I would like to compare 5 fields (custom fields - select list (single choice)) in an issue and write the highest value or these 5 fields (only values 1-6 can be selected) in another custom field (also a single-choice field).
Can this be done with Jira Cloud Automation and how?
Hi @Claudia Hossmann, you might use the smart value math function MAX() for this.
The principle is like this:
{{#=}}MAX(1, 2, 3, 4, 5, 6){{/}}
Adding this to the automation e.g. like this:
will return 6 as seen here
So, you can the use MAX(e,1,e2, ...) mentoined at the end of this page Automation smart values - math expressions | Cloud automation Cloud | Atlassian Support
Replace 1,2,3, etc with your custom fields, like this example:
{{#=}}MAX(
{{My customfield A}},
{{My customfield B}},
{{My customfield C}},
{{My customfield D}},
{{My customfield E}})
{{/}}
Edit this code to match your field names, and paste it into an Edit issues fields action as shown here, where I used the summary field (replace summary with your "result field"):
TimK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.