Approval Rules

Configuration path: Manage apps > WORKFLOWWISE > Approval rules, it can be configured by Jira administrators.

 

Approval rules can be configured By Project or By Workflow.

  • By Project: Add approval rules for one project-issue type, which will only affect this issue type under this project

  • By Workflow: Add approval rules for one workflow, which will make all issues using this workflow have an approval process

The page is shown as follows:

 


1. Add approval rule

  Click "Add", displays the dialog of "Add approval rule":

  • By Project

 

  • By Workflow

 

Who are the approval rules added for? This is required.

  • By project: Add an approval rule based on the project & issue type, which will only affect this issue type under this project.

  • By workflow: Add an approval rule based on the workflow, which will make all issues using this workflow have an approval process.

② According to the selected project & issue type or workflow, select the status that needs to be approved. You can search for the status name, and this is required.

③ According to the selected status in ②, select the action to be executed after approval (filter out those selected in ④), you can search for the action name, and this is required. When multiple actions are selected, the one who trigger the issue getting approved should choose an action.

④ According to the selected status in ②, select the action to be executed after the approval is rejected (filter out ③ selected), you can search for the action name, and this is required. When multiple actions are selected, the one who trigger the issue getting rejected should choose an action.

Add approvers, you can add by user, user group, project role, custom user field, multiple choices and required.

⑥ Set the pass condition for approval, required:

  • Pass count (default): If the number of passers reaches the set value, the approval is approved.

  • Pass Percent: If the proportion of passers reaches the set value, the approval is approved.

⑦ After it is turned on, the status of transformation will be calculated according to the rules only after all the approvers have approved it. After it is turned off, the system automatically changes the target status when the approval result meets the approval rule.

⑧ Once it is turned on, the transition buttons on the issue detail page will be greyed out and no longer be clickable, issues then can only be transitioned automatically by the rule.

 

Note1:Approval rules cannot be added repeatedly. When adding repeatedly, an error message "Approval rules already exist" will pop up.

Note2:The same issue type and status cannot have both approval rules by project and approval rules by workflow. The two will conflict and only one of them can be enabled.


2. Edit approval rule

Click "Edit", the "Edit approval rule" dialog will pop up:

  • By project: "Project", “Issue Type“ and “Approval status“ are readonly.

 

  • By workflow: "Workflow" and “Approval status“ are readonly.

 

Note:Modifying “Approvers“ or “Approval condition“ will reset those on going parallel approvals.

 


3. Copy approval rule

Copying an approval rule means creating a new approval rule by modifying an exist one. Modifying “Project“, ”Issue type”, “Workflow”, “Approval status“ is allowed during copying a rule.

Click "Copy", the "Copy Approval Rule" dialog will pop up. Approval rules by project can only be copied as project type, and approval rules by workflow can only be copied as workflow type.

 


4. Disable/Enable approval rule

Click "Disable"/"Enable" and confirm in the dialog to disable/enable this approval rule:

 

Note:The same issue type and status cannot have both approval rules by project and approval rules by workflow. The two will conflict and only one of them can be enabled. Disabling rules will reset those on going parallel approvals.


5. Search

  • By project: support query by project name, issue type, and approval status.

  • By workflow: support query by workflow name and approval status.


6. Condition of parallel approval

In addition to the approval status, you can also set additional conditions for the approval rules. Only when the conditions are met will the issues start the approval process.

Click “Condition“ button, fill the condition in the window.

The conditions are set in the form of JQL or Groovy Script. Only one of the two will take effect, and the last successful saved condition will take effect.

 

Example below: The approval process will only begin when the value of custom field “Severity“ is “S“ and the status of issue is the approval status.

import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.fields.CustomField def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(10200L) as CustomField; return issue.getCustomFieldValue(customField)?.toString() == 'S'