Page MenuHomePhabricator

D11015.diff
No OneTemporary

D11015.diff

diff --git a/resources/sql/autopatches/20141218.maniphestcctxn.php b/resources/sql/autopatches/20141218.maniphestcctxn.php
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20141218.maniphestcctxn.php
@@ -0,0 +1,20 @@
+<?php
+
+$table = new ManiphestTransaction();
+$conn_w = $table->establishConnection('w');
+
+echo "Converting Maniphest CC transactions to modern SUBSCRIBER ".
+ "transactions...\n";
+foreach (new LiskMigrationIterator($table) as $txn) {
+ // ManiphestTransaction::TYPE_CCS
+ if ($txn->getTransactionType() == 'ccs') {
+ queryfx(
+ $conn_w,
+ 'UPDATE %T SET transactionType = %s WHERE id = %d',
+ $table->getTableName(),
+ PhabricatorTransactions::TYPE_SUBSCRIBERS,
+ $txn->getID());
+ }
+}
+
+echo "Done.\n";
diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php
--- a/src/applications/maniphest/storage/ManiphestTransaction.php
+++ b/src/applications/maniphest/storage/ManiphestTransaction.php
@@ -7,26 +7,23 @@
const TYPE_STATUS = 'status';
const TYPE_DESCRIPTION = 'description';
const TYPE_OWNER = 'reassign';
- const TYPE_PROJECTS = 'projects';
const TYPE_PRIORITY = 'priority';
const TYPE_EDGE = 'edge';
const TYPE_SUBPRIORITY = 'subpriority';
const TYPE_PROJECT_COLUMN = 'projectcolumn';
const TYPE_MERGED_INTO = 'mergedinto';
const TYPE_MERGED_FROM = 'mergedfrom';
-
const TYPE_UNBLOCK = 'unblock';
// NOTE: this type is deprecated. Keep it around for legacy installs
// so any transactions render correctly.
const TYPE_ATTACH = 'attach';
/**
- * TYPE_CCS is legacy and depracted in favor of
- * PhabricatorTransactions::TYPE_SUBSCRIBERS; keep it around for legacy
+ * TYPE_PROJECTS is legacy and depracted in favor of
+ * PhabricatorTransactions::TYPE_EDGE; keep it around for legacy
* transaction-rendering.
*/
- const TYPE_CCS = 'ccs';
-
+ const TYPE_PROJECTS = 'projects';
const MAILTAG_STATUS = 'maniphest-status';
const MAILTAG_OWNER = 'maniphest-owner';
@@ -90,7 +87,6 @@
$phids[] = $old;
}
break;
- case self::TYPE_CCS:
case self::TYPE_PROJECTS:
$phids = array_mergev(
array(
@@ -271,9 +267,6 @@
return pht('Reassigned');
}
- case self::TYPE_CCS:
- return pht('Changed CC');
-
case self::TYPE_PROJECTS:
return pht('Changed Projects');
@@ -325,9 +318,6 @@
case self::TYPE_OWNER:
return 'fa-user';
- case self::TYPE_CCS:
- return 'fa-envelope';
-
case self::TYPE_TITLE:
if ($old === null) {
return 'fa-pencil';
@@ -546,13 +536,6 @@
$new_name);
}
- case self::TYPE_CCS:
- // TODO: Remove this when we switch to subscribers. Just reuse the
- // code in the parent.
- $clone = clone $this;
- $clone->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS);
- return $clone->getTitle();
-
case self::TYPE_EDGE:
// TODO: Remove this when we switch to real edges. Just reuse the
// code in the parent;
@@ -801,13 +784,6 @@
$new_name);
}
- case self::TYPE_CCS:
- // TODO: Remove this when we switch to subscribers. Just reuse the
- // code in the parent.
- $clone = clone $this;
- $clone->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS);
- return $clone->getTitleForFeed($story);
-
case self::TYPE_EDGE:
// TODO: Remove this when we switch to real edges. Just reuse the
// code in the parent;
@@ -902,7 +878,6 @@
case self::TYPE_OWNER:
$tags[] = self::MAILTAG_OWNER;
break;
- case self::TYPE_CCS:
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
$tags[] = self::MAILTAG_CC;
break;

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 6:18 PM (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6731970
Default Alt Text
D11015.diff (3 KB)

Event Timeline