Knowledge Base Articles

Set an automated Tempo Account from Parent work item

This article is for Tempo for Cloud


There might be a need to set a Tempo Account on an work item based on certain rules. With Automation for Jira this can easily achieved and there are several options to choose from. In this tutorial we focus on setting a Tempo Account in the event of the creation of a Jira work item. We will set the Tempo Account based on the Account that is set on the parent work item for the work item we will create.

Instructions with Connect on Forge (old)

  1. Set up an automation rule under Space settings >Automation.

  2. As the trigger for the automation choose “Work item created”.

  3. Add a new component IF.

  4. Select “Related work item condition” and set “Related work items” field “Parent” and “Condition” field “Exists”.

    image-20250403-192805.png
    valid Parent work item link
  5. Add a new component THEN.

  6. Select “Account” field with “COPY” option and set “work item to copy value from” field with “Parent work item”.

    image-20250403-193244.png
    Copy Account from Parent work item


  7. Save and publish the automation.

  8. You will notice that the Tempo Account value has been inherited from Parent.

    image-20250403-193548.png
    Account inherited from Parent

Instructions with Forge Remote (new)

  1. Set up an automation rule under Space settings >Automation.

  2. As the trigger for the automation choose “Work item created”.

  3. Add a first condition if Parent exists.

  4. Select “Related work item condition” and set “Related work items” field “Parent” and “Condition” field “Exists”.

    image-20260416-204552.png
    valid Parent work item link
  5. Add a second condition if Account is empty.

  6. Add a JQL condition to set the Account IS EMPTY and validate it.

    Account is empty
    


    image-20260416-204853.png
    validate empty Account
  7. Create a variable to store Parent work item key.

    {{issue.customfield_#####}}
    
image-20260416-205623.png
get Parent link into a variable
  1. Send web request to get Account from Parent work item.

    https://cops.atlassian.net/rest/api/3/issue/{{ParentLink}}
    


    image-20260416-205849.png
    get Account from Parent work item
  2. Create a variable to store Account from Parent work item.

    {{AccountfromParent}}
    
    {{webhookResponse.body.fields.customfield_#####.id}}
    


image-20260416-210715.png
get Account into a variable
  1. Assign the Account to the work item.

    {
        "fields": {
            "Account": "{{AccountfromParent}}"
        }
    }
    


    image-20260416-211101.png
  2. Save and publish the automation.

  3. You will notice that the Tempo Account value has been inherited from Parent work item.

    image-20250403-193548.png
    Account inherited from Parent


There are many rules available and the approach above could be used for many other use cases.