1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/maniphest/storage
epriestley 857e3aee83 Improve ApplicationTransaction behavior for poorly constructed transactions
Summary:
Ref T2222. Five very small improvements:

  - I hit this exception and it took a bit to understand which transaction was causing problems. Add an `Exception` subclass which does a better job of making the message debuggable.
  - The `oldValue` of a transaction may be `null`, legitimately (for example, changing the `repositoryPHID` for a revision from `null` to some valid PHID). Do a check to see if `setOldValue()` has been called, instead of a check for a `null` value.
  - Add an additional check for the other case (shouldn't have a value, but does).
  - When we're not generating a value, don't bother calling the code to generate it. The best case scenario is that it has no effect; any effect it might have (changing the value) is always wrong.
  - Maniphest didn't fall back to the parent correctly when computing this flag, so it got the wrong result for `CustomField` transactions.

Test Plan: Resolved the issue I was hitting more easily, made updates to a `null`-valued custom field, and applied other normal sorts of transactions successfully.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4557, T2222

Differential Revision: https://secure.phabricator.com/D8401
2014-03-05 10:44:21 -08:00
..
ManiphestCustomFieldNumericIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
ManiphestCustomFieldStorage.php Various linter fixes. 2014-02-26 12:44:58 -08:00
ManiphestCustomFieldStringIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
ManiphestDAO.php Delete license headers from files 2012-11-05 11:16:51 -08:00
ManiphestNameIndex.php Provide and populate an object name index for Maniphest 2013-09-12 13:06:44 -07:00
ManiphestTask.php Move many task status hardcodes into ManiphestTaskStatus 2014-02-17 15:59:31 -08:00
ManiphestTaskProject.php Delete license headers from files 2012-11-05 11:16:51 -08:00
ManiphestTaskSubscriber.php Delete license headers from files 2012-11-05 11:16:51 -08:00
ManiphestTransaction.php Improve ApplicationTransaction behavior for poorly constructed transactions 2014-03-05 10:44:21 -08:00
ManiphestTransactionComment.php Rename "transactionpro" table to "transaction" 2013-09-24 10:49:16 -07:00