1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications
epriestley 49570cb1c4 Fix an issue with mention transactions in Calendar
Summary:
Fixes an issue where mentioning an event name (like `E999`) in a revision summary (and probably elsewhere) would produce an error like this:

```
2015/06/08 17:30:22 [error] 27702#0: *307450 FastCGI sent in stderr: "PHP message: [2015-06-08 17:30:22] EXCEPTION: (Exception) Transaction ("PHID-XACT-CEVT-zglgzy36aote5ja", of type "core:edge") requires a handle ("PHID-DREV-4m6vorimvg4bm3ltskca") that it did not load. at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:285]
PHP message: arcanist(head=master, ref.master=8c589f1f759f), phabricator(head=master, ref.master=b4de79741ceb), phutil(head=master, ref.master=4a0e1b47a584)
PHP message:   #0 <#2> PhabricatorApplicationTransaction::getHandle(string) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:474]
PHP message:   #1 <#2> PhabricatorApplicationTransaction::shouldHide() called at [<phabricator>/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php:82]
PHP message:   #2 <#2> PhabricatorCalendarEventTransaction::shouldHide() called at [<phutil>/src/utils/utils.php:428]
PHP message:   #3 <#2> mfilter(array, string, boolean) called at [<phabricator>/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php:350]
PHP message:   #4 <#2> PhabricatorCalendarEventEditor::shouldSendMail(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:990]
PHP message:   #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorCalendarEvent, array) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:2937]
PHP message:   #6 <#2> PhabricatorApplicationTransactionEditor::applyInverseEdgeTransactions(DifferentialRevision, DifferentialTransaction, integer) called at [<phabricator>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:602]
...
```

This is similar to rP98aae51c / rP0fc0af64, but for Calendar. (Likely, I copy/pasted the Editor from Maniphest a while ago.)

We don't need to do this filtering here because we do it later before sending mail. Additionally, because some transactions may hide or show depending on the viewer, it's strictly incorrect to do it here.

Test Plan:
  - Created a revision which mentioned a bunch of events.
  - Grepped for other implementations of `shouldSendMail()` and verified that none try to perform similar filtering.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, lpriestley

Differential Revision: https://secure.phabricator.com/D13210
2015-06-08 10:48:49 -07:00
..
almanac Fix an issue with AlamancDeviceEditor 2015-06-03 18:41:21 -07:00
aphlict Linter fixes 2015-06-02 22:14:01 +10:00
arcanist/conduit Mark "arcanist.projectinfo" as deprecated 2015-05-25 22:52:41 +10:00
audit Use standard subscribers effects in Herald Adapter for commits 2015-06-08 10:31:38 -07:00
auth Add "Mailing List" users 2015-06-03 18:42:33 -07:00
base Send mail to targets in the user's translation 2015-06-03 18:59:33 -07:00
cache Introduce a request cache mechanism 2015-06-04 17:27:31 -07:00
calendar Fix an issue with mention transactions in Calendar 2015-06-08 10:48:49 -07:00
celerity Digest resource cachekeys to maximum length 2015-06-01 09:04:22 -07:00
chatlog phtize all the things 2015-05-22 21:16:39 +10:00
conduit Add "Mailing List" users 2015-06-03 18:42:33 -07:00
config Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
conpherence Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
console Make everything 1000x or 1000000x slower 2015-05-23 05:36:02 -07:00
countdown phtize all the things 2015-05-22 21:16:39 +10:00
daemon Linter fixes 2015-06-02 22:14:01 +10:00
dashboard phtize all the things 2015-05-22 21:16:39 +10:00
differential Use standard subscribers effects in Herald Adapter for revisions 2015-06-08 10:32:08 -07:00
diffusion Make ACTION_NOTHING a "standard" action in Herald 2015-06-08 10:30:09 -07:00
diviner Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
doorkeeper Rename some remarkup classes 2015-06-08 11:27:20 +10:00
draft/storage Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
drydock Linter fixes 2015-06-02 22:14:01 +10:00
fact Introduce a request cache mechanism 2015-06-04 17:27:31 -07:00
feed phtize all the things 2015-05-22 21:16:39 +10:00
files Convert Files to SearchFields 2015-06-07 07:32:09 -07:00
flag phtize all the things 2015-05-22 21:16:39 +10:00
fund phtize all the things 2015-05-22 21:16:39 +10:00
harbormaster Linter fixes 2015-06-02 22:14:01 +10:00
help Use __CLASS__ instead of hard-coding class names 2015-05-14 07:21:13 +10:00
herald Use standard subscribers effects in Herald Adapter for revisions 2015-06-08 10:32:08 -07:00
home phtize all the things 2015-05-22 21:16:39 +10:00
legalpad Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
lipsum phtize all the things 2015-05-22 21:16:39 +10:00
macro Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
mailinglists/storage Put PhabricatorMetaMTAMailingList back to keep bin/storage adjust happy for now 2015-06-03 18:51:40 -07:00
maniphest Use standard subscribers effects in Herald Adapter for tasks 2015-06-08 10:31:53 -07:00
meta phtize all the things 2015-05-22 21:16:39 +10:00
metamta Remove *TransactionType classes 2015-06-08 11:26:43 +10:00
multimeter Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
notification Add an index to the story notification table 2015-06-08 11:28:49 +10:00
nuance Give Nuance form sources a web UI 2015-06-05 11:01:06 -07:00
oauthserver Linter fixes 2015-06-02 22:14:01 +10:00
owners Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
passphrase Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
paste Fix some method visibilities 2015-06-08 09:52:14 +10:00
people Fix a minor issue with the approval queue 2015-06-06 06:39:02 -07:00
phame Make PhameBlog implement PhabricatorApplicationTransactionInterface 2015-06-03 18:59:42 -07:00
phid Remove mailing lists application 2015-06-03 18:42:36 -07:00
phlux Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
pholio Make "ADD_CC" and "REMOVE_CC" available as "standard" Herald effects 2015-06-08 10:30:22 -07:00
phortune Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
phpast phtize all the things 2015-05-22 21:16:39 +10:00
phragment phtize all the things 2015-05-22 21:16:39 +10:00
phrequent phtize all the things 2015-05-22 21:16:39 +10:00
phriction Use standard subscribers effects in Herald Adapter for Phriction 2015-06-08 10:31:09 -07:00
policy Provide core policy support for Spaces 2015-06-04 17:46:32 -07:00
ponder Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
project Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
releeph Linter fixes 2015-06-02 22:14:01 +10:00
remarkup/conduit phtize all the things 2015-05-22 21:16:39 +10:00
repository Rename PhabricatorSearchField to PhabricatorSearchFieldDocumentType 2015-06-05 11:01:25 -07:00
search Stop threading handles through the CustomField + ApplicationSearch pipeline 2015-06-07 07:32:46 -07:00
settings Allow administrators to configure "Email Settings" settings for lists 2015-06-03 18:42:41 -07:00
slowvote phtize all the things 2015-05-22 21:16:39 +10:00
spaces Fix some method visibilities 2015-06-08 09:52:14 +10:00
subscriptions phtize all the things 2015-05-22 21:16:39 +10:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Remove flags and tokens upon object destruction 2015-06-04 07:23:48 +10:00
tokens phtize all the things 2015-05-22 21:16:39 +10:00
transactions Support Spaces transactions 2015-06-05 10:42:49 -07:00
typeahead phtize all the things 2015-05-22 21:16:39 +10:00
uiexample phtize all the things 2015-05-22 21:16:39 +10:00
xhprof phtize all the things 2015-05-22 21:16:39 +10:00