Jira Newbie here:
Working in a form, there is a number field (Display Name "Amount") that is linked to a Custom Field (also a number field. Field Name is "Wire Amount").
When a number entry is made to the Amount field, I am attempting to format it to a currency display value such as "$123,456.78"
The first thing I find odd is when I configured the custom field and selected it to be a number, I did NOT have a "dropdown option" to select currency as a value as Jira instructions state (see screenshot). When I attempt entering any number in the default value of the custom field, I get an error (also attached).
I attempted this automation as a workaround:
When: Work Item created
Range is 'A, B, C, or D' (<--these are radio button selections for different criteria)
Then: Edit work item fields
Chosen Field to set: Wire Amount
From here I have tried numerous JSON entries and all either produce an error, or, come back with "No Actions Performed" in the Rule's audit log.
Some attempted entries are:
{{issue.Wire_Amount.asCurrency("en_US")}}.
{{issue.Wire_Amount}} $
{
"fields": {
"customfield_XXXXX": "1234.56"
}
}
I welcome any and all suggestions. Thanks!
Welcome to the community.
You can set a default for the field that is not a number.
In your automation, do a re-fetch action before doing the edit action on converting the number to currency.
Then you will need to have a text custom field where automation can set the number value as currency
So this field needs to be on the screen.
Then edit this field in the automation, like {{issue.<text-custom-field>.asCurrency("en_US")}}
So my linked custom field needs to be edited to a text field? Or are you meaning I need to create a new, separate custom field as text and add to the screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I attempted inserting the re-fetch between drawdown range and edit work item. The rule now states 'success' in the audit log.....but the field isn't updated at all. Still displaying without currency format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.