Bug 107944

Summary: Publishing fails if a live item ends up in the publishing queue
Product: [Retired] Red Hat Enterprise CMS Reporter: Mike Bonnet <mikeb>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
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-12-10 16:47: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: 100952    
Attachments:
Description Flags
Proposed fix none

Description Mike Bonnet 2003-10-24 19:42:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701
Galeon/1.3.9

Description of problem:
cms.lifecycle.PublishLifecycleListener.java asserts that it only operates on
draft or pending versions.  However, there are some situations (involving
auto-publishing) in which a live item could end up in the publishing queue. 
This causes publishing to die with an assertion error.

There is no need for the assertion.  The promotePendingVersion() method (called
by the PublishLifecycleListener) is smart enough to do the right thing if it's
passed an already-live item.  See the attached patch for a solution to the problem.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Update an item from pending to live while it's in the publishing queue.

Actual Results:  Assertion error, item does not get published correctly (it
never becomes the "liveVersion" of it's draft item).

Expected Results:  No assertion error, item does get published correctly.

Additional info:

Comment 1 Mike Bonnet 2003-10-24 19:46:33 UTC
Created attachment 95468 [details]
Proposed fix

This removes the assertion that the item is draft or pending, and treats a live
version the same as a pending version.	ContentItem.promotePendingVersion()
does the right thing in either case.

Comment 2 Mike Bonnet 2003-10-24 19:50:11 UTC
Adding as blocking the 6.0.1 tracking bug, because it's required for a client
(they're already using the patch, and we'd *really* like to get them onto a
fully supported release).

Comment 3 Archit Shah 2003-12-02 20:23:18 UTC
merged on 6.0.x (38222) and dev (38422)

Comment 4 Archit Shah 2003-12-02 20:25:48 UTC
actually, it is change 38411 on dev