Christopher Johnson (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/177769

Change subject: fix point change transaction formula
......................................................................

fix point change transaction formula

Changed to look at the "new" point value for the transaction,
The old formula was looking at the "current" point value.

Change-Id: I7a4861d97846e6994793ca4b60821737108164ee
---
M src/storage/SprintTransaction.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint 
refs/changes/69/177769/1

diff --git a/src/storage/SprintTransaction.php 
b/src/storage/SprintTransaction.php
index f760be1..1105410 100644
--- a/src/storage/SprintTransaction.php
+++ b/src/storage/SprintTransaction.php
@@ -26,6 +26,8 @@
 
       if (in_array($project_phid, $project_phids)) {
         $points = $query->getStoryPoints($task_phid);
+        $old_point_value = $xaction->getOldValue();
+        $new_point_value = $xaction->getNewValue();
         $date = phabricator_format_local_time($xaction_date, $this->viewer, 'D 
M j');
 
 
@@ -48,8 +50,7 @@
               break;
             case "points":
               // Points were changed
-                $old_point_value = $xaction->getOldValue();
-                $this->ChangePointsBefore($before, $points, $old_point_value, 
$dates);
+                 $this->ChangePointsBefore($before, $new_point_value, 
$old_point_value, $dates);
                  break;
           }
         }
@@ -88,8 +89,7 @@
             case "points":
 //              $this->transLog($event);
               // Points were changed
-                $old_point_value = $xaction->getOldValue();
-                $this->changePoints($date, $task_phid, $points, 
$old_point_value, $dates);
+                $this->changePoints($date, $task_phid, $new_point_value, 
$old_point_value, $dates);
 //                $this->closePoints($date, $task_phid, $points, 
$old_point_value, $dates);
               break;
           }

-- 
To view, visit https://gerrit.wikimedia.org/r/177769
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a4861d97846e6994793ca4b60821737108164ee
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/Sprint
Gerrit-Branch: master
Gerrit-Owner: Christopher Johnson (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to