.. include:: /Includes.rst.txt .. _feature-1793069835: ====================================================== Feature: Ask before a calendar change reaches the past ====================================================== Description =========== A change of holiday rules, weekly off rules or holiday calendar assignments used to recalculate every attendance day from the first day it could touch, so a recurring rule without a start year rewrote all past years. A change now recalculates from today on. If it would differ on a day that is already past, the API refuses it with status 409 and the problem ``calendar-change-reaches-the-past``, which names the past range and the number of days, and nothing is stored. HR repeats the request with ``applyFrom``, the first day to recalculate, to change the past on purpose. Days before the history boundary of the company are left out unless the request also sets ``includeProtectedPeriods``. Renaming a rule changes no date and recalculates nothing. Seeds, imports of holiday rules and holiday feeds never refuse: they recalculate from today on, or from ``applyFrom``. Impact ====== Clients that change holidays of past days send ``applyFrom``. ``HolidayCalendarChanged`` carries the new field ``includeProtectedPeriods`` and starts today instead of at the first day of the rule. .. index:: API, package:adsum-working-time