mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
Projects - stop automagically associating projects when they are mentioned
Summary: Fixes T6819. This isn't as useful as you might think and has one horribly buggy behavior - if you edit an object which has a description and a projects field, you can be unable to remove the associated project as the automagic association from the description kicks in. Further, since we've added the ability for applications to create multiple email addresses AND herald can react to those emails - say by programmatically adding projects - the known needs for this feature are basically 0. If this proves to be false we can maybe add some other syntax for these mentions - see T6819 for ideas / discussion. Test Plan: removed a project from a maniphest task while still mentioning it in the description and it worked! Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6819 Differential Revision: https://secure.phabricator.com/D11573
This commit is contained in:
parent
acde665905
commit
d184a61218
1 changed files with 0 additions and 19 deletions
|
@ -1242,25 +1242,6 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
return $block_xactions;
|
||||
}
|
||||
|
||||
if ($object instanceof PhabricatorProjectInterface) {
|
||||
$phids = $mentioned_phids;
|
||||
$project_type = PhabricatorProjectProjectPHIDType::TYPECONST;
|
||||
foreach ($phids as $key => $phid) {
|
||||
if (phid_get_type($phid) != $project_type) {
|
||||
unset($phids[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($phids) {
|
||||
$edge_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;
|
||||
$block_xactions[] = newv(get_class(head($xactions)), array())
|
||||
->setIgnoreOnNoEffect(true)
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
|
||||
->setMetadataValue('edge:type', $edge_type)
|
||||
->setNewValue(array('+' => $phids));
|
||||
}
|
||||
}
|
||||
|
||||
$mentioned_objects = id(new PhabricatorObjectQuery())
|
||||
->setViewer($this->getActor())
|
||||
->withPHIDs($mentioned_phids)
|
||||
|
|
Loading…
Reference in a new issue