3 Replies Latest reply on Aug 22, 2018 12:46 PM by MarkLarvo

    Change Management - Any way to set the CAB Review Date Picker to Only Allow Thursdays to be Selected

    JenBouillion Apprentice

      So only allow the user to select a Thursday from the Date Picker... All other Days would be greyed out so they would not be able to select Sun, Mon, Tues, Wed, Fri, and Sat for Cab Review Date

       

        • 1. Re: Change Management - Any way to set the CAB Review Date Picker to Only Allow Thursdays to be Selected
          AlasdairRobertson ITSMMVPGroup

          Hi Jen

           

          you cant do it on the date picket but you could add a validation rule that checks for the day of the week selected and throws a message box on save it a non Thursday has been selected.

           

          I think you can use the DatePart(weekday, date) function.

          • 2. Re: Change Management - Any way to set the CAB Review Date Picker to Only Allow Thursdays to be Selected
            AlasdairRobertson ITSMMVPGroup

            That command has been depreciated you can use this one $(LocalDayOfWeek(CurrentDateTime())) returns a 1-7 for the day of week with Sunday being 1, so Thursday = 5.

            • 3. Re: Change Management - Any way to set the CAB Review Date Picker to Only Allow Thursdays to be Selected
              MarkLarvo Specialist

              Hi Jen,

               

              Our CAB Review date is Tuesdays before 3 pm Central time and changes had to be submitted a week in advance.  We used to have people do the calculations and figure out that dates. With different time zones it wasn't always so easy.

               

              What we did was remove the need for anyone to determine the date using an editing rule. This rule looks at the Scheduled Start Date of the Change and determines the CAB review Date automatically. A validation rule checks to make sure the CAB review date is in the future.

               

              EDIT RULE

              On Change: ScheduledStartDate

              Set: CABReviewDate

               

              $(if LocalDayOfWeek(ScheduledStartDate,  "America/Chicago") == "1"

                  then AddHours(-105, BeginningOfDay(0,  ScheduledStartDate,  "America/Chicago"), "America/Chicago")

                else if LocalDayOfWeek(ScheduledStartDate,  "America/Chicago") == "2"

                       then AddHours(-129, BeginningOfDay(0,  ScheduledStartDate,  "America/Chicago"), "America/Chicago")

                     else if LocalDayOfWeek(ScheduledStartDate,  "America/Chicago") == "3" &&

                            LocalHour(ScheduledStartDate,  "America/Chicago") > "15"

                            then AddHours(15, BeginningOfDay(0,  ScheduledStartDate,  "America/Chicago"), "America/Chicago")

                          else if LocalDayOfWeek(ScheduledStartDate,  "America/Chicago") == "3" &&

                                  LocalHour(ScheduledStartDate,  "America/Chicago") <= "15"

                                  then AddHours(-153, BeginningOfDay(0,  ScheduledStartDate,  "America/Chicago"), "America/Chicago")

                               else if LocalDayOfWeek(ScheduledStartDate,  "America/Chicago") == "4"

                                       then AddHours(-9, BeginningOfDay(0, ScheduledStartDate, "America/Chicago"), "America/Chicago")

                                    else if LocalDayOfWeek(ScheduledStartDate, "America/Chicago") == "5"

                                           then AddHours(-33, BeginningOfDay(0, ScheduledStartDate, "America/Chicago"), "America/Chicago")

                                         else if LocalDayOfWeek(ScheduledStartDate, "America/Chicago") == "6"

                                            then AddHours(-57, BeginningOfDay(0, ScheduledStartDate, "America/Chicago"), "America/Chicago")

                                              else if LocalDayOfWeek(ScheduledStartDate, "America/Chicago") == "7"

                                                then AddHours(-81, BeginningOfDay(0, ScheduledStartDate, "America/Chicago"), "America/Chicago")

                                                   else null)

               

              Depending on the ScheduledStartDate entered this may calculate a CAB Review Date in the past. We only require CAB reviews on MEdium and High risk changes. A validation rule makes sure we aren't trying to save a CAB review date in the past for Medium and High risk changes.

               

              KESM - Change CAB review valiation rule.png

               

              By taking away most of the thinking around CAB review date we alleviated a lot of frustration and math "math is hard...".

               

              And finally in the display form we don't even show the CAB Review information unless the Change is Medium or High. This allows the Low, Emergency stuff to calculate dates that don't fit the CAB parameters but don't confuse people when it allows them to save. As you can see in the rule above we don't validate the calculated CAB date from the Edit Rule so we don't need to show it.

               

              KESM - CAB review form.png

              Should the CAB meeting need to be moved the CAB Review Date can be edited when Change Status = Pending CAB Approval

               

              I hope you and others can find this useful! Mark.