Text field value conversion to Numbers

Muhammad Akram Sharifi May 20, 2022

Hi Everyone, 

I am working on a Event based postfunction, I have some field to calculate and place the result on the other field.

on the event based action I have 3 fields as under:-

Field Name                                            Type

Contract ACV:                                  Number field

Amount ACV Realized:                      Number field

Result of Realized %:                         Text field

post function is set to: set value of “Result of Realized %”

{{ (issue.fields["Amount $ ACV Realized"]*100)/issue.fields["Contract ACV"]}}%

adding inputs to the fields

contract ACV = 1500

amount ACV Realized = 152

Result of Realized % =10.333333333333%

Here as the result field is Text type field I want the “Result of Realized%” to be rounded up I have tired

{{issue.fields["Result of Realized%"].asNumber|round}}

this function didnt worked for me. 

I appreciated your inputs. 

 

1 answer

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2022

Hi @Muhammad Akram Sharifi 

did you try .round instead of |round as described in the following documentation:

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

Best
Stefan

Muhammad Akram Sharifi May 26, 2022

I have figured it out i will share with you thanks for suggestion

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2022

Hi @Muhammad Akram Sharifi 

Would you be so kind to share your solution and/or consider to accept the answer in order to mark this issue as resolved and make it easier for other users to find the solution?

Best
Stefan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events