mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Don't delete tasks attached by freeform fields in Maniphest Tasks field
Summary: I didn't catch this issue at D3986 because we don't have `DifferentialManiphestTasksFieldSpecification` in field selector. Test Plan: Added `DifferentialManiphestTasksFieldSpecification` too field selector. Wrote `Refs T4` and not filled `T4` to Maniphest Tasks field. Reviewers: epriestley, 20after4 Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T945 Differential Revision: https://secure.phabricator.com/D4073
This commit is contained in:
parent
bff795d848
commit
27785c4f75
1 changed files with 3 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
final class DifferentialManiphestTasksFieldSpecification
|
||||
extends DifferentialFieldSpecification {
|
||||
|
||||
private $oldManiphestTasks = array();
|
||||
private $maniphestTasks = array();
|
||||
|
||||
public function shouldAppearOnRevisionView() {
|
||||
|
@ -51,9 +52,7 @@ final class DifferentialManiphestTasksFieldSpecification
|
|||
$revision_phid = $revision->getPHID();
|
||||
$edge_type = PhabricatorEdgeConfig::TYPE_DREV_HAS_RELATED_TASK;
|
||||
|
||||
$old_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||
$revision_phid,
|
||||
$edge_type);
|
||||
$old_phids = $this->oldManiphestTasks;
|
||||
$add_phids = $this->maniphestTasks;
|
||||
$rem_phids = array_diff($old_phids, $add_phids);
|
||||
|
||||
|
@ -73,6 +72,7 @@ final class DifferentialManiphestTasksFieldSpecification
|
|||
|
||||
protected function didSetRevision() {
|
||||
$this->maniphestTasks = $this->getManiphestTaskPHIDs();
|
||||
$this->oldManiphestTasks = $this->maniphestTasks;
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForCommitMessage() {
|
||||
|
|
Loading…
Reference in a new issue