How can I replace the value in a custom field with a mart Value ?

Robert Yataco January 21, 2022

Hi, 

I have a Custom Value (Number type)  but i want to format it for example like this "##,###,###.00", and for this I am using a Smart Value, and I got the smart value but I do not know how to assign the value to the custom field.

My Smart-value get the correct format number :

jira1.PNG

The smart definitions is :jira3.PNG

But I want to assign the value to a custom field, How can I do that?

 

Regards,

 

Robert

1 answer

0 votes
Vishwas
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.
January 22, 2022

Hey @Robert Yataco 

Welcome to Atlassian Community !!

Did you try adding one more action for edit custom field down the variable action in the automation rule and use the variable like this as a smart value ? {{VariableName}}

Please check this thread here if it is helpful https://community.atlassian.com/t5/Jira-Software-questions/Automate-Task-Creation/qaq-p/1565521

Regards,

Vishwas

Robert Yataco January 22, 2022

Hi @Vishwas 

 

Yes, but it reamins the same. I have added an action as you can see:

JiraFormat1.PNG

The detail in the action added is :

JiraFormat4.PNG

The smart value is "{{MontoFormateado}}", and I have selected the field "Monto Inversion" (the other name is customfield_10055) of the issue to be modified.

And I have an issue like this :

JiraFormat3.PNG

As you can see the amount is "4200" but I need to be "4200.00" , so I modify the amount issue to execute the automation and check the audit log:

JiraFormat6.PNG

And the value formatted is correct "4205.00", and the next action that modify the field is ok too, but when I check the issue in the list again, it is the same format:

 

JiraFormat5.PNG

It does not change to "4205.00" it remains "4205". 

Regards

Robert

Vishwas
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.
January 22, 2022

Hey @Robert Yataco 

I guess that decimal place is not coming for the field may be we have to once again give the format as mentioned here https://codebarrel.atlassian.net/browse/AUT-1591

like {{MontoFormateado.format("####.###")}}

But I wonder this is same as providing the customfield and format for the field that needs to be edited rather than passing the variable.

Regards,

Vishwas

Robert Yataco January 22, 2022

Hi, @Vishwas 

Now the action is :

JiraFormat8.PNG

But the result is the same. Is there any other way to format a Custom Field without passing the variable?

Regards

Robert

Vishwas
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.
January 23, 2022

Hey @Robert Yataco 

Did some research on this, what I tried is manually started editing the number field for a jira ticket. Since the number field is of floating point type it allows adding decimal values. Like 12.87 is displayed as 12.87 itself, but when we put 12.00 then it displays as 12 only even for 12.80 is displayed as 12.8

So looks like the last zeroes are being eaten up or ignored. It might be the defualt behaviour of Jira, as I am not finding any way to configure the trailing zeroes to be shown in the field.

I was going through this reported issue in atlassian feedback portal https://jira.atlassian.com/browse/JRASERVER-68854

It says the challenge you are facing, but for Jira Server variant. But my guess it could be the same behavior for Jira Cloud too.

 

Regards,

Vishwas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events