313 aggregation issue
https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/issues/313+
Related toI refactored some of the code and added JSdoc to make it clearer
I removed the resetInProgressAggreggation shenenigans that made no sense
Month aggregation is caculated from daily loads and year aggregation is calculated from monthly loads
I used https://docs.cozy.io/en/cozy-konnector-libs/api/#updateorcreate to update all aggregation every day instead of removing them, then recreate them using cozyClient
. This was more complex and didn't work.
It should fix previous aggregation for users having problems.
How to test on Alpha
- Build, deploy and update the konnector on your instance
- From CouchDB, alter one of the document in your
com-grandlyon-egl-year
doctype - run the konnector
- the aggregation should be fixed (try changing page if needed because the chart is not reloaded)
Edited by Rémi PAILHAREY