Accessing Jira Agile Board Configuration throws Exception: Uncaught TypeError: Cannot read property 'regionKey' of undefined
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Accessing Jira Agile Board Configuration throws
Exception: Uncaught TypeError: Cannot read property 'regionKey' of undefinedDiagnosis
The stack trace shows
TypeError: Cannot read property 'regionKey' of undefined
at Object.GH.WorkingDaysConfig.getRegionKeyForTimeZoneId
at Object.GH.WorkingDaysConfig.renderTimeZoneConfig
at Object.GH.WorkingDaysConfig.renderTab
at Object.GH.WorkingDaysConfig.initCause
This is related to Working Days board configuration. In table AO_60DB71_WORKINGDAYS , you can find that the affected board has timezone set to the timezone that does not exist in Jira by default, for example Africa/Addis_Ababa
Solution
Resolution
Fixing via REST API
REST endpoint:
/rest/greenhopper/1.0/rapidviewconfig/workingdays/timezoneWith example data input:
{"rapidViewId":2,"timeZoneId":"Europe/Brussels"}Example using
curl:curl -D- -u admin:admin --data '{"rapidViewId":2,"timeZoneId":"Europe/Brussels"}' -X PUT -H "Content-Type: application/json" http://localhost:8080/rest/greenhopper/1.0/rapidviewconfig/workingdays/timezone
Fixing via Database SQL
Shutdown Jira
Identify the non default timezone that have been configured here
select * from "AO_60DB71_WORKINGDAYS";Alternatively, verify the timezone configured for the affected board exists in Jira by identifying the board id
select "TIMEZONE" from "AO_60DB71_WORKINGDAYS" where "RAPID_VIEW_ID" = <board_id>;board_idcan be found in the browser URL. Eg: http://localhost:8080/secure/RapidView.jspa?rapidView=4038Change the timezone to a default timezone using the following query. Replace xxxx accordingly with the non-default timezone
UPDATE "AO_60DB71_WORKINGDAYS" SET "TIMEZONE" = 'defaultTimeZoneId' WHERE "TIMEZONE" = 'xxxxxx';Restart Jira
Remember to generate backup before modifying anything in the database.
Was this helpful?