Skip to content

Latest commit

 

History

History
955 lines (749 loc) · 39.6 KB

File metadata and controls

955 lines (749 loc) · 39.6 KB

Objects

CatalogDateValidator : object

Validates dates on a catalog item, because the standard validator doesn't work there

ChangeLCSController : object

Controls how the Life Cycle Status of Change Request appears

ChangeRequest : object

Handles the field states for Change Request. Used in the UI Policies to prevent overlap when the policies are at the same order level.

ChatAlertsClient : object

Displays chat messages on the client side

IncidentMessage : object

Controls that the incident message is shown on the list view, since we took the functionality away from the gs.addErrorMessage() code in the business rule. Instead, now the client renders the message based on g_user.getClientData and gs.putClientData

MedeaInternational : object

Contains functions for the Medea International Catalog Item and its Variable Sets/Variables

MediaPulse : object

Contains functionality for the MediaPulse form

PeopleSoft : object

Contains utility functions for PeopleSoft Access Request

PreApprovalUtil : object

Used to filter the categories and sub categories for Change Pre-Approvals

QueryString : object

creates an object that contains parameters passed in from the URL

SecurityAccessRequest : object

Contains utilities for Security Access Request catalog items

ServiceCatalog : object

Class for handling Service Catalog functionality

TaskUtils : object

Contains base functionality for tasks

VariableHider : object

Handles hiding variables or making them read-only on a ritm, because the UI policies often fail at this

## Typedefs
handleMissingFields : function

Ensures that blank, read-only fields on a catalog task are not set as mandatory

handleFieldNames : function

Gets the name of the variable so we can properly disable it

## CatalogDateValidator : object Validates dates on a catalog item, because the standard validator doesn't work there

Kind: global namespace

catalogDateValidator.validateDateTime(date) ⇒ boolean

validates a date/time object

Kind: instance method of CatalogDateValidator
Returns: boolean - true if valid

Param Type Description
date string a date/time string

catalogDateValidator.validateDate(date) ⇒ boolean

validates a date object

Kind: instance method of CatalogDateValidator
Returns: boolean - true if valid

Param Type Description
date string a date string

ChangeLCSController : object

Controls how the Life Cycle Status of Change Request appears

Kind: global namespace

changeLCSController.clearAll()

Clears all options on the life cycle status field

Kind: instance method of ChangeLCSController

changeLCSController.inDraft()

Sets the life cycle status field for Draft

Kind: instance method of ChangeLCSController

changeLCSController.inDraftEmergency()

Sets the life cycle status field for Draft if it's an Emergency

Kind: instance method of ChangeLCSController

changeLCSController.inPIP()

Sets the life cycle status field for Planning in Progress

Kind: instance method of ChangeLCSController

changeLCSController.inSFA()

Sets the life cycle status field for Scheduled for Approval

Kind: instance method of ChangeLCSController

changeLCSController.inScheduled()

Sets the life cycle status field for Scheduled

Kind: instance method of ChangeLCSController

changeLCSController.inScheduledEmergency()

Sets the life cycle status field for Scheduled Emergency

Kind: instance method of ChangeLCSController

changeLCSController.inDeployed()

Sets the life cycle status field for Deployed

Kind: instance method of ChangeLCSController

changeLCSController.isDeployed()

Sets the life cycle status field for after Deployed

Kind: instance method of ChangeLCSController

ChangeRequest : object

Handles the field states for Change Request. Used in the UI Policies to prevent overlap when the policies are at the same order level.

Kind: global namespace

changeRequest.setFieldsReadOnly(fields, trigger)

Changes the read only status of a list of fields

Kind: instance method of ChangeRequest

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields read only status

changeRequest.setFieldsMandatory(fields, trigger)

Changes the mandatory status of a list of fields

Kind: instance method of ChangeRequest

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields mandatory status

changeRequest.setFieldsDisplay(fields, trigger)

Changes the display status of a list of fields

Kind: instance method of ChangeRequest

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields read only status

changeRequest.typeIsNone()

Sets fields to read only if the type is none

Kind: instance method of ChangeRequest

changeRequest.isInfrastructure(type) ⇒ boolean

Determines if a change request is infrastructure based on type

Kind: instance method of ChangeRequest
Returns: boolean - true if it's infrastructure

Param Type Description
type string A change request type

changeRequest.isServerBuild(type) ⇒ boolean

Determines if a change request is a server build type

Kind: instance method of ChangeRequest
Returns: boolean - true if it's a server build

Param Type Description
type string A change request type

changeRequest.isDeployed(type) ⇒ boolean

Determines if a change request is deployed

Kind: instance method of ChangeRequest
Returns: boolean - true if it's deployed

Param Type Description
type string A change request life cycle status

changeRequest.isDeployedSuccessfulish(type) ⇒ boolean

Determines if a change request is deployed successfully (or with issues)

Kind: instance method of ChangeRequest
Returns: boolean - true if it's deployed successfully (or with issues)

Param Type Description
type string A change request life cycle status

changeRequest.handleSOXFramework()

Sets fields for SOX Framework

Kind: instance method of ChangeRequest

changeRequest.isCancelled()

handles if the change request is cancelled

Kind: instance method of ChangeRequest

changeRequest.isClosed()

handles if the change request is closed

Kind: instance method of ChangeRequest

changeRequest.onHoldHandler()

handles the visibility of the on hold checkbox

Kind: instance method of ChangeRequest

changeRequest.draftNonEmergency()

Handles if the change request is draft

Kind: instance method of ChangeRequest

changeRequest.draftEmergency()

Handles if the change request is draft (emergency)

Kind: instance method of ChangeRequest

changeRequest.planningInProgress()

Handles if the change request is planning in progress

Kind: instance method of ChangeRequest

changeRequest.scheduledForApproval()

Handles if the change request is scheduled for approval

Kind: instance method of ChangeRequest

changeRequest.scheduledInfrastructure()

Handles if the change request is scheduled and infrastructure

Kind: instance method of ChangeRequest

changeRequest.scheduledNonInfrastructure()

Handles if the change request is scheduled and non-infrastructure

Kind: instance method of ChangeRequest

changeRequest.deployed()

Handles if the change request is deployed

Kind: instance method of ChangeRequest

changeRequest.cancelled()

Handles if the change request is cancelled

Kind: instance method of ChangeRequest

changeRequest.closed()

Handles if the change request is closed

Kind: instance method of ChangeRequest

ChatAlertsClient : object

Displays chat messages on the client side

Kind: global namespace

chatAlertsClient.initialize()

initializes the chat message container to null

Kind: instance method of ChatAlertsClient

chatAlertsClient.start()

Main method - checks to see if the user is in the support desk, and if so, runs the code to get messages

Kind: instance method of ChatAlertsClient

chatAlertsClient.response(response)

Response handler for server response to getMyMessages

Kind: instance method of ChatAlertsClient

Param Type Description
response HttpResponse the response from the server

chatAlertsClient.acknowledgeMessage(sys_id)

Helper function to perform the AJAX call to acknowledge the message on the server

Kind: instance method of ChatAlertsClient

Param Type Description
sys_id string A sys_id of a chat message record to acknowledge on the server

chatAlertsClient.createContainer()

Helper function to create the chat container, this is our 'sidebar'

Kind: instance method of ChatAlertsClient

chatAlertsClient.removeMessage(sys_id)

Helper function to remove a chat message based on sys_id

Kind: instance method of ChatAlertsClient

Param Type Description
sys_id string The sys_id of a chat message to remove from the page

chatAlertsClient.createMessage(sys_id, from_name, body, dt)

Helper function to create a message within the container

Kind: instance method of ChatAlertsClient

Param Type Description
sys_id string The sys_id of the chat message
from_name string Who the message is from
body string The body of the message
dt string The date and time of the message

chatAlertsClient.animate(element, attribute, target, step, dir, callback)

Helper function to animate the display of a div

Kind: instance method of ChatAlertsClient

Param Type Description
element HtmlElement The element to animate
attribute string The attribute to affect
target integer
step integer
dir boolean
callback function A callback function

IncidentMessage : object

Controls that the incident message is shown on the list view, since we took the functionality away from the gs.addErrorMessage() code in the business rule. Instead, now the client renders the message based on g_user.getClientData and gs.putClientData

Kind: global namespace

MedeaInternational : object

Contains functions for the Medea International Catalog Item and its Variable Sets/Variables

Kind: global namespace
Extends: SecurityAccessRequest

medeaInternational.setMandatories(accessType)

Sets a list of fields to be mandatory (or not)

Kind: instance method of MedeaInternational

Param Type Description
accessType string The type of access

Example

new MedeaInternational().setMandatories('edit_access', true); //sets all "edit access" fields to mandatory

Example

new MedeaInternational().setMandatories('edit_access', false); //sets all "edit access" fields to not mandatory

medeaInternational.toggleAllLabels(on)

Toggles all labels on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the labels on or off

medeaInternational.toggleApplicationLabel(on)

Toggles the application label on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the label on or off

medeaInternational.toggleUserServicesLabel(on)

Toggles the user services label on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the label on or off

medeaInternational.toggleContractSecurityLabel(on)

Toggles the contract security label on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the label on or off

medeaInternational.toggleCountryLabel(on)

Toggles the country label on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the label on or off

medeaInternational.toggleFolderLabel(on)

Toggles the folder label on or off

Kind: instance method of MedeaInternational

Param Type Description
on boolean Whether to turn the label on or off

medeaInternational.folderAccessControl()

Sets the mandatory state of the folder access control

Kind: instance method of MedeaInternational

medeaInternational.folderSubmitCheck() ⇒ boolean

Checks that Add/Remove folders does not contain NONE and other values

Kind: instance method of MedeaInternational
Returns: boolean - false if the folder containers contain invalid data

MediaPulse : object

Contains functionality for the MediaPulse form

Kind: global namespace
Extends: SecurityAccessRequest

mediaPulse.toggleDivisionLabel(on)

toggles the division label on or off

Kind: instance method of MediaPulse

Param Type Description
on boolean Whether or not to show the label

mediaPulse.toggleGroupLabel(on)

toggles the group label on or off

Kind: instance method of MediaPulse

Param Type Description
on boolean Whether or not to show the label

mediaPulse.setMandatories(accessType)

Sets a list of fields to be mandatory (or not)

Kind: instance method of MediaPulse

Param Type Description
accessType string The type of access

Example

new MediaPulse().setMandatories('edit_access', true); //sets all "edit access" fields to mandatory

Example

new MediaPulse().setMandatories('edit_access', false); //sets all "edit access" fields to not mandatory

PeopleSoft : object

Contains utility functions for PeopleSoft Access Request

Kind: global namespace

peopleSoft.showPCList() ⇒ boolean

Determines if the PC list should be shown

Kind: instance method of PeopleSoft
Returns: boolean - true if the PC list should be shown

peopleSoft.showAMList() ⇒ boolean

Determines if the AM list should be shown

Kind: instance method of PeopleSoft
Returns: boolean - true if the AM list should be shown

peopleSoft.showGrantList() ⇒ boolean

Determines if the Grant Access list should be shown

Kind: instance method of PeopleSoft
Returns: boolean - true if the Grant Access list should be shown

peopleSoft.setCollectorFilter(collectorName, filterString)

Changes the filter of the list collector dynamically

Kind: instance method of PeopleSoft

Param Type Description
collectorName string the name of a list collector
filterString string the filter query to run on the list collector

PreApprovalUtil : object

Used to filter the categories and sub categories for Change Pre-Approvals

Kind: global namespace

preApprovalUtil.categoryChange(category, a)

handles the subcategory list on a category change

Kind: instance method of PreApprovalUtil

Param Type Description
category string The name of a category
a FilterSubCategories callback

PreApprovalUtil~FilterSubCategories : function

filters the subcategories properly (ie: shows the ones it should, hides the rest)

Kind: inner typedef of PreApprovalUtil

Param Type Description
response Response The response from the server

QueryString : object

creates an object that contains parameters passed in from the URL

Kind: global namespace

queryString.getObject() ⇒ object

creates an object containing url parameters

Kind: instance method of QueryString
Returns: object - an object containing url parameters
Example

var qs = new QueryString();
qs.getObject().sysparm_id; // gets a parameter called "sysparm_id"

SecurityAccessRequest : object

Contains utilities for Security Access Request catalog items

Kind: global namespace

securityAccessRequest.hider(element)

hides an element in the DOM

Kind: instance method of SecurityAccessRequest

Param Type Description
element HTMLElement an html element

securityAccessRequest.shower(element)

shows an element in the DOM

Kind: instance method of SecurityAccessRequest

Param Type Description
element HTMLElement an html element

securityAccessRequest.toggleApplicationLabel(on)

Hides or shows the application label

Kind: instance method of SecurityAccessRequest

Param Type Description
on boolean Whether or not to show the label

securityAccessRequest.getFormsArray() ⇒ array

gets all Access Request Forms

Kind: instance method of SecurityAccessRequest
Returns: array - a list of security access request forms

securityAccessRequest.atLeastOneSelectedOnGuide() ⇒ boolean

Ensures at least one check box is selected for the order guide

Kind: instance method of SecurityAccessRequest
Returns: boolean - true if one or more application is selected

securityAccessRequest.validateTwoListCollectorsWithName(listCollectorName, listCollectorName2, listName) ⇒ boolean

Validates that two list collectors do not contain similar values

Kind: instance method of SecurityAccessRequest
Returns: boolean - true if the lists do not contain similar values

Param Type Description
listCollectorName string the name of a list collector variable
listCollectorName2 string the name of a list collector variable
listName string the name of the list

securityAccessRequest.hasAnythingChanged() ⇒ boolean

Determines if any fields on the form have changed

Kind: instance method of SecurityAccessRequest
Returns: boolean - true if any form fields have changed; false otherwise
Example

var editAccess = g_form.getValue('request_types') == 'edit_access', mi = new MedeaInternational();
if (newValue == '' && editAccess && !mi.hasAnythingChanged()) {
	mi.setMandatories('edit_access', true);
}

SecurityAccessRequest.processFormsArray

Handles the data which comes back from the server

Kind: static typedef of SecurityAccessRequest

Param Type Description
catalogItems response A glide record

ServiceCatalog : object

Class for handling Service Catalog functionality

Kind: global namespace

serviceCatalog.validateDateField(a) ⇒ boolean

validates a date field format

Kind: instance method of ServiceCatalog
Returns: boolean - true if it's a valid date

Param Type Description
a string date string

serviceCatalog.validateOnboardingStartDate(start_date)

ensures a start date is at least ten days away

Kind: instance method of ServiceCatalog

Param Type Description
start_date string a date string

serviceCatalog.validateOnboardingEndDate() ⇒ boolean

Ensures an end date is not greater than six months away

Kind: instance method of ServiceCatalog
Returns: boolean - true if the date is valid

serviceCatalog.validateContractorEndDate() ⇒ boolean

Ensures an end date is not greater than six months away

Kind: instance method of ServiceCatalog
Returns: boolean - true if the date is valid

serviceCatalog.validateNewVendorDate() ⇒ boolean

Ensures an end date is not greater than six months away

Kind: instance method of ServiceCatalog
Returns: boolean - true if the date is valid

serviceCatalog.validateExistingVendorDate() ⇒ boolean

Ensures an end date is not greater than six months away

Kind: instance method of ServiceCatalog
Returns: boolean - true if the date is valid

serviceCatalog.hideServiceAndApplicationFields()

Hides service and application fields for a CMDB request

Kind: instance method of ServiceCatalog

serviceCatalog.serviceFields(onOff, ritm)

handles the visibility of service fields on the cmdb request

Kind: instance method of ServiceCatalog

Param Type Description
onOff boolean whether or not to show the variables
ritm boolean whether or not the code is executing on the sc_req_item form

serviceCatalog.applicationFields(onOff, ritm)

handles the visibility of application fields on the cmdb request

Kind: instance method of ServiceCatalog

Param Type Description
onOff boolean whether or not to show the variables
ritm boolean whether or not the code is executing on the sc_req_item form

serviceCatalog.cmdbFormNameFields()

sets the name fields to not mandatory for the cmdb request

Kind: instance method of ServiceCatalog

serviceCatalog.calculateDigitalInvoice()

calculates the digitial invoice section of an ad sales request

Kind: instance method of ServiceCatalog

serviceCatalog.nothingChangedDigital() ⇒ boolean

Determines if any of the values on the digital invoice have changed

Kind: instance method of ServiceCatalog
Returns: boolean - true if the user has actually changed a value on the form

TaskUtils : object

Contains base functionality for tasks

Kind: global namespace

taskUtils.setFieldsReadOnly(fields, trigger)

Changes the read only status of a list of fields

Kind: instance method of TaskUtils

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields read only status

taskUtils.setFieldsMandatory(fields, trigger)

Changes the mandatory status of a list of fields

Kind: instance method of TaskUtils

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields mandatory status

taskUtils.setFieldsDisplay(fields, trigger)

Changes the display status of a list of fields

Kind: instance method of TaskUtils

Param Type Description
fields object A list of fields
trigger boolean The state to set the fields read only status

VariableHider : object

Handles hiding variables or making them read-only on a ritm, because the UI policies often fail at this

Kind: global namespace

variableHider.disableAnElement(element)

disables an individual html element

Kind: instance method of VariableHider

Param Type Description
element HTMLElement an html element

variableHider.makeVariablesReadOnly()

makes all catalog variables read only on the form

Kind: instance method of VariableHider

handleMissingFields : function

Ensures that blank, read-only fields on a catalog task are not set as mandatory

Kind: global typedef

handleFieldNames : function

Gets the name of the variable so we can properly disable it

Kind: global typedef

Param Type Description
record GlideRecord A response from the server