Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-68498

The more post-functions to fire webhooks we add on a specific transition, more likely it can break notifications

    XMLWordPrintable

Details

    Description

      Summary

      This BUG occurs in a very specific scenario. If we add a post-function to trigger a custom webhook, the 'system' webhook which is also triggered intermittently doesn't contain changelog information. The custom webhook is apparently not affected.

      The broken webhook in question can be verified using the Cloud Inspector tool.

      The more post-functions to fire webhooks we add, more likely the transition will not trigger a notification in add-ons that need the changelog information that is sent along with the webhook payload. The information related to the changelog won't be found on the webhook JSON payload.

      Please note that this information won't be available on webhooks fired by default by the system. It seems that they are not the same as the regular webhooks that are fired by JIRA (AO_4AEACD_WEBHOOK_DAO). We can only see this when using the connect-inspector to monitor the webhooks fired: https://connect-inspector.prod.public.atl-paas.net/page/start

      Steps to Reproduce

      1. Install the connect-inspector in a test instance - https://connect-inspector.prod.public.atl-paas.net/page/start
      2. Create a workflow that has a transition setup exactly like the following:
        • With a screen associated
        • With at least two post-functions to trigger regular webhooks - Send transition to webhook: YourWebhook
      3. Start to add more post-functions to trigger other webhooks one by one and transition the issue while monitoring the payload catch by the connect-inspector
      4. At some point, the connect-inspector will show that no data regarding the changelog information is being recorded on the JSON payload.

      E.g.:

      Expected Results

      The JSON payload should contain this kind of information when the issue is transitioned, no matter how many post-functions are triggering webhooks:

      "changelog": {
          "id": "966624",
          "items": [
            {
              "field": "resolution",
              "fieldtype": "jira",
              "fieldId": "resolution",
              "from": "10000",
              "fromString": "Done",
              "to": null,
              "toString": null
            },
            {
              "field": "status",
              "fieldtype": "jira",
              "fieldId": "status",
              "from": "10104",
              "fromString": "Completed",
              "to": "3",
              "toString": "In Progress"
             }
          ]
        }
      }
      
      JSON end
      
      

      Actual Results

      The webhook payload that is sent to add-ons for consumption will not have the changelog information:

      ...
      
      "customfield_13900": null,
            "customfield_15802": null,
            "customfield_13902": null,
            "customfield_15803": null,
            "customfield_13901": null,
            "comment": {
              "comments": [],
              "maxResults": 0,
              "total": 0,
              "startAt": 0
            }
          }
        }
      }
      
      JSON end
      
      

      As we can see above, the JSON ends without having information about the changelog.

      Notes

      This is known to cause at least this problem:

      • Add-ons like Slack rely on the changelog information to display a notification on a channel about the issue being transitioned.

      Attachments

        Issue Links

          Activity

            People

              ohookins@atlassian.com Oliver Hookins (Inactive)
              rdasilva@atlassian.com Renan da Silva (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: