Please help me for date calculation

Issue #359 resolved
created an issue


I am trying to calculate a date based on another numeric field:

Date = duedate - (number of words/ 1500} days (skipping the weekends)

How could I achieve this ?

Thank you for your help

Comments (13)

  1. Fidel Castro Armario repo owner

    I have some questions:

    • Is "Number of words" a numeric custom field?
    • What you intend to do is to move earlier in time "Due date" based on "Number of words" custom field? Being more specific, to move 1 day back in time, per each 1,500 words. Please, confirm.
    • What happens when the number of words is nor divisible by 1500, e.g., when we have a value like 2,500, or 1,600, should we move "Due date" 2 day earlier, or not? Yes, with 2,500, and No with 1,600?
  2. Elvir reporter


    • Yes number of words is a numeric field. A translator can translate 1500 words per day. Yes we have to move back 1 day per each 1500 without counting the weekends
    • so 2,500 / 1,500 = 1.66. we should move back 2 days 1600/ 1500 = 1.06. we should move back 1 day

    Please let me know if you need more information

  3. Elvir reporter

    Hi Fidel

    Thanks for the feedback. I already used subtractDatesSkippingWeekends () to calculate the time between create date and start date. I was wondering if we could add some parameters.

    My company is not working between 22 of december and 2nd of january every year. How could we skip this period in the calculation.



  4. Fidel Castro Armario repo owner

    Use the following formula:

    floor(timeDifference({11204}, {00009}, "my_schedule", LOCAL) / {DAY})

    where my_schedule uses the following SDG definition:

    #Mondays to Fridays we count the whole day
    MON - FRI {
       00:00 - 00:00;   # whole day interval
    #Christmas holidays
    DEC/22 - JAN/2 {;}

    Schedules are defined in JIRA at Administration > Add-ons > JIRA WORKFLOW TOOLBOX > Schedules.

  5. Log in to comment