Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Programatically Modify/Change/Update an issues status in Java

I've been looking for a solid Java example on how to programmatically make issue status transitions. I've seen:

... but it fails to comprehensively show all the steps necessary to transition the status of an issue. The section marked Pseudocode for jira 4.4 looks interesting, but I'm still without a good direction?

Can an issue be ushered directly into any known status by name? must issues be walked through all workflow positions before a destination status can be obtained?

Thanks Everyone,


6 answers

1 accepted

5 votes
Answer accepted
You should transition an issue as here: just setting the status does not updste the osworkflow framework tables which is essential to remember the position within the workflow. Also it won't update your changehistory and you can't figure out later how your issue got into the status.Using transitions also makes sure that your issues are reindexed properly when it's in the new state and thus can be found by filters. In a nutshell you will loose a lot of functions when you bypass the transition. Just look at all the workflow post functions ..l

that helped allot, thanks...

private boolean transitionIssue(Issue issue) {

		boolean result = false;
		IssueService issueService = ComponentManager.getInstance().getIssueService();
		IssueService.IssueResult transResult;
		int actionId = 0;
		IssueInputParameters issueInputParameters = new IssueInputParametersImpl();
		TransitionValidationResult validationResult = issueService.validateTransition(user, issue.getId(), actionId, issueInputParameters);
		result = validationResult.isValid(); 
		if (result) {
			transResult = issueService.transition(user, validationResult);
		return result;

one more thing though, what the heck is the actionID for?

Each transition has a unique identifier. This identifier must be passed as actioniD. Check the picture at, e.g. the transition " start progress" has actionID 4. I.e. to move the issue from status open to in progress you must pass that actionD 4

is there a way to get the Transion by name?

You can enumerate the available actions for an issue using Just loop through the result and compare the name In the ActionDescriptor to the name you want to look up

Is there any API, which tells me the actionId based on current Issue status and new status? E.g. issue is in Open state and I want to change it to In progress -> what would be the actionId?

must issues be walked through all workflow positions before a destination status can be obtained?

Yes you must. You can't jump over statuses if there is no such path in the workflow. This makes sense because all the post functions/conditions/validations should all be statisified on the way!

A Source example would be an invaluable gem, please :)

Nothing I have seen provides Java examples that a newby can easily digest.


I have the similar requirement and i could achieve moving issue from current status to the target status (if there is a direct Transition/Action configured). But my requirement is, if there is no direct transition from current status to target status, it should figure out all the possible paths and take optimum path to reach the target status. Somehting similar to the "The salesman problem". I have the data/maps available like all possible transitions from each of the step/status, all transitions that lead to a step. How can we use this data to move to the target status. As it is an import tool, the path of status transitions does not really matter. Could someone help here.


Thank you,


@Ramakrishna Siriki

I would caution against your design and debate the validity of your use case a bit, but you can always use, even hide with conditions, a global transition to a known status.  The jiraWorkflow.getDescriptor() will give you a traversable workflow but getting through it can be tricky as workflows are transactional and "diverting" or redirecting is fraught with problems.

For those who are searching for answer that is more up to date in 2017.

Answer is HERE.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you