- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 07:24 AM
I wonder if there is a better place for me to post my Istanbul upgrade-related questions?
Anyway, I have an On-Call Assign (Current) Business Rule that goes and looks at the on-call calendar for the Assignment Group in the Incident and then adds the person on-call to the Assigned to field. This worked fine in Fuji and now does not work in Istanbul. Any thoughts on what's different? We can still use "current," right?
Name: On-Call Assign (current)
Order: 1001
Run at Server
When to Run: After on Insert of Update
Condition: !current.assignment_group.nil() && current.assigned_to.nil()
Script:
//*****************************************************************************
// Assign unassigned incident to the current on-call person for the specified
// group.
//*****************************************************************************
onCallAssign();
function onCallAssign() {
var userID;
var userName;
var rota = new OnCallRotation();
rota.who(current.assignment_group);
if (rota.next()) {
// if this is a device notification, we can only assign if there is a primary user
// there is no primary user if this is a manual rota, so just skip it in that case
if (rota.getType() == 'device') {
userID = rota.getPrimaryUser();
userName = rota.getPrimaryUserName();
} else {
userID = rota.getUser();
userName = rota.getUserName();
}
if (!userID) {
return;
}
current.assigned_to = userID;
current.update();
gs.addInfoMessage("Automatically assigned to on-call: " + userName);
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 07:35 AM
can you try replacing line 13 with this rota.who(current.assignment_group.toString());
I remember someone posted with same kind of issue about a week or two ago

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 07:35 AM
can you try replacing line 13 with this rota.who(current.assignment_group.toString());
I remember someone posted with same kind of issue about a week or two ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2017 07:41 AM
How wonderful! It worked!
thanks much,
Richelle