Bug 88039
Summary: | Can't delete a folder that has ever had a published item | ||
---|---|---|---|
Product: | [Retired] Red Hat Enterprise CMS | Reporter: | Jon Orris <jorris> |
Component: | other | Assignee: | Justin Ross <jross> |
Status: | CLOSED RAWHIDE | QA Contact: | Jon Orris <jorris> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | nightly | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-06-09 13:46:07 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 88926 |
Description
Jon Orris
2003-04-04 20:23:13 UTC
Jon, I'm confused about this ticket. As far as I can tell, since way way back, folders are not deletable: public boolean isDeletable() { if ( m_itemColl.isLive() ) { return false; } return ! ( m_itemColl.isFolder() ) || ((Folder) m_itemColl.getContentItem()).isEmpty(); } So, shall I try to enable folder deletes? I think that from a usability perspective, it makes sense to allow folders to be deleted. I asked Mr Berrange on IRC: <danpb> live folders are automatically deleted when the last live item in them is removed <danpb> then you need to delete all draft items in the folder, at which point a link to delete the draft folder will appear in the 'browse' pane The convoluted isDeletable code actually makes sense. The first if says "if it is live, it is not deletable". The second has two parts: "if it is not a folder, it is deletable" and "if it is a folder and is empty, it is deletable". So this part is correct, albeit confusing. This might have something to do with the fact that Bundles are never unpublished. When the last lang instance of a bundle is unpublished, the Bundle should be unpublished. Currently when a live folder is emptied, the live version is unpublished (allowing deletion). When bundles are never unpublished, neither are folders. I now understand how isDeletable *does* do the right thing :). I will clarify that code a bit. At perforce 32126, I'm not reproducing this bug. I believe it was fixed by making auto bundle unpublish work. |