Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67860

WebHook JQL should be checked upon transition completion

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.11.2
    • Webhooks

    Description

      Summary

      At the moment, Issue Updated event is listened by a WebHook when:

      1. An issue is updated (Issue Updated) either in Edit Issue screen (clicking the Edit button) or in View Issue screen (inline-update)
      2. An issue is transitioned (Issue Transitioned)

      If a WebHook is configured with a JQL, currently the JQL is checked when:

      1. For Issue Updated, after the issue is updated
      2. For Issue Transitioned, when the transition button is clicked, or before the post-functions are executed

      This causes some confusion and/or unexpected behaviors, and some requirements can't be achieved.

      Scenario / Steps to reproduce

      1. Create a Select List custom field named Counter with 2 options: One and Two
      2. Add the field to a Transition screen and all Create/Edit/View Issue screens of project ABC
      3. Create a WebHook with this configuration:
        • JQL:
          project = ABC and Counter = Two
        • Events: Issue Updated only
      4. Create an issue ABC-1 and ensure its Counter value is not Two

      Scenario 1 - Issue Updated

      1. Edit the field Counter either inline or in Edit Issue screen for ABC-1 -> Set its value to Two
        The WebHook is triggered as expected.
      2. Edit the field Counter either inline or in Edit Issue screen for ABC-1 -> Set its value to One (or None)
        The WebHook is not triggered.

      Scenario 2 - Issue Transitioned (the opposite behavior)

      1. When Counter is not Two, transition ABC-1 and set Counter to Two on the transition screen -> Complete the transition
        The WebHook is not triggered as expected.
      2. When Counter is Two, transition ABC-1 and set Counter to One (or None) on the transition screen -> Complete the transition
        The WebHook is triggered.

      This makes it impossible to achieve this requirement:

      • Fire the WebHook only when ABC-1 is transitioned and its Counter value is set to Two from a different value that doesn't match the WebHook JQL at the time of clicking the transition button.

      Notes

      1. This behavior not only applies to a Select List custom field, but also to other fields if they're updated on a Transition screen. Known related issues are:
      2. This behavior can't be worked around using WebHook Post-function. For example, if the WebHook is added to the post-function list of the Transition, it's not fired either (following Scenario 2), regardless of the order of the post-function.
        One may expect that, if the WebHook Post-function is after the Issue Re-index Post-function, the WebHook should be triggered.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vdung Andy Nguyen (Inactive)
              Votes:
              23 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated: