Found a couple of issues in the math for checking minimum worklog timer time (and hence failing to store the worklog) to resolve my issue create at #298.
TR_RoundTime should have the || 5 default, rather than the operator (since Math[5] isn't a function)
timeInMins will be 0 for anything < 30 seconds, so the rounding operation (e.g. ceil) would still keep it as 0 instead of ceiling it to 5 minutes (or what the user has configured). The Math.max ensures it is at least 1 minute (if the user has set TR_MinTime greater than that then it will never get to this code path anyway from the if (timeInMins >= minTime) check above)
Found a couple of issues in the math for checking minimum worklog timer time (and hence failing to store the worklog) to resolve my issue create at #298.
TR_RoundTime
should have the|| 5
default, rather than the operator (sinceMath[5]
isn't a function)timeInMins
will be 0 for anything < 30 seconds, so the rounding operation (e.g.ceil
) would still keep it as 0 instead of ceiling it to 5 minutes (or what the user has configured). TheMath.max
ensures it is at least 1 minute (if the user has setTR_MinTime
greater than that then it will never get to this code path anyway from theif (timeInMins >= minTime)
check above)