Uploaded image for project: 'Live Copy'
  1. Live Copy
  2. LIVECOPY-163

Multivalue properties are not pushed when it doesn't exist in slave

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.1
    • Labels:
      None
    • Release notes required:
      Yes
    • Sprint:
      Add-Ons 24
    • Story Points:
      3

      Description

      If there is a multivalue field that is not required and the livecopy is done without this value, then when the value is filled, it is not pushed to the slave copy:

      info.magnolia.livecopy.actions.PropagateMasterContentChangesHelper.updateMasterProperties
      if (masterProperty.isMultiple()) {
                      if (referencedNode.hasProperty(masterProperty.getName())) {
                          referencedNode.setProperty(masterProperty.getName(), masterProperty.getValues());
      
       }else{
      ...
      }       
      

      This piece of code is ignoring new properties in multiple fields when these fields are not required and the component is already created. if property isMultiple, then the value is updated in case the property already exists.

      Steps to reproduce:
      1. Create a new component with a multivalue field as not required(attached you can find an example)
      2. Add the component to a page.
      3. Create a livecopy of the page.
      4. Edit the previous component, add values to the multivalue field and save changes.
      5. Push content changes to slave copy.
      6. Open the slave copy and see that changes has not been added.

      Attached you can find a component example.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                trung.luu Trung Luu
                Reporter:
                miruela Mercedes Iruela
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1d 6.5h
                  1d 6.5h