[PUBLISHING-150] Unpublishing should include modified children of the unpublished node Created: 26/Jul/22  Updated: 22/Feb/23  Resolved: 18/Nov/22

Status: Closed
Project: Publishing
Component/s: None
Affects Version/s: 1.3.4
Fix Version/s: 1.4.0, 1.3.6

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
is related to PUBLISHING-188 Publishing children of a renamed pare... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PUBLISHING-155 Implementation Sub-task Completed Antonín Juran  
PUBLISHING-156 Code review Sub-task Completed Adam Siska  
PUBLISHING-157 Pre-integration QA Sub-task Completed Adam Siska  
PUBLISHING-158 Final QA Sub-task Completed Roman Kovařík  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Sprint: Nucleus 23
Story Points: 3
Team: Nucleus

 Description   

When moving published items between trees there can sometimes be inconsistent states.

Reproduce
Consider two websites travel and sportstation where a new test page has been added to the sportstation tree. Make sure all pages are in a published (green) state.
Author instance

| - travel
    | - about
    | - tour
| - sportstation
    | - about
    | - tour
    | - test

Move the test page under the travel page.
Author instance

| - travel
    | - about
    | - tour
    | - test
| - sportstation
    | - about
    | - tour

The test page should now be in a modified (yellow) state. However on the public instance the page remains under the sportstation tree.

If the user then unpublishes the entire travel tree (unpublish incl subnodes) the test page will remain under the sportstation tree on the public instance.

| - sportstation
    | - about
    | - tour
    | - test

Expected
I would expect the test page to be removed from the sportstation tree.

Actual
The test page remains under the sportstation tree after the upnublish incl subnodes.

Notes
I'm not exactly sure how this should be handled. Maybe a move should trigger an unpublish or at least prompt the user about doing so.
Maybe moved items need some kind of tracking flag. Saying it's modified is not enough. Perhaps there should be a metadata property which has mgnl:moved=true until the item is published. This flag could be used to prevent this case from occurring.



 Comments   
Comment by Antonín Juran [ 10/Oct/22 ]

DISCOVERY

UnpublicationCommand#execute method unpublishes specific node on an author instance which causes removing of its counterpart on public instance. If the node contains a child node which hasn't been published yet (i.e. moved node), such child node isn't removed from the public instance.

Suggested solution:

We could collect child nodes of the unpublished node which haven't been published yet and pass them to the list of nodes which is parameter of Sender#unpublish method called in the UnpublicationCommand#execute.
We could also introduce a property i.e. boolean includeUnpublishedChildren in the UnpublicationCommand which would configure desired behaviour.
 

Comment by Roman Kovařík [ 14/Nov/22 ]

Solution: the unpublished children are not published as part of the unpublishing process. This might result in the process taking longer than before.

Generated at Mon Feb 12 10:35:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.