Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

While updating the Team custom field by "errors":{"customfield_10001":"The Team must be a string"}}

Raju Mandapaka
Contributor
November 22, 2022

Team,

I am having a text drop down option with all team names, my automation should copy that value and set as a value in Teams custom field (which was originated from advanced road maps) but it is throwing errors.

Added all the screen shots.

Thanks in advance.

Automation -1.JPGAutomation -2.JPGAutomation -3.JPG

3 answers

0 votes
Alexa
Contributor
September 22, 2023
0 votes
Trudy Claspill
Community Champion
November 22, 2022
0 votes
Stefan Salzl
Community Champion
November 22, 2022

Hi @Raju Mandapaka 

did you try to just use {{a}} ? Furthermore: Is there a special need for the ID? Haven‘t seen that before. 

Best
Stefan

Raju Mandapaka
Contributor
November 22, 2022

Hi @Stefan Salzl 

I tried both one as 

{
"fields": {
"customfield_10001": { "name": "{{a}}" }
}
}

and one as

{
"fields": {
"customfield_10001": { "ID": "{{a}}" }
}
}

both results in same error

 

(The Team must be a string (customfield_10001))

Raju Mandapaka
Contributor
November 22, 2022

@Stefan Salzl  Any suggestions or workarounds??

Stefan Salzl
Community Champion
November 22, 2022

{
"fields": {
"customfield_10001": "{{a}}"
}
}

Stefan Salzl
Community Champion
November 22, 2022

@Raju Mandapaka 

I would even suggest to skip the step of creating a variable as this step is not needed.

image.pngAs you are acting in the same issue you could always refer to the {{issue}} context.

In my screenshot: 

  • customfield_10093 is a text field
  • {{issue.Stages}} is a dropdown --> by adding .value it takes the currently selected value into account

So in your case try the following:

 

{
"fields": {
"customfield_10001": "{{issue.JA Team 2.value}}"
}
}

 

Best
Stefan

Stefan Salzl
Community Champion
November 22, 2022

Hi @Raju Mandapaka 

I found the following article covering exactly this topic:

https://community.atlassian.com/t5/Jira-articles/Automation-Set-your-Advanced-Roadmaps-Team-automatically-when/ba-p/1761588

 

As it seems the field can only be set with the ID of the team (not the name). I have no idea how to get the teams ID via name (checked if there is an API but doesn´t seem to be sufficient):
https://docs.atlassian.com/portfolio-for-jira-server/REST/2.13.0/teams/

Best
Stefan

Trudy Claspill
Community Champion
November 22, 2022

That is the same article link I posted in the duplicate question the OP put into the Jira Software Questions community. :-)

Like Stefan Salzl likes this
Stefan Salzl
Community Champion
November 22, 2022

🤣🙈

ooouh....well...in this case I couldn‘t share any news I guess 🤷🏻‍♂️

Thanks for letting me know.

Suggest an answer

Log in or Sign up to answer