Duplicate Change Tasks getting created when 'Copy Change' UI action is used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 12:03 AM
Hello Folks,
While using 'Copy Change' UI action, we have observed that the Change tasks are getting doubled.
For example, Change A has 2 Change tasks and I create a copy of that change, I see 4 change tasks in the copied change.
Is this a known issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 12:05 AM
Yes, this is expected because these tasks get copied from the previous change, and two new tasks will be created from the new change as the flow triggers.
We had the same issue and resolved it by creating a new UI action that is a copy of the original "Copy Change." We then commented out the code related to the change task functionality.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 12:08 AM
HI @Dr Atul G- LNG ,
But our tasks which are duplicating are actually manual tasks and not the ones which are created from flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 03:29 AM
Is still open?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 12:47 AM
Hello @Aayushi Sharma ,
Please could you validate from the OOB Copy Change UI action. Because i have tested in my PDI as well as real instance there is no difference and i am getting only correct task created like if i have created 2 task then 2 tasks are getting copied in new copy change.
//This is the OOB code can you compare with your code.
function OnCopyChangeClick() {
function addParam(form, name, val) {
var inp = cel('textarea', form);
inp.name = name;
inp.value = val;
}
var srcSysId = g_form.getUniqueValue();
var ga = new GlideAjax('ChangeUtils');
ga.addParam('sysparm_name', 'getChangeQueryParams');
ga.addParam('sysparm_src_sysid', srcSysId);
ga.setWantSessionMessages(true);
ga.getXMLAnswer(function (queryParam) {
if (queryParam) {
var gotoURL = new GlideURL('CopyChangeRelatedLists.do');
gotoURL.setEncode(false);
gotoURL.addToken();
gotoURL.addParam('srcSysID', srcSysId);
gotoURL.addParam('newSysID', '$sys_id');
gotoURL.addParam('sysparm_returned_action', '$action');
var form = cel('form', document.body);
hide(form);
form.method = "POST";
form.action = g_form.getTableName() + ".do";
if (typeof g_ck != 'undefined' && g_ck != "")
addParam(form, 'sysparm_ck', g_ck);
addParam(form, 'sys_id', '-1');
addParam(form, 'sysparm_query', queryParam);
addParam(form, 'sysparm_goto_url', gotoURL.getURL());
form.submit();
}
});
}
Copied Change with 2 task only
Thanks
Sanjay Bagri