Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-28939

Add time-zone support for rendering date fields


      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      The implementation of JRA-9 only covers the web user interface, but does not appear to extend to emails. Date fields appearing in notification emails do not honor the user's time zone preference but instead show the server local time. Please extend time zone support to the entire product.

      Emails use the interface of NavigableField to render the changed values in emails. Specifically, they are given GenericValue objects for ChildChangeItem entries, which are rendered via VelocityHelper#getPrettyFieldString, which will call out to the Field's equivalent method.

      Here's the rub:

      1. The changelog values are only strings. They don't have type data, so we don't know whether we're dealing with a value that needs parsing or not.
      2. The NavigableField rendering methods only accepts an i18nHelper object, but not a locale or timezone value.
      3. NavigableField is a Public API, so it's possible people are implementing and extending this.

      These three things combined mean that, at present, we have no real means of parsing the values for a user's timezone.

      To add time zone support in emails, we need to address the more fundamental problems listed above.

            Unassigned Unassigned
            3f85ab128771 G B
            61 Vote for this issue
            54 Start watching this issue