- edited description
How to substract 6 days to a date
Hello,
I tried to use the substractDays... function and it does not. The due date stays empty.
I tries 6 * {DAY}, I am not sure if it is the good way...
Actually, on the creation, I want to push the value "Ship date - 6 days" to Due date.
Thanks
Comments (11)
-
reporter -
repo owner Hi Christine,
In case you want to subtract 6 natural days to Due Date, you have to use post-function "Mathematical or date-time expression calculator" with the following configuration:
Notice that:
- {12200} is the code for numeric value of field Ship Date. This code depends on each JIRA instance.
Once configured, transition "Create Issue" will look like this:
-
repo owner Hi Christine,
In case you want to subtract 6 work days to Due Date, you have to use post-function "Mathematical or date-time expression calculator" with the following configuration:
Notice that:
- {12200} is the code for numeric value of field Ship Date. This code depends on each JIRA instance.
- Work days depend on timezone, since certain moment in time may be Sunday in some timezones, and Monday in other ones. In the example we are using JIRA server's local time, but we can use any other timezone. If you want to use the current user's time zone you should use USER_LOCAL instead.
Once configured, transition "Create Issue" will look like this:
-
repo owner - changed status to resolved
-
reporter I tried with no success...
Ship date = 7/Oct/14 and due date became 19/Dec/01.
Here is my post-function : subtractDatesSkippingWeekends({16411}, 6 * {DAY}, SERVER_LOCAL)
-
reporter - changed status to open
-
repo owner Hi Christine,
I made a mistake in the function to be used. You should use function addDaysSkippingWeekends instead of subtractDatesSkippingWeekends.
I have edited and fixed my description of the solution in a previous comment.
Please, close the issue if the solution works for you.
Thanks.
-
reporter Oh Thanks. Let me try :-)
-
repo owner I close the issue. Please, reopen it if the solution doesn't work.
-
repo owner - changed status to resolved
-
repo owner Hi @crolland7,
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