How to actual start date(work_start) and actual end date(work_end) work in change request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2019 10:52 PM
Hi everybody,
There is a requirement that i need disable the function that actual start date and actual end date auto capture in system, i found that it work in script include(ChangeRequestStateModelSNC_normal/standard/emergency) and protected. However, i can't find where to call this method(toImplement_moving() and toReview_moving()) . Can somebody tell me ?
Thanks very much!
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2019 01:24 AM
Hi HuChin,
The Actual start date and Actual end date are set by functions in Change Request State Model script includes. When state changes to Implement the Actual start date is populated, when state changes to Review the Actual end date is populated. This logic is scripted in the following script includes:
- ChangeRequestStateModelSNC_standard
- ChangeRequestStateModelSNC_normal
- ChangeRequestStateModelSNC_emergency
As those are SNC script includes they are read-only and can not be changed, but all of them has secondary versions (they extend the SNC ones) that should be used if someone wants to overwrite the OOTB behaviour, those script includes do not have the SNC in the name:
- ChangeRequestStateModel_standard
- ChangeRequestStateModel_normal
- ChangeRequestStateModel_emergency
So you can write your own logic in the ones that extands the SNC scripts.
Just add to them those lines:
toImplement_moving: function() {
// comment, delete or change lines that fills the Actual start date
//if (this._gr.work_start.nil())
//this._gr.work_start = new GlideDateTime();
return true;
},
toReview_moving: function() {
// comment, delete or change lines that fills the Actual end date
//if (this._gr.work_end.nil())
//this._gr.work_end = new GlideDateTime();
return true;
},
Hope this helped.
Best regards,
Łukasz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 04:02 PM - edited 07-29-2024 04:03 PM
Hi HuChin,
There are 2 business rules responsible to auto populate Actual Start Date and Actual End date, you can modify or add conditions accordingly based on requirement.
1. Change Model: Set work start
2. Change Model: Set work end
Hope this helps.
Thank you,
Pavan