view.getContext() returns a stale user timezone after Account Preferences changes

XMLWordPrintable

    • Minor
    • Integration testing

      Issue Summary:

      view.getContext() in Forge Custom UI returns an outdated timezone value after the user changes their time zone in Atlassian Account Preferences. The same call immediately reflects changes to locale (language), but timezone continues to report the previous value even after refreshes and logout/login.

      Steps to Reproduce

      1. Log in to Jira with a user who has a Forge Custom UI app installed that calls:
      const ctx = await view.getContext();
      console.log('Locale:', ctx.locale, 'Timezone:', ctx.timezone); 
      1. Go to Account Preferences
      2. Change Language (e.g. English → Italian) and Time zone (e.g. Europe/Sofia → Europe/Rome).
      3. Save the changes.
      4. Return to Jira, open the page where the Forge app is rendered, and refresh the page.
      5. Optionally log out and log back in, then open the app again.
      6. Check the console log of view.getContext().

      Expected Results

      • ctx.locale should reflect the new language.
      • ctx.timezone should reflect the new time zone from Account Preferences (e.g. Europe/Rome) after a refresh and certainly after logout/login.
      • Locale and timezone should be consistent with the current Account Preferences.

      Actual Results

      • ctx.locale updates immediately and shows the new language (e.g. Italian).
      • ctx.timezone continues to return the old time zone value (e.g. Europe/Sofia), even after Hard refresh or Logging out and back in.
      • As a result, apps relying on view.getContext().timezone see stale timezone data while locale is up to date.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Sumit Uniyal
              Votes:
              25 Vote for this issue
              Watchers:
              23 Start watching this issue

                Created:
                Updated: