Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1052

A4J always searches objects by "Name" attribute in Edit Issue action for Assets Custom fields

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      While trying to choose the Assets Object in an Automation Rule configuration, the object search is always done with the "Name" attribute:

      https://<JIRA>/rest/insight/1.0/iql/objects?iql=objectTypeId=51%20and%20Name%20like%20XXX
      

      However, if the object does not have a "Name" attribute the search fails to find the object.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a sample schema with an Assets object custom field
      2. Rename the default "Name" attribute to something else e.g., "Renamed Name"
      3. Try to create an A4J automation rule by selecting the Edit Issue action > Choose the Assets CF > search for one of the objects

      Expected Results

      A4J should search for the object by label and not specific/modifiable attribute like "Name" and the search result should return objects being searched for.

      Actual Results

      A4J searches for the typed string in the Name attribute even though the Attribute with that name doesn't exist and hence cannot find the objects:

      Workaround

      Instead of choosing the object from the dropdown, use the JSON payload method in order to set the value (examples here)


      Payload in text:

      {
          "update" : {
              "customfield_10304" : [{"set": [{"key" : "SAMITSM-18"}]}]
          }
      }
      

        1. 2024-08-06_18-01-24.png
          510 kB
          Suddha
        2. 2024-08-07_08-14-34.png
          48 kB
          Suddha
        3. 2024-08-07_08-14-51.png
          53 kB
          Suddha
        4. 2024-08-07_08-33-16.png
          49 kB
          Suddha

              9e460d4f5ba4 Shreyans Jain
              smitra2@atlassian.com Suddha
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: