Creating Change Request via Service Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2016 01:00 AM
Hello Everybody,
We would like to create a Change Request using a SR, is there a way to set change request fields using scripts. this is what I am doing.
1. Creating a Task in workflow item.
2. Setting up the fields using below scripts, there are fields that are created in Task form and fields create in change_request.
task.state = 7;
change_request.u_change_scale = "Minor";
change_request.risk = 4;
task.impact = 3;
task.contact_type = "change_service";
task.assignment_group = "2b931feb4faec200f6a144f18110c78e";
change_request.type = "Normal";
change_reuqest.start_date = current.variables.effective_date;
I am not able to create the Change Request using this approach, any assistance is highly appreciated.
Thanks,
Pradeep Shokeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2016 12:22 AM
Can you explain me same, as i have the same requirement.
Thanks
Sukant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2016 05:15 AM
var newCR = new GlideRecord('change_request');
newCR.initialize();
newCR.state = 7;
newCR.short_description = "Switch Port Opening Request ";
newCR.description = "See request item " + current.number;
newCR.impact = 3;
newCR.u_change_scale = "Minor";
newCR.risk = 4;
newCR.assignment_group = "2b931feb4faec200f6a144f18110c78e";
newCR.type = "Standard";
newCR.contact_type = "change_service";
newCR.parent = current.sys_id;
newCR.cmdb_ci = current.variables.u_switch;
newCR.start_date = current.variables.port_execution_date;
newCR.requested_by = current.variables.requested_by;
newCR.setWorkflow(false);
newCR.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 09:23 AM
Thanks Pradeep