- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2023 02:52 AM
Actual start and end date in change request should be inbetween change request planned start date and planned end date
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2023 02:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2023 02:57 AM
Hello @Tulasiram1 ,
you need to Write on Submit Client Script for this , use below code
function onSubmit() {
// Get the planned start date and end date
var plannedStart = g_form.getValue('planned_start_date'); // update with your field
var plannedEnd = g_form.getValue('planned_end_date');//update with your field
// Get the actual start date and end date
var actualStart = g_form.getValue('start_date'); //update with your field
var actualEnd = g_form.getValue('end_date'); //update with your field
// Check if the actual start date is before the planned start date
if (actualStart < plannedStart) {
g_form.showFieldMsg('start_date', 'Actual start date cannot be before the planned start date', 'error');
return false;
}
// Check if the actual end date is after the planned end date
if (actualEnd > plannedEnd) {
g_form.showFieldMsg('end_date', 'Actual end date cannot be after the planned end date', 'error');
return false;
}
return true;
}
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2023 03:09 AM
I have written ths script then I am trying to test. I am getting error while filling planned start date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2023 10:53 PM
Hello @Tulasiram1 ,
Did you updated your backend field values correctly in the Script , also can you please share the Code screenshot which you have written in CS
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2023 02:21 AM
Write Before BR update.