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.
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. |
...
Code Block |
---|
|
key in silJQLList("commented.sil", TEST, 2w, admin) |
Code Block |
---|
|
string [] keys = selectIssues("project = " + argv[0]);
string [] ret;
for(string k in keys) {
number [] commentIds = getAllCommentIds(k);
if(size(commentIds) != 0) {
for(number id in commentIds) {
JComment comment = getCommentById(id);
if(userInGroup(argv[1], comment.updatedBy)) {
ret += k;
}
}
}
}
return ret; |
This script would return issues that were last updated by users that belongs to the given group.
Code Block |
---|
|
key in silJQLList("lastUpdated.sil", TEST, jira-administrators) |
Find issues by worklogs
If we want to find the issues where work had been logged by a specified user. We can do this by using silJQLExpression:
Code Block |
---|
|
key in silJQLExpression('size(getWorklogIdsForUser("user", key)) != 0', 'project = TEST') |
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') |