Hi, apologies if this is a noob question.
I've been able to get the Calculated Number field to work based on the below, where 3 select custom field values are multiplied and added together.
@Formula:
((issue.get("customfield_1") != null ? Integer.parseInt(issue.get("customfield_1").toString()) : 1 ) * 10) +
((issue.get("customfield_2") != null ? Integer.parseInt(issue.get("customfield_2").toString()) : 1 ) * 45) +
((issue.get("customfield_3") != null ? Integer.parseInt(issue.get("customfield_3").toString()) : 1 ) * 30)
-->
What I would like to do now is use an IF statement (based on a value of another select custom field) to process one calculation (eg. value = RED) and process another calculation (eg. value <> RED).
Both sets of calculations would be almost identical except RED would be as per above and all other values would see calculations at twice the multiplication factor.
@Formula:
((issue.get("customfield_1") != null ? Integer.parseInt(issue.get("customfield_1").toString()) : 1 ) * 20) +
((issue.get("customfield_2") != null ? Integer.parseInt(issue.get("customfield_2").toString()) : 1 ) * 90) +
((issue.get("customfield_3") != null ? Integer.parseInt(issue.get("customfield_3").toString()) : 1 ) * 60)
-->
How can this be achived? Thanks