Exclude Sundays from Validation
Hi Fidel,
im struggeling with the following issue: I have a selectfield that holds a priority represented by a "2" or a "3". Depending on that I would like to add a validation rule in the create transition that checks for the earliest possible start date. With Prio 2 its 5 days from now excluding sundays, with Prio 3 its 15 days excluding sundays.
I found your adddaysskippingweekend function but could not get it working.
Givven that 10119 is the Priority Select field and 00057 the startdate I tried the following:
( %{11303} = "2" AND {10119} >= {00057} + addDaysSkippingWeekends({00057}, 5, LOCAL, {SUNDAY}, {SUNDAY})) OR ( %{11303} = "3" AND {10119} >= {00057} + addDaysSkippingWeekends({00057}, 15, LOCAL, {SUNDAY}, {SUNDAY}) )
However, the following works fine:
(%{11303} = 2 AND {10119} >= {00057} + 5 * {DAY}) OR (%{11303} = 3 AND {10119} >= {00057} + 15 * {DAY})
Comments (3)
-
repo owner -
reporter - changed status to resolved
Works! Thank you!
-
repo owner Hi @pschuh,
Since version 2.2.39, JIRA Workflow Toolbox supports Custom Schedules, and you can do all you are doing now using
addTimeSkippingWeekends ()
andsubtractDatesSkippingWeekends ()
functions, and much much more.I recommend you to take a look at it. You will be able to do amazing things using it.
- Log in to comment
Hi @pschuh,
Try the following boolean expression:
where
%{11303}
is Priority, and{10119}
is code for numeric value of Start date.