Skip to content
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

Sort permittedActivityTypes #17794

Merged
merged 1 commit into from
Jul 12, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jul 12, 2020

Overview

When determining whether to add a clause filtering activity types the permitted types
are compared to all types. If all are permitted no clause is needed.

Before

activity_type_id IN (1,3,,4) added, even when all activity type ids are in the IN

After

Clause not added if it includes all types

Technical Details

Without this sort it is incorrectly comparing the keys of the 2 arrays in addSelectWhere and concluding that they differ

Comments

When determining whether to add a clause filtering activity types the permitted types
are compared to all types. If all are permitted no clause is needed.

However, without this sort it is incorrectly seeing them as not matching and adding extraneous joins
@civibot
Copy link

civibot bot commented Jul 12, 2020

(Standard links)

@civibot civibot bot added the master label Jul 12, 2020
@seamuslee001
Copy link
Contributor

This seems fine to me

@seamuslee001 seamuslee001 merged commit 90f86d4 into civicrm:master Jul 12, 2020
@eileenmcnaughton eileenmcnaughton deleted the act_perms branch July 13, 2020 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants