On this page:
...
With the introduction of version 4.0, we unlocked a very powerful mechanism to search your issues, in ways you never believed possible. Here is our guide on how to build your searches.
Info | ||
---|---|---|
| ||
Before you start to create your JQL functions check out the JQL Support. |
Warning | ||
---|---|---|
| ||
For performance reasons, put there a filter that keeps the potential number of matching issues as low as possible. Remember that running a script over an issue is more complex than simply comparing values. |
...
If we want to find the issues where work had been logged by a specified user. We can do this by using silJQLExpression:
...
Also, we can use this JQL to find the issues where work had been logged on a given date:
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('size(getWorklogIds("2017-03-16", key)) != 0', 'project = TEST') |
...
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('size(linkedIssues(key, "Relates")) != 0', 'project = TEST') |
To find all the issues that are blocked by issues with status "To Do" we could use:
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('size(linkedIssues(key, "Blocks", 1)) != 0', 'project = TEST') and status = 'To Do' |
If we want to search for the linked issues whatever the link type with resolution "Done" :
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('size(linkedIssues(key)) != 0', 'project = TEST') and resolution = Done |
...
Find issues by comparing dates
To search for issues that were resolved after the due date:
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('resolution > dueDate', 'project = TEST') |
To find issues that were updated within one week after being created:
Code Block | ||
---|---|---|
| ||
key in silJQLExpression('updated < created + "1w" ' , 'project = TEST') |
...