How to substract 6 days to a date

Issue #72 resolved
christine rolland
created an issue

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)

  1. Fidel Castro Armario 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:

    conf-1.png

    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:

    conf-2.png

  2. Fidel Castro Armario 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:

    conf-1.png

    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:

    conf-2.png

  3. Fidel Castro Armario 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.

  4. Log in to comment