Next and previous working day
Two related jobs: moving a date onto a working day, and asking whether a date is one.
Move a date onto a working day
Use Calculate Working Date with 0 working days and an adjustment.
| Field | Value |
|---|---|
| Start date | {{issue.duedate}} |
| Working days to add | 0 |
| If the start date is not a working day | Move it to the next working day |
Zero means "do not move it, only correct it". A due date that already falls on a working day comes back untouched; one that lands on a Sunday or Christmas Day comes back on the next day the team is actually in.
Switch the adjustment to previous working day to pull deadlines earlier instead — which is usually what you want for anything that must be finished before a holiday rather than after it.
The Was adjusted output tells you whether anything moved, so you can post a
comment only when it did.
Ask whether a date is a working day
Check Working Day answers without changing anything.
| Field | Value |
|---|---|
| Working calendar | Norway Support |
| Date to check | {{issue.duedate}} |
What comes back:
| Output | Meaning |
|---|---|
| Is working day | True or false. Use it in a condition. |
| Reason | WORKING_DAY, NON_WORKING_WEEKDAY or NON_WORKING_DATE |
| Reason text | The same answer in plain language, ready to put in a comment |
| Next working date | The next working day after this one |
Reason distinguishes a weekend from a holiday. That matters more than it sounds:
"this fell on a Sunday" and "this fell on Constitution Day" call for different
replies to a customer.
Next working date is always strictly after the date you asked about. If you ask about a Wednesday that is a working day, you get Thursday — not Wednesday back.
Putting them together
A useful pattern for a support desk:
- Trigger: Work item transitioned to Waiting for customer
- Action: Check Working Day, date =
{{now.jiraDate}} - Condition:
Is working dayequalsfalse - Action: Comment — "We are back on {next working date} and will pick this up then."
The customer gets a real date instead of silence, and nobody had to remember which public holiday it is.