Use case
Set a Date Picker field to the nth day of the month after the issue has been transitioned.
⚒️ Configuration
Add the Update or copy field values post function to the transition of your choice.
Target issue
Choose Current issue
Fields
Field
Choose a Date Picker field
Value
Choose Set field value manually
Expression
Introduce the following expression in the expression editor in Numeric mode.
addDays({system.currentDateTime}, (10 - dayOfTheMonth({system.currentDateTime}, LOCAL)), LOCAL)
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.
Variant
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.
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))