[MGNLUI-3727] Deleting a content node claims success on actual failure Created: 22/Dec/15  Updated: 01/Feb/16  Resolved: 19/Jan/16

Status: Closed
Project: Magnolia UI
Component/s: jcr browser
Affects Version/s: None
Fix Version/s: 5.4.5

Type: Improvement Priority: Critical
Reporter: Andreas Weder Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: qa
Remaining Estimate: 3h
Time Spent: 3d 1h
Original Estimate: 3d
Environment:

EE-pro webapp of 5.4.4-SNAPSHOT: https://jenkins.magnolia-cms.com/job/ee_bundle/4462


Attachments: PNG File 1 select content node.png     PNG File 2 confirm.png     PNG File 3 success and failure.png     PNG File 4 failure details.png    
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: UX pain points 2018
Sprint: Saigon 28
Story Points: 5

 Description   

If I attempt to delete a content node (which I've just created - unsure if that matters), I get a success confirmation and a warning that the deletion failed at the same time.

To reproduce:

  1. Add a new content node
  2. Select it, then "delete item"
  3. Confirm the deletion
    -> We get a "Deletion successful" notification and a warning of a failure of the long-running delete task at the same time.

The failure in this test was actually to a non-configured subscriber.



 Comments   
Comment by Ngoc Nguyenthanh [ 11/Jan/16 ]

What's happening?
JCR app inherit actions from Configuration app.

  • Delete action in the app is defined in /modules/ui-admincentral/apps/configuration/subApps/browser/actions/confirmDeletion which will call delete action when user agree to delete item.
  • The delete action will call the delete command group (/modules/ui-admincentral/commands/default/delete - which contains deactivate and delete command in order) by asynchronous

Where the messages come from?

  • The other message comes from info.magnolia.ui.framework.action.async.DefaultAsyncActionExecutor.CommandActionTriggerListener#triggerComplete when execute deactivate command failed info.magnolia.module.activation.commands.DeactivationCommand
  • Deletion successfully message comes from info.magnolia.ui.framework.action.DeleteAction.

Why the item still there?

  • Because info.magnolia.commands.chain.ChainBase#execute execute the chain commands in order. So when the deactivate failed it'll not execute delete command.

Impact

  • Apps which have delete action configured that mentioned above.
  • Foreseen apps: JCR, Configuration.
Comment by Ngoc Nguyenthanh [ 12/Jan/16 ]

weder What's your expectation for this ticket?
Do we just need to show "Deletion has failed" or both (include deactivation failed message) or show a new message, etc?
Thank you!

Comment by Oanh Thai Hoang [ 13/Jan/16 ]

Imo, I have 2 expectations:
1. Will change the action delete to work the same as delete behaviour in Pages, Assets app
2. Or change the notification message to "This action will take a while to complete. You will be notified in Pulse once it has completed." for case asynchronous delete action

Comment by Andreas Weder [ 15/Jan/16 ]

I'd expect the following behavior (this is without workflows):

If a regular delete action is successful:

  • shows the blue notification message, e.g. "Deletion successful." or "Item deleted successfully." (check how we've done it in similar cases).

If a regular delete action fails:

  • shows a yellow or red notification message, e.g. "Deletion failed." or "Item deleted successfully."
  • if more is known as to why the message has failed, a warning (yellow) or error (error) message is also sent through Pulse (and thus shows up simultaneously).

If a delete action is detected to run a long time, and is successful:

  • shows a blue notif "This action will take a while to complete. You will be notified in Pulse once it has completed."
  • Pulse will eventually inform that the action has completed successfully.

If a delete action is detected to run a long time, and eventually fails:

  • shows a blue notif "This action will take a while to complete. You will be notified in Pulse once it has completed."
  • Pulse will typically inform with a warning message that the action has failed and list the reason (the badly configured subscribers). It would alternatively send an error message if the reason is severe.

In general, I'd prefer this behavior to be in-line with how things are done elsewhere, if this is feasible and makes sense. So if the above actually deviates a lot from how delete works in similar cases elsewhere, please let me know.

Comment by Oanh Thai Hoang [ 18/Jan/16 ]

Thanks weder for your answer

Generated at Mon Feb 12 09:09:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.