Can you update the Tempo team field using automation?

Naomi Stulberg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 20, 2020

Hello, 

Currently, I am using the Tempo team field in Jira to add which team the issue belongs to. I am trying to create automation rules to update this field when it has been assigned to a certain user, added to a particular sprint or upon creation of a specific issue. 

I have tried to use the additional field option with the following but have had no luck. 

{
    "fields": {
           "customfield_xxxx": {
           "value": "Team One"
        }
    }
}

 

When trying to test the automation rule, I get the following error message:

Error creating issue. Can not deserialize instance of java.lang.Long out of START_OBJECT token at [Source: N/A; line: -1, column: -1] (io.tempo.jira__team)

 

Has anyone had any luck trying to update this custom field? Or is it not possible because it is a locked custom field from Tempo? I have seen that you are able to run automation rules to update the Tempo Account field but not for the Team field. 

Any help will be much appreciated! Thanks!

6 answers

3 accepted

4 votes
Answer accepted
Brett February 17, 2021

I've tried many different variants of this JSON but I still can't get this to work. It's very frustrating. Has anyone has success on this? @Naomi Stulberg @Yannick Vanlaeke @Alexander Eck [Tempo] @michal.wesolowski @Susana Rodrigues 

Alexander Eck [Tempo]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2021

Hi @Brett

what response do you get in the Audit logs? There might be some hints of what is going wrong.

Have you ensured that the Team you want to set is linked to the Jira project?

I wrote up a tutorial on how to set the Tempo Team name. You might want to go through the steps to see if you are missing something.

BR

Like Anatoli Hadukhin likes this
Yannick Vanlaeke February 18, 2021

Hi @Brett,

The JSON I mentioned works for me. We are on datacenter 8.5.5. Are you also trying this on server our in cloud?

Regards,
Yannick

Brett February 18, 2021

Hey @Yannick Vanlaeke & @Alexander Eck [Tempo] - thank you for your replies.

I am getting the same error as the OP plus another when I make minor changes.

1. (Can not deserialize instance of java.lang.Long out of START_OBJECT token at [Source: N/A; line: -1, column: -1] (io.tempo.jira__team)) 

2. (Can not construct instance of java.lang.Long from String value 'Development': not a valid Long value at [Source: N/A; line: -1, column: -1] (io.tempo.jira__team))

I get error #1 when my JSON is
{
"fields": {
"customfield_10068": {"value" : "Design"}
}
}

I get error #2 when my JSON is

{
"fields": {
"customfield_10068": "Development"
}
}

I checked that the teams are mapped to the project too and will go through your article @Alexander Eck [Tempo] 

Brett February 18, 2021

@Alexander Eck [Tempo] thanks for the article. I followed it and can confirm this is now working for me! Awesome.

Like # people like this
2 votes
Answer accepted
Yannick Vanlaeke December 7, 2020

Hi,

It's important to add the " also for the value.

The value should also be the id of your team.

{
"fields": {
"customfield_xxxxx": "xxx"
}
}

Regards

Renni Verho November 25, 2022

This worked to me.  even it is somehow agains to logic what I (and looks many other) tried. 

 

so not 

"customfield_xxxx": {"key": "xxx"},

or 

"customfield_xxxx": {"id": "xxx"},

or 

"customfield_xxxxx": xxx

just 

   "customfield_xxxxx": "xxx"

 Br

Like Eugene Victorov likes this
1 vote
Answer accepted
Alexander Eck [Tempo]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 9, 2020

Hi,

you should use the Tempo team id. So something like this should do it.

{"fields":{"customfield_xxxxx":4}}

BR

0 votes
Andrew Bilukha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2022

We have a little different use case, when we change the value of a team in Epic, we need to update the team value in stories (or children) of the said epic.  To get an idea what this should look like, always go to JSON view of a ticket, and find that field.
https://<yourURL>/rest/api/2/issue/<issuekey>

You will see that the field is complex, it has a few values - self, id, key, name, so we set the following from parent to child:

{
"fields": {
"customfield_10014": {
"self": "{{triggerIssue.fields.customfield_10014.self}}",
"id": "{{triggerIssue.fields.customfield_10014.id}}",
"key": "{{triggerIssue.fields.customfield_10014.key}}",
"name": "{{triggerIssue.fields.customfield_10014.name}}"
}
}
}

 That works, but for some reason we get an error in JIRA Project automation,

"Error editing issues ER-298 (Could not find team with name of supplied custom field value.), ER-297 (Could not find team with name of supplied custom field value.)"
and unless we force reindex the project, the updated team value shows in UI but does not show up in searches, etc.
Still trying to resolve the project re-index issue.

Corey Hughes April 14, 2022

@Andrew Bilukha We were able to accomplish this by using the below. 

{
"fields": {
"customfield_10014": "{{issue.epic.customfield_10014.id}}"
}
}
Like karel_mellen likes this
0 votes
michal.wesolowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 4, 2020

I have the same problem here. Did you manage to solve it?

Renni Verho November 25, 2022

This did the magic :

"customfield_xxxxx": "xxx"  

 

last xxx is team ID

0 votes
Susana Rodrigues
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2020

I'm trying to do the same, but no sucess. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events