What is a change request?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 02:11 PM
I'm trying to understand the concept of change request? what is it ? and why do we want to create a change request. Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 02:15 PM
Claudia,
Change request is used to track all the changes made in the IT environment of the organization. For all changes which affect IT or departments which rely on IT Change request is created. Change Requests are usually workflow driven and workflow designs vary from organization to organization. For more info please read ServiceNow documentation on ITIL Change Management.http://wiki.servicenow.com/index.php?title=ITIL_Change_Management#gsc.tab=0
Let me know if you have any question in particular .
~Raghu.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 02:22 PM
Thank you! I have an scrip in my workflow that it is supposed to create a standard change of request. I have no idea what it is doing and what will be the result. Could you help me out understand it?
// Set values for the standard change to be created in this script.
// read variables: current.variables.select_add_remove_or_modify;
// Create change and set fields
var DNStype = current.variables.select_add_remove_or_modify;
var standardChangeId="";
var requestDetails = "Type: " + current.variables.select_add_remove_or_modify + "\n";
requestDetails = requestDetails + "Name: " + current.variables.name + "\n";
requestDetails = requestDetails + "Record Type: " + current.variables.record_type + "\n";
requestDetails = requestDetails + "Data: " + current.variables.data + "\n";
requestDetails = requestDetails + "Comments: " + current.variables.comments + "\n";
requestDetails = requestDetails + "\n";
requestDetails = requestDetails + "This change is linked to: " + current.number + " and will be closed as soon as the request is closed.\n";
//requestDetails = requestDetails + "A Record: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "A Record Details: " + current.variables.a_record + "\n\n";
//requestDetails = requestDetails + "Alias: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "Alias Details: " + current.variables.a_record + "\n\n";
//requestDetails = requestDetails + "MX/DKIM: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "MX/DKIM Details: " + current.variables.a_record + "\n\n";
//requestDetails = requestDetails + "TXT: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "TXT Details: " + current.variables.a_record + "\n\n";
//requestDetails = requestDetails + "PTR: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "PTR Details: " + current.variables.a_record + "\n\n";
//requestDetails = requestDetails + "Service: " + current.variables.a_record + "\n";
//requestDetails = requestDetails + "Service Details: " + current.variables.a_record + "\n";
if ( DNStype == 'add' ) {
standardChangeId="fe7b74ac2b6f3100954cbd63e4da159e";
}
else if ( DNStype == 'modify' ) {
standardChangeId="7e7b74ac2b6f3100954cbd63e4da15a0";
}
else if ( DNStype == 'remove' ) {
standardChangeId="be7b74ac2b6f3100954cbd63e4da159f";
}
else {
standardChangeId="fe7b74ac2b6f3100954cbd63e4da159e";
}
newChange = new TaskCopy().copyChange(standardChangeId);
// Add the patch list to the description of the change
newChange.description = newChange.description + '\n\nDetails:\n' + requestDetails;
newChange.requested_by = current.variables.requested_for;
newChange.cmdb_ci = '0e3efb309553b100923b27f794926dff';
workflow.scratchpad.change_id = newChange.sys_id;
//set the parent on the requested item so that reporting can be done
newChange.parent = current.sys_id;
newChange.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 03:10 PM
Lines 6,7,8 are declaring variables to store some data.
Lines 9 - 14 are creating a nicely formatted chunk of text (I'm guessing to dump somewhere later)
Lines 31 - 42 are determining what Change will be used as the template for creation.
Line 45 issues a copy command using lines 31-42 to determine which task is the source.
Lines 49-51 are populating properties of the new change initialized in Line 45
Line 54 is declaring a variable for later use within the workflow (no way of knowing from this screenshot where that's being used. I'd need to dig in the workflow itself)
Line 58 sets the parent of the created change to *this* record's sys_id ("this" being the record who's workflow is running)
Line 61 commits it all.
In short, this looks like a very complicated way of handling something that SN does a semi-decent job of out-of-box. If you want a live deep dive, I have some time tomorrow afternoon. More than happy to help you get to where you need to go.
Rob (at) thewhitespace (dot) io.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 03:10 PM
Cluadia,
This looks like a custom built for specific requirement. I wont be able to explain this without knowing the scenario. On what table is this work flow on again ? Is this on change_request?
~Raghu.