Validation of "Total time spent" and "Work logged in Translation" fails with european decimal

Issue #221 resolved
Martin Widemann created an issue

The validation of "Total time spent" and "Work logged in Translation" with a boolean expression fails when the time is entered as decimal number with european decimal.

Unit for time logging is set to hour. Using minutes also fails.

Example rule: Only if the following boolean expression is true: {Total time spent (minutes)} >= 30

  • Value "10m" is validated correct and the expression returns false.
  • Value "0.1" is validated correct and the expression returns false.
  • Value "0,1" is NOT validated correct and the expression returns falsely true.

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi Martin,

    The bug has been fixed in version 2.2.4_beta_1.

    Until the moment those virtual fields always returned an integer number of minutes, i.e., 1.3m was rounded to 1, but with the new version 1.3 is returned.

    Regards,

    Fidel

  2. Martin Widemann reporter

    I have updated to 2.2.5. Unfortunately 0.1 (hours) now is converted to 1 h. And 0.5 (hours) is converted to 5 h. jira-wft-validate-time.png

  3. Fidel Castro Armario repo owner

    That's the behavior implemented by JIRA, not by the plugin: thousands separator are ignored, i.e, when logged user is using European Locale (character ',' as decimal separator, and '.' as thousands separator) then 0.1 and 0.01 are equivalent to 1.

    The validation that you have implemented using the plugin doesn't modify the way JIRA parses the user's input. The only change made in the plugin is to parse the user's input according to the logged user's locale, i.e., the same way JIRA does, this way the validation is obtaining the same value JIRA obtains from user's input.

  4. Log in to comment