Uploaded image for project: 'Xporter for Jira Cloud'
  1. Xporter for Jira Cloud
  2. XPORTERCLOUD-2450

Using JavaScript in templates is causing blank lines to appear

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Open
    • Medium
    • Resolution: Unresolved
    • Xporter Cloud [SilentRelease]
    • None
    • Templates
    • None
    • Cloud

    • UNCOVERED

    Description

      Using JavaScript in templates is causing blank lines to appear.

      Steps to reproduce:

      Use the following code in a template:

      %{const months = ["Jan ", "Feb ", "Mar ", "Apr ", "May ", "Jun ", "Jul ", "Aug ", "Sep ", “Oct ", "Nov ", "Dec "];}
      %{ function mt(date) {return months[date.getUTCMonth()] +  String(date.getUTCDate()) + “, “   }}
      %{ function yr(date) {return date.getUTCFullYear() + “ “}}
      %{ function tm(date) {return String(date.getUTCHours()).padStart(2,’0’) + “:“ + String(date.getUTCMinutes()).padStart(2,’0’)    }}
      %{ function formatMyDated(date) {return date.toUTCString()}}
      %{ function formatMyDate(date) {return mt( date) + yr(date) + tm(date) + ‘ UTC’}}
      

      Actual Result:

      A new line will be created for each code block:

      Expected Result:

      No new lines should be created.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pmax Paulo Aleixo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: