#5368 - Leader-board: Not generating
| Identifier | #5368 |
|---|---|
| Issue type | Major issue (breaks an entire feature) |
| Title | Leader-board: Not generating |
| Status | Completed |
| Tags |
Roadmap: v11 (custom) |
| Handling member | PDStig |
| Version | 11 beta4 |
| Addon | leader_board |
| Description | Leader-boards are not generating. Scheduler does not show any errors when running the hook. Likely, the leader-board times are being miscalculated. |
| Steps to reproduce | |
| Funded? | No |
| Commits |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
This hotfix resolves a number of problems with how leader-boards generated (or rather, never generated) results:
- Leader-boards were not generating at all due to weird behaviour with PHP's strtotime. As such, we are no longer using it for leader-boards and instead have our own new methods of calculating time intervals: to_epoch_interval_index and from_epoch_interval_index (both in temporal).
- #6001: Monthly generation is now supported again and working according to our tests
- #5992: The main_leader_board block is not supposed to require a param, but it was, triggering an error when trying to open a non-param leader-board in the block tool. Also, I modified the block so it wouldn't output the requested leader-board doesn't exist if none was specified to begin with in a param.
- Fixed bugs with voting power calculations still using points balance in a couple locations
- Fixed a bug where leader-board was not correctly calculating rank points for its results (via the new is_ranked column on the ledger table)
This has not been thoroughly tested, but with that said, the automated test for leader-boards now passes. And initial testing shows it does generate (new leader-boards may take up to an hour to generate because they generate 2-3 intervals / results before the current one, one at a time per scheduler cycle [15 minutes for the leader-board hook]).