Copy change details in the change task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 12:46 AM
Hi All,
I have a requirement to create a UI action to copy change Planned start and end date, short description, description in the change task.
Please help in this.
Thanks,
Sam
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 12:59 AM
create a ui action on change request and add condition when to visible button and write below logic
copyDetails() ;
function copyDetails() {
var plannedStartDate = current.planned_start;
var plannedEndDate = current.planned_end;
var shortDescription = current.short_description;
var description = current.description;
var taskGR = new GlideRecord('change_task');
taskGR.addQuery('change_request', current.sys_id); /
taskGR.query();
while (taskGR.next()) {
taskGR.planned_start = plannedStartDate;
taskGR.planned_end = plannedEndDate;
taskGR.short_description = shortDescription;
taskGR.description = description;
taskGR.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 02:13 AM
Hi @Mani A ,
Button be display in Change task. When anyone create change task, new form will open with the button and once button is clicked the values should auto populate with parent change values
Thanks,
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 03:32 AM
copyDetails() ;
function copyDetails() {
var taskGR = new GlideRecord('change_request');
taskGR.addQuery('sys_id', current.change_request);
taskGR.query();
while (taskGR.next()) {
current.planned_start_date = taskGR.start_date;
current.planned_end_date = taskGR.end_date;
current.short_description =taskGR.short_description;
current.description = taskGR.description;
current.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 04:50 AM
Hi @Mani A ,
It is not working.
Thanks,
Sam