Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation Copies Number Field data to Text Field but uses Scientific notation

Jason Krewson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2025

 

 

I am working on an integration between Monday and Jira. When sending the item key from Monday to Jira, it only adds to a Number field in Jira. The issue is that the Number field includes commas, so I set up Jira automation to move the data from the Number field to a Text field to remove the commas.

The automation is working and when the Number field is updated it updates the Text field like it should. However, the problem arises when the number is moved, it gets converted to scientific notation instead of remaining a plain number.

For example, the item number 8214112777 appears as 8,214,112,777 in the Number field. When the automation moves it to the Text field it shows as 8.214112777E9.

Is there a way to prevent this from happening and transfer the full number as is?

I have tried several different ways to try and fix this but they either stop the Text field from updating or don't correct the number format.

Rule: 

Monday field copy.png

Current JSON: 

{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{issue.customfield_10737}}"
  }
}

What I have also tried:

None of these worked, they either game me the same result, similar result, or didn't copy the field data at all, I asked AI to help with the issue and most of these are from that or community posts I found with related issues.

 

{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{issue.customfield_10737.asNumber}}"
  }
}
{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{issue.customfield_10737.asNumber.toString}}"
  }
}
{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{issue.customfield_10737.formatNumber("#")}}"
  }
}
{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{#=}}{{issue.customfield_10737}}|0"
  }
}
{
  "action": "editIssue",
  "fields": {
    "customfield_10265": "{{issue.customfield_10737|0}}"
  }
}

 

4 answers

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2025

Hi @Jason Krewson 

Rather than converting the number to text in another field, please try using the format() function on the number. 

Assuming your number field is customfield_10737, that would be this to send in the message / integration:

{{issue.customfield_10737.format("#")}}

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#format-input-

Kind regards,
Bill

1 vote
Shawn Doyle - ReleaseTEAM
Community Champion
February 5, 2025

Hi @Jason Krewson 

Sorry, your question was automatically marked as spam, that is weird.

This question from last year may shed some light on the problem.

https://community.atlassian.com/t5/Jira-Service-Management/The-problem-of-displaying-numbers-higher-than-6-digits-in-the/qaq-p/2448179

It looks like the solution was in this doc:  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

And the suggestion was to use the smart value: {{issue.FieldName.format}}

Hope that helps.

0 votes
Jason Krewson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2025

Thanks, I will look into this today and see if it works.

0 votes
Jason Krewson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2025

Thank you I will check these out today.

Suggest an answer

Log in or Sign up to answer