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. event_handler_config.JPG
          131 kB
          Michaël Vachette
        2. NXP-27978.mp4
          2.42 MB
          Michaël Vachette
        3. post_request.JPG
          177 kB
          Michaël Vachette
        4. post_response.JPG
          193 kB
          Michaël Vachette

          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