Bug 1071063

Summary: PressGang Import Tool ignores the mainfile: parameter in Publican.cfg files
Product: [Community] PressGang CCMS Reporter: Ruediger Landmann <rlandman>
Component: ImportToolAssignee: Matthew Casperson <mcaspers>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.5CC: cbredesen, lnewson, mcaspers
Target Milestone: ---   
Target Release: 1.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-01 21:39:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Alternate mainfile test
none
Incorrect main file none

Description Ruediger Landmann 2014-02-28 03:53:28 UTC
Description of problem:
I uploaded a Zip file of a book that had a main XML file named something other than Publican's default. Even though this file was specified with the mainfile: parameter in the Publican.cfg file, the Import Tool still asked me to specify it manually (ie, it did not default to the correct mainfile). Since this wasn't a book I created, I had to refer to the Publican.cfg myself and select the file manually. 

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


How reproducible:
100%

Steps to Reproduce:
1. Create a book with Publican and rename its main file
2. Specify the new main file in the Publican.cfg file
3. Zip up the book and upload it with the PressGang Import Tool

Actual results:
PIT allows you to specify the mainfile, but does not default to the file specified in the Publican.cfg. 

Expected results:
PIT defaults to the specified mainfile. It's still nice to be able to override that though.

Additional info:

Comment 1 Ruediger Landmann 2014-02-28 04:54:36 UTC
Actually, it ignores default main files too!

Comment 2 Matthew Casperson 2014-03-14 02:40:06 UTC
Created attachment 874205 [details]
Alternate mainfile test

Comment 3 Matthew Casperson 2014-03-14 02:40:20 UTC
Fixed in 201403141239

Comment 4 Lee Newson 2014-04-01 02:27:32 UTC
Using the attached sample doesn't select the main file and instead adds a blank option that will allow you to continue. When clicking the "Start Import" it just appears to hang.

Comment 5 Matthew Casperson 2014-04-01 03:30:42 UTC
Fixed in 201403211230

The included sample sets mainfile to filename.xml, whereas it should only be set to filename (see http://jfearn.fedorapeople.org/en-US/Publican/2.6/html/Release_Notes/index.html). There is now a check for incorrectly adding the xml extension though.

Comment 6 Lee Newson 2014-04-01 03:59:28 UTC
Attempting to use a mainfile that doesn't exist results in the same behaviour as above.

ie:

mainfile: Blah

or

mainfile:

Comment 7 Matthew Casperson 2014-04-01 23:07:53 UTC
Created attachment 881558 [details]
Incorrect main file

Comment 8 Matthew Casperson 2014-04-01 23:08:24 UTC
Fixed in 201404020907

When the mainfile option point to a file that does not exist, it is ignored.

Comment 9 Lee Newson 2014-04-02 02:25:56 UTC
Verified