JJupin SIL - selectIssues not finding issues

I'm trying to automate our fortnightly version cycle and as part of that I need to find all the issues still actively assigned to the version.  I've created a SIL script to run fortnightly, but everytime I try and run the script nothing is returned.

To find the issues I'm using selectIssues, which I understand takes a JQL string and returns an array of issue keys.  However it doesn't seem to be returning anything.  If I run the same JQL manually then I get a list of about five Issues.

Here's a stripped down version of the code:

// Find selected Issues
logPrint("WARN", "Check projects for Sprint End");
string[] projectList = {"TES"};
string updateJQL = "fixVersion = earliestUnreleasedVersion() AND status in (Ready, Doing, 'Under Review') AND project = ";
for(string curProj in #{projectList}) {
    string jql = updateJQL + curProj;
    string[] sIssues = selectIssues(jql);
    logPrint("WARN", "Ran " + jql + " Found: " + sIssues);
    for(string iss in sIssues) {
        logPrint("WARN", "\tIssue: " + iss);
    }
}

When I run it the output I get is:

Check projects for Sprint End

Ran fixVersion = earliestUnreleasedVersion() AND status in (Ready, Doing, 'Under Review') AND project = TES Found:

I've tried simplifying the JQL to 'Status = Doing' but I'm still getting nothing back.

 

What am I missing?

1 answer

Never mind - it works fine if triggered by the SIL Listener rather than the SIL Scheduler so it's obviously a bug.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 5 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

27 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you