Homec4science

Allow Differential Mail to accept multiple comments for one mail

Authored by epriestley <git@epriestley.com> on Feb 12 2014, 00:21.

Description

Allow Differential Mail to accept multiple comments for one mail

Summary:
Ref T2222. Currently, one DifferentialComment can do a lot of things (add ccs, reviewers, comments, inline comments, and perform state changes). In the future, each ApplicationTransaction does only one thing. This is the primary piece of complexity which makes the upcoming migration risky, because each comment needs to migrate into multiple transactions.

I want to mitigate this complexity as much as possible before the migration itself happens. One approach I'm going to use to do that is to start writing one comment per effect now, so the mapping is more direct when the migration itself happens and the write code can be straightforward (one row per save()) after the migration.

This tackles a small piece of that, which is the mail Differential sends. Currently, Differential mail acts on a single comment. Instead, allow it to act on a list of comments, but always give it one comment for now. In the future, we can hand it several comments instead and still get the expected behavior.

This change should have no impact on any application behaviors.

Test Plan:

  • Commented;
  • commented with inline;
  • added reviewers;
  • added CCs;
  • added CCs via mentions;
  • updated revision;
  • looked at all the mail, all of which seemed sane.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8199

Details

Committed
epriestley <git@epriestley.com>Feb 12 2014, 00:21
Pushed
aubortJan 31 2017, 17:16
Parents
rPHfec5ea8f9dac: Pholio - robustify submission errors to retain image edits
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH8e232a8bf164: Allow Differential Mail to accept multiple comments for one mail (authored by epriestley <git@epriestley.com>).Feb 12 2014, 00:21