[MSHOP-107] Clarify actions available when publishing the deletion of an item Created: 14/Nov/13  Updated: 23/Apr/15  Resolved: 23/Apr/15

Status: Closed
Project: Magnolia Shop (closed)
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.1.1, 2.2

Type: Bug Priority: Major
Reporter: Andreas Weder Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: acceptance, evaluate, usability, ux
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Publish deletion in Pages.png     PNG File Slightly confusing deletion.png    
Issue Links:
dependency
depends upon MAGNOLIA-6157 Allow to configure RestorePreviousVer... Closed
relation
is related to MAGNOLIA-6137 NodeUtil.collectAllChildren(node) met... Open
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:

 Description   

When I delete an item in any of the shop apps, the item's icon is replaced with the trash can and I get a "publish" and an "unpublish" action. It's not entirely clear to me what these actions do, and this is actually also not aligned with what other apps show in this case.

I think we should clarify the actions like this:

  • I don't know what the "unpublish" action is supposed to do. Does it cancel the deletion? Then we should rather provide "restore item" action in a separate section below. Else we should just remove or disable the "unpublish" action.
  • I'd prefer to rename the "Publish" action "Publish deletion" to be in-line with other apps.

For an example of how the action bar looks for a deleted item in Pages, please see the attached screenshot.



 Comments   
Comment by Antonín Juran [ 02/Apr/15 ]

In shopping carts can't revert to a previous version after deleting.

Comment by Antonín Juran [ 03/Apr/15 ]

Restore previous version action on item in shopping carts throws UnsupportedRepositoryOperationException

Comment by Antonín Juran [ 08/Apr/15 ]

Use RestorePreviousVersionCommand class from magnolia_main module for restoring previous version of a node.

Comment by Jan Haderka [ 10/Apr/15 ]
Rule("[nonExistentNodeType, ]; Reverse:true", ",")

That looks bit cryptic and scary. Why is there a rule for non existent node type? What does it mean. If nothing else, there should be some explanation for the magic.

<sv:property sv:name="extends" sv:type="String">
     <sv:value>/modules/workflow/generic/actions/schedulePublication</sv:value>
</sv:property>

If you depend on something from workflow, that dependency should be declared. OTOH Shop is a forge module so depending on something that is in EE only should be optional only.

Anyway there seems to be entirely too many dependencies in shop (e.g. to theme-pop (what if i have my own theme only?)) that should probably be reviewed and if possible removed as part of some other issue.

Comment by Jan Haderka [ 10/Apr/15 ]

I would probably also change update messages from "Add availability node into shop ..." to "Configure availability of action deactivate", etc.

Comment by Roman Kovařík [ 17/Apr/15 ]

Shop 2.1.x:
Restoring a previous version in products throws exception, although it looks like the version is properly restored:

2015-04-17 14:48:00,772 ERROR info.magnolia.module.scheduler.CommandJob         : Cannot execute command restorePreviousVersion-shop.
javax.jcr.UnsupportedRepositoryOperationException: Unable to perform a versioning operation on a non versionable node: /p4012/prices
	at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkVersionable(VersionManagerImplBase.java:293)
	at org.apache.jackrabbit.core.version.VersionManagerImplBase.getVersionHistory(VersionManagerImplBase.java:354)
	at org.apache.jackrabbit.core.VersionManagerImpl.access$700(VersionManagerImpl.java:73)
	at org.apache.jackrabbit.core.VersionManagerImpl$4.perform(VersionManagerImpl.java:184)
	at org.apache.jackrabbit.core.VersionManagerImpl$4.perform(VersionManagerImpl.java:180)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
	at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96)
	at org.apache.jackrabbit.core.VersionManagerImpl.getVersionHistory(VersionManagerImpl.java:180)
	at org.apache.jackrabbit.core.NodeImpl.getVersionHistory(NodeImpl.java:2997)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getVersionHistory(DelegateNodeWrapper.java:267)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getVersionHistory(DelegateNodeWrapper.java:267)
	at info.magnolia.cms.core.version.BaseVersionManager.getAllVersions(BaseVersionManager.java:367)
	at info.magnolia.commands.impl.RestorePreviousVersionCommand.getPreviousVersion(RestorePreviousVersionCommand.java:119)
	at info.magnolia.commands.impl.RestorePreviousVersionCommand.restoreAllChildren(RestorePreviousVersionCommand.java:105)
	at info.magnolia.commands.impl.RestorePreviousVersionCommand.restore(RestorePreviousVersionCommand.java:92)
	at info.magnolia.commands.impl.RestorePreviousVersionCommand.execute(RestorePreviousVersionCommand.java:72)
	at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:81)
	at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:70)
	at info.magnolia.module.scheduler.CommandJob.execute(CommandJob.java:135)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

Restoring a previous version In suppliers works without any problems.

Comment by Roman Kovařík [ 23/Apr/15 ]

Reopen after QA: an deleted item after update doesn't have any actions available.

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