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

CRM-17213 add tests for group search #8645

Merged
merged 3 commits into from
Jul 14, 2016

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jun 30, 2016

This test ensures we don't break the group search while fixing CRM-17213
@eileenmcnaughton eileenmcnaughton force-pushed the group_query branch 4 times, most recently from 91a92dc to b49e891 Compare June 30, 2016 11:45
Note that I added a group refresh to pick up the 'hard-adds'. I think the correct place to deal with this is in fact to alter the GroupContact Add functionality - ie.

IF (CRM_Core_DAO::executeQuery('SELECT id FROM civicrm_group_contact_cache WHERE group_id = 1 LIMIT 1)) {
  // Add the contact just added to the group to the group_contact_cache table.
}

I started that a bit but I think it should be dealt with separately after this is resolved
@eileenmcnaughton
Copy link
Contributor Author

test this please

@eileenmcnaughton eileenmcnaughton force-pushed the group_query branch 4 times, most recently from f69d4ee to 0e716db Compare July 1, 2016 06:42
Note that in testing this I checked
1) searching in search builder with groups as a criteria
(checked that correct groups show & only 'Added' ones)
2) Exporting  - groups show per above when selected as an export field
3) Groups tab on a contact correctly shows added & removed groups
4) Api calls per tests
5) Manage groups - clicking through shows correct status for all members and it is possible to alter the group criteria to include 'Removed' and they show with the correct status
@eileenmcnaughton
Copy link
Contributor Author

CRM-17123 further removal of damaging OR query.
Note that in testing this I checked

  1. searching in search builder with groups as a criteria
    (checked that correct groups show & only 'Added' ones)
  2. Exporting - groups show per above when selected as an export field
  3. Groups tab on a contact correctly shows added & removed groups
  4. Api calls per tests
  5. Manage groups - clicking through shows correct status for all members and it is possible to alter the group criteria to include 'Removed' and they show with the correct status

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 this is probably the most important patch in performance to QA - it provides a resolution to the group performance issue that would otherwise block ahem 'certain sites' upgrading to 4.7...

@seamuslee001
Copy link
Contributor

Just noting have done some manual tests against a pretty oldish smart group created with search builder, previous situation it would time out on me when running query. Now it comes back perfect. Just also noting that the group_id value was '(400)' It was correctly selected in the search builder form however in the quill it was group(s) in (400) I would have expected the qill to translate to the group title not the raw value. However performance much much improved

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 let me know when you feel it is OK to merge. As I mentioned in #8645 (comment) I tried to think of all the places where the way in which group title is rendered would make a difference. I have also deployed this live on one site

@seamuslee001
Copy link
Contributor

Attaching screenshot of where qill isn't properly translated
group title not correctly converted

@eileenmcnaughton
Copy link
Contributor Author

I could not create a group that did this - but I am aware from Seamus this is a legacy group. I notice in the legacy group form values there are braces around the group number - ie

value";a:3:{i:1;a:5:{i:0;s:0:"";i:1;s:5:"(400)";

  • would changing it to value";a:3:{i:1;a:5:{i:0;s:0:"";i:1;s:3:"400";

change it?

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 I'm going to merge this as the only issue you found is minor & affects legacy groups & then tackle that in a separate PR if that's OK with you? We have another PR that has already started to conflict with this one so it would be good to get these changes in since they are mostly tested & QAd

@seamuslee001
Copy link
Contributor

@eileenmcnaughton merge away

@eileenmcnaughton eileenmcnaughton merged commit 178cf31 into civicrm:master Jul 14, 2016
@eileenmcnaughton eileenmcnaughton deleted the group_query branch July 14, 2016 01:27
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Jul 14, 2016
Please add review comments to civicrm#8645

Note that in testing this I checked
1) searching in search builder with groups as a criteria
(checked that correct groups show & only 'Added' ones)
2) Exporting  - groups show per above when selected as an export field
3) Groups tab on a contact correctly shows added & removed groups
4) Api calls per tests
5) Manage groups - clicking through shows correct status for all members and it is possible to alter the group criteria to include 'Removed' and they show with the correct status

Change-Id: I1304eaced73262f66030010bfcce05bc7d70d0b5
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Jul 14, 2016
Please add review comments to civicrm#8645

Note that in testing this I checked
1) searching in search builder with groups as a criteria
(checked that correct groups show & only 'Added' ones)
2) Exporting  - groups show per above when selected as an export field
3) Groups tab on a contact correctly shows added & removed groups
4) Api calls per tests
5) Manage groups - clicking through shows correct status for all members and it is possible to alter the group criteria to include 'Removed' and they show with the correct status

Change-Id: I1304eaced73262f66030010bfcce05bc7d70d0b5
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.

3 participants