Skip to content

Commit 2b46355

Browse files
authored
Merge pull request #37 from nextcloud/feat/noid/short-notice-warning
feat(notifications): warn the manager and HR about a short-notice req…
2 parents 681e208 + 2463ddd commit 2b46355

25 files changed

Lines changed: 658 additions & 42 deletions

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Built to the specification in [SPECIFICATION.md](./SPECIFICATION.md).
1414
- **Apply** for annual, sick, unpaid or special leave (configurable types) with a live
1515
balance preview. The working-day count is prefilled from your availability and
1616
public holidays in personal settings.
17-
- **Approve / reject** as a line manager, with team-coverage conflict warnings.
17+
- **Approve / reject** as a line manager, with team-coverage conflict warnings and a
18+
short-notice warning when the leave starts sooner than the notice period the admin
19+
expects (default two weeks).
1820
- **Escalation**: pending requests a manager ignores are automatically escalated to HR.
1921
- **Full balance tracking**: entitlement, used, pending, remaining and carry-over,
2022
with a configurable year-rollover policy. *My leave* shows each balance as an
@@ -148,7 +150,8 @@ The default leave types (annual, sick, unpaid, special) are seeded on install.
148150
## Configuration
149151

150152
Admin settings live under **Administration settings → Absence** (HR group, default
151-
entitlement, escalation window, carry-over policy, coverage threshold, CalDAV targets).
153+
entitlement, escalation window, carry-over policy, coverage threshold, expected notice
154+
period, CalDAV targets).
152155

153156
Personal settings are appended to the built-in **Personal settings → Availability**
154157
page. They prefill the "Working days" field on new requests: working weekdays come

SPECIFICATION.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,20 @@ is what counts (§7).
468468
or exceeds a configurable threshold (admin setting **max concurrent absences per
469469
team**, default e.g. 2, or a percentage), show a prominent warning in the review
470470
panel. It is a warning, not a hard block.
471+
- **Short-notice warning:** a request whose leave starts sooner than the admin's
472+
**expected notice period** (calendar days, default 14; `0` switches the check off)
473+
is flagged to the line manager and to HR. Like the conflict warning it informs a
474+
decision and blocks nothing, and it appears wherever the decision is made: on the
475+
request's Details tab, in the notification and in the subject line of the email
476+
that asks for a decision (§11) — including the escalation to HR and the pending
477+
reminder, by which point the notice given has shrunk further.
478+
- Calendar days, not working days: "two weeks' notice" is a fortnight on the wall
479+
calendar. Measured against the *server's* today, so one request gets one answer
480+
for the manager, for HR and for the job that mails them.
481+
- Only while a decision is outstanding (`PENDING` / `ESCALATED`), and so never for
482+
leave with no approval workflow — sick leave is recorded after the fact and
483+
auto-approved types are booked straight through (§4.1), so nobody is weighing the
484+
notice, and nobody can give notice of falling ill.
471485
- Provide an API endpoint to query overlaps for a date range + scope (team/company).
472486

473487
---
@@ -581,6 +595,7 @@ new "Absence" settings section or "Personal info"/"Administration"):
581595
| Carry-over cap (days) | 5 | Used when `capped`. |
582596
| Carry-over expiry | none / date (e.g. Mar 31) | §6.2. |
583597
| Max concurrent team absences | 2 | Conflict threshold (§8). |
598+
| Expected notice period | 14 calendar days | Short-notice threshold (§8); `0` disables. |
584599
| CalDAV: write personal events | true | §10. |
585600
| CalDAV: write shared team calendar | true | §10. |
586601
| Shared calendar type-visibility | neutral | Reveal type vs "Absent" on shared cal. |

js/NcCheckboxRadioSwitch-DVdt5Hkq-anWxu1ok.chunk.mjs renamed to js/NcCheckboxRadioSwitch-DVdt5Hkq-WOiPqszu.chunk.mjs

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

js/NcCheckboxRadioSwitch-DVdt5Hkq-anWxu1ok.chunk.mjs.license renamed to js/NcCheckboxRadioSwitch-DVdt5Hkq-WOiPqszu.chunk.mjs.license

File renamed without changes.

js/NcCheckboxRadioSwitch-DVdt5Hkq-anWxu1ok.chunk.mjs.map renamed to js/NcCheckboxRadioSwitch-DVdt5Hkq-WOiPqszu.chunk.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/absence-main.mjs

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

js/absence-main.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/absence-personal-settings.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)