Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-13045

Provide a way to Append Values to existing Values in an Assets Object Attribute via Actions in Automation

XMLWordPrintable

    • 59
    • 11
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      There is not a way to easily append values for Assets Object Attributes via Automation.

      Suggested Solution

      Have an Append Option on an Object Attribute in Actions like the Edit Object Action.

      Alternatively, have the input to these Attributes parse correctly when provided a list of Object Keys or IDs, such as something like:

      {{issue.AssetsCustomField}}, {{object.Attribute}}
      

      Where the above would render to something like:

      ABC-123, ABC-124

      And would set the Value of the Attribute to the provided Objects (in this case, ABC-123 & ABC-124).

      Workaround

      This article provides a workaround using the Send Web Request Action:

      An alternative, more easily approachable workaround is to use a combination of Create Variable Action & the .split Function.

      In Automation Rules, Smart Values have Types. Those can be reviewed here:

      The Create Variable Action creates a String. Using something like this:

      {{issue.AssetsCustomField}},{{object.Attribute}}
      

      Will create a text String like this:

      ABC-123,ABC-124, ABC-125,ABC-126
      

      Where the first 2 Keys are from the first Smart Value, and the second 2 Keys are from the second Smart Value.
      Then, we can take this new Smart Value created by this Action and convert it to a List like so:

      {{createdVariable.replace(", ",",").split(",")}}
      

      The .replace is necessary to remove the extraneous space. This will produce a List, which is what the Edit Object Action needs when setting Object Attribute Values.

      And with that, we can append values without the Send Web Request Action.
      We could even remove values using other Text String Smart Value Functions in the middle of the process as well.

              Unassigned Unassigned
              992127aa63ec Payden Pringle (Inactive)
              Votes:
              75 Vote for this issue
              Watchers:
              34 Start watching this issue

                Created:
                Updated: