I have found similar questions, but the issue may be that I am using Jira Data Center v9.4.15, not Cloud.
I have configured four shared teams in Advanced Roadmaps. I have added the Teams field to my screens. I can manually set the Team value in either Plans or issue screen. My goal is have an automated way to make sure the Team value is always set going forward.
I created a rule triggered when an issue is assigned to a user. If assignee is (a, b, c) then edit Team field to (Team ABC). The issue is that the Team field is not available to be selected in the Edit Issues fields pick list. It is cf(10502) according to the custom fields list.
Please help!
First thing, I am using Jira Cloud, and so my suggestions are based on what I know about automation, in general. With that out of the way...
I believe you may set that field using advanced edit with JSON, in the "More options" section of the Edit Issue action. To learn more about such edits, please look here: https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html
For teams, please try this:
{
"fields": {
"Teams": "the id value for the team"
}
}
You will need to find the team id values using example issues, such as with this how-to article, and then searching for the field's value: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy , as always, thanks for your expertise in Automation. I am missing the bit on how this works based on assignee though. I have a use case where I want to keep the Team field updated based on Assignee changing.
@Jennifer Maurer , could you share your full automation so that I, and others can benefit?
I suspect where my use case may be different is that I don't want to create a "hard-coded" scenario in my automation where team members are concerned. Rather I want to lookup the assignee and find the team they are assigned to and then set the Team accordingly. Assuming this "lookup" is even possible, there is one remaining gottcha - what happens when a user is in multiple teams? I want to test that out to see.
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.
Thanks @Jennifer Maurer , that is what I expected. The one obvious challenge here is keeping the rule up to date. If changes are made to one of the Teams the rule will need to change. Hopefully we will get a way to search for any team(s) that a user is in one day.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...
For Jira Cloud, Server, and Data Center, I believe the if / else conditions are a high-maintenance solution. With Jira Cloud, a Lookup Table would make that slightly easier to maintain.
One would hope for a method to "find the teams for a user", but there is no REST API endpoint to do that yet. Here is the really old suggestion to add that, but it is tagged with the dreaded "future consideration": https://jira.atlassian.com/browse/JSWCLOUD-20360
Another approach would invert the query direction, and only need to hardcode the team id values. That would lookup the users for each possible team, one by one, check for membership, and then use that id. This is the relevant endpoint from the Teams REST API for those wanting to try that: https://developer.atlassian.com/platform/teams/rest/v1/api-group-teams-members-public-api/#api-gateway-api-public-teams-v1-org-orgid-teams-teamid-members-post
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.