How to enable status transition from Salesforce to Jira via Automation for Jira

Purpose

We'll discuss how to synchronize status from Salesforce to Jira since the status field in Jira is read-only. This allows the 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. 

Answer

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.

  1. 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”.

    Image-001.png
  2. From here, click Create rule on the top right.

  3. This is where you will need to specify the Trigger.

    Image-002.png
  4. Select Field value changed for this specific use-case to automate remote status transition.

  5. 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.

  6. 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.

  7. After clicking Save, you can choose to add a condition, branch rule, or action.

  8. Select New condition.

  9. 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.

  10. Step 9 will ensure that the automation will only run if the value is changed by the Salesforce and Jira Connector app.

  11. After that, we can add an additional condition by selecting the New condition again then select the Issue fields condition.

  12. 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.

  13. After saving, add a New action.

  14. From here, you can select the various types of actions that the automation can perform. Select Transition issue.

  15. Select the Destination status to the status that you want the automation to transition to.

  16. Lastly, click Turn it on to enable the automation.

  17. Now, you’ll have an automation that will transition the issue status to Waiting for Jira Team whenever the following scenario occurs.

    1. The value for the Remote Status Transition field is updated.

    2. The user that updates the Remote Status Transition field is the Salesforce & Jira Cloud Connector app user.

    3. The value for Remote Status Transition is changed to Yes.

Workflow post-function to synergize with the automation

  1. 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.

  2. To do that, navigate to the project’s workflow (Project settings > Workflow)

  3. Click on a transition to the status, and click on Post Functions on the right pop-up.

  4. From here, click on the Add post function button on the right.

  5. Select Update Issue Custom Field and click Add.

  6. Select Remote Status Transition field and enter No for the Custom Field Value.

  7. After adding the post function, remember to publish the draft of the workflow.

  8. 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.