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

Document resource endpoint does not handle null and empty array properties correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF15, 11.1, 2021.0
    • Component/s: Rest API

      Description

      Use case:

      • some properties are pre-filled with a listener on the event empty document created
      • a user empties a pre-filled property in webui
      • the property is still set with the pre-filled value after the POST

      Expected result:
      the property emptied by the user is still empty

      Here's an automation chain to reproduce the issue

      - Context.FetchDocument
      - Document.SetProperty:
          xpath: "dc:nature"
          save: "false"
          value: article
      - DocumentMultivaluedProperty.addItem:
          value: art
          xpath: "dc:subjects"
          checkExists: "true"
          save: "false"
      

        Attachments

        1. NXP-27978.mp4
          2.42 MB
        2. event_handler_config.JPG
          event_handler_config.JPG
          131 kB
        3. post_response.JPG
          post_response.JPG
          193 kB
        4. post_request.JPG
          post_request.JPG
          177 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 1 day, 5 hours
                  1d 5h