Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Include Page
Tempo for Cloud Header
Tempo for Cloud Header

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.

...

Code Block
https://api.tempo.io/core/34/teams

This will provide a response like this:

Code Block
languagejson
{
    "self": "https://api.tempo.io/core/3/4/teams?offset=0&limit=50",
    "metadata": {
        "count": 20,
        "offset": 0,
        "limit": 50
    },
    "results": [
        {
            "self": "https://api.tempo.io/4/teams/2",
            "id": 2,
            "name": "Web Development",
            "summary": "",
            "lead": {
                "self": "https://cops.atlassian.net/rest/api/2/user?accountId=5cb085549b0de43f0aea7154612e8d6a2aa280006879d507",
                "accountId": "5cb085549b0de43f0aea7154",612e8d6a2aa280006879d507"
            },
            "displayNameprogram": {
"Angel Williams"
  },
  "program": null,
                  "self": "https://api.tempo.io/4/programs/8",
                "id": 8,
                "name": "Demo"
            },
            "links": {
                "self": "https://api.tempo.io/core4/3/teams/2/links"
            },
            "members": {
                "self": "https://api.tempo.io/core/34/teams/2/members"
            },
            "permissions": {
                "self": "https://api.tempo.io/4/teams/2/permissions"
            }
        },
        {
            "self": "https://api.tempo.io/4/teams/3",
            "id": 3,
            "name": "Service and Support",
            "summary": "This team provides services to implement our products, and support for those products.",
            "lead": {
                "self": "https://cops.atlassian.net/rest/api/2/user?accountId=5df2a18c41fd8d0e35072edc",
                "accountId": "5df2a18c41fd8d0e35072edc"
            },
            "program": null,
            "links": {
                "self": "https://api.tempo.io/core/3/teams/2/4/teams/3/links"
            },
            "members": {
                "self": "https://api.tempo.io/4/teams/3/members"
            },
            "permissions": {
                "self": "https://api.tempo.io/4/teams/3/permissions"
            }
        },
        {...
Note

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.

...

The trigger for the rule is when a user is assigned to a Jira issue or when the assignee changeshas 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.

...