Announcement

Collapse
No announcement yet.

Mirth v1.2 - Import v1.1 channel concatenates code to single line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirth v1.2 - Import v1.1 channel concatenates code to single line

    ============
    Mirth v1.2
    ============

    Tried importing channel created in v1.1 which had javascript filter and transformers with many lines of code.

    It imports the code but under filter and transformer window the multiple lines of javascript code gets concatenated into a single line.

  • #2
    Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

    nshaik,

    I just checked, and I am having the same problem on all text areas when importing a channel. It looks like the serializer is stripping out all of the character returns. I'll add this bug to JIRA if it is not already there.

    -Brendan
    Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

    Comment


    • #3
      Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

      This is not a bug. Unfortunantly the previous serialization of channels did not retain newlines. (It capture carriage returns, but this was not platform independent).

      The new Mirth Syntaxt Text areas use the standard Java line delimiter (\n) rather than a platform specific delimiter to render text. This ensures that text processing and saving is consistent on all platforms. Additionally, the 1.2 serializer has been updated to retain newlines, so this issue will not appear with channels exported from 1.2.

      In terms of fixing this for 1.2.1, we can include a replacement in the channel import class that changes carriage returns to newlines for code areas.

      -Chris
      Chris Lang

      Comment


      • #4
        Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

        A simple fix for this is to use a text editor and run a search and replace for:

        Code:
        
        
        to 
        
        \n
        That should convert all of the carriage returns to newlines. Importing the channel then retains the newlines in all code/descriptions/templates.
        Chris Lang

        Comment


        • #5
          Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

          Replace (&amp above with an actual amperstand.

          If you are building Mirth from source, you can change the "doImport" function in Frame.java:

          Code:
          Channel importChannel = (Channel)serializer.fromXML(channelXML.replaceAll("\\&\\#x0D","\\&\\#x0A");
          Chris Lang

          Comment

          Working...
          X