Iam adding 3 custom filed values and dividing with another custom filed value. It is working with dividing by lower value, but not with higher value.
Adding cf1+cf2+cf3 and assigning the value to an integer variable "number".
Ex - If the sum of cf1+cf2+cf3 is 6. If the cf4 value is 3, then works fine. If the sum of 3 variables are lesser , then it returns 0.0. Can you please help to fix this.
double a = 0;
Object cf1 = issue.get("customfield_10203");
Object cf2 = issue.get("customfield_10204");
Object cf3 = issue.get("customfield_10205");
Object cf4 = issue.get("customfield_10207");
int number = ((cf1 != null ? Integer.parseInt(cf1.toString()) : 0 )) +
((cf2 != null ? Integer.parseInt(cf2.toString()) : 0 )) +
((cf3 != null ? Integer.parseInt(cf3.toString()) : 0 )) ;
a=number/((cf4 != null ? Integer.parseInt(cf4.toString()) : 0 )) ;
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs