Throwing Error Messages: [You can not transition a null issue.] error during change status

Prashant Mali June 12, 2017

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.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2017

You don't appear to be giving it an issue to transtion.

Suggest an answer

Log in or Sign up to answer