When i set issue staus as resolved like that
The status seems to be updated, but the resolve issue button at the issue page is still active. What should i do?
Thanks, in advance.
You can see the actionId in the workflow XML. If you want to get it programmatially, do something like this:
JiraWorkflow workFlow = componentManager.getWorkflowManager(). getWorkflow(issue); GenericValue status = issue.getStatusObject().getGenericValue(); com.opensymphony.workflow.loader.StepDescriptor currentStep = workFlow.getLinkedStep(status); List<ActionDescriptor> actions = currentStep.getActions();
And then iterate over actions and find the one to use.
Reference: p.121 JIRA Development Cookbook
I think you're mixing up resolution, status and transitions.
Resolution is a flag saying how something was resolved. You can set that on-screen, via a workflow post function, or in code (exactly the method you have used). You have nothing wrong there.
However, the "resolve issue" button is a transition, which moves an issue through the workflow, from one status to another. It is NOT as simple as just setting a status, and you've broken your issue with your code. You might well be seeing the "correct" status on the issue, but you haven't moved it through the workflow, so it's now got the wrong status for the step it is on.
What you should do is:
Edit - Jobin's post is the detail on step 3 of what I just scribbled...
Good Day, Bad bad traffic, not sure why!!!! 1/2 hour commute took me 2 hours today 🤯 What helped me is that I kept browsing LinkedIn until...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs