- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 08:17 AM
When I create a new child ticket, I would like some field values from the parent ticket to automatically be populated into the child ticket. How do I achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2016 07:45 AM
Here is a script from a UI Action which creates a change request from an incident.
It will guide you through the main points of what you want to do.
var change = new GlideRecord("change_request");
//change.short_description = current.short_description;
//change.description = current.description;
change.cmdb_ci = current.cmdb_ci;
change.priority = current.priority;
var sysID = change.insert();var mySysID = current.update();
gs.addInfoMessage("Change " + change.number + " created");
var new_relationship = new GlideRecord('task_rel_task');
new_relationship.type = 'd798ba000a2581020048305ef5287403'; //use the sys_id of the relationship type from your instance here
new_relationship.parent = current.sys_id;
new_relationship.child = sysID;
new_relationship.insert();action.setRedirectURL(change);
action.setReturnURL(current);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 12:53 PM
You would have to do some update to the Parent to get child(ren) tickets updated with fields from the parent. There is an update of the box business rule: Update Child Incidents - you could modify that with the fields you want pushed to the child(ren).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 12:59 PM
Michael,
I cannot find a business rule called "Update Child Incidents" on the business rules table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2016 01:07 PM
Do you have a personal instance that you can review? Is the business rule inactive? I know it's been around for a while.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2016 07:36 AM
I requested a developers instance and found the business rule you are talking about. However, I think i am leaning more towards creating a UI action rather than a business rule, unless the business rule can map fields from the parent ticket to the child ticket immediately when a user clicks "New"