Page MenuHomeIn-Portal Phabricator

INP-1491 - Round numbers in kFormatter before using "sprintf"
ClosedPublic

Authored by alex on Oct 2 2015, 10:45 AM.

Details

Test Plan

Part 1

  1. pick any unit (I tend to use manuf unit)
  2. add new DB column for storing decimal numbers with 4 digit after comman precision
  3. add matching:
    • field declaration to the unit config
    • grid column declaration to the unit config
  4. create record in DB with 145.575 value

Part 2

NOTE: Repeat test with each of these format field option values: %.02f, %0.2f, %01.2f, %.2f, anything that doesn't end with digit and f letter.
  1. put needed value in format field option in unit config
  2. confirm, that 145.58 value is displayed in grid

Feel free to use any format you like that has digit and f letter at the end.

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 284
Build 284: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 356.Oct 2 2015, 10:45 AM
alex retitled this revision from to INP-1491 - Round numbers in kFormatter before using "sprintf".
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1491.
glebs accepted this revision.Oct 6 2015, 1:30 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.Oct 6 2015, 1:30 AM
alex updated this revision to Diff 439.Jan 17 2016, 4:17 AM
alex edited edge metadata.

Add code comment, that describes why high precision formats are not supported.

alex updated this revision to Diff 440.Jan 17 2016, 4:31 AM

Grammar fix.

This revision was automatically updated to reflect the committed changes.
alex added a project: Restricted Project.Mar 10 2016, 5:42 AM