1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Smooth "no effect" detection in Maniphest for @mentions

Summary:
Ref T2217. Since we aren't actually using subscriptions yet, the "transactions have no effect" detection can trigger for `@mention`s of users who are already CC'd on a task.

Be more conservative about generating a CC transaction.

Test Plan: See screenshot.

Reviewers: btrahan, chad

Reviewed By: chad

CC: chad, aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7095
This commit is contained in:
epriestley 2013-09-24 10:49:29 -07:00
parent 1d7cbe202f
commit 1327bd2c8a

View file

@ -197,10 +197,12 @@ final class ManiphestTransactionSaveController extends ManiphestController {
} }
} }
// Evade no-effect detection in the new editor stuff until we can switch
// to subscriptions.
$added_ccs = array_diff($added_ccs, $task->getCCPHIDs());
if ($added_ccs || $force_cc_transaction) { if ($added_ccs || $force_cc_transaction) {
// We've added CCs, so include a CC transaction. It's safe to do this even // We've added CCs, so include a CC transaction.
// if we're just "adding" CCs which already exist, because the
// ManiphestTransactionEditor is smart enough to ignore them.
$all_ccs = array_merge($task->getCCPHIDs(), $added_ccs); $all_ccs = array_merge($task->getCCPHIDs(), $added_ccs);
$cc_transaction->setNewValue($all_ccs); $cc_transaction->setNewValue($all_ccs);
$transactions[] = $cc_transaction; $transactions[] = $cc_transaction;