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

Automation rules begin to fail after Assets new Arch

XMLWordPrintable

      Issue Summary

      Previously, with the old Assets Arch, users were able to send a web request via automation rules with the following custom payload:

      {
        "objectTypeId": "1234",
        "attributes": [
          {"objectTypeAttributeId": "56",
            "objectAttributeValues": [
              {
                "value": "{{ABC123}}"
              }
            ]
          }
        ]
      }
      

      Now, these rules are failing, and the error below is displayed in the Audit Logs:

      Unable to publish the web request - received HTTP status response:
      400
      Error found in the HTTP body response:
      {"errorMessages":[],"errors":{"objectType":"i18n.constraint.violation.ObjectTypeBean.Invalid.objectTypeId"}}
      

      It looks like, with the new arch, the objectTypeId has changed for some existing object types.

      Steps to Reproduce

      1. After migrating to the new Assets Arch, check if you have an automation rule that updates an Assets object via web request;
      2. On the Send web request > Custom data rule section, check if you are updating the objectTypeId of the object. You might see an objectTypeId with more than 2 digits, for example;
      3. If no changes were made to this rule and your Assets instance has been recently migrated, you should see in logs a HTTP 400 error, saying that the respective objectTypeId does not exist or was deleted.

      Expected Results

      The rules should be executed as expected, as with the old Assets Arch.

      Actual Results

      The rules are now failing and throwing this error in logs

      Unable to publish the web request - received HTTP status response:
      400
      Error found in the HTTP body response:
      {"errorMessages":[],"errors":{"objectType":"i18n.constraint.violation.ObjectTypeBean.Invalid.objectTypeId"}}
      

      Workaround

      As a workaround, double-check if the objectTypeId passed in the custom data is the actual ID for that object type. If not, replace it with the correct value and update the rule.

              Unassigned Unassigned
              rsilva@atlassian.com Rodrigo Silva
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: