Description
Issue Description
The value changed trigger generates odd behaviour when evaluating the smart values fieldChange.toString on issue creation, whereas on issue updated the behaviour is correct.
Steps to replicate
- Create a new custom field (for example, a select list field)
- Create a new automation rule as follows:
- Try to set the value of the custom field using the 2 method below
- Method 1: Create a new issue issue and set the custom field value on the create issue screen
- Method 2: Create a new issue (without setting the value yet). After the issue is created, set the field to a value from the View issue or Edit issue screen
Expected results
The automation rule should work successfully with both methods, and the new field value should be copied over to the other field
Actual Results
The automation fails with Method 1.
Instead of getting the proper value, the smart value fieldChange.toString returns a full JSON payload and the automation rule fails with the following error:
Could not convert the field value to a number. Please ensure the value is a number, math expression or smart-value that can be converted into a number.
Story Points: {self=http://localhost:8081/jira8201/rest/api/2/customFieldOption/10503, value=5, id=10503, disabled=false}
Workaround
Instead of using fieldChange.toString in the Edit Issue action, use issue.customfield_XXXXX, as shown in the screenshot below:
To get the ID of the custom field, go to ⚙ > Issues > Custom Fields, try to configure the custom field and get the ID from the URL in the browser.
Attachments
Issue Links
- was cloned as
-
AUTO-1232 The FieldChange smart value does not resolve correctly on issue creation
- Closed