Skip to content

Instantly share code, notes, and snippets.

@jmbauguess
jmbauguess / RequestTester.js
Created August 26, 2015 15:25
Creates Requested Items that can be approved and worked for testing purposes
/**
* @description Creates Requested Items that can be approved and worked for testing purposes
* @namespace
* @type {Class}
*/
var RequestTester = Class.create();
RequestTester.prototype = {
/**
* @description Creates a Requested Item given a name of a catalog item and variables to enter
* @param {String} name The name of a catalog item
@jmbauguess
jmbauguess / ClassGenerator.xml
Created August 19, 2015 17:16
Update Set to generate Selenium Page Objects for ServiceNow
<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2015-08-14 18:47:45">
<sys_remote_update_set action="INSERT_OR_UPDATE">
<application display_value="Global">global</application>
<application_name>Global</application_name>
<application_scope>global</application_scope>
<application_version/>
<collisions/>
<commit_date/>
<deleted/>
@jmbauguess
jmbauguess / SLARunner.js
Last active August 4, 2016 13:08
Updates SLAs based on a period of time
/**
* @description Updates SLAs based on conditions and stages
* @namespace
* @type {Class}
*/
var SLARunner = Class.create();
SLARunner.prototype = {
/**
* @description The name of the SLA table
* @type {String}
@jmbauguess
jmbauguess / SNDataCopy.xml
Last active May 1, 2018 00:20
Contains functionality for copying data from a child to its parent once the parent commits the update set. Useful for moving metadata that normally does not move in update sets. See http://sensibleservicenow.com/?p=49
<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2015-08-14 22:59:24">
<sys_remote_update_set action="INSERT_OR_UPDATE">
<application display_value="Global">global</application>
<application_name>Global</application_name>
<application_scope>global</application_scope>
<application_version/>
<collisions/>
<commit_date/>
<deleted/>
@jmbauguess
jmbauguess / JSONtoGlide.js
Last active May 2, 2022 19:24
Converts a GlideRecord object into JSON, or converts JSON into a GlideRecord. See http://sensibleservicenow.com/?p=49
/**
* @description Converts between JSON Objects and GlideRecords
* @namespace
* @type {Class}
*/
var JSONtoGlide = Class.create();
JSONtoGlide.prototype = {
/**
* @description Converts an object into a new GlideRecord
* @param {Object} json A json object
@jmbauguess
jmbauguess / SNBuild.xml
Last active October 11, 2018 03:36
Uses REST integrations with Jenkins and a NodeJS program to automatically extract source code from a ServiceNow instance and save it to a repository. See http://sensibleservicenow.com/2015/08/17/automatic-source-control-and-you-save-time-and-headaches
<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2015-08-14 17:18:17">
<sys_remote_update_set action="INSERT_OR_UPDATE">
<application display_value="Global">global</application>
<application_name>Global</application_name>
<application_scope>global</application_scope>
<application_version/>
<collisions/>
<commit_date/>
<deleted/>