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

Post-Function and Scheduled Reports fails if, in the filename, we use a mapping with colons (:)

    XporterXMLWordPrintable

Details

    • UNCOVERED

    Description

      Description

      Post-Function or Scheduled Reports fail if, in the filename, we use a mapping with colons (:)

      How to reproduce
      With Post Function:

      1. Create an Xporter post-function to attach a file, and in the filename, add the mapping ${dateformat("dd-MM-yyyy":Created}. (or whatever that contains a colon).
      2. Run the post-function.
        With Scheduled Report
      3. Go to Scheduled Reports page
      4. Create a new one and select the Xporter Reports option
      5. Add the mapping ${dateformat("dd-MM-yyyy":Created}. (or whatever that contains a colon) to the filename
      6. Click on create

      Actual result/Attachments
      The post-function does not work. No file is attached.
      The Scheduled Report will not be created or updated if it already exists.

      In the Audit logs, we see the following:

      On the application-logs we see the entry:
      Post Function log

      2023-04-14 10:37:49,482+0200 : /secure/CommentAssignIssue.jspa; user: admin ERROR admin /secure/CommentAssignIssue.jspa [c.x.jiraxporter.workflow.XporterPostFunctionAction] Error performing post function
      java.lang.IllegalArgumentException: NTFS ADS separator (':') in file name is forbidden.
      	at org.apache.commons.io.FilenameUtils.indexOfExtension(Unknown Source)
      	at org.apache.commons.io.FilenameUtils.getExtension(Unknown Source)
      	at com.xpandit.jiraxporter.manager.impl.ExecutionValidationServiceImpl.validateFilenameExtension(Unknown Source)
      	at com.xpandit.jiraxporter.manager.impl.ExecutionValidationServiceImpl.validateWfPostFunctionConfig(Unknown Source)
      	at com.xpandit.jiraxporter.workflow.XporterPostFunctionAction.execute(Unknown Source)
      	at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)
      	at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407)
      	at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:557)
      	at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:84
      

      Scheduled Report log

      2023-09-18 12:28:55,942+0100 http-nio-8080-exec-17 ERROR mariopeixoto01 748x2450x1 liwm7i 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/scheduledreports/update [c.x.j.rest.services.ScheduledReportsRestService] A sql exception has occured.
      java.lang.IllegalArgumentException: NTFS ADS separator (':') in file name is forbidden.
      	at org.apache.commons.io.FilenameUtils.indexOfExtension(Unknown Source)
      	at org.apache.commons.io.FilenameUtils.getExtension(Unknown Source)
      	at com.xpandit.jiraxporter.manager.impl.ExecutionValidationServiceImpl.validateFilenameExtension(Unknown Source)
      	at com.xpandit.jiraxporter.manager.impl.ExecutionValidationServiceImpl.validateScheduledReportConfig(Unknown Source)
      	at com.xpandit.jiraxporter.rest.services.ScheduledReportsRestService.update(Unknown Source)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      	... 3 filtered
      	at com.xpandit.jiraxporter.manager.impl.XporterCsrfTokenInterceptor.intercept(Unknown Source)
      	... 1 filtered
      	at com.xpandit.jiraxporter.manager.impl.RestServiceInterceptor.intercept(Unknown Source)
      	... 15 filtered
      

      Expected result

      The post-function should be normally executed with the set filename.
      The Scheduled Report should be normally created or updated with the set filename.

      Version

      • 6.9.13

      Attachments

        Activity

          People

            rmbr Rui Rodrigues
            amgt Ana Teixeira
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: