Planned Strat &end dates issue in the change request.

Sidhu9
Tera Contributor

My Requirement is an Updated Planned start and date in the Change request, But this date is not updated in the List of Change Tasks view, showing only the Previous date and time. It is not showing the latest date and time. Example: updated screenshots Please check once.

 

 

 

task2.JPGtask.JPG

 

Thanks 

Srinivas

Thanks& Regards
Sidhu !
1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Sidhu9 ,

You can write BR on change_request table like the one below, with the following script.

 

(function executeRule(current, previous /*null when async*/) {

	var ctGr = new GlideRecord('change_task');
	ctGr.addQuery('change_request', current.getUniqueValue());
	ctGr.query();

	while(ctGr.next()){
		ctGr.planned_start_date = current.start_date;
		ctGr.planned_end_date = current.end_date;
		ctGr.update();
	}

})(current, previous);

 

AnveshKumarM_0-1691506709814.png

AnveshKumarM_1-1691506777161.png

 

 

 

Thanks,
Anvesh

View solution in original post

1 REPLY 1

AnveshKumar M
Tera Sage
Tera Sage

Hi @Sidhu9 ,

You can write BR on change_request table like the one below, with the following script.

 

(function executeRule(current, previous /*null when async*/) {

	var ctGr = new GlideRecord('change_task');
	ctGr.addQuery('change_request', current.getUniqueValue());
	ctGr.query();

	while(ctGr.next()){
		ctGr.planned_start_date = current.start_date;
		ctGr.planned_end_date = current.end_date;
		ctGr.update();
	}

})(current, previous);

 

AnveshKumarM_0-1691506709814.png

AnveshKumarM_1-1691506777161.png

 

 

 

Thanks,
Anvesh