Closed colemanw closed 7 years ago
BTW I refactored the query a bit more and I think it's all working well now.
Tidied up the admin page while I was at it:
Ok this PR is getting kinda big but we also needed a way to define new summary fields so have added in hook_civicrm_sumfields_definitions
to allow other extensions to add to the list, and have refactored the rest of this extension to remove hardcoded references to particular fields/components and pull everything from metadata.
@jmcclelland This has been running on the civicrm.org server for a few days now with no issues.
Thanks coleman! Sorry I haven't had a chance to re view - I hope to take a closer look tomorrow.
No prob. FYI I also made this little tweak to core to improve the summary fields UI:
@jmcclelland might be worth bumping the version & putting out a release when this is merged.
Thanks coleman - these are excellent improvements!
Hi @jmcclelland I'm looking for feedback on this one. Adding a 3rd base table made things complicated, as the module is hard-coded for only two in many places. It especially made the UNION in
sumfields_generate_data_based_on_current_data()
quite tricky, but I think I solved it by changing it to anINSERT UPDATE
from each, instead of trying to UNION multiple temp tables together. Would you try it out and let me know what you think?