I'm trying to convert a custom field of type "text field" into integer with the following approch:
<!-- @@Formula: Integer.parseInt(issue.get("customfield_10328")) -->
Then I got the following error message:
Thanks & regards,
This is probably because your customfield_10328 can sometimes have a null value. So you should test against null values before converting to int:
issue.get("customfield_10328")==null ? 0 : Integer.parseInt(issue.get("customfield_10328"))
Just to answer the question then, what this is saying is that there exists no function called "parseInt" that accepts a double as its only parameter.
A few ways to get around this is to cast the Double to an Integer:
Or run toString() on the Double (make sure it's not null!) and then pass that to Integer.parseInt:
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
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