I am trying to auto populate a number field from a custom text field on transition using automation.
I have a custom text field that holds a hexadecimal value, which I would like to convert to decimal value and populate that in to a number field when transitioning the state from any-state to "done".
I am able to read the string from the custom-text field using automation but am unable to change the format to decimal
tried using field.asNumber.format option, but its not working (changes value to None)
Example value in text field - 0xA
Expected value in number field - 10
How can I achieve this during the automation?
Hi @sreeram_anikodemahadevan -- Welcome to the Atlassian Community!
You may force the conversion by adding the hexadecimal value to 0 in a math expression, like this:
{{#=}}0+{{issue.MyHexField}}{{/}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy how do we do the other way around as well?
I doing a math on the HEX field and writing to another field. The resulting number always ends up in decimal.
How do I convert the decimal to hex?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was not able to find support for that in automation rules, such as with the format() function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So that would be a no go then.
Any other thoughts on converting an integer to hexadecimal?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Before doing this, my question would be: what problem is this solving?
Some workarounds I can think of are:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a list of stories with requests for getting assigned with a sequentially progressing hexadecimal number.
When the issue get approved I would like the automation to look at the last assigned hex number increment it by '1' and update the issue which got approved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.