@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Expose initially set values of Maniphest custom date field and point values when removing them

Summary:
After removing or resetting a custom date field value or points value initially set at task creation there is no way to find and restore the previous value.
As Phorge adds a transaction entry anyway, include the previous value in the transaction title.
This makes it easier to revert an accidental removal of such data and is also more aligned with the behavior of other custom field types.

Closes T15846

Test Plan:
* Define a custom date field in Maniphest via http://phorge.localhost/config/edit/maniphest.custom-field-definitions/ and also enable http://phorge.localhost/config/edit/maniphest.points/
* Create a task with those fields set to non-custom values via a create task form which allows editing/changing these values
* Edit the task and remove/reset the values of these custom fields
* Look at the task and its transaction entries

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15846

Differential Revision: https://we.phorge.it/D25678

+11
+5
src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php
··· 33 33 '%s set the point value for this task to %s.', 34 34 $this->renderAuthor(), 35 35 $this->renderNewValue()); 36 + } else if ($new === null && $old !== null) { 37 + return pht( 38 + '%s removed the point value %s for this task.', 39 + $this->renderAuthor(), 40 + $this->renderOldValue()); 36 41 } else if ($new === null) { 37 42 return pht( 38 43 '%s removed the point value for this task.',
+6
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
··· 177 177 $xaction->renderHandleLink($author_phid), 178 178 $this->getFieldName(), 179 179 $new_date); 180 + } else if (!$new && $old) { 181 + return pht( 182 + '%s removed %s which was set to %s.', 183 + $xaction->renderHandleLink($author_phid), 184 + $this->getFieldName(), 185 + $old_date); 180 186 } else if (!$new) { 181 187 return pht( 182 188 '%s removed %s.',