diff --git a/resources/sql/patches/20130523.maniphest_owners.sql b/resources/sql/patches/20130523.maniphest_owners.sql new file mode 100644 index 0000000000..d5209e2b35 --- /dev/null +++ b/resources/sql/patches/20130523.maniphest_owners.sql @@ -0,0 +1 @@ +update {$NAMESPACE}_maniphest.maniphest_task set ownerPHID = NULL WHERE ownerPHID = ''; diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index c20172b268..4c3d83ec2b 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -90,7 +90,7 @@ final class ManiphestTask extends ManiphestDAO } public function setOwnerPHID($phid) { - $this->ownerPHID = $phid; + $this->ownerPHID = nonempty($phid, null); $this->subscribersNeedUpdate = true; return $this; } diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index b6d5a23bcd..a67d63211a 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -1310,6 +1310,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('20130521.dropconphimages.sql'), ), + '20130523.maniphest_owners.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('20130523.maniphest_owners.sql'), + ), ); }