The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
That's my SIL script:
string[] CL_issues_K1;
string[] issues_K1 = selectIssues("\"SLA_1\" = breached() and created > startOfDay(-2)");
string[] CL_issues_K2;
string[] issues_K2 = selectIssues("\"SLA_2\" = breached() and created > startOfDay(-2)");
for(string iss in issues_K1){
CL_issues_K1 = createIssue("CL_SLA", "", 11604, %iss%.summary);
%CL_issues_K1%.customfield_15116 = "SLA_1";
%CL_issues_K1%.assignee = %iss%.assignee;
JSlaInformation[] slaInfos = getSlaInformation(iss);
for(JSlaInformation slaInfo in slaInfos){
JSlaOngoingCycle slaOC = slaInfo.ongoingCycle;
%CL_issues_K1%.description = "||KEY: |" + %iss%.key + "\n" + "||NAME: |" + slaInfo.name + "\n" + "||START: |" + slaOC.startTime + "\n" + "||END: |" + slaOC.breachTime + "\n" + "||TIME: (в минутах) |" + slaOC.goalDuration/60000 + "\n" + "||LEFT: |" + slaOC.remainingTime;
}
}
for(string is in issues_K2){
CL_issues_K2 = createIssue("CL_SLA", "", 11604, %is%.summary);
%CL_issues_K2%.customfield_15116 = "SLA_2";
%CL_issues_K2%.assignee = %is%.assignee;
JSlaInformation[] slaInfos = getSlaInformation(is);
for(JSlaInformation slaInfo in slaInfos){
JSlaOngoingCycle slaOC = slaInfo.ongoingCycle;
%CL_issues_K2%.description = "||KEY: |" + %is%.key + "\n" + "||NAME: |" + slaInfo.name + "\n" + "||START: |" + slaOC.startTime + "\n" + "||END: |" + slaOC.breachTime + "\n" + "||TIME (в минутах): |" + slaOC.goalDuration/60000 + "\n" + "||LEFT: |" + slaOC.remainingTime;
}
}
But for that issues in SLA_1 and SLA_2 i got only SLA_2 information. Why only SLA_2?
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events