I want to change the status of linked issue from resolved to waiting for triage.
Reopen is a transition in between them. and I am getting action ID 131 of this transtion. using below code
com.opensymphony.workflow.loader.StepDescriptor currentStep = workFlow.getLinkedStep(link.destinationObject.getStatus());
// com.opensymphony.workflow.loader.StepDescriptor currentStep = workFlow.getLinkedStatusObjects();
IssueService issueService = ComponentAccessor.getIssueService();
List<ActionDescriptor> actions = currentStep.getActions();
log.error "Size"+actions.size()
for (ActionDescriptor action: actions)
{
log.error "Action name:" +action.getName()
if (action.getName().equals("Reopen"))
{
int a=action.getId();
IssueInputParameters issueInputParameters = new IssueInputParametersImpl();
log.error "Action ID"+ a +"User " +appUser+""+id+""+issueInputParameters;
TransitionValidationResult transitionValidationResult= issueService.validateTransition(appUser,id,10005, issueService.newIssueInputParameters());
if (transitionValidationResult.isValid()) {
IssueResult transitionResult = issueService.transition(appUser, transitionValidationResult);
}
else{
ErrorCollection errorCollection = transitionValidationResult.getErrorCollection();
log.error "Result Check"+errorCollection
// showTransitionErrors(transitionValidationResult);
}
but still getting TransitionValidationResult is Invalid. Why it is so? where is the problem.
You don't appear to be giving it an issue to transtion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.