AutoTransitionService

This service provides a way to automatically perform workflow transitions when specific criteria are met.

These criteria are defined in the workflow configuration



Configuration

To configure the Auto-Transition Service:

  1. Add the Class com.atlassian.jira.service.AutoTransitionService in Service Definition.
  2. Perform the Service definition :

    AutoTransitionService

  3. Specify its scope of analysis. It may be based on :
    • a Filter
    • a Project
    • a Project Category
  4. Specify the user to use as Requester. It may differ from current user, and be defined in the plugin settings page.
  5. Update you Workflow with dedicated Transition for AutoTransitionService.
    • the workflow transition has to be marked as runnable by adding the meta-attribute : allow.auto.transition
    • the workflow transition can be marked as restricted to a Auto Transition Service user, by specifying the ExtendedPermissionCondition as Workflow Condition
    • In case of field in an associated screen, the default value have to be specified.

Transition Sample

This sample transition:
  • is reserved to AutoTransitionService
  • is performed if:
    • the user has the global administration permission
    • and if the Inactivity Condition on Worklog is confirmed,
  • and since the associated screen is "resolveissue", the Resolution and Assignee fields have to be specified.

    • Resolution is set to 1 (Fixed)
    • Assignee keeps its previous value (due to the --unchanged-- value).
<action id="100" name="Close" view="resolveissue">
	<meta name="jira.description">Close Transition reserved to AutoTransitionService</meta>
	<meta name="jira.i18n.title">WFA_Close</meta>
	<meta name="allow.auto.transition">true</meta>
	<meta name="auto.transition.resolution">1</meta>
	<meta name="auto.transition.assignee">--unchanged--</meta>
	<restrict-to>
		<conditions type="AND">
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.InactivityCondition</arg>
				<arg name="onWorklog">15d</arg>
			</condition>
			<condition type="class">
				<arg name="class.name">com.atlassian.jira.workflow.condition.ExtendedPermissionCondition</arg>
				<arg name="permission">admin</arg>
			</condition>
		</conditions>
	</restrict-to>
	<post-functions>
		<function type="class">
			<arg name="class.name">com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction</arg>
		</function>
		<function type="class">
			<arg name="class.name">com.atlassian.jira.workflow.function.misc.CreateCommentFunction</arg>
		</function>
		<function type="class">
			<arg name="class.name">com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction</arg>
		</function>
		<function type="class">
			<arg name="class.name">com.atlassian.jira.workflow.function.issue.IssueReindexFunction</arg>
		</function>
		<function type="class">
			<arg name="eventTypeId">5</arg>
			<arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction</arg>
		</function>
	</post-functions>
</action>