[MGNLRES-205] Add Publish Deletion and Restore actions to Resources app Created: 28/Aug/15  Updated: 29/Mar/22  Resolved: 19/Oct/15

Status: Closed
Project: Magnolia Resources Module
Component/s: None
Affects Version/s: 2.4.2
Fix Version/s: 2.4.2

Type: Story Priority: Major
Reporter: Aleksandr Pchelintcev Assignee: Ilgun Ilgun
Resolution: Fixed Votes: 0
Labels: ux
Remaining Estimate: 0d
Time Spent: 5d 1.25h
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLRES-255 Restore of a resource version is not ... Closed
relation
is related to MGNLRES-186 Add create and delete actions for res... Closed
is related to MAGNOLIA-6399 JcrResourceOrigin should not filter o... 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)
Date of First Response:
Epic Link: Phase out in-place templating app
Sprint: Basel 15
Story Points: 3
Team: Nucleus

 Description   

These actions need to be added to complete the deletion functionality and to be consistent with other apps.

NOTE:
The main quirk with resource deletion is that the JcrResourceOrigin needs to take resources marked for deletion into account. In order to support that properly the linked issue clearly defines a criteria of which nodes can be considered as resources by the origin (any mgnl:folder/mgnl:content nodes). However, the AddResourceAction and UploadResourceAction produce nodes of type mgnl:contentNode => that has to be changed to mgnl:content.



 Comments   
Comment by Ilgun Ilgun [ 21/Sep/15 ]

Changes can be found in the branch of feature/MGNLRES-205/publish-deletion-restore-actions.

Comment by Ilgun Ilgun [ 28/Sep/15 ]

Made necessary changes after review and pushed to the existing branch with a commit to be squashed later.

feature/MGNLRES-205/publish-deletion-restore-actions

Comment by Ilgun Ilgun [ 29/Sep/15 ]

FIxed the last defect and pushed to the same branch.

Comment by Federico Grilli [ 01/Oct/15 ]

QA: found an issue when deleting a resource which was either added or uploaded to JCR

  • add or upload a new JCR resource
  • delete it
  • you get an info dialog saying that the resource will be marked for deletion
  • click on "Yes, delete" and the resource is immediately deleted from the resources workspace instead of being just marked for deletion
Comment by Ilgun Ilgun [ 01/Oct/15 ]

Resolving it hence the found issue is indeed an expected behaviour.

Comment by Mikaël Geljić [ 02/Oct/15 ]

Here's a bit more:

  • Most new definition classes are empty, just declaring extended implementationClass. How about configuring them with the original definition class + setting the specific implementationClass in config?
  • I'm also surprised at how much logic is replicated in those custom markAsDeleted & version actions, e.g. with comparators ordering adapters beforehand, can't we inherit more from those UI actions?
  • useless method overrides? (seen in RestoreResourceVersionAction)
Comment by Federico Grilli [ 02/Oct/15 ]

Reopening following Mika's comment but the issue with deletion and publishing of a new resource seems to be fixed indeed.

Comment by Ilgun Ilgun [ 02/Oct/15 ]

Made the changes and pushed to the same branch.
fix/MGNLRES-205

Comment by Philip Mundt [ 07/Oct/15 ]
  • "Publish deletion" action should also recursively publish deletion (just like the "Mark as deleted" action)
  • Do not assume that an empty folder can also be marked as deleted when deleting a resource on the same level
Comment by Ilgun Ilgun [ 07/Oct/15 ]

Pushed to the branch fix/MGNLRES-205

Comment by Ilgun Ilgun [ 08/Oct/15 ]

Blocked due to https://wiki.magnolia-cms.com/pages/viewpage.action?pageId=108437312.

Comment by Ilgun Ilgun [ 13/Oct/15 ]

Fixed all the remarks and issue and pushed to branch fix/MGNLRES-205-ilgun-rebased

Comment by Philip Mundt [ 26/Oct/15 ]

I'd still like to see a complete test for info.magnolia.resources.app.action.ResourceActivationAction#resolveClosestAffectedAncestor!

Generated at Mon Feb 12 06:48:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.