Details
-
Bug
-
Resolution: Fixed
-
Low
-
5.0, 6.1, 6.1.4
-
5
-
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
- duplicates
-
JRASERVER-32187 Creating transition via REST API appears successful when validators have prevented the transition
- Closed
-
JRASERVER-33868 Transitioning via REST ignores failed field validations
- Closed