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

Set a Date Picker field to the nth day of the month after the issue has been transitioned.



Configuration

UI Steps


UI Step
Add the Update or copy field values post function to the transition of your choice. 


UI Step

Target issue

Choose Current issue


UI Step

Fields


UI Steps


UI Step

Field

Choose a Date Picker field


UI Step

Value

Choose Set field value manually


UI Step

Expression

Introduce the following expression in the expression editor in Numeric mode.


Code Block
languagebash
linenumberstrue
addDays({system.currentDateTime}, (10 - dayOfTheMonth({system.currentDateTime}, LOCAL)), LOCAL) 


UI Text Box
typeinfo
You can modify the day of the month that the Date Picker field will be set to by updating the number 10 in the previous expression.


UI Expand
expandedtrue
titleVariant

The following expression will set the Date Picker field to the 10th day of the month if the issue is transitioned from the day 1 to the day 9 of the month, to the 20th day of the month if it is transitioned from the day 10 to the day 19, and to the last day of the month after the day 20 of the month.

Code Block
languagebash
linenumberstrue
dayOfTheMonth({system.currentDateTime}, LOCAL) < 10 ? 
addDays({system.currentDateTime}, (10 - dayOfTheMonth({system.currentDateTime}, LOCAL)), LOCAL)  :
(dayOfTheMonth({system.currentDateTime}, LOCAL) < 20 ? 
addDays({system.currentDateTime}, (20 - dayOfTheMonth({system.currentDateTime}, LOCAL)), LOCAL) : 
lastDayOfTheMonth({system.currentDateTime}, LOCAL))








Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel in ("use-case-workflow","parser_func_adddays","parser_func_lastdayofthemonth","parser_func_dayofthemonth") 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 functionsdayOfTheMonth() lastDayOfTheMonth() addDays()
Label




Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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