Uploaded image for project: 'JOC - JobScheduler Operations Center'
  1. JOC - JobScheduler Operations Center
  2. JOC-1971

Wrong calculation of Month Days for restrictions using validity periods

    XMLWordPrintable

Details

    Description

      Current Situation

      • If a Month Days restriction is used that holds a validity period, then target dates of a schedule are wrongly calculated:
        • For the first month the begin of validity is added to the month days.
        • Instead, the begin of month should be used when calculating month days.
      • This applies to the schedule's preview and to orders created by the Daily Plan.

      How to reproduce

      • Assume a working day calender holding all days of year using the frequency "Every day"
      • Add a schedule based on the above calendar, see s1.schedule.json
        • Add a restriction to the schedule using the frequency: Month Days (Count from First Day)
        • Specify month days: 18th and 19th of month, see s1.schedule.json
        • Specify validity: 13.12.2024 to 19.02.2025
      • Verify wrong calculation:
        • The 29th and 30th of December 2024 are incorrectly displayed instead of 18th and 19th, see show_preview.png. The reason being that for the first month the begin of validity, 13.12.2024, is added to the month days 18th and 19th which results in 29th and 30th of December.
        • The Daily Plan is similarly created for 29th and 30th December 2024.

      Desired Behaviour

      • The Month Days frequency should calculate days of month from the begin of month instead of the begin of validity.

      Attachments

        1. c1.workingdayscalendar.json
          0.3 kB
        2. image-2024-12-17-14-02-34-699.png
          image-2024-12-17-14-02-34-699.png
          8 kB
        3. s1.schedule.json
          0.6 kB
        4. show_preview.png
          show_preview.png
          108 kB

        Issue Links

          Activity

            People

              re Robert Ehrlich
              ur Uwe Risse
              Pramokshi Narawariya Pramokshi Narawariya
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: