oroinc / platform

Main OroPlatform package with core functionality.
Other
627 stars 351 forks source link

Calling TagManager::deleteTagging() then TagManager::addTag() re-add deleted tags #1045

Open sadortun opened 3 years ago

sadortun commented 3 years ago

Summary

If you use TagManager::deleteTagging() then TagManager::addTag() addTag() re-add deleted tags because TagManager::$storage is not cleared .

PR will follow in a few minutes ...

Steps to reproduce

$entity = new Contact();
$oldTagID = 1234
$tag = new Tag(); 
$tagManager->deleteTagging($entity  , [$oldTagID ]);
$tagManager->addTag($entity , $tag)

Actual Result OldTag is gone, and `$tag is added

Expected Result
OldTag is still there, with the new $tag

Details about your environment