Open scloo opened 6 years ago
Same version of CouchDB?
Zanzibar has 2.1 where as democs has 1.7.1. The problem seems to relate to the caseCounter view in couchdb. Upon investigation, don't think it is related to couchDB version. I ran the same view on 1.7.1 for the zanzibar data, and it works fine. So I suspect that in democs, there must be some data discrepancies.
Start by regenerating the demo database?
I need to find where that script is, that generate the demo database.
Regenerated the democs database. Now the graphs is working now.
Need to verify data whether the anonymizing is updating correctly.
Anonymizing is not updating as expected. It should have shifted the dates to current period. The data was filtered to 2014 and 2015. After filtering, it is supposed to shift the dates to 2016 to 2018, based on the current date. When I ran the CaseIDByDates view, I still see only dates in 2014 and 2015.
@mikeymckay I was checking the view codes for caseIDByDates view for all the other databases besides democs that was broken, and I found that there were no Reduce function in all of them. So I suspect that somewhere along the Reduce function _sum got inserted in democs caseIDByDates view. In which case the data was ok since it should not have the Reduce function.
Oops. I need a break from staring at the codes. I was looking at the wrong view. It isn't the caseIDByDates view but the caseCounter that was having issues with Reduce function. So please ignore last comments.
I believe this has been resolved along the way. Probably by the recreation of the demo database.
All graphs working now on democs. @scloo - is there any weekly aggregate data in the demo database? Those graphs are blank. @mikeymckay may also know the answer to this.
These two graphs indicate that the script may not be correctly advancing the timing of some date/time fields:
Error message: Sorry. Unable to complete due to an error: {"status":500,"name":"invalid_value","message":"Database encountered an unknown error","reason":"builtin _sum function requires map values to be numbers or lists of numbers"}