On this page

Use case

This use case explains how to add a fix number of days to a custom field skipping weekends and holidays according to a pre-set calendar.

Prerequisites

Set a JWT calendar

Create a JWT calendar and name it "my_calendar" and configure it as follows:

MON - FRI { 00:00-00:00; }

# HOLIDAYS
DEC/22 - JAN/02 { ; }
You can visit JWT calendar specification for more information about how to configure a JWT calendar to fit to your needs.


Configuration

Add the Update or copy field values post function to the desired transition or create a new transition.

Target issue

Choose Current issue

Fields

Field

Choose the Date Picker field

Value

Choose Set field value manually

Expression

addTime({issue.cfDatePicker}, 14 * {DAY}, "my_calendar", LOCAL)

This expression will add 14 days skipping weekends and holidays to a date picker field.

The field code of the custom field {issue.cfDatePicker} must be replaced with the corresponding one of your instance.



Related use cases


If you still have questions, feel free to refer to our support team.