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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,634
Community Members
 
Community Events
184
Community Groups

Inconsistent Power Script behavior when updating a custom field from events

I am running a Power Script to update a calculated field when issues are updated or created. 

Somehow my updates are overridden by power script, not sure if something is missing in the configuration, but the updates sometimes are really quick and sometimes takes minutes to complete.

See the sequence of updates here:

robolucha-power-scripts-issue-2020mar15.png

 

Updated the script to add some comments and still sometimes the update is quick and sometimes takes minutes, anybody experienced something like this before?

Here is the code I am running: 

/*
update WSJF Score with values from:

Design Business Value
Product Business Value
Story point estimate
*/

number design = 0;
number product = 0;
number points = 1;
number score = 0;

if( isNotNull(%key%.#{Design Business Value}) ){
design = %key%.#{Design Business Value};
}

if( isNotNull(%key%.#{Product Business Value}) ){
product = %key%.#{Product Business Value};
}

if( isNotNull(%key%.#{Story Points}) ){
points = %key%.#{Story Points};
}

score = round((design+product) / points, 1);

string message = "WSJF Score updated with: " + score + ", [design=" + design + ",product=" + product + ",points="+ points + "]";
logPrint("WARN", message);

addComment(key, currentUser(), message);

%key%.#{WSJF Score} = score;

1 comment

Hello Hamilton,

Please create a support ticket so that we can assist you further with your script.

https://jira.cprime.io/servicedesk/customer/portal/2/create/13

Regards,

Hyrum Steffensen

Product Engineer, Power Scripts - Cprime

Comment

Log in or Sign up to comment