OpenConext / OpenConext-statistics

Statistics
Apache License 2.0
0 stars 1 forks source link

Week data shows incorrect number of logins #239

Closed phavekes closed 2 days ago

phavekes commented 2 days ago

This issue is imported from pivotal - Originaly created at Feb 21, 2019 by Bart Geesink

When I look at the last week of January, the logins are too low. It seems to be caused by the fact that a week is cut over two months:
select * from total_users_week where month = \'02\';
time                count_user_id month quarter year
----                ------------- ----- ------- ----
2019-01-28T00:00:00Z    919838    02    1       2019

select * from total_users_week where month = \'01\';
time                count_user_id month quarter year
----                ------------- ----- ------- ----
2019-01-28T00:00:00Z   2481609    01    1       2019
phavekes commented 2 days ago

The chart only displays the first entry if the time equals. For week stats we need to add the login numbers of all records with the same time. Fixed in https://github.com/OpenConext/OpenConext-statistics/blob/master/server/influx/time.py#L97 (Okke Harsta - May 17, 2019)