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
Unknown Object (File)
Mon, Nov 25, 2:40 PM
Unknown Object (File)
Wed, Nov 20, 5:29 PM
Unknown Object (File)
Sun, Nov 17, 10:46 AM
Unknown Object (File)
Thu, Nov 14, 6:55 AM
Unknown Object (File)
Mon, Oct 28, 6:59 AM
Unknown Object (File)
Oct 15 2024, 9:27 AM
Unknown Object (File)
Oct 9 2024, 8:29 AM
Unknown Object (File)
Oct 1 2024, 11:07 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.