[LIVECOPY-169] Pushing not working for multiple properties Created: 14/Nov/19 Updated: 25/May/20 Resolved: 22/May/20 |
|
| Status: | Closed |
| Project: | Live Copy |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Oanh Thai Hoang |
| Resolution: | Outdated | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| 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
|
||||
| Date of First Response: | |||||
| Epic Link: | Ext DAMs maintenance & partnership support | ||||
| Sprint: | Maintenance 8 | ||||
| Story Points: | 3 | ||||
| Description |
|
When pushing master content changes for a page component in which more than one property have been modified, only one of them will be pushed. You will need to push for each property changed. Steps to reproduce with demo author
Result: In about page in the copied tree, only one of the two modified properties has been updated. Cause of the error is in info.magnolia.liveCopy.actions.PropagateMasterContentChangesHelper.updateMasterProperties(Node, Node), where after modifying a property, the method returns true which makes the iteration finish and not processing the rest of properties: if (referencedNode.hasProperty(masterProperty.getName())) { // If the property value changed Property referencedProperty = referencedNode.getProperty(masterProperty.getName()); if (!masterProperty.getValue().getString().equals(referencedProperty.getValue().getString())) { referencedProperty.setValue(masterProperty.getValue()); log.info("Updating a property for the page: {} property is: {} master content page is: {} New Value: {} Old value: {}", referencedProperty.getValue().getString(), referencedNode.getPath(), referencedProperty.getName(), masterNode.getPath(), masterProperty.getValue().getString()); return true; <<<<<<<<<<<<<<<<<<<<<<<<<<< } } else { // This property is new referencedNode.setProperty(masterProperty.getName(), masterProperty.getValue()); log.info("Setting a new property for the page: {} property is: {} master content page is: {}", referencedNode.getPath(), masterProperty.getName(), masterNode.getPath()); return true; <<<<<<<<<<<<<<<<<<<<<<<<<<<<< }
|
| Comments |
| Comment by Jonathan Ayala [ 18/Dec/19 ] |
|
See this comment from malupion who has already dealt with this issue. |
| Comment by Oanh Thai Hoang [ 21/May/20 ] |
|
This bug can not reproduce with live-copy version 2.1.1 because this bug has been fixed since https://jira.magnolia-cms.com/browse/LIVECOPY-36
For reference code. See https://git.magnolia-cms.com/projects/ADDON/repos/live-copy/browse/magnolia-livecopy/src/main/java/info/magnolia/liveCopy/actions/PropagateMasterContentChangesUtil.java?at=refs%2Fheads%2Frelease%2F2.1#556,562 |