Page MenuHomePhabricator

Prepare TransactionEditor for silent transactions via bulk edit
ClosedPublic

Authored by epriestley on Jan 19 2018, 5:48 PM.
Tags
None
Referenced Files
F13089101: D18882.diff
Thu, Apr 25, 1:40 AM
Unknown Object (File)
Thu, Apr 11, 1:24 PM
Unknown Object (File)
Thu, Apr 11, 9:29 AM
Unknown Object (File)
Tue, Apr 2, 4:44 PM
Unknown Object (File)
Tue, Apr 2, 4:44 PM
Unknown Object (File)
Thu, Mar 28, 2:57 PM
Unknown Object (File)
Mar 15 2024, 5:57 PM
Unknown Object (File)
Feb 11 2024, 11:56 PM
Subscribers
None

Details

Summary

Ref T13042. This adds a "silent" edit mechanism which suppresses feed stories, email, and notifications.

The other behaviors here are:

  • The transactions are marked as "silent" so we can render a hint in the UI in the future to make it clear to users that they aren't missing email.
  • If the editor uses Herald, mail rules are suppressed so they don't fire incorrectly (this mostly affects "the first time this rule matches, send me an email" rules: without this, they'd match "the first time" on the bulk edit, not send email, then never match again since they already matched).
  • If the edit queues additional edits, those are applied silently too.

This doesn't (or, at least, shouldn't) actually change any behavior since you can't apply silent edits yet.

Test Plan

Somewhat theoretical, since this isn't reachable yet. Should get meaningful testing in an upcoming change.

Did a bit of var_dump() / debug poking to attempt to verify that nothing too crazy is happening.

Viewed and edited objects, no changes in behavior.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/herald/state/HeraldCoreStateReasons.php
12

"is being applied"?

src/applications/transactions/storage/PhabricatorApplicationTransaction.php
162

Should this be HeraldCoreStateReasons:: REASON_SILENT?

166

Same as above.

This revision is now accepted and ready to land.Jan 19 2018, 8:01 PM
  • Juggle tense/grammar on Herald messaging.
  • core.silent on transactions and the Herald reason aren't technically the same semantically so I left them as-is for the moment. We could extract the transactions strings somewhere else, but nothing else should ever be using them directly anyway.