issue with timedifference function and schedule

Issue #965 resolved
Juri Koenig created an issue

Hi,

we have a big problem with a 10.000 user instance using JWT for calculating work log based on time spent in a workflow status.

  • every status has a "date" field which holds the value of the last occurence (entry date) of the status (gets set via post-function to the status)
  • every status has a "duration" field in order to track time in status - based on a schedule using JWT
  • the calculations for the duration do work, unless there's a "work free" time in between status changes according to JWT schedule.

our schedule looks like this:

tge_schedule.PNG

Example:

given transition: "On Hold" -> "In Progress" ...

start-progress-transition.PNG

... for calculating the time in status "On Hold" we have this post-function: on_hold_duration.PNG

Now... inside the same issue (without any configuration changes inbetween transitions) we get ...

... a correct calculation (example 1):

onhold1.PNG

... and a wrong calculation (example 2):

onhold2.PNG

Note that in example with false result, there was a work-free time scheduled between the status change - as it's always the case when the false calculation occurs. Therefore we assume there's a bug with the schedule functionality and/or the timeDifference function.

We have JIRA Software v7.4.4.

Kind regards

Juri

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi @jurikoenig,

    Can we have a screen-share through Skype? I would like to see the problem in direct, since I'm not able to reproduce your problem.

    My Skype user is fidel100r. Can we arrange a time for the meeting? I will be available today since now up to 14:00 UTC, or since 16:30 to 19:00 UTC.

  2. Juri Koenig reporter

    Hi @fcarmario,

    we can skype at 18:00 UTC. I will add and call you via Skype by then.

    Kind regards Juri

  3. Juri Koenig reporter
    # Working Days
    MON - FRI {
       08:00 - 18:00;
    }
    
    # Annual German Holidays
    # Neujahr, Tag der Arbeit, Dt. Einheit, 1. und 2. Weihnachtsfeiertag
    JAN/1, MAY/1, OCT/3, DEC/25, DEC/26 {;}
    
    # German Holidays - 2018
    # Karfreitag, Ostermontag, Christi Himmelfahrt, Pfingstmontag
    2018/MAR/30, 2018/APR/02, 2018/MAY/10, 2018/MAY/21 {;}
    
  4. Fidel Castro Armario repo owner

    Hello @jurikoenig,

    I have fixed the problem in version 2.3.0_beta_1.

    Can you, please, test it and let me know whether it's a valid solution for you?

  5. Juri Koenig reporter

    Hi @fcarmario , thank you for the quick solution. Looks good to me after a few quick tests. Can you please provide information how the old, wrong values have been calculated? We need this information in order to fix corrupt values in existing issues.

  6. Fidel Castro Armario repo owner

    Hi @jurikoenig,

    Sorry, but it's not possible to calculate the correct values from the wrong ones.

    In order to calculate the correct values you have to use the new version of the add-on with the correct input parameters (both date-time values).

  7. Log in to comment