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

API integration not respecting processing rules cascading

XMLWordPrintable

      Issue Summary

      When using the integration alert endpoint, only the "Create alert" processing rule is being matched.

      Example: If you send an API call with a valid "alias" value (from an open alert), and you don't match the conditions to the "Create alert" rule, the "Close alert" doesn't match.

      We can use different API endpoints for the different actions, but this renders the processing rule actions cascading not functional when using only the "alias" value and alert conditions to perform different actions.

      Steps to Reproduce

      1. Using an API integration, set a specific condition to the "Create alert" rule and then match all remaining alerts for the "Close alert" action (you can also set a specific condition for the "Close alert" rule).
      2. Create an alert using an API integration.
        curl --location 'https://api.atlassian.com/jsm/ops/integration/v2/alerts' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: GenieKey XXXXXXXX' \
        --data '{
          "message": "This is an alert.",
          "alias": "123",
          "description": "This is an alert.",
          "details": {
            "state": "down"
          }
        }'
        
      3. Try to send an API call using the same "alias" value, that should close (or perform other actions) the open alert.
        curl --location 'https://api.atlassian.com/jsm/ops/integration/v2/alerts' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: GenieKey XXXXXXXX' \
        --data '{
          "message": "Trying to close alert.",
          "alias": "123",
          "description": "Trying to close alert.",
          "details": {
            "state": "up"
          }
        }'
        

      Expected Results

      The integration respect the processing rules cascading, skip the "Create alert" rule and process the "Close alert" rule.

      Actual Results

      The API call doesn't match any action.

      Workaround

      Use the "Close alert" endpoint. This workaround would require storing the "alert ID" somewhere to be used in future actions. But this is not ideal, in some cases the external system only sends alerts with the custom "alias" value, and can't store the "alert ID" for future actions.

      When using the "Close alert" endpoint, processing conditions are taken into consideration (if used), so the problem is not in identifying any processing conditions, but rather the cascading from the different actions.

        1. error.png
          error.png
          20 kB
        2. integration.png
          integration.png
          68 kB

              Unassigned Unassigned
              6866bc1ee70f Rodrigo Henrique (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: