[MGNLTOOLS-86] Purge versions of previously deleted content doesn't work since 5.5 Created: 27/Jul/17 Updated: 08/Aug/17 Resolved: 03/Aug/17 |
|
| Status: | Closed |
| Project: | Repository Tools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.9 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Oanh Thai Hoang | Assignee: | Oanh Thai Hoang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1.5d | ||
| Original Estimate: | 2d | ||
| Attachments: |
|
||||||||||||
| 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: | |||||||||||||
| Sprint: | Saigon 106, Saigon 107 | ||||||||||||
| Story Points: | 3 | ||||||||||||
| Description |
|
Since Reason is mgnlVersion.getRootNode().getNodes() only get child of root node from magnolia-mgnlVersion workspace and those nodes alway invalid because of missing mix:versionable.
Step to reproduce:
java.lang.String querySql2 = "select * from [mgnl:page] as t where name(t) = 'test'"; java.lang.String queryWorkspace = "website"; javax.jcr.NodeIterator nodeList = info.magnolia.cms.util.QueryUtil.search(queryWorkspace, querySql2, javax.jcr.query.Query.JCR_SQL2, "mgnl:page"); println "Removing nodes :"; while(nodeList.hasNext()) { javax.jcr.Node currNode = nodeList.nextNode(); println "${currNode.path}"; currNode.remove(); } info.magnolia.context.MgnlContext.getJCRSession(queryWorkspace).save(); println "Nodes removal finished";
Expectation: Version of 'test' page is gone |
| Comments |
| Comment by Dai Ha [ 07/Aug/17 ] |
|
Purge version command function: |