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

Allow to append to multi-valued properties using Document.Update operation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2021.13
    • Component/s: Automation

      Description

      When updating multi-valued properties using the Document.Update operation, the value is always replaced by the new value. If we want to append a new value to the list, we need to know the value before, append the new value and use that as a new value.
      This can't work while using bulk edit feature.

      We want to be able to define a behavior per multi-valued properties when using Document.Update:

      • replace: replace the old value by the new value, existing behavior.
      • append_excluding_duplicates: append the new value to the existing list value, ignoring any new value duplicates.
      • append_including_duplicates: append the new value to the existing list value, including all duplicates.

      To do that, add a new parameter propertiesBehaviors to the Document.Update operation, same type as the properties one to define the behavior of the properties, if any.

      dc:subjetcs=append_excluding_duplicates
      dc:subjetcs=append_including_duplicates
      dc:coverage=replace
      

      No behavior defined means replace.

      When using the append_excluding_duplicates option:

      • Values that do not exist already in the destination documents are added
      • Already existing values are ignored. e.g. If dc:subjects already contains art/architecture and the user adds it using the bulk edit form, it is only stored once in the document. It triggers a server side log for debugging purpose but does not trigger an error preventing the action from going through.

      When using the append_including_duplicates option:

      • All values are added regardless of whether they are already present in the destination documents or not 

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: