How to check if user is part of specific group to assign the ticket

abdul rajak
Kilo Contributor

Hi,

How to check if the user who is updating work notes or additional comments section is part of assignment group in the ticket. If the user the is part of assignment group, only then I want to assign the ticket to that particular user.

For that I have written below Business rule.

Please help me.

find_real_file.png

 

find_real_file.png

Thank you.

 

 

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Abdul,

Try using below as script.

if(gs.getUser().isMemberOf(current.assignment_group))
{
current.assigned_to=gs.getUserID();
}

View solution in original post

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi Abdul,

Try using below as script.

if(gs.getUser().isMemberOf(current.assignment_group))
{
current.assigned_to=gs.getUserID();
}

asifnoor
Kilo Patron

Hi,

create a before update BR on the incident table and just check like this

if(gs.getUser().isMemberOf(current.assignment_group.toString()))
{
current.assigned_to=gs.getUserID();
} else {
gs.addErrorMessage("your error comes here");
}

Mark the comment as a correct answer and helpful if this has helped to solve the problem.