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
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.