Setting a Date Fields

Jira hosting: Cloud, Server, Data Center

When creating tasks in Jira, we want them to improve the organization of work as much as possible. We often want to embed it in a time frame, e.g. to set a deadline for its execution.

There are three types of date fields that can be used in The Scheduler system due date field, custom date field, and custom date time field.

Each date field can be completed in 4 ways:

Additionally when you choose “Dynamic” or “End of Month Offset” option, you need to select time unit which is a base for date calculation. Here you can read about available time units:

The above options will work with system fields like “Due Date” and custom date/date time fields. However, the custom date field and date time field will not be displayed in the Scheduled Issue details when they are set.

Date fields (2) are located on the second step of Scheduled Issue Wizard (1). If these fields are not visible contact your Administrator. This happens because all the fields on this screen (and other screens of TSP) are being taken from Jira's fields, so if a particular field was disabled by Jira or Project admin, then you won't be able to see it here.

Moreover sometimes there are fields generated entirely by other add-ons and they may also be invisible or working in a faulty/glitch way. To resolve such issues feel free to get in touch with us.

Exemplary date fields in the SI Wizard, Data Center

Fixed

In fixed option (1), you can enter a specific date or select it from a calendar (2). The format of fixed date is d/MMM/yy for custom date field and system due date field and dd/MMM/yy h:mm a for a custom date time picker.

Fixed option with Due Date, Cloud

Each execution of a Scheduled Issue where a fixed date will be specified will include this one, immutable date. It means that unless you specify end date for the executions, you may have issues created with date in the past.

Fixed option is a default selected option in a date fields. If this field is not required and it is left empty, no action will happen and date will not be set.

Of course you can edit your Scheduled Issue any time and update fixed date in your date/date time field.

Here you can check how to edit Scheduled Issue: Editing of the Scheduled Issue

Dynamic

Days can be counted in more flexible way thanks to dynamic option (1). Dynamic option is basically adding time to the issue creation date. Time can be added in months (m), weeks (w), days (d) for date pickers and additionally in hours (h) or minutes (min) for date time pickers (2).

In the dynamic date field you can choose how many units would you like to add to a time of SI creation to count date for particular issue eg. if “2d” is set as a dynamic due date it means that the due date will be set on two days after, at the same hour as creation time.

When dynamic option is selected and field is left empty, no action will happen and and date will not be set.

Next Execution Time

Issues created by the Scheduler can also have date based on the next execution time (1). In that case date on the created issue will be the same as the next execution time of the Scheduled Issue from which it was created (2).

Once issue has counted day, it does not changes. Therefore when triggers are changed before the upcoming execution, due date will not change on the created issues.

Additionally, date on the created issue is always a date of the upcoming execution even if it will be skipping eg. due to the calendar day off.

End of Month Offset

End of Month Offset option is available only in Data Center.

End of Month Offset (1) is a great option to set date around end of the month. Date is counted based on the month of creation and the exact day is selected depending on the value that will be provided in the field (2).

User can specify value in months, weeks, days for date picker and additionally in hours and minutes for date time picker. For example if “2d” will be set in this field, it means that due date will be set two days before the last day of the month.

As in the Fixed and Dynamic option, user can select this option and leave empty. In that case no date will be set.

When any date field is marked as required, user cannot leave Fixed, Dynamic or End of Month Offset date field empty.

Time units

There are six time units that are available for date calculation:

  • min - minutes

  • h - hours

  • d - days

  • w - weeks

  • m - date calculated based on a specified number of months

  • M - date is calculated based on number of days in current month.

Comparison between M and m

For the example let’s assume that current date is 1st of February 2024:

Calculations for 1M:

  • Option Dynamic 1M → 1st of March (to 1st of February, we’re adding 29 days)

  • Option End of Month Offset 1M → 31th of January (from 29th of February, we’re going 29 days backwards)

Calculations for 1m:

  • Option Dynamic 1m → 1st of March (to 1st of February, we’re adding 1 month forward)

  • Option End of Month Offset 1m → 29th of January (from 29th of February, we’re going 1 month backwards)

 

 

Feel free to tell us what topic should be covered: thescheduler@psc-software.atlassian.net