ORO CRM shows duplicated activities #955
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Activity owners is being set after flush and this triggers Note entity update, and then ORO shows original note and duplicate with message that it has been updated by Admin. In the end having 2 duplicate notes, this might not be a best solution, as src/Oro/Bundle/ActivityListBundle/EventListener/ActivityListListener.php should only be triggered by UI accesable changes, but this listener itself modifies Entity and then triggers update event and in the end duplicate notes popup on the screen. Same goes for all activities.
This change will set ActivityOwners at the creation and wont be triggered by ActivityListener and in the end wont show "updated" duplicate. Please advise me with this one, if this solution is wrong.