[MGNLTOOLS-87] Remove empty folders in mgnlVersion workspace Created: 28/Jul/17  Updated: 28/Jul/17

Status: Accepted
Project: Repository Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File after-delete-and-publish-delete-page.png     PNG File before-delete-and-publish-delete-page.png    
Issue Links:
Relates
relates to MGNLTOOLS-86 Purge versions of previously deleted ... Closed
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)
Story Points: 3

 Description   

When calling delete content, version of content is also deleted (introduced in 5.5 too, MAGNOLIA-6784: https://git.magnolia-cms.com/projects/PLATFORM/repos/main/browse/magnolia-core/src/main/java/info/magnolia/cms/core/version/MgnlVersioningNodeWrapper.java#111). So there are many many empty folders in version workspace now.

Solution: We could improve Purge Version Command to prune empty version folders

Step to reproduce:

  • Create page with name 'test' in pages app
  • Publish that 'test' page
  • Check version of it is created in JCR-Browser app/magnolia-mgnlVersion
  • Delete 'test' and publish deleted- page in pages app
  • Open JCR-Browser app/magnolia-mgnlVersion and see the 'test' version is gone but there are remaining empty folders nodes

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