You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open phpreport in 31st Dec, 2018; the displayed weekly goal is "NaN".
I suspect the problem is that 31st Dec is part of 2018 but belongs to week 1, 2019. The calculated goal for the rest of week 1, 2019 should be checked too.
The text was updated successfully, but these errors were encountered:
If the week in case is the last week of the year,
this method would fail because weeksTillEndOfJourneyPeriod
is 0, causing a division by 0 exception
Fixes#432
Fixed by this commit, reviewed in PR #520. Mind you that the result provided is 0 and not the correct one, but we'd need more work and will be revisited in #521.
commit 526d37719cd4ae447c1fb81e57428de4b33f62d8
Author: Ana Rute Mendes <ana@igalia.com>
Date: Wed Sep 29 16:39:35 2021 -0300
Fix weekly goal calc if in last week of the year
If the week in case is the last week of the year,
this method would fail because weeksTillEndOfJourneyPeriod
is 0, causing a division by 0 exception
Fixes https://github.com/Igalia/phpreport/issues/432
Open phpreport in 31st Dec, 2018; the displayed weekly goal is "NaN".
I suspect the problem is that 31st Dec is part of 2018 but belongs to week 1, 2019. The calculated goal for the rest of week 1, 2019 should be checked too.
The text was updated successfully, but these errors were encountered: