Update calendar
rillsoft_calendar_updatePartially update a calendar's fields and replace its exception days within a specified range, leaving days outside unchanged. Requires an open unit of work.
Instructions
Changes a calendar as a partial update, so only the fields given take effect, and replaces its exception days inside a range you name explicitly. Days outside that range stay as they are. Inside an open unit of work only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | id of the calendar; give exactly one of 'id', 'code' and 'name' | |
| code | No | code of the calendar | |
| name | No | name of the calendar, the fallback for pools without codes; renaming goes through 'newName' | |
| week | No | weekly model; only the weekdays given are changed | |
| color | No | color as #RRGGBB | |
| notes | No | notes | |
| range | No | { year } or { from, to } (DD.MM.YYYY); exception days are replaced inside that range only | |
| newCode | No | new code of the calendar; it has to stay unique across the pool | |
| newName | No | new name of the calendar | |
| exceptionDays | No | exception days inside the range, each of them { date, shift (optional, empty meaning a day off), asWeekday (optional) }. An empty array clears exactly that range. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | id of the calendar | |
| code | No | code of the calendar; missing when none is set | |
| name | No | name of the calendar | |
| range | No | the replaced range; only when exception days were changed | |
| created | No | exception days created; only with a replaced range | |
| outcome | Yes | what the call did | |
| removed | No | exception days removed; only with a replaced range | |
| unchanged | No | exception days left unchanged; only with a replaced range |