NERC-CEH / irecord-butterflies-app

Repository for the code for the iRecord Butterflies App
0 stars 0 forks source link

Stats not reporting correctly #143

Closed RichardFoxBC closed 2 years ago

RichardFoxBC commented 2 years ago

Hi all, I've been using the app quite a bit over the last couple of weeks and it is working well. It is really nice to see the notifications of record verification coming in. However, I noticed that the Records (2022) and Species recorded (2022) statistics are not reporting correctly for me. They seem to be stuck and are not advancing despite having made more records and seen new species.

RichardFoxBC commented 2 years ago

It may be related to the above but I've also not received any of the pop-up Thank You messages that are meant to appear after the submission of certain numbers of records each calendar year.

kazlauskis commented 2 years ago

Yes, there is an issue with the website report.

The user stats report emits this error. I can reproduce this by logging into the iRecord Butterflies app and going to the user stats page. It strangely works for some accounts.

Warning: Division by zero in RecorderMetrics->getUserMetrics() (line 210 of /code/web/modules/custom/indicia_advanced_reports/src/RecorderMetrics.php)

@johnvanbreda would you be able to take a look at it?

johnvanbreda commented 2 years ago

@kazlauskis this should now be fixed. Main issue was a missing comma in the query JSON in the new version of the module.

RichardFoxBC commented 2 years ago

@kazlauskis @johnvanbreda confirmed the stats are now reporting correctly in the app for me. Many thanks.

@kazlauskis do you think the lack of pop-up thank you messages is related? My app now tells me that I've submitted 51 records in 2022 but I haven't had any pop-up thank you messages.

kazlauskis commented 2 years ago

Thanks John.

@RichardFoxBC yes, the "Thank You" alert depends on this report so it should be working fine now. Please reopen the issue if this still doesn't appear to you.