Hi All,
The fields have to be called: "Calculated business value" and "Calculated technical value" and they have to be scripted fields.
The logic for these scripted fields is as follows:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
For the "Calculated business value" field, you have to add the values of the following fields:
>Revenue & Monetization
>Customer Experience
>Efficiency Impact
>Priority
Currently these fields have values in a drop-down list that goes from P1 to P5, to make the sum of the 4 fields we have to take into account that each PX has the following value:
>P1 = 8
>P2 = 5
>P3 = 3
>P4 = 2
>P5 = 1
>None = 0
Illustrative example: If "Revenue & Monetization" is worth "P1 - Huge Impact", "Customer Experience" is worth "P2 - High Impact", "Efficiency Impact" is worth "P3 - Medium Impact" and "Priority" is worth "P5 - Minor Impact", then We would have a sum of 8+5+3+1 and the value of the field "Calculated business value" would be 17.
Can you please help me this.
Welcome to the Atlassian Community!
https://library.adaptavist.com/entity/populate-a-scripted-field-with-the-sum-of-all-values-added-or-updated-in-a-number-field does the basics of what you need.
But, the field you are reading the values from will need to be calculated, not just read.
I'm assuming your source field is a select list (drop-down). When you use getCustomFieldValue() on a select list, you will get an "option" object from it, which you will need to translate. For this script, you should be able to do stuff like
def read-field = issue.getCustomFieldValue("my field").getName()
def px = 0
if ("P1".equals (read-field) ) then px = 8
if ("P2".equals (read-field) ) then px = 5
and so on.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.