mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
Further smooth "Add CC" interaction in Maniphest
Summary: Ref T2217. Fixes T3877. Improves more behaviors in the presence of "no effect" detection and new comment storage. Test Plan: Added CCs, added existing CCs, implicitly added CCs via reassign, added CCs with comment. Reviewers: btrahan, garoevans Reviewed By: garoevans CC: aran Maniphest Tasks: T2217, T3877 Differential Revision: https://secure.phabricator.com/D7100
This commit is contained in:
parent
dfcac84a69
commit
6b245c0665
1 changed files with 2 additions and 10 deletions
|
@ -79,7 +79,6 @@ final class ManiphestTransactionSaveController extends ManiphestController {
|
|||
$cc_transaction = new ManiphestTransaction();
|
||||
$cc_transaction
|
||||
->setTransactionType(ManiphestTransactionType::TYPE_CCS);
|
||||
$force_cc_transaction = false;
|
||||
|
||||
$transaction = new ManiphestTransaction();
|
||||
$transaction
|
||||
|
@ -106,13 +105,6 @@ final class ManiphestTransactionSaveController extends ManiphestController {
|
|||
// the CC transaction later.
|
||||
$added_ccs = array_merge($added_ccs, $request->getArr('ccs'));
|
||||
|
||||
// Transfer any comments over to the CC transaction.
|
||||
$cc_transaction->setComments($transaction->getComments());
|
||||
|
||||
// Make sure we include this transaction, even if the user didn't
|
||||
// actually add any CC's, because we'll discard their comment otherwise.
|
||||
$force_cc_transaction = true;
|
||||
|
||||
// Throw away the primary transaction.
|
||||
$transaction = null;
|
||||
break;
|
||||
|
@ -199,9 +191,9 @@ 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());
|
||||
$added_ccs = array_filter(array_diff($added_ccs, $task->getCCPHIDs()));
|
||||
|
||||
if ($added_ccs || $force_cc_transaction) {
|
||||
if ($added_ccs) {
|
||||
// We've added CCs, so include a CC transaction.
|
||||
$all_ccs = array_merge($task->getCCPHIDs(), $added_ccs);
|
||||
$cc_transaction->setNewValue($all_ccs);
|
||||
|
|
Loading…
Reference in a new issue