I've been looking for a solid Java example on how to programmatically make issue status transitions. I've seen: https://answers.atlassian.com/questions/6985/how-do-i-change-status-of-issue
... 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,
Ryan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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; }
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A Source example would be an invaluable gem, please :)
Nothing I have seen provides Java examples that a newby can easily digest.
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.
For those who are searching for answer that is more up to date in 2017.
Answer is HERE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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,
Rk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.