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

Set Tempo Team on Jira issue assignment

This article is for Data Center.

When we want to assign a Jira issue to a specific Tempo Team based on assignee. Unlike Tempo Account, Tempo Team is not a recognized field by Automation for Jira, we will show how to setup the rule to update Team value in Jira issue below.

  1. You can get a list of Tempo Teams with:

    http://localhost:8080/rest/tempo-teams/2/team

    and the results should look like this:

    [ { "id": 3, "name": "Accounting", "mission": "", "summary": "Accounting and Billing group", "lead": "JIRAUSER10703", "isPublic": false }, { "id": 4, "name": "BJT", "summary": "", "lead": "swu", "program": "Tempo Support", "isPublic": false }, { "id": 17, "name": "Company Plans", "summary": "", "lead": "swu", "isPublic": false }, { "id": 1, "name": "Default Tempo Team", "mission": "", "summary": "", "lead": "swu", "program": "Tempo Support", "isPublic": false }, ... ]

    You will need to know which Team ID you want to assign for the assignee or user group.

  2. Also, you need to find out what is Jira custom field number (customfield_#####) for Tempo Team in Jira System > Manage apps > Tempo > Custom Fields > (Tempo) Team (id: #####).

    Tempo Team ID
  3. Create a new rule in Jira System > Automation For Jira > Automation rules. You can create a rule of global or project scope, depending your requirement.

    Rule details
  4. Select a trigger on Issue assigned and Save

  5. Add component with New condition on If / else block

  6. For If block, add conditions with Advanced compare condition

  7. First value = {{issue.assignee.key}}, Condition = equals, Second value = userkey, and Save the block. This is using Jira smart value. This IF condition is to update a specific Team for a specific user.

  8. Add Component inside/under If block with New action of Send web request, instead of Edit issue, because Tempo Team is not recognized by Automation.

  9. Webhook URL should be Jira REST API issue search of current issue with {{issue.key}}

  10. As headers, please add
    Content-type application/json
    Authorization Basic xxxxxx
    (The Authorization is basic. To find the authentication in the correct format, you can use the terminal with a command like:
    echo -n username:password | base64
    or run the REST API in Postman and it will show the value for the authentication)

  11. Update Tempo Team value with desired Team ID in the issue by using PUT with Custom data:

    { "fields":{ "customfield_10201": "4" } }

    and click Save.

  12. You can validate the webhook if the request works with issue key.

  13. For Else-if block, add condition with User condition: User = Assignee, Check to perform = is in group, Criteria = Jira user group(s). This Else condition is to update a specific Team for specific Jira user group(s).

  14. Add component inside/under Else block with the same web request as above (IF block), but with a different Team ID.

  15. Save and publish the automation.

It’s best to test out your rule within a Project first and then change to global after the rule has run successfully.