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

Fix XML import of null integer properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6
    • Fix Version/s: 6.0-HF01, 7.1
    • Component/s: Core
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      Any workflow derived from the standard SerialDocumentReview should be updated by making sure that the global variable "index" has an explicit default value of 0.

      Show
      Any workflow derived from the standard SerialDocumentReview should be updated by making sure that the global variable "index" has an explicit default value of 0.

      Description

      The import of a Zip Tree XML Export containing a document with a null integer property sets value to 0.

      Steps to reproduce:

      1. Define docType with schema that includes an integer property.
      2. Create doc of above type with integer property not populated.
      3. Zip Tree XML Export folder containing above doc to file export.zip
      4. Import above export.zip
      5. Edit imported doc
      6. Note that imported doc has integer property value set to 0 rather than unset.

      The bug appears to be in how the decode(String str) method from org.nuxeo.ecm.core.schema.types.primitives.IntegerType handles the empty string. The method currently returns 0 for the empty string. In order to be consistent with the way the corresponding encode(Object obj) method handles null values, the decode(String str) method should return null for the empty string and not 0.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.