OCRotaMember - Global

The OCRotaMember script include provide methods to perform maintenance operations on the On-call Member [cmn_rota_member] table.

OCRotaMember - deactivateUser (String userId, GlideDateTime deactivateDate)

Deactivates the user's rota member records according to the deactivate date.

表 : 1. Parameters
Name Type Description
userId String The sys id of the user.
deactivateDate GlideDateTime The date from which the user's rotation is deactivated.
表 : 2. Returns
Type Description
void

OCRotaMember - hasChanged (GlideRecord current, GlideRecord previous)

Checks whether the cmn_rota_member record has changed. Checks the Member, From, To, and Order fields have changed.

表 : 3. Parameters
Name Type Description
current GlideRecord The latest changes made to the cmn_rota_member record.
previous GlideRecord The original state of the cmn_rota_member record.
表 : 4. Returns
Type Description
void

OCRotaMember - hasOrderChanged (GlideRecord current, GlideRecord previous)

On update of a cmn_rota_member record, checks whether the order of the record has changed.

表 : 5. Parameters
Name Type Description
current GlideRecord The latest changes made to the cmn_rota_member record.
previous GlideRecord The original state of the cmn_rota_member record.
表 : 6. Returns
Type Description
Boolean Returns true if the order has changed.

OCRotaMember - recalculate (GlideRecord current, GlideRecord previous)

Recalculates the schedule for the cmn_rota_member record.

表 : 7. Parameters
Name Type Description
current GlideRecord The latest changes made to the cmn_rota_member record.
previous GlideRecord The original state of the cmn_rota_member record.
表 : 8. Returns
Type Description
void

OCRotaMember - validateDates (String from, String to)

Ensures that the From date occurs before or on the same date as the To date.

表 : 9. Parameters
Name Type Description
from String Formatted date/
to String Formatted date/
表 : 10. Returns
Type Description
Boolean Returns true if the From date is before or on same date as To date.