mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
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
This commit is contained in:
parent
f090fa7426
commit
aa74af1983
9 changed files with 6 additions and 31 deletions
2
resources/sql/autopatches/20180207.mail.01.task.sql
Normal file
2
resources/sql/autopatches/20180207.mail.01.task.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
|
||||
DROP originalTitle;
|
2
resources/sql/autopatches/20180207.mail.02.revision.sql
Normal file
2
resources/sql/autopatches/20180207.mail.02.revision.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_differential.differential_revision
|
||||
DROP originalTitle;
|
2
resources/sql/autopatches/20180207.mail.03.mock.sql
Normal file
2
resources/sql/autopatches/20180207.mail.03.mock.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_pholio.pholio_mock
|
||||
DROP originalName;
|
|
@ -20,7 +20,6 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
PhabricatorDraftInterface {
|
||||
|
||||
protected $title = '';
|
||||
protected $originalTitle;
|
||||
protected $status;
|
||||
|
||||
protected $summary = '';
|
||||
|
@ -98,7 +97,6 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
),
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'title' => 'text255',
|
||||
'originalTitle' => 'text255',
|
||||
'status' => 'text32',
|
||||
'summary' => 'text',
|
||||
'testPlan' => 'text',
|
||||
|
@ -155,14 +153,6 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
return '/'.$this->getMonogram();
|
||||
}
|
||||
|
||||
public function setTitle($title) {
|
||||
$this->title = $title;
|
||||
if (!$this->getID()) {
|
||||
$this->originalTitle = $title;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function loadIDsByCommitPHIDs($phids) {
|
||||
if (!$phids) {
|
||||
return array();
|
||||
|
|
|
@ -522,7 +522,6 @@ final class ManiphestTransactionEditor
|
|||
'status' => '""',
|
||||
'priority' => 0,
|
||||
'title' => '""',
|
||||
'originalTitle' => '""',
|
||||
'description' => '""',
|
||||
'dateCreated' => 0,
|
||||
'dateModified' => 0,
|
||||
|
|
|
@ -31,7 +31,6 @@ final class ManiphestTask extends ManiphestDAO
|
|||
protected $subpriority = 0;
|
||||
|
||||
protected $title = '';
|
||||
protected $originalTitle = '';
|
||||
protected $description = '';
|
||||
protected $originalEmailSource;
|
||||
protected $mailKey;
|
||||
|
@ -83,7 +82,6 @@ final class ManiphestTask extends ManiphestDAO
|
|||
'status' => 'text64',
|
||||
'priority' => 'uint32',
|
||||
'title' => 'sort',
|
||||
'originalTitle' => 'text',
|
||||
'description' => 'text',
|
||||
'mailKey' => 'bytes20',
|
||||
'ownerOrdering' => 'text64?',
|
||||
|
@ -176,14 +174,6 @@ final class ManiphestTask extends ManiphestDAO
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setTitle($title) {
|
||||
$this->title = $title;
|
||||
if (!$this->getID()) {
|
||||
$this->originalTitle = $title;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMonogram() {
|
||||
return 'T'.$this->getID();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ final class PholioMock extends PholioDAO
|
|||
protected $editPolicy;
|
||||
|
||||
protected $name;
|
||||
protected $originalName;
|
||||
protected $description;
|
||||
protected $coverPHID;
|
||||
protected $mailKey;
|
||||
|
@ -65,7 +64,6 @@ final class PholioMock extends PholioDAO
|
|||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'text128',
|
||||
'description' => 'text',
|
||||
'originalName' => 'text128',
|
||||
'mailKey' => 'bytes20',
|
||||
'status' => 'text12',
|
||||
),
|
||||
|
|
|
@ -15,9 +15,6 @@ final class PholioMockNameTransaction
|
|||
|
||||
public function applyInternalEffects($object, $value) {
|
||||
$object->setName($value);
|
||||
if ($object->getOriginalName() === null) {
|
||||
$object->setOriginalName($this->getNewValue());
|
||||
}
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
|
|
|
@ -194,11 +194,6 @@ final class PonderQuestion extends PonderDAO
|
|||
return parent::save();
|
||||
}
|
||||
|
||||
public function getOriginalTitle() {
|
||||
// TODO: Make this actually save/return the original title.
|
||||
return $this->getTitle();
|
||||
}
|
||||
|
||||
public function getFullTitle() {
|
||||
$id = $this->getID();
|
||||
$title = $this->getTitle();
|
||||
|
|
Loading…
Reference in a new issue