Uploaded image for project: 'mod-data-export'
  1. mod-data-export
  2. MDEXP-426

Escape control characters in quoted literals

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 4.1.1, 4.2.0
    • None
    • Firebird Sprint 123
    • 2
    • Firebird
    • R2 2021 Hot Fix #3
    • Yes
    • via slack on 9/17/21

    Description

      Overview:

      The export fails with following errors recorded in the log:

      "ExportManagerImpl Export is failed, cause: A quoted literal may not contain any control characters - controls must be escaped using \uHHHH; at Input Source: "MarcInput", Line: 1, Column: 110, Member Name: 007"

      2021-08-06T14:59:01,896 ERROR [vert.x-eventloop-thread-1] ExportManagerImpl Export is failed, cause: A quoted literal may not contain any control characters - controls must be escaped using \uHHHH; at Input Source: "MarcInput", Line: 1, Column: 110, Member Name: 008

      This is an example of another error that halts data export.

      2021-09-13T20:15:30,595 ERROR [vert.x-eventloop-thread-1] ExportManagerImpl Export is failed, cause: A string value cannot contain data after its closing quote (this is most likely caused by a missing comma between members); at Input Source: "MarcInput", Line: 1, Column: 2639, Member Name: ind1

      Steps to Reproduce:

      1. Manually update SRS record in the database so that it  contains three control characters (bell, character 7) – one in 006, one in 007, and one in 008. You can also a backslash to those fields just in case there are interpretation issues with those (this will contain the data similar to the attached  test.mrc file. You can also add some text after a closing double quote to check another error.
      2. Export several records, including the one manually modified in prior step.

      Expected Results:

      • The error is handled gracefully
      • The status of the export is Completed with errors. 
      • Not affected records are successfully exported.
      • The information about the affected record is  added to the user error log using the standard entry :
        <dateandtime> ERROR A quoted literal may not contain any control character. Field name <affected fields>
        {
        "Instance UUID": "<affected record uuid>"
        "Instance HRID": "<affected record hrid>"
        "Instance Title": "<title>"
        "Inventory record link": <link to the record>
        }
        

      Actual Results:

      Export job fails.  Error log contains only Generic error information.

      Interested parties:

      Skidmore

      MSTU

      TestRail: Results

        Attachments

          1. data_export_errors.PNG
            data_export_errors.PNG
            227 kB
          2. data_export_logs.PNG
            data_export_logs.PNG
            75 kB
          3. test_6_records_only_1_is_valid.csv
            0.2 kB
          4. test_6_records_only_1_is_valid.txt
            38 kB
          5. test.mrc
            3 kB

          Issue Links

            Activity

              People

                Oleksandr_Bozhko Oleksandr Bozhko
                magdaz Magda Zacharska
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases