Jira Service Management Conditionals¶
Conditionals or Execution Conditions give you the power to decide if a particular action on Jira Service Management will be performed or not when the workflow is triggered by the incoming event. This is similar to applying "if-then-else" logic to the execution of an action based on the attribute value coming from the workflow's trigger event.
You can add conditions to any action in your workflow.
To decide which actions should be performed in response to a particular trigger based on its characteristics or the data attributes. you can even apply a complex logic using AND, OR, and grouping of such conditions.
Each of the Conditionals support different operators based on the passed data type like string, number, boolean, etc. Read here to learn more about Execution Conditions.
Example Scenario¶
We will take a scenario where you are using Jira Service Management as the trigger application. There could be multiple application actions that could be invoked upon receiving a Jira Service Management trigger.
Each of the actions in the flow would have its own execution conditions based on the data attributes of the Jira Service Management trigger event. This will allow each of the actions to execute independently based on the defined execution conditions.
In this example, the workflow is triggered when a new request is created in the Jira Service Management account and it has two actions, first is a "PagerDuty create incident" action, and the second is a "ServiceNow create incident" action.
While using Jira Service Management as the trigger application, various attributes depending on your entity selection will be available to you in your application actions.
For eg. If you chose Request entity, then the following attributes will be available:
- Issue Type - Type of the issue.
- Project Name - Project Name in which issue will be created.
- Project Key - Key of the project in which issue will be created.
- Created At - Created time of issue.
- Priority - Priority of the issue.
- Summary - Summary of the issue.
- Description - Description of the issue.
- Issue Key - Key of the issue
- Reporter - Reporter of the issue.
- Assignee - Assignee of the issue.
In Figure 1 below, the action on PagerDuty will only be performed if the Priority
of the request equals Highest
AND Summary
of the request contains server outage
.
Similarly, in Figure 2 below, in the same workflow, a message from ServiceNow will only be sent if the Issue Type
of request equals Service Request
AND Summary
of the request contains server outage
.