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

Add ability to reference Assets Custom Fields using labels or other unique attribute values via the REST API

XMLWordPrintable

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

      Issue Summary

      Currently, the only way to reference an Assets custom field is by its key, but if its key is not known and its label is, there is no easy way to do this without extra lookups to find search for objects to find the key. The same limitation is applicable for any other Assets attribute that is unique and could be distinctively used to address the Assets object.

      Actual behaviour:

      example:

      curl -D- -u username:password -X POST -H 'Content-Type: application/json' --data '
      {
        "serviceDeskId": "1",
        "requestTypeId": "1",
        "requestFieldValues": {
          "summary": "Request JSD help via REST",
          "description": "I need a new mouse and keyboard,
          "customfield_xxxxx" : [{"key" : "XXX-1"}]
        }
      }' <JIRA BASE URL>/rest/servicedeskapi/request

      Expected behaviour:
      We'd like an easier method to just specify the label or some other unique attribute like this:

      curl -D- -u username:password -X POST -H 'Content-Type: application/json' --data '
      {
        "serviceDeskId": "1",
        "requestTypeId": "1",
        "requestFieldValues": {
          "summary": "Request JSD help via REST",
          "description": "I need a new mouse and keyboard,
          "customfield_xxxxx" : [{"label" : "Sales Laptop"}]
        }
      }' <JIRA BASE URL>/rest/servicedeskapi/request

      Workaround

      Required, if there is no workaround please state:
      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              f973680a41c6 Kalpa Pushpakumara (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: