
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 07:08 AM
I want to separate groups that handle Incidents so that the ITIL user in each groups only see their incidents. I didn't want to play with the ACL so I updated the business rule "incident query " (see below). The business rule is working after some initial tests and showing me only the incidents for the groups the user is in.
However, I am wondering where is the sys_id ("d6435e965f510100a9ad2572f2b47744") for this DYNAMIC coming from? I copied that query from the list when I set the filter. The value is the same as on my developer instance, test instance and production instance.
--------
Business rule: incident query
When: before
Order: 100
Query
No filter
----------------
// check if user is not the admin. admin can see everything
if (!gs.hasRole("admin")) {
var u = gs.getUserID();
// if user has ITIL role we check what groups the user belongs to and then run the query
if (gs.hasRole("itil") && gs.isInteractive()) {
var qc = current.addQuery("assignment_group", "DYNAMIC", "d6435e965f510100a9ad2572f2b47744");
gs.print("query restricted to users groups: " + u);
}
// if user is not itil we check only for the incidents for the user
if (!gs.hasRole("itil") && gs.isInteractive()) {
var qc = current.addQuery("caller_id", u).addOrCondition("opened_by", u).addOrCondition("watch_list", "CONTAINS", u);
gs.print("query restricted to user: " + u);
}
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 07:10 AM
Dynamic filter i gguess,
Navigate to Dynamic filter from left nav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 07:56 AM
Thats what i said initially mate!!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 08:03 AM
You are right. I didn't quiet understand what you meant initially because I was more looking or expecting a table name. Will change the correct answer.
Thank you for your help. Will change the correct answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 08:19 AM
Thankyou.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 07:50 AM
Do you mean the table "Dynamic Filter Options"?