Conditions in Approval Path
- Use Cases
- Determining Condition Approval Steps
- Creating a Conditions Rule
- Condition verification
- Creating Conditions
- Managing Condition Rules
“Conditions” feature allows you the ability to establish criteria using jiraexpressions. The chosen expression is evaluated by the Jira REST API based on the selected condition evaluator. These conditions serve as qualifiers for either generating an approval or incorporating a step into it. When the criteria are satisfied, approval is created or the assigned step seamlessly integrates into the approval process. Conversely, if the conditions aren't met or an error arises during assessment, approval creation fails or the step is omitted from the flow.
Adding conditions to approval steps using Jira expressions offers a flexible way to manage your project workflows. Here are some interesting ideas for conditions you might consider:
Issue Priority-Based Approval: Trigger an approval step only if the issue's priority is above a certain threshold. For example, only issues marked as 'High' or 'Critical' require approval.
Project Phase Dependency: Initiate an approval process based on the current phase of the project. For instance, approvals are needed only during the 'Development' or 'Testing' phases but not during 'Planning'.
Time-Based Conditions: Implement a condition where approvals are required if an issue remains unresolved or unattended for a certain period, indicating it needs higher attention.
User Role or Group Check: Set up approvals to activate only if the issue is reported or handled by users of a certain role or group. This can be useful for ensuring that only relevant personnel are involved in the approval process.
Issue Type Specific Conditions: Differentiate approvals based on the type of issue, such as 'Bug', 'Feature Request', or 'Task'. Each category could have its unique approval process.
Budget Constraints: In projects where budget tracking is essential, approvals could be required when the estimated cost of an issue exceeds a set limit.
Dependency on Other Issues: Approval steps could be conditional on the status of related issues, such as requiring all blocking issues to be resolved first.
Customer Impact Analysis: For customer-facing projects, approvals could be mandatory for issues that are marked as having high customer impact.
Change in Issue Severity: Trigger an approval if there's a change in the severity level of an issue, indicating a potential escalation in the problem.
Compliance Check: In regulated environments, approvals can be made conditional on whether the issue complies with certain standards or regulations.
Each of these conditions can be tailored and combined to fit the specific needs of your project, ensuring that the approval process is both efficient and effective.
Determining Condition Approval Steps
Accessing Global/Project Settings
Navigate to the "Apps" dropdown menu on the navbar
Select Approval Path global settings
Navigate to the desired project
Select the "Approval Path" app on the sidebar within the project (project settings)
Creating a Conditions Rule
Click on the "Add Condition" button
Select your Condition name
Add an Expression (jiraexpressions) - Condition will be only be executed correctly if the expression returns a logical value. Condition is met when expression results true, otherwise it will not be met.
Add Condition Evaluator - The chosen expression is evaluated by the Jira REST API based on the selected condition evaluator. Jira expression will be evaluated as:
Current User - User who starts approval path on issue/ using API Key/ using workflow condition
Selected User - user selected in condition
Issue field User - user from selected issue field (field value must be set)
Select a Project to limit condition to specific projects. (optional)
You can specify the key of a specific issue to verify the condition expression for that particular issue.
Click the ‘Test’ button to check your expression. You'll find details below indicating whether the expression is met, not met, or if an error is encountered, returned result is not of type boolean.
Condition expression met
Condition expression not met
Expression evaluation error
Returned result is not of type boolean
You can use the Test button to verify the result of your Jira expression and view it (the first comment issue issue.comments is displayed below). This way, you can ensure they behave as expected in your Jira environment. It will be easier for you to prepare the final expression you want to use.
Create Approval Path Condition
Create Approval Step Condition
Once chosen, the step will be included in the approval workflow only when the condition is met. Conversely, if the condition is not fulfilled or an error occurs during the evaluation of the condition, the step will be excluded from the approval process.
Managing Condition Rules
You can filter conditions by name, project, or status. This allows a comprehensive browsing of the conditions' versions and their usage across issues.
Viewing and Editing
All Condition rules are listed here, and you can click on any rule to view or edit its details.
Use duplicate option to create new condition based on existing one, saving time and ensuring consistency in configurations.
If a condition is no longer needed, you can archive it for future reference. Archived conditions can only be viewed for history and usage with pre-archive configurations. Note that condition rules cannot be deleted, only archived.
Archived conditions are not applied to approval path
Filtering and Sorting
Use the filter option to refine your search by selecting projects or issues.
Viewing Active Conditions
On the Conditions tab in global or project settings, users can see a list view. They may opt to view only active condition which show records that are not archived.
Configuration and History
A comprehensive history of all condition actions is recorded under each condition expressions, which can be viewed for reference.