We'll discuss how to synchronize status from Salesforce to Jira since the status field in Jira is read-only. This allows pushing of status updates from Salesforce to Jira, thus completing the overall automated workflow process. The following are the steps to show how you can utilize Automation for Jira in conjunction with the connector to enable a more seamless workflow transition.
The following knowledgebase article explains how you can utilize Automation for Jira in conjunction with the connector to enable a more seamless workflow transition.
You may incur charges for using Jira Automation. For Jira Cloud, single project rule executions do not count towards the usage. Check this documentation for more information: How is my usage calculated? You can also view your usage to keep track of how many executions left in the month. For Jira Server, please see guidelines here.
Basics: Automation for Jira
The main thing about automation is to create a rule. The rule in Automation for Jira consists of 4 key concepts:
Triggers - The starting action that will be used as a reference to kick-off the automation. (The Listener)
Conditions - This allows the user to narrow down the scope and be more specific on the required use-case.
Actions - When the Triggers and Conditions are met, this will be the one that performs the automation.
Branch Rule - This will apply the actions to all the related issues that you’ve selected/filtered.
Creating a rule
For this example, we are creating a rule to specifically automate status transition. Automation for Jira can be used for many other use cases.
Navigate to Settings > System > Automation rules. You can also press “g” twice or “.” (dot) to open up the shortcut navigator and search for “Automation rules”.
From here, click Create rule on the top right
This is where you will need to specify the Trigger
Select Field value changed for this specific use-case to automate remote status transition.
Have a custom field configured in Jira that acts as a middle-man between Jira and Salesforce. We recommend using the Select List (Single Choice) field type as it can be an additional status field that can be used to sync Salesforce and Jira. We created the Remote Status Transition field as an example - see diagram below.
You can also select if you want it to be specific to an Issue Operation: Create Issue, Edit Issue, Transition issue, Assign Issue, or leave it blank for all Issue Operations.
After clicking Save, you can choose to add a condition, branch rule, or action.
Select New condition
From here, you can choose how to narrow down the scope. We use User condition and we select the Salesforce & Jira Cloud Connector app user (at the Criteria) as the User condition
Step 9 will ensure that the automation will only run if the value is changed by the Salesforce and Jira Connector app.
After that, we can add an additional condition by selecting the New condition again then select the Issue fields condition.
Now, select the custom field that you’ve created. in this scenario, we will select Remote status transition and select equals to Yes. This Issue fields condition combined with the User condition (in step 9) will make sure that the automation will only run if the value of the field is changed to Yes, and the user who changes the value is the Salesforce & Jira Cloud Connector app user.
After saving, add a New action.
From here, you can select the various types of actions that the automation can perform. Select Transition issue.
Select the Destination status to the status that you want the automation to transition to.
Lastly, click Turn it on to enable the automation.
Now, you’ll have an automation that will transition the issue status to Waiting for Jira Team whenever the following scenario occurs.
The value for the Remote Status Transition field is updated.
The user that updates the Remote Status Transition field is the Salesforce & Jira Cloud Connector app user.
The value for Remote Status Transition is changed to Yes.
Workflow post-function to synergize with the automation
Since the above automation is configured to transition the issue to a specific status based on a Select List field value, we can create a post-function to enable looping.
To do that, navigate to the project’s workflow (Project settings > Workflow)
Click on a transition to the status, and click on Post Functions on the right pop-up
From here, click on the Add post function button on the right
Select Update Issue Custom Field and click Add
Select Remote Status Transition field and enter No for the Custom Field Value
After adding the post function, remember to publish the draft of the workflow.
With the post function added, the Remote Status Transition field value will change to No whenever the transition happens, in this case, we configured the transition to In Progress status.