Open pizzqc opened 1 year ago
One easy solution could be to use week()
instead of isoWeek()
which might be better suited for this code logic.
the ISO week counter starts from the week with the first Thursday of the year. So, if the first day of the year is Saturday, it belongs to the last week of the previous year.
Plugin Version: 0.6.3 Backstage Version: 1.6.0
Starting in the new year 2023, we started having the backstage opsgenie
Analytics
tab to stop working and generating a bunch ofundefined
errors.Digging into the code a little, we can see that a date in early January result into being classified as Week 52 of 2023 instead of Week 1. Which then leads to an issue when trying to increment the
incidentsBuckets
since weekw52 - 2023
wasn't initialized to 0. (incidentsBuckets[week].total += 1;
)Steps to reproduce
impactStartDate: "2023-01-02T03:00:38.787Z"
)/opsgenie/analytics
pageError: Cannot read properties of undefined (reading 'total')