Hello Community, How can I populate users on Assignee field based on the value of custom single group picker field?
Scenario is tickets are unassigned by default, when the agent tries to edit the issue, Assignee should contain only the users (values) on the single group picker custom field
Example is:
Assignee : Unassigned
Single Group Picker : ABC TEAM
Values on Assignee must be ABC TEAM users.
Can behavior do this? or post functions? any help is really appreciated. if you have sample code to start with, that would be great. Thank you
Hi @Alvin,
What I've done in the past was setting up a custom field where users were collected from a group and the copied the username from that field to the assignee (also removed assignee from fields).
Does that make sense?
I wonder if that approach would help you. Let me know what you think.
Cheers,
Krisz
Hi @Krisztian Kovacs, I foresee what have you done and I think that really made sense. did you still have the sample code? and where it had been used? behavior ? post functions? thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alvin,
unfortunately it was very specific for a client, but here is the gist of it:
I think I had to go really fancy and use "George Smith - g.smith@company.com" format in the single select field, so I ended up parsing that and used the email address to look up the user object and then put that in the assignee field.
Does that make sense at all?
Cheers,
Krisz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Krisztian KovacsOhh I see. I got the point but what do you mean by appropriate screens? because on the #3 how can I update assignee if it is removed from the screens. Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script will do it for you, based on what user is in the field. The idea is to completely replace the assignee field with your own.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need the assignee user picker to be populated everytime the group change. is it possible on post function? or should I use listener? or behavior?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It depends on when you change the group. If it's on the edit screen then behaviour, if it changes somewhere else, you could use a listener.
I'd expect users to change the field on the edit and create screens, so I'd use a behaviour to update the assignee field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Krisztian Kovacs , but post functions and behavior have different syntax right?
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.