progressivetech / net.ourpowerbase.sumfields

The Summary Fields extension creates read-only custom data fields that extend Contact and are automatically populated with up-to-date totals such as total lifetime contributions, last contribution amount, last attended event, etc.
Other
8 stars 29 forks source link

Smart groups broken on disable / enable #52

Closed khorporative closed 5 years ago

khorporative commented 5 years ago

If I disable and re-enable Summary Fields, the Smart Groups that contain Summary Fields custom fields in search are broken. As are all those Smart Groups that contain / refer to Smart Groups that search custom fields of Summary Fields.

image

jmcclelland commented 5 years ago

Thanks for the report. That seems to be because I was destroying the tables on disable rather than just disabling them. I guess I figured there should not be any useful data in them so it was ok.

In any event, I just updated the code so now when you disable, the custom fields are disabled. When you enable, they are re-enabled.

Since they are no longer destroyed, they will retain the same field names, which should allow your smart groups to keep working properly.