Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This script is used in silJQL to return a list of all issues that meet You want to filter issues based on two or more criteria. This can not be done However, this can’t be achieved by using the normal typical boolean operators in standard JQL.

Enter the below silJQL script to display a list of all issues that meet your preferred criteria.

Html bobswift
<iframe width="560" height="315" src="https://www.youtube.com/embed/WFcGuqRMiC4" frameborder="0" allowfullscreen></iframe>

Example

...

usage (JQL query)

Code Block
key in silJQLList("silJQL_FindTwoOrMoreCriteria.sil", PROJ)

Script

Code Block
string [] keys = selectIssues("project= " + argv[0]);
string [] ret;

for(string k in keys){
    int criteriaCount = 0;
    
    if(arrayElementExists(%k%.labels, "criteria")) {
        criteriaCount ++;
    }
    if(%k%.assignee == %k%.reporter) {
        criteriaCount ++;
    }
    if(isNull(%k%.desc)) {
        criteriaCount ++;
    }
    if(arrayElementExists(%k%.components, "JIRA")) {
        criteriaCount ++;
    }
    if(%k%.priority == "Major") {
        criteriaCount ++;
    }
    
    if(criteriaCount >=2) {
        ret += k;
    }
    
}

return ret;