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:
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;
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Improve user experience across Jira with global settings
Learn how to set up and configure a Jira site, manage Jira permissions, and configure Jira apps and integrations.
Learning Path
Streamline projects across Jira with shared configurations
Build Jira work items with reusable configurations called schemes, and reduce administrative work with automation.
Learning Path
Become an effective Jira software project admin
Set up software projects and configure tools and agile boards to meet your team's needs.