Skip to end of banner
Go to start of banner

Filter on number of fulfilled criteria

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

This script is used in silJQL to return a list of all issues that meet two or more criteria. This can not be done using the normal boolean operators in standard JQL.

Example Usage (JQL query)

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

Script

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;
  • No labels