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

Handle smart groups created in previous Civis which include relation_permission #12804

Conversation

highfalutin
Copy link
Contributor

Overview

Fixes https://lab.civicrm.org/dev/core/issues/390: Smart groups created before 5.5.0 using "relation_permission" break on upgrade to 5.5.0

Before

  • In Civi 5.4, create a smart group based on a relationship search.
  • Upgrade to 5.5, clear cache and try to open the group.
  • Error: DB Error: syntax error

After

  • In Civi 5.4, create a smart group based on a relationship search.
  • Upgrade to 5.5, clear cache and try to open the group.
  • Group opens as expected.

Technical Details

When you create a Smart Group for a relationship search, the form values which are saved include relation_permission. Prior to 5.5.0, the operator was "=" and the value was scalar. As of 5.5.0, the operator is "IN" and the value is an array.

@eileenmcnaughton
Copy link
Contributor

I'm OK merging this since it gives us the immediate fix - but I'd prefer to see either form conversion or using a function that transforms various formats (I can do an example later on) - but I think this is fine for now

@totten
Copy link
Member

totten commented Sep 12, 2018

jenkins, test this please

@totten
Copy link
Member

totten commented Sep 12, 2018

Added merge on pass based on review from the 5.5 variant #12803.

@eileenmcnaughton eileenmcnaughton merged commit 78d330f into civicrm:5.6 Sep 12, 2018
@eileenmcnaughton
Copy link
Contributor

test fails unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants