Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30037

Fix CSV export for mixed content with Vocabulary metadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF40, 11.x, 2021.2
    • Component/s: CSV
    • Release Notes Summary:
      CSV export handles missing properties on document for Vocabulary metadata.
    • Backlog priority:
      675
    • Sprint:
      nxplatform #26, nxplatform #27
    • Story Points:
      3

      Description

      Steps to reproduce:

      1. Deploy the jar from https://jira.nuxeo.com/secure/attachmentzip/unzip/152948/100459%5B5%5D/
      2. Go to a Workspace
      3. Create a document whose type is Doc1 and fill all the custom metadata
      4. Create a document whose type is Doc2 and fill all the custom metadata
      5. Do a CSV export for this workspace with  the 2 new documents

      Observe that the content is not aligned with the column headers for Doc1

      The problem comes from the "write" method at https://github.com/nuxeo/nuxeo/blob/805d23810353a23253256fd8c90c7a05128ac832/nuxeo-features/nuxeo-platform-csv-export/src/main/java/org/nuxeo/ecm/platform/csv/export/io/DocumentPropertyCSVWriter.java#L65 which prints a single"null" if the property is null (for example when the document does not have this schema) whereas 2 columns were written to the headers when the property is a vocabulary (one for id, one for label)

      Expected behavior:

      All content should be aligned with the respective columns.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m