Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

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

UI Expand
titleSet a JWT calendar


UI Steps


UI Step

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


Code Block
languagebash
linenumberstrue
MON - FRI { 00:00-00:00; }

# HOLIDAYS
DEC/22 - JAN/02 { ; }


UI Text Box
typeinfo
You can visit JWT calendar specification for more information about how to configure a JWT calendar to fit to your needs.









Configuration

UI Steps


UI Steps


UI Step

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


UI Step

Target issue

Choose Current issue


UI Step

Fields

UI Steps


UI Step

Field

Choose the Date Picker field


UI Step

Value

Choose Set field value manually


UI Step

Expression

Code Block
languagebash
linenumberstrue
addTime({issue.cfDatePicker}, 14 * {DAY}, "my_calendar", LOCAL)


UI Text Box
typeinfo

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


UI Text Box
typenote

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










Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel in ("use-case-workflow","calendar-use-case","parser_func_addtime") and ancestor = "27067093"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow function

Update or copy field values

Parser functionsaddTime()
Label



Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged