not working workflowTransitionUtil.setAction

Fernando del Río September 23, 2016

Hi,

 

I have the code:

 

 

MutableIssue issue = issue as MutableIssue

def currentUser = com.atlassian.jira.component.ComponentAccessor.getJiraAuthenticationContext().getUser()
WorkflowTransitionUtil workflowTransitionUtil = ( WorkflowTransitionUtil ) JiraUtils.loadComponent( WorkflowTransitionUtilImpl.class );
workflowTransitionUtil.setIssue(issue);
workflowTransitionUtil.setUsername(currentUser.name);
workflowTransitionUtil.setAction (251)
if (workflowTransitionUtil.validate()) {
println("validacion OK!!!!!!")
workflowTransitionUtil.progress();

}

 

 

 

And not working not error

Help Please

1 answer

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2016

you want:

if (! workflowTransitionUtil.validate().hasAnyErrors()) {
  // ... all good
}

.validate() returns an error collection that you can look at to see what the problem is.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events