Accessing Jira Agile Board Configuration throws Exception: Uncaught TypeError: Cannot read property 'regionKey' of undefined

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Accessing Jira Agile Board Configuration throws 

Exception: Uncaught TypeError: Cannot read property 'regionKey' of undefined

Diagnosis

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.init

Cause

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

Resolution

Fixing via REST API
  • REST endpoint:

    /rest/greenhopper/1.0/rapidviewconfig/workingdays/timezone
  • With 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
  1. Shutdown Jira
  2. Identify the non default timezone that have been configured here

    select * from "AO_60DB71_WORKINGDAYS";
  3. 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>;
    tip/resting Created with Sketch.

    board_id can be found in the browser URL. Eg: http://localhost:8080/secure/RapidView.jspa?rapidView=4038

  4. Change 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';
  5. Restart Jira
tip/resting Created with Sketch.

Remember to generate backup before modifying anything in the database.

Last modified on Oct 18, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.