From 9c82881cac2ef36ae35d58c98029bc92d7957c88 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 9 Jun 2015 13:30:45 -0700 Subject: [PATCH] Fix "unmarked 0 inline comments as not undone" transactions Summary: Fixes T8483. I did this incorrectly in D13159, by doing it correctly first and then editing it carelessly. For most transaction types, it didn't matter, but did for inline state. Also, clean up any bad inline state transactions. Test Plan: - Ran migration, bad transactions vanished. - Marked some inline comments as done. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8483 Differential Revision: https://secure.phabricator.com/D13226 --- resources/sql/autopatches/20150609.inline.sql | 4 ++++ .../editor/PhabricatorApplicationTransactionEditor.php | 1 + 2 files changed, 5 insertions(+) create mode 100644 resources/sql/autopatches/20150609.inline.sql diff --git a/resources/sql/autopatches/20150609.inline.sql b/resources/sql/autopatches/20150609.inline.sql new file mode 100644 index 0000000000..1c9765ac5f --- /dev/null +++ b/resources/sql/autopatches/20150609.inline.sql @@ -0,0 +1,4 @@ +/* This cleans up some errant transactions, see T8483. */ + +DELETE FROM {$NAMESPACE}_differential.differential_transaction + WHERE transactionType = 'core:inlinestate' AND newValue = 'null'; diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index 04e5983c3f..d89c782900 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -356,6 +356,7 @@ abstract class PhabricatorApplicationTransactionEditor case PhabricatorTransactions::TYPE_BUILDABLE: case PhabricatorTransactions::TYPE_TOKEN: case PhabricatorTransactions::TYPE_INLINESTATE: + return $xaction->getNewValue(); case PhabricatorTransactions::TYPE_SPACE: $space_phid = $xaction->getNewValue(); if (!strlen($space_phid)) { -- 2.51.2