Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Get different SLA information

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?

0 comments

Comment

Log in or Sign up to comment