Dear community
I have a question regarding Jira Automation for Jira Data Center.
Current Situation
In order to prioritize Epics we use Weighted Shortest Job First (WSJF). Until now we calculated it this way:
In this situation we always need to manually transition to a certain status in order to run the groovy script.
wsjf = (issue.get("customfield_10005") // Business Value
+ issue.get("customfield_14804") // Time Criticality
+ issue.get("customfield_14805") // Riks or Opportunity
) / issue.get("customfield_10004") // Story Points
issue.setFieldValue("customfield_14806", wsjf)
issue.setFieldValue("Resolution", null)
Expectation
As this manual step is annoying and sometimes takes a lot of time I wanted to add an automation to our project so that every time one of the 4 custom fields value has been changed, the 5th field "WSJF" is automatically updated.
I tried doing it by changing the groovy script to a json object and add it to the action "Edit issue" but it does not work.
Any proposals how you would solve that?
Thanks a lot!
Hello @Karin Biedermann,
Create a rule with the trigger Field value changed and the action Edit issue. Add the following line for calculating the field WSJF:
{{issue.customfield_10004|0}} + {{issue.customfield_10005|0}} + {{issue.customfield_14804|0}} + {{issue.customfield_14805|0}}
By adding "|0", you specify the default value if a field is empty. Here's the example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your fast response.
Unfortunately it does not work in my case.
I get the following error message
But I checked again. The issue ID for risk or opportunity is correct.
Would you know if I missed something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this:
({{issue.customfield_10005|0}} + {{issue.customfield_14804|0}} + {{issue.customfield_14805|0}}) / {{issue.customfield_10004|0}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.