Answers.Body: <p>It seems like a bug to me. Please raise a issue on <a href="https://issues.civicrm.org" rel="nofollow">Civicrm Issue tracker</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T17:27:26.957Z
Answers.Text: Created Issue CRM-16938 for this
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-30T10:03:53.107Z
Answers.Text: Paul I have submitted the PR. Please find the fix at CRM-16938
Answers.UserDisplayName: Monish Deb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T04:50:47.957Z
Answers.LastActivityDate: 2015-07-29T13:28:10.270Z
Answers.LastEditDate: 2015-07-29T13:28:10.270Z
Answers.UserDisplayName: Monish Deb
Body: <p>Smart groups that are based upon advanced search membership are broken after upgrade from 4.6.4 to 4.6.5.  After the upgrade, the groups have everyone in the database.  When you select contacts in group and then click on the edit smart group search criteria you get the advanced search form.  The section for membership is expanded but the group is not selected nor is membership status filled in.</p>
  
  <p>I can fix the groups but it's a bit of a pain.</p>
  
  <p>I looked at the criteria in the civicrm_groups after the upgrade.  It looks the same as before the upgrade and doesn't work.  Once you manually fix them then the criteria is different.  I'm not sure if the civicrm_membership_cache is messed up or if the criteria isn't getting update.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-29T05:25:44.483Z
Comments.Text: I have the same problem after going from 4.6.3 to 4.6.5.  Once I tried the patch Monish supplied for the other issue, smart groups worked, but with the problem you describe, Paul.  I gave up on it again when I realized the patch breaks our contact views, but I can help test or debug as needed.
Comments.UserDisplayName: Norris
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-29T17:15:15.687Z
Comments.Text: I tried the patch but alas it didn't fix this issue.
Comments.UserDisplayName: Paul-Tahoe
Tags: <smartgroups>
Title: smart groups based on membership broken after upgrade from 4.6.4 to 4.6.5
ThreadText: # smart groups based on membership broken after upgrade from 4.6.4 to 4.6.5
  
  (Asked by: username_0 on 2015-07-29)
  
  Smart groups that are based upon advanced search membership are broken after upgrade from 4.6.4 to 4.6.5. After the upgrade, the groups have everyone in the database. When you select contacts in group and then click on the edit smart group search criteria you get the advanced search form. The section for membership is expanded but the group is not selected nor is membership status filled in.
  
  I can fix the groups but it's a bit of a pain.
  
  I looked at the criteria in the civicrm\_groups after the upgrade. It looks the same as before the upgrade and doesn't work. Once you manually fix them then the criteria is different. I'm not sure if the civicrm\_membership\_cache is messed up or if the criteria isn't getting update.
  
  **Tags:** smartgroups
  
  > **Comments:**
  > **username_1**: I have the same problem after going from 4.6.3 to 4.6.5.  Once I tried the patch Monish supplied for the other issue, smart groups worked, but with the problem you describe, Paul.  I gave up on it again when I realized the patch breaks our contact views, but I can help test or debug as needed.  
  > **username_0**: I tried the patch but alas it didn't fix this issue.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-07-29. Score: 1
  
  It seems like a bug to me. Please raise a issue on [Civicrm Issue tracker](https://issues.civicrm.org)
  
  > **Comments:**
  > **username_0**: Created Issue CRM-16938 for this  
  > **username_2**: Paul I have submitted the PR. Please find the fix at CRM-16938  
  
  ---
  
  