Workflow Condition

Kaamelot provides usefull Workflow Conditions

KeyDescription
allowleader-conditionCondition to allow only the Project Leader to execute a transition.
allowreporter-conditionCondition to allow only the Issue Reporter to execute a transition. (May be duplicated allowOnlyReporter from JIRA)
allowEstimateToNull-conditionCondition to allow a Workflow Transition only if the current Estimate (Remaining Estimate) is valued to Null or Zero.
AllowEstimateNotToNull-conditionCondition to allow a Workflow Transition only if the current Estimate (Original Estimate) is not valued to Null nor Zero.
workable-issue-conditionCondition to allow a Workflow Transition only if the current user is allowed to log Work on current Issue.
ActivityConditionCondition to allow a Workflow Transition depending on Activity age
UnactivityConditionCondition to allow a Workflow Transition depending on Unactivity age (inverted ActivityCondition)
GlobalPermissionConditionCondition to allow a Workflow Transition depending a Global Permission
ValidatingIssueConditionCondition to allow a Workflow Transition only when called for the Edit or Update Issue Validation
DateReachedConditionCondition to allow a Workflow Transition when called a CustomField Date is reached


AllowLeader Condition

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.AllowLeader</arg>
			</condition>
		</conditions>
	</restrict-to>
...
</action>

Allow Reporter Condition

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.AllowReporter</arg>
			</condition>
		</conditions>
	</restrict-to>
...
</action>

Allow Estimate To Null Condition

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.AllowEstimateToNull</arg>
			</condition>
		</conditions>
	</restrict-to>
...
</action>

Allow Estimate Not To Null Condition

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.AllowEstimateNotToNull</arg>
			</condition>
		</conditions>
	</restrict-to>
...
</action>

Activity and UnactivityCondition

Evaluate a condition based on the Issue Activity

ActivityCondition



InactivityCondition



It is possible to select one of proposed Activity Type.

ActivityCondition Edit



When defined, the condition will be passed depending on activity Type evaluations.

ActivityCondition View



The Condition configuration may be done in XML in Worflow descriptor as follow :

<condition type="class">
   <arg name="class.name">com.atlassian.jira.workflow.condition.ActivityCondition</arg>
   <arg name="onXXXXX">2d</arg>
</condition>

where the argument onXXXXX may be

  • onEdit : delay between Issue Update Date and Today after which issue is no more assumes as active
  • onTransition : delay between Last Transition Date and Today after which issue is no more assumes as active
  • onComment : delay between Last Comment Update Date and Today after which issue is no more assumes as active
  • onWorklog : delay between Last Worklog update Date and Today after which issue is no more assumes as active
If more than one argument is defined, then each are evaluated in above order until one raises that the issue is active.
<condition type="class">
   <arg name="class.name">com.atlassian.jira.workflow.condition.ActivityCondition</arg>
   <arg name="onEdit">5d</arg>
   <arg name="onWorklog">2d</arg>
</condition>
Here Issue is assumed as Active, if none ot the mentionned delays are superseded !

You are able to combined conditions as follow :
<conditions type="OR">
   <condition type="class">
      <arg name="class.name">com.atlassian.jira.workflow.condition.ActivityCondition</arg>
      <arg name="onEdit">5d</arg>
   </condition>
   <condition type="class">
      <arg name="class.name">com.atlassian.jira.workflow.condition.ActivityCondition</arg>
      <arg name="onWorklog">2d</arg>
   </condition>
</conditions>
Here Issue is assumed as Active one ot he mentionned delay is superseded !

Global Permission Condition

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.GlobalPermissionCondition</arg>
				<arg name="permission">admin</arg>				
			</condition>
		</conditions>
	</restrict-to>
...
</action>

ValidatingIssueCondition Condition

This validator evaluate the transientVar validatingIssue pushed by the Edit and the Update Issue action.
<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.ValidatingIssueCondition</arg>
			</condition>
		</conditions>
	</restrict-to>
...
</action>

DateReachedCondition Condition

This condition allow a Workflow Transition when a CustomField Date is reached, and does not exceed a delay.

DateReachedCondition

It is possible to select one of proposed CustomField having Date or Datetime CustomFieldType, and specify a delay in seconds.

DateReachedCondition Edit

When defined, the condition will be passed only when the date will reached without having exceed the mentionned delay.

DateReachedCondition View

The Condition configuration may be done in XML in Worflow descriptor as follow :

<action ... >
...
	<restrict-to>
		<conditions >
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.DateReachedCondition</arg>
				<arg name="customFieldId">customfield_10160</arg>
				<arg name="maxExceedDelay">1400</arg>
			</condition>		
		</conditions>
	</restrict-to>
...
</action>