Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14355878
D16601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D16601.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -495,7 +495,7 @@
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
'rsrc/js/application/projects/WorkboardBoard.js' => 'fe7cb52a',
'rsrc/js/application/projects/WorkboardCard.js' => 'c587b80f',
- 'rsrc/js/application/projects/WorkboardColumn.js' => 'bae58312',
+ 'rsrc/js/application/projects/WorkboardColumn.js' => '21df4ff5',
'rsrc/js/application/projects/WorkboardController.js' => '55baf5ed',
'rsrc/js/application/projects/behavior-project-boards.js' => '14a1faae',
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
@@ -825,7 +825,7 @@
'javelin-websocket' => 'e292eaf4',
'javelin-workboard-board' => 'fe7cb52a',
'javelin-workboard-card' => 'c587b80f',
- 'javelin-workboard-column' => 'bae58312',
+ 'javelin-workboard-column' => '21df4ff5',
'javelin-workboard-controller' => '55baf5ed',
'javelin-workflow' => '1e911d0f',
'lightbox-attachment-css' => '7acac05d',
@@ -1162,6 +1162,10 @@
'javelin-stratcom',
'conpherence-thread-manager',
),
+ '21df4ff5' => array(
+ 'javelin-install',
+ 'javelin-workboard-card',
+ ),
'2290aeef' => array(
'javelin-install',
'javelin-dom',
@@ -1922,10 +1926,6 @@
'javelin-uri',
'phabricator-notification',
),
- 'bae58312' => array(
- 'javelin-install',
- 'javelin-workboard-card',
- ),
'bb1dd507' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/webroot/rsrc/js/application/projects/WorkboardColumn.js b/webroot/rsrc/js/application/projects/WorkboardColumn.js
--- a/webroot/rsrc/js/application/projects/WorkboardColumn.js
+++ b/webroot/rsrc/js/application/projects/WorkboardColumn.js
@@ -222,6 +222,7 @@
var points = {};
var count = 0;
+ var decimal_places = 0;
for (var phid in cards) {
var card = cards[phid];
@@ -238,6 +239,15 @@
points[status] = 0;
}
points[status] += card_points;
+
+ // Count the number of decimal places in the point value with the
+ // most decimal digits. We'll use the same precision when rendering
+ // the point sum. This avoids rounding errors and makes the display
+ // a little more consistent.
+ var parts = card_points.toString().split('.');
+ if (parts[1]) {
+ decimal_places = Math.max(decimal_places, parts[1].length);
+ }
}
count++;
@@ -247,6 +257,7 @@
for (var k in points) {
total_points += points[k];
}
+ total_points = total_points.toFixed(decimal_places);
var limit = this.getPointLimit();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 6:48 PM (17 h, 1 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6911631
Default Alt Text
D16601.diff (2 KB)
Attached To
Mode
D16601: When summing points on a workboard, display sum with same precision as most-precise value
Attached
Detach File
Event Timeline
Log In to Comment