when user belongs to particular group he can see only ticket assigned their group only

Gillerla Rajesh
Tera Contributor

when user belongs to particular group he can see only ticket assigned their group only and also having another condtion group is command center and reassginemnt count is greater then 1,

 

how can achive this ?

 

i tried with Query BR, but when i impersonate the group memeber when i open ticket its opening different tickets not opening ticket,

 

but when i copy that URL and open in my login its opening correct record, here that user open ticket it's every time opening same ticket number but sys_id is different.

 

any idea about this with out Query BR how can i achive this.

2 REPLIES 2

Isaac Vicentini
Mega Sage
Mega Sage

Hi @Gillerla Rajesh,

 

You can create an ACL to achieve this, like:

 

Type: Record

Operation: Read

Table: (Ticket table)

 

Script to condition:

    var user = gs.getUser();
    var isCommandCenter = user.isMemberOf('<<Command Center Group Name>>');

    if (isCommandCenter && current.reassignment_count > 1) {
        return true;
    }
    return false;

 

Change the <<Command Center Group Name>> in the script with the exact name of the group.


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Hi @Isaac Vicentini ,

i have some doubts here

 

1. What type ACL i will give here ? is it table.none (or) table.*

2. in script i need to give any filter conditon like addQuery or encoded query for filter records?

3.and u given return true, but in acl we will pass answer=true or answer= false right ?

 

 

GillerlaRajesh_0-1720978000223.png

var user = gs.getUser();
var group= user.isMemberOf('Mexico- TechHub Team');

if (group) {
    // i need to pass encoded query or query ?
answer=true;
}else{
    answer=false;
}
 
 
Please give me the exact logic here.
 
this is the exact filter condition
GillerlaRajesh_1-1720978824966.png

 

 

 

 

 

 

 

FYI: 

this is Query BR

 var member = gs.getUser().isMemberOf('Mexico- TechHub Team');
    if (member ) {

        // var m = current.addQuery('assignment_group', '=', '7302247f1b854a107065c8415b4bcb93');
        // m.addOrCondition('reassignment_count', '>', '1');



        //current.addEncodedQuery('assignment_group=7296c9151b16e9100467feee034bcb1b^reassignment_count>1^NQassignment_group=7302247f1b854a107065c8415b4bcb93');


        var k = current.addQuery('assignment_group', '=', '7296c9151b16e9100467feee034bcb1b');
        k.addCondition('reassignment_count', '>', '1');

        k.addOrCondition('assignment_group', '=', '7302247f1b854a107065c8415b4bcb93');
}
 
Regards
Rajesh Gillerla.