We want to ensure that "Due date" is at least 5 workdays later than issue date and time of creation. To do it we use validator Boolean validator with math, date-time or text-string terms with the following configuration:
Boolean expression used is: {00012} >= addDaysSkippingWeekends({00009}, 5, LOCAL)
Note that:
Once configured, transition "Create Issue" will look like this:
We want to allow the execution of a transition only Mondays to Thursdays: from 9:00 to 14:00 and from 17:00 to 20:30.
We can use Boolean condition and validator with math, date-time or text-string terms condition or validator depending on whether we want to hide the transition, or show a custom error message to the user when transition execution is done of valid time frame. In this example we are going to use the validator:
Boolean expression used is:
dayOfTheWeek({00057}, LOCAL) >= {MONDAY} AND dayOfTheWeek({00057}, LOCAL) <= {THURSDAY} AND (timePart({00057}, LOCAL) >= 9:00 AND timePart({00057}, LOCAL) <= 14:00 OR timePart({00057}, LOCAL) >= 17:00 AND timePart({00057}, LOCAL) <= 20:00)
Note that:
Once configured, transition will look like this:
Since version 2.2.39 time calculations on custom defined schedules can be carried out using Schedules Definition Grammar.
For example, you can define your work-schedule as Mondays to Fridays since 8:00 to 15:00, and since 16:00 to 20:00. Then you can calculate time differences, or add time durations to a base instant within that particular custom schedule.
Much more complex schedules than the one described in the above example are possible. You can define common and personal holidays, you can define different work-times for summer and winter seasons, change your work-times from a certain date on, keeping the older work-time definitions for previous instants. Almost any requirement you might think of is possible.