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

What if sumfield misses an update due to some unknown error in the transaction. #64

Open jitendrapurohit opened 5 years ago

jitendrapurohit commented 5 years ago

For eg -

The custom fields added by this extension is configured to updated "Instantly".

image

Seems if this update to the summary data is missed, it can never be updated by the extension unless we come to the settings page and re-save the values?

Can it be set to both? i.e, an instant update is required, but the backend cron job also checks if the data values are up-to-date.

We're finding a number of transactions in civi that are not updating sumfield values in some cases. Eg a contribution is getting added to civi, but the "Total" stat value in summary data remains as it is. I've tried to replicate it but haven't found any issues yet.

Currently, we're handling such cases by resaving the sumfield settings, which correctly updates all the custom field values.

jmcclelland commented 5 years ago

Yes - I agree, this is a problem. I'm not sure there is a reliable way to test to make sure all the values are accurate.

I wonder if we should have a (by default daily) cron job that simply re-creates from scratch?