Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14019888
D17885.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17885.diff
View Options
diff --git a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
--- a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
+++ b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
@@ -6,16 +6,14 @@
const TRANSACTIONTYPE = 'points';
public function generateOldValue($object) {
- return $object->getPoints();
+ return $this->getValueForPoints($object->getPoints());
+ }
+
+ public function generateNewValue($object, $value) {
+ return $this->getValueForPoints($value);
}
public function applyInternalEffects($object, $value) {
- if (!strlen($value)) {
- $value = null;
- }
- if ($value !== null) {
- $value = (double)$value;
- }
$object->setPoints($value);
}
@@ -73,4 +71,14 @@
return $errors;
}
+ private function getValueForPoints($value) {
+ if (!strlen($value)) {
+ $value = null;
+ }
+ if ($value !== null) {
+ $value = (double)$value;
+ }
+ return $value;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 11:45 PM (6 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710386
Default Alt Text
D17885.diff (1 KB)
Attached To
Mode
D17885: Generate newValue for ManiphestTaskPointTransaction
Attached
Detach File
Event Timeline
Log In to Comment