Uploaded image for project: 'Xporter for Jira'
  1. Xporter for Jira
  2. XPORTER-3673

Error NumberFormatException returned when setting up a variable with a formatted date

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • 6.6.7
    • 6.6.8
    • Xporter Engine
    • None
    • JIRAXPORTER 2021 Sprint 2
    • OK

    Description

      Description
      Error NumberFormatException returned when setting up a variable with a formatted date.
      It happens when using "set" "dateformat" and Javascrip to set the date into a variable.

      How to reproduce

      1. Create a template with the following code:
        ${set(newRunDate, %{'${dateformat("yyyyMMddhhmm"):TestRuns[n].Finished On}'})}
      2. Execute the report

      Actual result/Attachments
      The date value is not set up and the error below is shown in the logs:
      _java.lang.NumberFormatException: For input string: "202009080254" _

      Expected result
      The date value is processed and shown in the output document.

      Version

      • Xporter 6.6.7

      Attachments

        Activity

          People

            afro Andre Fernandes Rodrigues
            rmsp Rogerio Paiva [X] (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 0 minutes
                0m