-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
CRM-21433: Optimize dupe checking in Recent Items stack #11281
CRM-21433: Optimize dupe checking in Recent Items stack #11281
Conversation
Hi, Can you open a JIRA issue? https://docs.civicrm.org/dev/en/latest/core/contributing/ Also, can you provide examples of what would normally create a dupe, so that we can test before & after? From a code style point of view, it seems to me like using |
i think === is supposed to be what you should use unless there is a reason not to - e.g you think there is a risk of a number being passed as a string |
Issue filed at https://issues.civicrm.org/jira/browse/CRM-21433. I just produced some dupes while implementing #11280. In one case I injected an activity item with query params
|
Call me pedantic, but I am not able to reproduce the bug. For example, I tried accessing:
And only one contact was shown in the Recent Items. Am I missing something obvious? (the old code clearly seems wrong) |
Yeah. It's not the request's query params order which is passed. It's the programmer's order at the place Recent.php's add-method is called! See
|
This makes sense to me. |
CRM-21433: Optimize dupe checking in Recent Items stack
Don't check for dupes by url beacause query params my change their order. Instead use type and id.