I'm attempting to create a Java plugin that reopens and updates a field on a closed ticket via a WebworkAction/UI Button.
The 'Reopen' workflow succeeds without errors, and the UI even reflects a successfully 'Reopened' ticket, giving me workflow options only available to open tickets (such as the option to 'Close').
However, the status is still listed as 'Closed'.
Reading through the ages on this, I haven't been able to find a good solution-- it seems like this has been broken at least since 2012, with solutions varying but generally falling back on implementing a fixed time delay. I can't imagine a bug/problem like this has lingered in the API for nearly a decade like this, and am hoping someone can help me figure this out.
I'm using code as described in the platform documentation. The function's javadoc indicates that all parts of the transition (reindex/etc) should occur during the call.
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters(); issueInputParameters.setAssigneeId("newdude"); IssueService issueService = ComponentAccessor.getInstance().getIssueService(); TransitionValidationResult transitionValidationResult = issueService.validateTransition(user, 12345L, 10000L, issueInputParameters); if (transitionValidationResult.isValid()) { IssueResult transitionResult = issueService.transition(user, transitionValidationResult); if (!transitionResult.isValid()) { // Do something } }
There seem to be literally dozens of posts like this one, all of varying detail/specificity/outrage, none with an actual solution. Hear's to hoping this is the one that provides clarity!
This isn't expected to be an answer, rather a collection of past answers to similar problems.
A brief collection of the first page of Google results includes:
I've also attempted manually forcing a reindex and issue update, which appears to properly transition the ticket some of the time, but inconsistently (and leaning towards not working most of the time). I think this goes into the timing related issues pointed out in 509411.
The javadoc, however, clearly states that the transition function should 'update' the issue, among its other functions, which is what appears to not be happening here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like you can make an event listener, and have that trigger the transition, but the transition is not necessarily successful when called with other component types. As far as I can tell the docs don't indicate any limitation on the transition/why this might be.
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 same problem and I solve it an other way
I put auto transition in the workflow (export workflow to xml, modify xml and import it)
sample in the xml : <action id="31" name="toNextPhase" auto="true">
and I control the transition by condition in the workflow
I wish this can help
an other post for auto transition Here
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.