Start date same as planned start date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:28 PM
I want to populate start date and end date based on planned start date and planned end date
run a fix script to update existing records in rm_sprint table , wrap this as a function
can someone help with code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:35 PM - edited 12-21-2023 06:35 PM
Hi,
You just want a copy or something else based on planned start date and planned end date?
Thanks and Regards,
Saurabh Gupta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:36 PM
Can you please share what you did?
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 07:51 PM - edited 12-21-2023 07:51 PM
Hi @J_31 Find below script which maps planned start and end dates to start and end dates
updateDate();
function updateDate(){
var rm= new GlideRecord('rm_sprint');
rm.addEncodedQuery('end_dateISNOTEMPTY^start_dateISNOTEMPTY'); // ensure planned end and start date are not empty
rm.orderBy('sys_created_on'); //order by created on
rm.query();
while (rm.next()){
rm.start=rm.start_date;// planned start date
rm.end = rm.end_date; // planned end date
rm.setWorkflow(false); //Do not run business rules
rm.autoSysFields(false); //Do not update system field
rm.update();
}
}
Harish