Document toolboxDocument toolbox

To learn more about Tempo products, please visit our Help Center. For support, see our Support Portal.

Set a Tempo team on Jira issue assignment

There might be cases where we want to assign a Jira issue to a specific Tempo Team based on certain conditions. In the example below we use the Jira issue assignment as the trigger to run an automation rule to set a Tempo Team on the Jira issue. Further, we can implement a what-if scenario by setting the Team name based on the assignee user or the assignee belonging to a Jira group.

Since the Tempo Team field can't be set out of the box we will need to leverage the advanced options when editing the Jira issue via an automation. Therefore we need the Tempo team customfield ID. Jira custom fields can be retrieved from the Jira API

{YourJiraCloudUrl}/rest/api/3/field

In the response search for “Team”, your query should give you something like this:

{ "id": "customfield_11718", "key": "io.tempo.jira__team", "name": "Team", "untranslatedName": "Team", "custom": true, "orderable": true, "navigable": true, "searchable": true, "clauseNames": [ "cf[11718]", "Team" ], "schema": { "type": "option2", "custom": "com.atlassian.plugins.atlassian-connect-plugin:io.tempo.jira__team", "customId": 11718 } },

That means in our case the Tempo Team customfield has the ID “11718”.

Before we go into Automation for Jira we will also need the respective Tempo Team IDs as we can't use the Tempo Team names in Automation for Jira. We can get the Team ID by navigating to the Tempo Team and look for the ID in the url.

Or we can leverage the Tempo Team REST API to get the Tempo Teams, their names and IDs.

https://api.tempo.io/4/teams

This will provide a response like this:

Make sure that the Tempo Team is linked to the Jira project that you want to use the Jira automation rule for. The Tempo Team can only be set on the Jira issue when the Tempo Team is linked to the Jira project.

Once we have ensured that we have everything we need and all settings are correct we can go ahead with Automation for Jira.

Our rule looks like this:

The trigger for the rule is when a user is assigned to a Jira issue or when the assignee has changed.

We implemented in this example a condition rule checking on the assignee. We want to set a different Tempo Team based on the assignee of the Jira issue. Without going into too much detail, you can check the value against a specific user or if the assignee belongs to a certain Jira group. Just keep in mind that the if-block is exited once a condition is met.

After the condition check, we finally assign the Tempo Team to the issue by setting the Tempo Team custom field.

In the “More Options” section you set the values based on the Jira customfield ID and the Tempo Team ID that we have retrieved above. Make sure that you escape the Tempo Team ID.

That´s all. As always check the audit logs if any problems occur. The automation should now set the Tempo Team customfield.