Weekdays and Weekend reporting for Change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 11:16 AM
Hi Team,
We have a requirement, we have to create report on change table, where we would like to see reports on change implemented between "Monday to Friday" and "Friday to Monday" so that client can ensure how many changes has been implemented during weekdays and weekends.
is there any OOB solution we have ? or we have to go for scripting ?
Note : We have Planed start and planed end date to capture the date and time.
Regards,
Amit
- Labels:
-
Reporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 01:54 PM
Outside all of that, you could do:
- Create another column in your change table. Maybe something like weekdays or whatever you want to call it. You will want to make it a True/False type. In my script example, it is workday.
- Then you will want to create a Business Rule that will trigger when the planned start date changes on the change_request table. Something like this:
var checkTime = current.start_date.getGlideObject();
if(current.work_start){
checkTime = current.work_start.getGlideObject();
}
if (sched.isInSchedule(checkTime))
{
current.u_is_workday = true;
} else {
current.u_is_workday = false;
}
- I wouldn’t recommend putting an actual sys_id in the script. I used it for my testing. — perhaps a sys_property so this can easily be changed
- You would also need to run a fix script to update all of your existing records to populate the new field.
Try and utilize the existing schedules that are in the platform if you can when writing your script.
I hope this helps and points you in a direction to create what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 03:26 AM
Please guide an alternate way to achieve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 02:04 PM
Hi Amit,
Please see this great video from
This should show how you can create reports based on set days of the week and should hopefully solve what your looking for.
Let me know if this helps, and if so mark helpful or correct.
Thanks
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 08:37 AM
Hi Sam,
I watched the video and created a report using Trend option to show the weekend changes.
How can I include the changes that have a large window where the planned start is not necessarily on Weekend but are scheduled for few weeks? like for example if I have a change that starts Jan 1, 2021 and end February 1st, 2021?
This change should appear on my weekend change report, as part of it is on weekends, any suggestions?
Thanks