Join thousands of Atlassian users for an unforgettable week of knowledge sharing, product training, networking, and fun. Atlassian Summit is Oct 10 - 13 in San Jose, CA – Register soon before tickets sell out.
Hi, i am developing jira plugin for web interface but i can not find anything about issue status. For example i try to put a button in my issues for start/stop progress. What should i do? Is JQL good idea? If it is what should my query be?
JIRA does not allow arbitrary change of the issue status - Issue must go through a workflow transition.
You can use WorkflowManager.getWorkflow(Issue) to find out which workflow does the issue belong to. Then you can use workflow.getLinkedStep(issue.getStatus()) to get the current workflow step the issue has. Then you can use StepDescriptor.getActions() to see which transitions are available and select the required ActionDescriptor. Then you can use IssueService.validateTransition() and IssueService.transition() to transition the issue.
As I have asked in the other post, how would you transition a ticket base off the status of another ticket, assuming both ticket uses the same workflow? Like if TEST-123 is in "Development", I want to move "HOT-2223" to "Development" if it's not already in "Development". From your answer and other old JIRA forum posts, I just dont know how you can move HOT-2223 base of list of transitions. I dont want to hot code the transition, as it mentioned in this forum, but yet I just dont know how you would move forward when you have 6 transitions in that given step. Thoughts?
But all method you mentioned is about getting informations of statue of issues. I want to change statue. For example if status is "open" and when i click the button, status changes "in progress".If it is possible on java script,if it is,it is best for me but rest of solutions are posibble too.
Pseudocode for jira 4.4:
For previous versions try using
This will not work - you will only change the status field in the Issue bean.
what are the text os script, we can write just "in progress" or "open" just, can you give me an example?
I just read what I think Dieter just read too. Igor's answer is correct - Gri does not seem to have spotted the point in the last sentence about actually performing the transition.