@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

Remove all "originalTitle"/"originalName" fields from objects

Summary:
Depends on D19012. Ref T13053. In D19012, I've changed "Thread-Topic" to always use PHIDs.

This change drops the selective on-object storage we have to track the original, human-readable title for objects.

Even if we end up backing out the "Thread-Topic" change, we'd be better off storing this in a table in the Mail app which just has `<objectPHID, first subject we used when sending mail for that object>`, since then we get the right behavior without needing every object to have this separate field.

Test Plan: Grepped for `original`, `originalName`, `originalTitle`, etc.

Reviewers: amckinley

Maniphest Tasks: T13053

Differential Revision: https://secure.phabricator.com/D19013

+6 -31
+2
resources/sql/autopatches/20180207.mail.01.task.sql
··· 1 + ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task 2 + DROP originalTitle;
+2
resources/sql/autopatches/20180207.mail.02.revision.sql
··· 1 + ALTER TABLE {$NAMESPACE}_differential.differential_revision 2 + DROP originalTitle;
+2
resources/sql/autopatches/20180207.mail.03.mock.sql
··· 1 + ALTER TABLE {$NAMESPACE}_pholio.pholio_mock 2 + DROP originalName;
-10
src/applications/differential/storage/DifferentialRevision.php
··· 20 20 PhabricatorDraftInterface { 21 21 22 22 protected $title = ''; 23 - protected $originalTitle; 24 23 protected $status; 25 24 26 25 protected $summary = ''; ··· 98 97 ), 99 98 self::CONFIG_COLUMN_SCHEMA => array( 100 99 'title' => 'text255', 101 - 'originalTitle' => 'text255', 102 100 'status' => 'text32', 103 101 'summary' => 'text', 104 102 'testPlan' => 'text', ··· 153 151 154 152 public function getURI() { 155 153 return '/'.$this->getMonogram(); 156 - } 157 - 158 - public function setTitle($title) { 159 - $this->title = $title; 160 - if (!$this->getID()) { 161 - $this->originalTitle = $title; 162 - } 163 - return $this; 164 154 } 165 155 166 156 public function loadIDsByCommitPHIDs($phids) {
-1
src/applications/maniphest/editor/ManiphestTransactionEditor.php
··· 522 522 'status' => '""', 523 523 'priority' => 0, 524 524 'title' => '""', 525 - 'originalTitle' => '""', 526 525 'description' => '""', 527 526 'dateCreated' => 0, 528 527 'dateModified' => 0,
-10
src/applications/maniphest/storage/ManiphestTask.php
··· 31 31 protected $subpriority = 0; 32 32 33 33 protected $title = ''; 34 - protected $originalTitle = ''; 35 34 protected $description = ''; 36 35 protected $originalEmailSource; 37 36 protected $mailKey; ··· 83 82 'status' => 'text64', 84 83 'priority' => 'uint32', 85 84 'title' => 'sort', 86 - 'originalTitle' => 'text', 87 85 'description' => 'text', 88 86 'mailKey' => 'bytes20', 89 87 'ownerOrdering' => 'text64?', ··· 173 171 174 172 public function setOwnerPHID($phid) { 175 173 $this->ownerPHID = nonempty($phid, null); 176 - return $this; 177 - } 178 - 179 - public function setTitle($title) { 180 - $this->title = $title; 181 - if (!$this->getID()) { 182 - $this->originalTitle = $title; 183 - } 184 174 return $this; 185 175 } 186 176
-2
src/applications/pholio/storage/PholioMock.php
··· 25 25 protected $editPolicy; 26 26 27 27 protected $name; 28 - protected $originalName; 29 28 protected $description; 30 29 protected $coverPHID; 31 30 protected $mailKey; ··· 65 64 self::CONFIG_COLUMN_SCHEMA => array( 66 65 'name' => 'text128', 67 66 'description' => 'text', 68 - 'originalName' => 'text128', 69 67 'mailKey' => 'bytes20', 70 68 'status' => 'text12', 71 69 ),
-3
src/applications/pholio/xaction/PholioMockNameTransaction.php
··· 15 15 16 16 public function applyInternalEffects($object, $value) { 17 17 $object->setName($value); 18 - if ($object->getOriginalName() === null) { 19 - $object->setOriginalName($this->getNewValue()); 20 - } 21 18 } 22 19 23 20 public function getTitle() {
-5
src/applications/ponder/storage/PonderQuestion.php
··· 194 194 return parent::save(); 195 195 } 196 196 197 - public function getOriginalTitle() { 198 - // TODO: Make this actually save/return the original title. 199 - return $this->getTitle(); 200 - } 201 - 202 197 public function getFullTitle() { 203 198 $id = $this->getID(); 204 199 $title = $this->getTitle();