OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
188 stars 87 forks source link

Prevent numbers from being formatted in scientific notation in forms #3208

Closed maurizi closed 7 years ago

maurizi commented 7 years ago

Connects to #2733

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.001%) to 83.852% when pulling 20f593044f37e051d40d6270826b0b3c3f2f615e on maurizi:no-scientific-notation into 52a89f63dcaae2c0235c9376f2a1d170b757eaa5 on OpenTreeMap:develop.

jwalgran commented 7 years ago

The tag is working well for the built in fields but I added a custom Decimal field and the view mode value is getting scientifically notated.

Looks good in the form

screen shot 2017-08-31 at 2 42 47 pm

Notated after save

screen shot 2017-08-31 at 2 42 06 pm
maurizi commented 7 years ago

Custom decimal field values in the view mode are getting scientifically notated.

Fixed in (rebased) commit https://github.com/OpenTreeMap/otm-core/pull/3208/commits/537c391b84f51f672a1c8d49eb7729fa4fd897c8. I also fixed formatting for numbers in the edits sidebar, and made sure we don't show trailing zeros

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.006%) to 83.927% when pulling 537c391b84f51f672a1c8d49eb7729fa4fd897c8 on maurizi:no-scientific-notation into e558d2abcc5b4879b19ba582068d4b783c1c2412 on OpenTreeMap:develop.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.01%) to 83.92% when pulling 7bdee5f995cedd6ee22b6f523e475697726045da on maurizi:no-scientific-notation into e558d2abcc5b4879b19ba582068d4b783c1c2412 on OpenTreeMap:develop.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.006%) to 83.904% when pulling 149dfeafd83db8fa047dcbeaf5afef674fd40522 on maurizi:no-scientific-notation into 7b3f08b490e83a9479e9db53568d84043902b462 on OpenTreeMap:develop.