Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

Advarsel

If You encounter this error in the logs:

Kodeblok
2014-06-10 08:01:43,716 QuartzScheduler_Worker-2 WARN automaticservices    CloseinactiveSupportIssues [jelly.tags.log.WarnTag] Inactivating issue MYPROJECT-151
2014-06-10 08:01:43,825 QuartzScheduler_Worker-2 ERROR anonymous    CloseinactiveSupportIssues [jira.jelly.service.JellyService] file:/pack/jira-jelly/support-closeinactivate.xml:48:145: <jira:TransitionWorkflow> Field 'resolution' can not be set on action with no screen
org.apache.commons.jelly.JellyTagException: file:/pack/jira-jelly/support-closeinactivate.xml:48:145: <jira:TransitionWorkflow> Field 'resolution' can not be set on action with no screen

This is typically due to the script is a copy/similarity of https://confluence.atlassian.com/display/JIRA/Jelly+Escalation and the line:

Kodeblok
<jira:TransitionWorkflow key="${issue.key}" user="${workflowUser}" workflowAction="${workflowStep}" comment="${comment}" resolution="Customer Timeout"/>

Setting a field on the Jelly "jira:TransitionWorkflow" requires a screen with the field, therefore - set it in the Post Function

Advarsel

A real-life example:

I created an onComment Listener in Groovy, that transistet Issue when a Comment came in, a code snippet is:

Kodeblok
workflowTransitionUtil.setUsername(currentuser); 
workflowTransitionUtil.setAction (transition) 
// Validate and transition issue 
workflowTransitionUtil.validate(); 
workflowTransitionUtil.progress();

This code is valid, but in the "Post Function" of the Transition was:

Kodeblok
Fire a Issue Commented event that can be processed by the listeners.

Hence, the script re-fired itself, which is not good...