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

JIRA REST does not return errors on transitioning an issue

    XMLWordPrintable

Details

    Description

      The outcome of the transition is ignored, and all we get back is an empty 204 response.

      REST:

                  issueService.transition(user, validationResult);
                  return Response.noContent().build();

      This code is taken from: https://atlaseye.atlassian.com/browse/jira-rest/jira-rest-plugin/src/main/java/com/atlassian/jira/rest/v2/issue/UpdateIssueResource.java?r=8c7d68606c899d4f781431ddfda4fd9ee499120a

      Action (called from JIRA UI):

              final IssueService.IssueResult transitionResult = issueService.transition(getLoggedInUser(), this.transitionResult);
              if (!transitionResult.isValid())
              {
                  addErrorCollection(transitionResult.getErrorCollection());
                  return ERROR;

      This means that FishEye / Stash cannot detect when things go wrong when transitioning an issue.

      Additionally, the response we get back even in the success case is empty. It would be very nice to be given the expandable issue object so that we dont need a second request to get the new state + transitions.

      We will be implementing the following workaround:

      • make the transition
      • re-retrieve the issue
      • check that the "to state" of the transition is equal to the new state of the issue
      • if it is not, display a generic error message that something went wrong in JIRA

      Is there anything wrong with this workaround?

      Attachments

        Issue Links

          Activity

            People

              pklimkowski@atlassian.com Piotr Klimkowski (Inactive)
              gcrain Geoff Crain (Inactive)
              Votes:
              15 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: