Skip to content

313 aggregation issue

Rémi PAILHAREY requested to merge 313-aggregation-issue into dev

Related to https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/issues/313+

I 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

  1. Build, deploy and update the konnector on your instance
  2. From CouchDB, alter one of the document in your com-grandlyon-egl-year doctype
  3. run the konnector
  4. the aggregation should be fixed (try changing page if needed because the chart is not reloaded)
Edited by Rémi PAILHAREY

Merge request reports