I am using a Locked Team field in my project which is a single pick (from a dropdown list) field. There are multiple Team fields and so I made sure I was using the correct Team field on my pages. I verified this by looking at my issues from the Create and Edit screens (the only two screens I have) and the correct field type is displayed. I also verified by selecting the Screens in the Custom fields screen and I see that my screens are listed. I also selected the other Team field Screens and saw that is was only on one screen and it wasn't mine.
I have an automation that creates an issue tree where the user will create an Epic issue and that will trigger an Automation to create the issue and child issues. Pretty simple so far.
I want all the issues created via the automation to all have a particular Team set. The Create screen had the team so I could either use what the user set and propagate it down to the created child issues, OR more preferably, I want to just set all issue team values since my automation issue type trigger will "know" what team should be set for all issues.
I tried to simply use the "Choose fields to set" in the automation rule to have it set the Team to an explicit value as well as use the one the user selected when they created the issue and that didn't work. That's weird. Error said that Team wasn't available for some reason.
Then I tried to do it in JSON. I know my customfield_ID and I tried to set the value to 0 (zero) in the JSON thinking that the selectable Team indexes started at 1 and it actually set the Team Value to one of the values in the Team Picker. Too easy... NOT. Trying subsequent numbers of 1, 2, 3, etc. resulted in errors. Scoured this forum and the internet for hours and nothing. I also tried using the text in that I see in the picker ("Sales", "HR" etc,) and those values were unknown as well.
My current thinking is to try and find the value IDs since 1 workd and I can't find them. Tried the Rest API and viewing page source and all the things I found on the net. I can't seem to find them and maybe it's because the field is Locked???
What am I missing?
Thanks in advance!
Hello @Dan Spearing
Welcome to the Atlassian community.
If you are using this Team custom field:
...then you must currently use the More Options feature in the Automation Rule Create Issue and Edit Issue actions to set it. You must set the value to the ID for the Team itself. You can get the ID for the Team by looking up the Team manually through the Teams menu. After finding the Team, click on it to display the details. The ID for the Team displays in the URL of the page showing the Team's details i.e
/jira/people/team/b124c9df-fded-4751-afb1-2994f08c45e8
The JSON code for setting the field would be:
{
"fields":{
"Team":"insert Team ID here"
}
}
Reference:
https://community.atlassian.com/forums/Jira-articles/Two-ways-to-update-the-Team-field/ba-p/2567910
Thank you for the response Trudy!
I would have never found this without you!
If I have an automation that sets the team of a created issue via the JSON and then calls an automation to create another issues, can I simply set the the Team to the "Copy Team from Current Issue" or does each created issue need to do it through the JSON?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Team field cannot be selected from the Choose fields to set list, so there is not an option to use the Copy options associated with that.
The value has to be set through JSON.
If your rule has a trigger issue where the value is set you can use Smart Value syntax to reference that value in the JSON rather than explicitly providing a Team ID.
{
"fields": {
"Team": "{{triggerIssue.Team}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Trudy!
BTW, Team is available for selection which is why I tried to make it work. The JSON route works so that is the path I'm following.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.