← Back to team overview

dhis2-devs team mailing list archive

[Bug 790172] Re: integers-values-do-not-allow-negative-numbers

 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dh
is-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/
javascripts/commons.js  2011-05-28 14:40:32 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/
javascripts/commons.js  2011-05-30 13:52:04 +0000
@@ -1439,7 +1439,7 @@

 function isInt(value)
 {
-       var regex = /^\d+$/;
+       var regex = /[-]?\b\d+\b/;
        return regex.test( value );
 }

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/790172

Title:
  integers-values-do-not-allow-negative-numbers

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Last time I checked, integers included both positive and negative
  values with no decimal places. In our case, we need to enter a stock
  loss (negative) or adjustments (positive). When I enter a negative
  number (-1) after having set the type of the data element to integer I
  receive the message that the number must be an integer, which it is.
  :)

  On Rev 3643.


Follow ups

References