Page MenuHomePhabricator

Automatically CC users mentioned in a task description like in the comments
Closed, DuplicatePublic

Description

Docs say:

In Differential and Maniphest, you can mention another user by writing:
@username
When you submit your comment, this will add them as a CC on the revision or task if they aren't already CC'd.

I think that for consistency if you create a task and mention a user in the description, he should be CC'd as well when the task is created. We wondered about this today while test-driving Maniphest on our first real-world project.

Event Timeline

swisspol raised the priority of this task from to Needs Triage.
swisspol updated the task description. (Show Details)
swisspol added a subscriber: swisspol.

Also the doc is not clear on what happens if editing a comment (vs adding a comment) and mentioning a user? Would that add to the CC list as well? Editing a description should adopt the same behavior.

btrahan added subscribers: chad, epriestley, btrahan.

@chad, @epriestley - what do you think of this? Seems reasonable to me, though potentially confusing unless basically every field you can @mention someone automagically cc'd.

I'm less sure on the edit request, at least in that I wouldn't want to support removing people from subscriptions on an edit. Adding them would seem fine to me.

It pretty much works like this in Differential now. I'm not 100% sure I completely like this behavior (it's slightly weird for random users making comments like Fixes T123 to activate magic) but I think it's good for username mentions.

Implementing it in Maniphest is probably just a matter of overriding getRemarkupBlocks() or whatever, and having the TYPE_DESCRIPTION transaction return its text.

However, the italics on probably are because Maniphest still isn't really on modern Subscriptions, so that "probably" might be:

  1. Move to modern subscriptions.
  2. Trivially override a method.

...where (1) is 99% of the work.

(Comment edits -- versus description/field edits which go in as normal transactions -- also don't trigger it anywhere right now. It's vaguely tricky to run them through the normal logic, and I'm not sure if it's worthwhile. I agree that removing subscribers based on edits doesn't make much sense.)

I'm just going to merge this into T5604 because it will happen automatically as soon as ManiphestTask implements PhabriatorSubscribableInterface.