Jira issue transition to resolve working fine without resolution.

PrateekS May 21, 2015

I am trying to move an issue from open to resolve where default resolution is cleared out. When the same operation is done from JIRA UI, user needs to select some resolution as there is no default resolution. But when it is done via REST api, issue is getting updated to resolve without any resolution.

Is it a bug in Jira?

-Prateek

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2015

When you are doing it in the UI, it is expecting you to pick a resolution. When you are doing it via, you have to set the resolution in the code.

If you want the transition to fail when there is no resolution sent in the REST API call, make sure you add a workflow validator that checks for resolution value.

PrateekS May 21, 2015

But when resolution is mandatory in UI then the same behavior should reflect in rest api as well without workflow validator. Since we are utilizing Jira rest api in our product, our customer has to explicitly make sure that there is a workflow validator (which is not required in UI) to make it throw an error with our product.

PrateekS May 21, 2015

It works fine with jira SOAP.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2015

Did you mark resolution as mandatory? There is no way to do that in workflow screen unless you add a workflow validator. Once resolution is on screen, user will have to select one or the other but that is different from making it mandatory. When you add a validator, REST will respect that.

PrateekS May 21, 2015

I got the solution for the way I am handling trasitions. Before firing a transition POST request I get all the available transition for an issue by using GET request. In GET request I can expand on fields available for transition and in the response I get whether the field is required or not. Why I chose this way is because I don't want user to change anything in Jira.

Suggest an answer

Log in or Sign up to answer