The smart value function replaceAll will not work with custom fields.

XMLWordPrintable

    • Minor

      Issue Summary

      The smart value function replaceAll will not work with custom fields.

      Steps to Reproduce

      1. Create an automation rule with an edit issue action, selecting a custom field.
      2. 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("(.*?)","")
      3. 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)

            Assignee:
            Unassigned
            Reporter:
            Adam Wood
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: