- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:54 AM
We have a "Copy Change Request" UI Action that copies over specific fields to a new request. However, we made some groups inactive and added some code to the script to check if the assignment group is active or not and if not throw a message to the user. When an admin uses the UI action, it works perfectly. However, if a normal ITIL user hits the button, it will copy over the previous group even if it is inactive. There are no ACL's on the ui action either. Below is a code snippet that works for admins but not itil users. Ideas why? Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:59 AM
There is a business rule on group table, which restricts it. You need to update this table to allow for itil users as well.
Make sure it doesnt affect you task table. assignment_group field in task table should have filter active=true
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:00 AM
Hi Akunk
Quick question. Did you check the active field content of the group you are trying to update ?
Your condition says cgh.active == false, but if the field has never being touched the content is null not false.
I would suggest try to implement a different logic
cgh.active != true
Try and let me know. I hope this will solve your issue and if it does please mark it
Cheers
R0b0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:01 AM
Why not add one more line in line 5
chg.addQuery('active',true);
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:03 AM
or use if (chg.active!=true) in line 9 instead of chg.active == false
One more catch here.
ITIL users may not have access to group table. This could be an access issue also.
You may need to give access to ITIL users to Read sys_user_group table.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:40 AM
Thanks for the responses, however I still get the same result. Tried changing the script and adding a read role to the sys_user_group table for ITIL members and still only works for an admin.