1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 04:02:43 +01:00
phorge-phorge/src/applications/spaces
epriestley 9f5e6bee90 Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw"
Summary:
Depends on D20115. See <https://discourse.phabricator-community.org/t/transaction-search-endpoint-does-not-work-on-differential-diffs/2369/>.

Currently, `getApplicationTransactionCommentObject()` throws by default. Subclasses must override it to `return null` to indicate that they don't support comments.

This is silly, and leads to a bunch of code that does a `try / catch` around it, and at least some code (here, `transaction.search`) which doesn't `try / catch` and gets the wrong behavior as a result.

Just make it `return null` by default, meaning "no support for comments". Then remove the `try / catch` stuff and all the `return null` implementations.

Test Plan:
  - Grepped for `getApplicationTransactionCommentObject()`, fixed each callsite / definition.
  - Called `transaction.search` on a diff with transactions (i.e., not a sourced-from-commit diff).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: jbrownEP

Differential Revision: https://secure.phabricator.com/D20121
2019-02-07 14:56:38 -08:00
..
__tests__ Update Spaces for modular transactions 2017-05-04 21:48:13 +00:00
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
capability Add "Spaces", an application for managing policy namespaces 2015-06-01 11:28:38 -07:00
controller Update Spaces for new edit UI 2017-09-07 11:33:59 -07:00
editor Update Spaces for modular transactions 2017-05-04 21:48:13 +00:00
engineextension Add more mail stamps: tasks, subscribers, projects, spaces 2018-02-06 04:05:46 -08:00
herald Group and order Herald fields 2015-07-16 14:13:13 -07:00
interface Add spacePHID infrastructure and implement in Paste 2015-06-04 17:45:24 -07:00
phid Add more mail stamps: tasks, subscribers, projects, spaces 2018-02-06 04:05:46 -08:00
query Sort Spaces dropdown by name, not "alphabetical ID" 2016-02-23 10:41:49 -08:00
remarkup Add a Spaces remarkup rule 2015-06-05 14:19:40 -07:00
searchfield Flesh out Conduit types for Paste search fields 2015-12-14 04:23:28 -08:00
storage Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
typeahead Allow Spaces to be archived 2015-06-11 10:13:47 -07:00
view Don't show Space monograms in SpaceContextView 2015-06-11 10:14:22 -07:00
xaction Update Spaces for modular transactions 2017-05-04 21:48:13 +00:00