It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
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:
I'm using Jira V4.3.3 and jira-misc-custom-fields-1.1.2. I'm new in Jira and Javascript, so sorry if the question seems to be stupid... ;)
Thanks & regards,
Yunzhu
Thanks for your answer, i've already tried this but it dosen't work, so i used the simplest instruction to test. When i try the above code, i got this:
So is it means that i got a problem with my library or somthing like that?
I tried with a custom field of type integer and instead of "Method Invocation" I got the following error:
Finally I will abandon this idea, in fact we are not allowed to install any plugin in our Jira system... Thank you anyway for your help!
Nothing else on the screen except for "Method Invocation Integer.parseInt".
Finally I will abandon this idea, in fact we are not allowed to install any plugin in our Jira system... Thank you anyway for your help!
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:
(Integer)(issue.get("customfield_10328"))
Or run toString() on the Double (make sure it's not null!) and then pass that to Integer.parseInt:
Integer.parseInt(issue.get("customfield_10328").toString())
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreAtlas 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 groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.