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

Javascript regular expressions are not working

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Xporter Cloud 2.2.0
    • FPC#8, Xporter Cloud 2.2.3
    • Templates
    • None

    Description

      Javascript regular expressions are not working.

      Nothing is exported when trying to use regular expressions to find some content in a string.

      Steps to reproduce:

      • Use one of the following methods to find some content:
      //find string inside brackets
      %{var des= 'aaa [abcdefg] ddd'; var regExp = /\[([^)]+)\]/; var matches = regExp.exec(des)[1]; matches;}
      

      Expected Result: abcdefg

      //find issue key in text
      %{var content = “gg PMAXS-12345 aaa”; var regExp =/PMAXS-\d+/g; var matches = regExp.exec(“gg PMAXS-12345 aaa”)[0]; matches;}
      //or
      %{var content = ‘gg PMAXS-12345 aaa’; var id = content.match(/PMAXS-\d+/g)[0]; ‘my result is ‘ + id;}
      

      Expected Result: PMAXS-12345

      Current Behavior: Nothing is exported

      Attachments

        Activity

          People

            rmbr Rui Rodrigues
            pmax Paulo Aleixo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: