show incidents only for few groups in list view !
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 09:51 AM
I have created BR in task table to show the incidents for the specific groups.
the groups are added in sys property.
the script is not working can some one help to resolve quickly.
(function executeRule(current, previous /*null when async*/) {
var userGroups = gs.getUser().getMyGroups();
var grp1 = gs.getProperty('Lock_Incidents').split(',');
var grp2 = gs.getProperty('Collection_Incidents').split(',');
var lock = false;
var collection = false;
for (var i = 0; i < grp1.length; i++) {
if (userGroups.indexOf(grp1[i]) !== -1) {
lock = true;
break;
}
}
for (var j = 0; j < grp2.length; j++) {
if (userGroups.indexOf(grp2[j]) !== -1) {
collection = true;
break;
}
}
if (lock == true) {
current.addEncodedQuery('short_descriptionNOT LIKE "Lock"');
}
if (collection == true) {
current.addEncodedQuery('short_descriptionNOT LIKE "Collection"');
current.addEncodedQuery('short_descriptionNOT LIKE "collection"');
}
})(current, previous);
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 12:16 AM
Hi @Barathk,
can you please share what is the ambition of the business rule?
You have system property with assignment groups and these groups shall be allowed to get access, is that correct?
Why don't you use scripted ACL instead of BR?
Please, explain who is supposed to do what and who is not supposed to do it - e.g. who can show what and who is not allowed..
———
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */