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
Starting in the new year 2023, we started having the backstage opsgenie Analytics tab to stop working and generating a bunch of undefined 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 week w52 - 2023 wasn't initialized to 0. (incidentsBuckets[week].total += 1;)
index-8e608a93.esm.js:269 Uncaught TypeError: Cannot read properties of undefined (reading 'total')
at eval (index-8e608a93.esm.js:269:1)
at Array.forEach (<anonymous>)
at AnalitycsApi.incidentsByWeekAndHours (index-8e608a93.esm.js:266:1)
at Graph$3 (index-8e608a93.esm.js:1194:1)
at renderWithHooks (react-dom.development.js:14985:1)
at mountIndeterminateComponent (react-dom.development.js:17811:1)
at beginWork (react-dom.development.js:19049:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
Steps to reproduce
Make sure to have an incident in OpsGenie that has an impactStartDate in early January. (i.e.: impactStartDate: "2023-01-02T03:00:38.787Z")
Open the /opsgenie/analytics page
Error: Cannot read properties of undefined (reading 'total')
The text was updated successfully, but these errors were encountered:
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')
The text was updated successfully, but these errors were encountered: