Uploaded image for project: 'JIRA Importers Plugin'
  1. JIRA Importers Plugin
  2. JIM-774

Time field is ignored when importing a comment with "datetime; author; comment" format

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Medium Medium
    • None
    • 4.4
    • None
    • None

      When importing a column from a CSV file into the "Comment Body" JIRA field, the importer displays this tip:

      To preserve the comment author/date use format: "05/05/2010 11:20:30; adam; This is a comment."
      

      However, this does not work. The date & author & comment are parsed, yet the comment is created on the issue with the time 00:00:00. Using the exact example as above, we observe:

      Foo Bar added a comment - 05/May/10 12:00 AM
      This is a comment.
      

      What I am trying to achieve is to import a comment with a comment author and have the comment attached to the issue using the current datetime of the import. However attempts to leave the date field blank (ie use "; foobar; Comment") result in errors:

      2012-07-06 18:08:47,863 WARN - Exception occurred parsing comment. Some values may not be set
      java.text.ParseException: Unparseable date: "; foobar"
      [...]
      2012-07-06 18:08:47,892 WARN - Commenter named null not found. Creating issue with currently logged in user instead
      
      Import completed with 2 warnings:
      Commenter named null not found. Creating issue with currently logged in user instead
      Exception occurred parsing comment. Some values may not be set
      

      and the comment is added with the currently logged-in user.

      How is it possible to (a) include the time in a fully-qualified comment import, or better, just specify the author & comment and have the system use the import datetime?

            [JIM-774] Time field is ignored when importing a comment with "datetime; author; comment" format

            Thank you. The solution was to use a date format that included a time component, as suggested.

            "date.import.format" : "MM/dd/yyyy HH:mm:ss",
            

            Nicholas Gianniotis added a comment - Thank you. The solution was to use a date format that included a time component, as suggested. "date.import.format" : "MM/dd/yyyy HH:mm:ss",

            I'm assuming this is answered. If still something doesn't work please re-open or raise a new issue.

            Pawel Niewiadomski (Inactive) added a comment - I'm assuming this is answered. If still something doesn't work please re-open or raise a new issue.

            Thanks for the tip. The current format in the config file is:

              "date.import.format" : "MM/dd/yyyy",
            

            I will switch this to include a time component and re-test.

            Nicholas Gianniotis added a comment - Thanks for the tip. The current format in the config file is: "date.import.format" : "MM/dd/yyyy", I will switch this to include a time component and re-test.

            It's not possible to import the comment with an author but without the date.

            The date format the parser expects is the same format you put during the wizard. So probably the format you put is different than the one in the file.

            Please send me your configuration with a sample CSV file and I'll investigate.

            Pawel Niewiadomski (Inactive) added a comment - It's not possible to import the comment with an author but without the date. The date format the parser expects is the same format you put during the wizard. So probably the format you put is different than the one in the file. Please send me your configuration with a sample CSV file and I'll investigate.

              Unassigned Unassigned
              Anonymous Anonymous
              Archiver:
              dnorton@atlassian.com Dave Norton

                Created:
                Updated:
                Resolved:
                Archived: