mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-17 12:22:42 +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 {
|
PhabricatorDraftInterface {
|
||||||
|
|
||||||
protected $title = '';
|
protected $title = '';
|
||||||
protected $originalTitle;
|
|
||||||
protected $status;
|
protected $status;
|
||||||
|
|
||||||
protected $summary = '';
|
protected $summary = '';
|
||||||
|
@ -98,7 +97,6 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
),
|
),
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'title' => 'text255',
|
'title' => 'text255',
|
||||||
'originalTitle' => 'text255',
|
|
||||||
'status' => 'text32',
|
'status' => 'text32',
|
||||||
'summary' => 'text',
|
'summary' => 'text',
|
||||||
'testPlan' => 'text',
|
'testPlan' => 'text',
|
||||||
|
@ -155,14 +153,6 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
return '/'.$this->getMonogram();
|
return '/'.$this->getMonogram();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTitle($title) {
|
|
||||||
$this->title = $title;
|
|
||||||
if (!$this->getID()) {
|
|
||||||
$this->originalTitle = $title;
|
|
||||||
}
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function loadIDsByCommitPHIDs($phids) {
|
public function loadIDsByCommitPHIDs($phids) {
|
||||||
if (!$phids) {
|
if (!$phids) {
|
||||||
return array();
|
return array();
|
||||||
|
|
|
@ -522,7 +522,6 @@ final class ManiphestTransactionEditor
|
||||||
'status' => '""',
|
'status' => '""',
|
||||||
'priority' => 0,
|
'priority' => 0,
|
||||||
'title' => '""',
|
'title' => '""',
|
||||||
'originalTitle' => '""',
|
|
||||||
'description' => '""',
|
'description' => '""',
|
||||||
'dateCreated' => 0,
|
'dateCreated' => 0,
|
||||||
'dateModified' => 0,
|
'dateModified' => 0,
|
||||||
|
|
|
@ -31,7 +31,6 @@ final class ManiphestTask extends ManiphestDAO
|
||||||
protected $subpriority = 0;
|
protected $subpriority = 0;
|
||||||
|
|
||||||
protected $title = '';
|
protected $title = '';
|
||||||
protected $originalTitle = '';
|
|
||||||
protected $description = '';
|
protected $description = '';
|
||||||
protected $originalEmailSource;
|
protected $originalEmailSource;
|
||||||
protected $mailKey;
|
protected $mailKey;
|
||||||
|
@ -83,7 +82,6 @@ final class ManiphestTask extends ManiphestDAO
|
||||||
'status' => 'text64',
|
'status' => 'text64',
|
||||||
'priority' => 'uint32',
|
'priority' => 'uint32',
|
||||||
'title' => 'sort',
|
'title' => 'sort',
|
||||||
'originalTitle' => 'text',
|
|
||||||
'description' => 'text',
|
'description' => 'text',
|
||||||
'mailKey' => 'bytes20',
|
'mailKey' => 'bytes20',
|
||||||
'ownerOrdering' => 'text64?',
|
'ownerOrdering' => 'text64?',
|
||||||
|
@ -176,14 +174,6 @@ final class ManiphestTask extends ManiphestDAO
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTitle($title) {
|
|
||||||
$this->title = $title;
|
|
||||||
if (!$this->getID()) {
|
|
||||||
$this->originalTitle = $title;
|
|
||||||
}
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMonogram() {
|
public function getMonogram() {
|
||||||
return 'T'.$this->getID();
|
return 'T'.$this->getID();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ final class PholioMock extends PholioDAO
|
||||||
protected $editPolicy;
|
protected $editPolicy;
|
||||||
|
|
||||||
protected $name;
|
protected $name;
|
||||||
protected $originalName;
|
|
||||||
protected $description;
|
protected $description;
|
||||||
protected $coverPHID;
|
protected $coverPHID;
|
||||||
protected $mailKey;
|
protected $mailKey;
|
||||||
|
@ -65,7 +64,6 @@ final class PholioMock extends PholioDAO
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'name' => 'text128',
|
'name' => 'text128',
|
||||||
'description' => 'text',
|
'description' => 'text',
|
||||||
'originalName' => 'text128',
|
|
||||||
'mailKey' => 'bytes20',
|
'mailKey' => 'bytes20',
|
||||||
'status' => 'text12',
|
'status' => 'text12',
|
||||||
),
|
),
|
||||||
|
|
|
@ -15,9 +15,6 @@ final class PholioMockNameTransaction
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$object->setName($value);
|
$object->setName($value);
|
||||||
if ($object->getOriginalName() === null) {
|
|
||||||
$object->setOriginalName($this->getNewValue());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
|
|
|
@ -194,11 +194,6 @@ final class PonderQuestion extends PonderDAO
|
||||||
return parent::save();
|
return parent::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOriginalTitle() {
|
|
||||||
// TODO: Make this actually save/return the original title.
|
|
||||||
return $this->getTitle();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFullTitle() {
|
public function getFullTitle() {
|
||||||
$id = $this->getID();
|
$id = $this->getID();
|
||||||
$title = $this->getTitle();
|
$title = $this->getTitle();
|
||||||
|
|
Loading…
Reference in a new issue