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

to_status in the JSON is null when using Webhooks

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Problem

      Using a webhook triggered from a transition returns incomplete data specifically the {{to_status)) returns null.

      Reason

      The transition object that is being returned in the JSON contains the from_status and to_status attributes. From testing with a fresh workflow, and testing with your workflow, you'll notice that in the JSON object, from_status is always being returned correctly (even if it's null in the descriptor), whereas to_status is always returning the value of status from the workflow descriptor XML. This is apparent when examining the code in the jira-webhooks-plugin that populates the values for the JSON. The
      to_status is always going to be the status of the createdStep, which is populated from the database. Whereas from_status is actually being looked up in the jira workflow.

      Workaround

      Export the XML of the workflow that you want to use the webhooks on, edit the status manually to something that makes sense, import the edited workflow, and continue to use the webhooks. You should only need to edit the status as it's the only attribute not being return correctly in the webhooks.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jaguilar Javier Aguilar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: