- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 08:40 AM
On our change request I want to permanently add two of our process users to the watch list. So for all change requests these two users should be on the watch list.
I've had a look around the community and can't find what I want.
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 09:21 AM
Instead of scripting this, why don't you just add them to the notifications sent out to the watch list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 08:47 AM
Hi Angus,
You can just add the users as defaults in the dictionary for your watch list, just separate them by a comma. I'd suggest using the sys_id's of the users.
You can also script this so that every change of a change confirms the users are in the watch list with an onBefore business rule
checkWatchList(sysIDOfUser1);
checkWatchList(sysIDOfUser2);
function checkWatchList(userSysID) {
var watchListString = current.watch_list.toString();
var watchListArray = watchListString.split(",");
var onList = false;
for (var i = 0; i <= watchListArray.length; i++) {
if (watchListArray<i> == userSysID) {
onList = true;
}
}
if (!onList) {
watchListArray[watchListArray.length] = userSysID;
}
current.watch_list.setValue(watchListArray.join());
}
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 09:00 AM
Careful with this. Watch List is defined on the TASK table, and I strongly suspect these two users don't want to be on the watch list for absolutely everything.
You're going to need to define a Dictionary Override on task.watch_list if you want to set its default value for Change only.
You might also want to learn what they're trying to solve by being watch_listed on all changes.
- Is it that they can't see all changes, but can see stuff they're watch listed on?
- Is it that they want to be CC'd on every discussion of every change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 09:04 AM
you should never be hard-coding sys_id's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2015 09:21 AM