-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Low
-
Component/s: Rule - Smart Values
-
None
-
Minor
Issue Summary
The smart value function replaceAll will not work with custom fields.
Steps to Reproduce
- Create an automation rule with an edit issue action, selecting a custom field.
- Attempt to update a custom field (short text) using the following smart value function or similar (this example removes all text within brackets):
issue.<custom_field>.replaceAll("(.*?)","") - Nothing is captured and updated.
This works for system fields but not text fields tested working with:
issue.summary.replaceAll("(.*?)","")
Expected Results
The custom field value should be updated with the custom field value after manipulation via the smart value function.
Actual Results
Nothing is captured and updated.
Workaround
I was able to successfully workaround this by creating a variable called <custom_field>ValueVar with the following value:
{{issue.<custom_field>}}
And then performing the replace function on the variable instead:
{{<custom_field>ValueVar.replaceAll("\(.*?\)","")}}
More information about creating variables here - Automation for Jira - Create variable (New component)