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

Align the way values are presented for Assets custom fields between issue create and issue edit events

    • 3
    • 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.

      Background

      Referencing an Assets custom field following a trigger for an issue created event behaves different to when an Assets custom field is called in a trigger where an existing issue is edited, such as Field value change configured with Edit issue.

      One such example is the {{addedfieldChange.values}} smart value (see the documentation on the fieldChange smart value for further information).

      However this smart value behaves different depending on the trigger configuration. When an Assets custom field triggers the Edit issue configuration, the value is represented as the object label. An example can be seen below:

      However, using the Create issue configuration, instead of the object label, the system uses a JSON payload of the Assets workspace id and the object id:

      The ask

      Ideally both trigger configurations should work in the same way and should be consistent.

      Workaround

      Within the rule a few additional components can be added to retrieve the desired object data:

      1. Create a variable that we can call objectId
      2. For the variable smart value section we can use match() to extract the object id value: {{addedfieldChange.values.match(".*objectId=(\d+)")}}
      3. Using the Lookup objects action, we can retrieve the object using the following AQL: objectId = {{objectId}}
      4. We can now access the object data in the automation rule via {{lookupObjects}}

        1. create_issue.png
          create_issue.png
          121 kB
        2. edit_issue.png
          edit_issue.png
          114 kB

            [JSDCLOUD-15291] Align the way values are presented for Assets custom fields between issue create and issue edit events

            It is not only addedfieldChange.values affected. But all properties of addedfieldChange.

            Issue Create / addedFieldChange:

            FieldValueDifference{field=customfield_10165, fieldType=, fieldId=customfield_10165, valueIds=[

            {workspaceId=removed, id=removed objectId=removed]}

            , values=[\{workspaceId=removedremoved, objectId=removed}]}

            Issue Update / addedFieldChange:

            FieldValueDifference{field=Business Service, fieldType=null, fieldId=com.atlassian.jira.plugins.cmdb:cmdb-object-cftype, valueIds=[globalIdremoved], values=[some asst name]}

            This makes working with this smart variable inconsistent and possibly unreliable. Please fix this bug... This should not be considered a suggestion / feature request!

            Markus Zeiler added a comment - It is not only addedfieldChange.values affected. But all properties of addedfieldChange. Issue Create / addedFieldChange: FieldValueDifference{field=customfield_10165, fieldType=, fieldId=customfield_10165, valueIds=[ {workspaceId=removed, id=removed objectId=removed]} , values= [\{workspaceId=removedremoved, objectId=removed}] } Issue Update / addedFieldChange: FieldValueDifference{field=Business Service, fieldType=null, fieldId=com.atlassian.jira.plugins.cmdb:cmdb-object-cftype, valueIds= [globalIdremoved] , values= [some asst name] } — This makes working with this smart variable inconsistent and possibly unreliable. Please fix this bug... This should not be considered a suggestion / feature request!

              Unassigned Unassigned
              f189ef36d400 Andras M.
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: