shridhar-tl / jira-assistant

Repository containing source code of Jira Assistant browser extension. This is also used to track bugs related to the extension.
https://www.jiraassistant.com
235 stars 74 forks source link

#298 - resolve small worklog timer entries #299

Closed talltechdude closed 1 year ago

talltechdude commented 1 year ago

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.

  1. TR_RoundTime should have the || 5 default, rather than the operator (since Math[5] isn't a function)
  2. 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)