Hello,
is it possible to set a group picker in a post function based on the user who transitions the issue?
I want to do the following:
Users can set the status to "investigating" and have to set the group picker "team" to the according team group manually so the members of that group see that there is an issue they have to work on.
The other way would be, a user takes the issue directly and does not pass the issue to a team. Therefore he uses the "fast-track" transition where he gets set as assignee directly in a post function. Problem is - for reporting - we need the according team group of the user who directly assigns the issue to himself to be set too. Can I script this? I dont know how to check (user A assigns himself the issue -> search his profile for relevant groups -> if there is a group starting with "Team...." set it)
Best regards
If you have Scriptrunner, then combining bits of these two scripts should do the job:
https://library.adaptavist.com/entity/identify-the-groups-of-a-user will get a list of groups for the currently logged in user.
https://library.adaptavist.com/entity/update-the-value-of-custom-fields-through-the-script-console shows you how to set values of many types of field on an issue, so nick the group-picker lines from that!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.