Import a string of numbers into a Date Type attribute will result in wrong value

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      Using a JSON or CSV import, Dates which are stored in source as a string of numbers, will be treated as UNIX Timestamp

      Insight 8.7.6

      Steps to Reproduce

      1. In an Object Type, add a Date type Attribute
      2. Create a CSV or JSON source / file to import, and make sure to have a column for dates formatted as yyyyMMdd, e.g. 20200316 
      3. Configure an Import for this source, and indicate the date format yyyyMMdd in the Import Configuration.
      4. Map the Date column to the Date Attribute
      5. Synchronize the import

      Expected Results

      The date value will be imported and interpreted per the Date Format, and the value displayed in the Attribute will show according to the Date Picker in Jira

      Actual Results

      The date will show a wrong value, for example: 22 Aug, 1970 or 22.08.70

      Which matches the value calculated if treating 20200316 as a UNIX Timestamp

      ...
      

      Workaround

      If possible - try and add separators to the source value, and indicate them in the Date Format configuration, for example:
      2020.03.16
      And the date format: yyyy.MM.dd

            Assignee:
            Puya Alemirad (Inactive)
            Reporter:
            Yinon Negev
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: