Set a date on the same week day on alternate weeks

Use case

Set a date on a given day of the week every two weeks. An example would be setting an appointment on the second and fourth Thursday of the month skipping the first and the third Thursday.

🛠️ 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, as for instance the Due date field.

Value

Choose Set field value manually

Expression

Bash
modulus(weekOfTheYear({00057}, {MONDAY}, 7, LOCAL),2)=0 ? 
nextDayOfTheWeek(datePart({00057}, LOCAL), {THURSDAY}, LOCAL) : 	
addDays(nextDayOfTheWeek(datePart({00057}, LOCAL), {THURSDAY}, LOCAL), 7, LOCAL) 

The next appointment will be set next Thursday if the week of the month is even and a week later if it is uneven.

If you need to set the appointment on another day of the week, change {THURSDAY} for the field code corresponding to the day of the week of your choice.

If you need to change the order of the weeks in which the appointment is set (even and uneven weeks), change the number 0 in the expression for 1.

Use case JWT feature Workflow function Parser functions
Prioritize the issues globally

(cog) 

Update or copy field values

indexOf() previousValue() issuesFromJQL()

Automatically fill an insight custom field after a transition

(cog) 

Update or copy field values

Create an internal Service Management comment on linked issues

(cog) 

Update or copy field values

Set a date on the same week day on alternate weeks

(cog) 

Update or copy field values

addDays() nextDayOfTheWeek() modulus() weekOfTheYear() datePart()

Set a Date Picker field to the nth day of the month

(cog) 

Update or copy field values

dayOfTheMonth() lastDayOfTheMonth() addDays()

Set the next fix version

(cog) 

Update or copy field values

floor() toNumber() substring() length()

Set fix version based on its start and release date

(cog) 

Update or copy field values 

toString() textOnStringList() unreleasedVersions() startDates() releaseDates() first()

Set Due Date with latest value among sub-tasks

(cog) 

Update or copy field values

fieldValue()

max()

siblingSubtasks()

Assign important issues to the project lead

(cog) 

Update or copy field values

Shorten the summary to a maximum number of characters

(cog) 

Update or copy field values

substring() length()

Match several values of a list

(cog) 

Update or copy field values

toString() distinct() filterByPredicate()

Assign issue to current user

(cog) 

Update or copy field values

Keep parent issue's priority in sync

(cog) 

Update or copy field values

Set assignee based on a former assignee

(cog) 

Update or copy field values

previousValue()

Add watchers ignoring inactive users

(cog) 

Update or copy field values

usersInGroup() isActive() toString() filterByPredicate()

Add days skipping weekends and holidays to a Date Picker field

(cog) 

Update or copy field values

addTime()

Keep track of important status updates

(cog) 

Update or copy field values

Fields required or changed

dateTimeToString()

Change the assignee to the next evaluator

(cog) 

Update or copy field values

first()

toStringList()

Add or remove request participants

(cog) 

Update or copy field values