Count approval periods in business days and hours using work calendars

Description

Problem

In Approval Path every period is counted in calendar time, including weekends, non-working hours and public holidays. An approval started on Friday with an "Approval decision deadline" of 3 days expires on Monday, so the approver effectively has one working day to decide. Admins cannot define working days, working hours or holidays, so deadlines do not match how their teams work. This affects admins who configure definitions and approvers who must decide before the deadline.

Change

  • Admins can create a work calendar: working days (e.g. Monday to Friday), working hours and public holidays.

  • Admins can create several calendars and choose which one a definition uses.

  • Each period can be counted in calendar time (as today) or in business days and hours according to a calendar.

  • This applies to every period: "Approval decision deadline" (maximum and default), "Validity period" and the "Automatic reminders" interval, in global settings and in the definition, and to periods entered by hand when starting an approval (Parametrize, "Set decision deadline").

  • "Voting deadline" in the Vote step gets a period option next to the fixed date, also counted in business time.

  • A global setting lets admins choose business time as the default option for created and edited definitions.

Acceptance criteria

  • With a Monday to Friday calendar, an approval started on Friday at 10:00 with a deadline of 3 business days gets a deadline on Wednesday at 10:00.

  • A day marked as a holiday in the calendar does not count toward a business period.

  • With working hours set, a period in business hours does not use time outside them.

  • Two definitions with different calendars count the same period according to their own calendar.

  • "Validity period", "Automatic reminders", "Voting deadline" and a period entered in Parametrize are counted according to the calendar when business time is selected.

  • When business time is the global default, a new or edited definition has it selected by default, and the admin can switch it to calendar time.

  • Definitions without business time selected, and approvals started from them, count periods as today.