OCRotation - Global

The core OCRotation builds a data structure that is used to display the calendar. The code builds up the GlideAJAXSchedulePage object which stores a list of span items. You can use this type for the Gwt (legacy) calendar. See the OCRotationV2 API for other calender types. This is part of On-Call Scheduling.

OCRotation - buildRotas()

Builds the on-call coverage based on your groups, rotas, and rosters. This is used by the OCRotationV2 - getSpans method.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Void

OCRotation - getEndDate()

Get the end date for the time period for which you want to retrieve on-call coverage.

Table 3. Parameters
Name Type Description
None
Table 4. Returns
Type Description
String End date for the time period for which you want to retrieve on-call coverage.

OCRotation - getGroupIds()

Get comma separated list of group sys_id (sys_user_group) values for an on-call schedule.

Table 5. Parameters
Name Type Description
None
Table 6. Returns
Type Description
String Comma separated list of group sys_id (sys_user_group) values for an on-call schedule.

OCRotation - getRosterIds()

Get the rosters according to the selected rotas.

Table 7. Parameters
Name Type Description
None
Table 8. Returns
Type Description
String Rosters according to the selected rotas.

OCRotation - getRotaGr(String rotaIds, String groupIds, String rosterIds, String userIds)

Get a GlideRecord for the cmn_rota table filtered by groups, rota, users, and roster.

Table 9. Parameters
Name Type Description
rotaIds String Comma separated list of rota sys_id (cmn_rota) values for an on-call schedule.
groupIds String Comma separated list of group sys_id (sys_user_group) values for an on-call schedule.
rosterIds String Comma separated list of roster sys_id (cmn_rota_roster) values for an on-call schedule.
userIds String Comma separated list of user sys_id (sys_user) values for an on-call schedule.
Table 10. Returns
Type Description
GlideRecord A GlideRecord for the cmn_rota table filtered by groups, rota, users, and roster.

OCRotation - getRotaIds()

Get the rotas for the groups on your calendar.

Table 11. Parameters
Name Type Description
None
Table 12. Returns
Type Description
String Rotas for the groups on your calendar.

OCRotation - getStartDate()

Get the start date for the time period for which you want to retrieve on-call coverage.

Table 13. Parameters
Name Type Description
None
Table 14. Returns
Type Description
String Start date for the time period for which you want to retrieve on-call coverage.

OCRotation - getTimezone()

Get the timezone that your on-call calendar will use.

Table 15. Parameters
Name Type Description
None
Table 16. Returns
Type Description
String Timezone that your on-call calendar will use. For example, Europe/London and US/Pacific.

OCRotation - getUserIDs()

This will filter the schedules return by users. Get comma separated list of user sys_id (sys_user) values used to filter on-call schedules.

Table 17. Parameters
Name Type Description
None
Table 18. Returns
Type Description
String Comma separated list of user sys_id (sys_user) values used to filter on-call schedules.

OCRotation - setEndDate(String endDate, Boolean inclusive)

Set the end date for the time period for which you want to retrieve on-call coverage. If the end date is not set, then the last day of the next month is applied by default. Use in conjunction with OCRotationV2 - getSpans.

Table 19. Parameters
Name Type Description
endDate String [Optional] End date of the on-call schedule.
inclusive Boolean [Optional] When true, the end date is included in the time span. If not specified, this value defaults to true.
Table 20. Returns
Type Description
Void

OCRotation - setGroupIds(String groupIds)

This will filter the schedules return by groups. Set comma separated list of group sys_id (sys_user_group) values for an on-call schedule. Use in conjunction with OCRotationV2 - getSpans.

Table 21. Parameters
Name Type Description
groupIds String Comma separated list of group sys_id (sys_user_group) values for an on-call schedule.
Table 22. Returns
Type Description
Void

OCRotation - setRosterIds(String rosterIds)

Set the rosters according to the selected rotas. Use in conjunction with OCRotationV2 - getSpans.

Table 23. Parameters
Name Type Description
RosterIds String Rosters according to the selected rotas.
Table 24. Returns
Type Description
void

OCRotation - setRotaIds(String rotaIds)

Set the rotas for the groups on your calendar. Use in conjunction with OCRotationV2 - getSpans.

Table 25. Parameters
Name Type Description
RotaIds String Rotas for the groups on your calendar.
Table 26. Returns
Type Description
Void

OCRotation - setStartDate(String startDate)

Set the start date for the time period for which you want to retrieve on-call coverage. If the start date is not set, then the first day of the previous month is applied by default. Use in conjunction with OCRotationV2 - getSpans.

Table 27. Parameters
Name Type Description
startDate String [Optional] Start date for the time period for which you want to retrieve on-call coverage.
Table 28. Returns
Type Description
void

OCRotation - setTimezone(String timezone)

Set the timezone that your on-call calendar will use. Use in conjunction with OCRotationV2 - getSpans.

Table 29. Parameters
Name Type Description
Timezone String Timezone that your on-call calendar will use. For example, Europe/London and US/Pacific.
Table 30. Returns
Type Description
Void

OCRotation - setUserIds(String userIds)

Set comma separated list of user sys_id (sys_user) values used to filter on-call schedules. Use in conjunction with OCRotationV2 - getSpans.

Table 31. Parameters
Name Type Description
UserIds String Comma separated list of user sys_id (sys_user) values used to filter on-call schedules.
Table 32. Returns
Type Description
Void