[LIVECOPY-163] Multivalue properties are not pushed when it doesn't exist in slave Created: 28/Oct/19  Updated: 03/Dec/20  Resolved: 06/Nov/19

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.1

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Trung Luu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 6.5h
Original Estimate: Not Specified

Attachments: File multi-value-test.yaml    
Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Epic Link: Ext DAMs maintenance & partnership support
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.


Generated at Mon Feb 12 02:26:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.