Object AQL rest endpoint called too many times during servicedesk request

XMLWordPrintable

    • 8
    • Minor
    • 17

      Issue Summary

      Making a POST request to /rest/servicedesk/request with an Assets Custom Field, it calls the api/v1/object/aql 4 times.

      This also includes setting an asset custom field via automation.

      Steps to Reproduce

      1. Create an Assets schema
      2. Add some objects to the Assets schema
      3. Create an Assets Custom Field to use the Assets schema (with the objects). Make it a singular value for now - you can try to add more Assets fields/multi valued later
      4. Assign the Assets custom field to a request type
      5. Use cUrl or Postman to do a POST request to /servicedeskapi/request and set the Assets custom field values in the body of the request

      Expected Results

      object/aql endpoint should be called once per custom field

      Actual Results

      Additional 3 calls to the object/aql endpoint are done (totalling 4 calls)

      Workaround

      Using Jira API instead of serviceDeskApi reduces the number of calls made to object/aql.

      Example of call to update an issue setting an asset customfield:

      curl --request PUT \
        --url 'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}' \
        --user 'email@example.com:<api_token>' \
        --header 'Accept: application/json' \
        --header 'Content-Type: application/json' \
        --data '{
        "fields": {
          "customfield_99999": [
            {
                "workspaceId": "9a9999a-a999-9999-a999-a99a9aa99a99",
                "id": "9a9999a-a999-9999-a999-a99a9aa99a99:99"
            }]
        }
      }'
      

      Notes

      This also works in automation. Instead using the "Edit issue" action. Add a send web request with Jira API to fill an asset customfield.

              Assignee:
              Rajesh Jha
              Reporter:
              Matthew Saliba
              Votes:
              10 Vote for this issue
              Watchers:
              21 Start watching this issue

                Created:
                Updated: