[MAGNOLIA-8053] Copying JCR items should strip activation and modification metadata Created: 09/Oct/20  Updated: 22/Sep/21  Resolved: 13/Apr/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2
Fix Version/s: 6.2.8

Type: Improvement Priority: Major
Reporter: Richard Gange Assignee: Thuy To
Resolution: Done Votes: 0
Labels: VN-Maintenance, cs-bk, maintenance
Remaining Estimate: Not Specified
Time Spent: 6d 2h 10m
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-6841 Workspace#copy shows copied nodes wit... Closed
is related to MGNLUI-6284 duplicateNodeAction should strip acti... Closed
is related to MAGNOLIA-8054 Consider adding copy metadata to copi... Closed
is related to PAGES-357 DOC: Best practice for moving pages a... Closed
is related to PAGES-358 DOC: Best practice for renaming pages... Closed
Template:
Acceptance criteria:
[X]* remove mgnl:hasVersion mixin when copying item (NodeTypes.HasVersion.NAME)
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)
Release notes required:
Yes
Date of First Response:
Epic Link: metadata-sanitization
Sprint: Maintenance 52
Story Points: 8

 Description   

Reproduce:

  • Open the pages app
  • Copy and paste /travel/tour to create /travel/tour0
  • Export tour0

Expected:
The new node tour0 should not contain any metadata related to activation or modification. It should be treated like a brand new node with only a copy of the required content.

Actual:
Metadata from the original node about activation remains.

'tour0':
  'hideInNav': 'true'
  'jcr:primaryType': 'mgnl:page'
  'jcr:uuid': '84b07c40-de2d-4c2a-987b-af3692fa6db9'
  'mgnl:activationStatus': false
  'mgnl:created': 2020-10-07T13:03:38.650Z
  'mgnl:createdBy': 'superuser'
  'mgnl:lastActivated': 2020-10-07T13:03:38.674Z
  'mgnl:lastActivatedBy': 'superuser'
  'mgnl:lastModified': 2020-10-07T13:03:38.720Z
  'mgnl:lastModifiedBy': 'superuser'
  'mgnl:template': 'tours:pages/tour'
  'title': 'Tour detail'
  'main':
    'jcr:primaryType': 'mgnl:area'
    'jcr:uuid': '695f32bc-05c4-45ee-81af-ed91520f4dac'
    'mgnl:activationStatus': false
    'mgnl:created': 2020-10-07T13:03:38.650Z
    'mgnl:createdBy': 'superuser'
    'mgnl:lastActivated': 2020-10-07T13:03:38.674Z
    'mgnl:lastActivatedBy': 'superuser'
    'mgnl:lastModified': 2020-10-07T13:03:38.650Z
    'mgnl:lastModifiedBy': 'superuser'

Strip from node and all subnodes:

    'mgnl:activationStatus': false
    'mgnl:lastActivated': 2020-10-07T13:03:38.674Z
    'mgnl:lastActivatedBy': 'superuser'
    'mgnl:lastModified': 2020-10-07T13:03:38.650Z
    'mgnl:lastModifiedBy': 'superuser'

It's never been modified and never been activated.


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