-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #9602 - ProspectLists save function has a duplication issue #9642
Fix #9602 - ProspectLists save function has a duplication issue #9642
Conversation
Hi @eojedapilchik, Thanks for your Pull Request. Could you please update the commit message following the standards shown in our documentation: Thanks, |
Amended the commit message here: 0733b4a |
Hello, @eojedapilchik thanks for contribution, Would you be so kind also to squash commits in your branch into one (it means to combine multiple commits into single commit)? Thanks in advance, |
13f6b30
to
aacdba8
Compare
@serhiisamko091184 I updated the branch to use only 1 commit, let me know if there's any other requirement to merge it |
… issue The save function is unnecessary and create a duplication of ater_save hooks on duplicate records
aacdba8
to
44ee83a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Target List Logic Hook now only fires once on Duplication
Also fires once on Normal Creation, (either through Create Action, or through Campaigns Module->Target Lists creation)
Users able to relate items as normal.
Can be merged!
The
$focus->save()
call inside\modules\ProspectLists\Save.php
on line 79 is unnecessary.If there are any after_save logic hooks present on the Prospect List (Target List) module, it will trigger them twice for a target list that is being duplicated, causing undesired results.
Description
This fix is related to this issue: https://github.com/salesagility/SuiteCRM/issues/9602
When a Target List is duplicated there's a check on the
\modules\ProspectLists\Save.php
that handles adding related records to the Target List being duplicated.On line 79 of the
Save.php
there's a call that is redundant to the save method of the focus bean. This causes any after_save logic hook to be triggered twice which is undesirable.Motivation and Context
This solves redundant after_save logic hooks being triggered on a Target List being duplicated.
How To Test This
$GLOBALS['log']->fatal('After save Triggered')
or any other logic to the after_save logic hook.Types of changes
Final checklist