1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
phorge-phorge/src/applications/calendar/editor
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
..
PhabricatorCalendarEventEditor.php Fix an issue with mention transactions in Calendar 2015-06-08 10:48:49 -07:00