Bug 1017465

Summary: PressGang requires <article>s to have <section>s
Product: [Community] PressGang CCMS Reporter: Ruediger Landmann <rlandman>
Component: CCMS-CoreAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 1.1CC: lnewson, mcaspers
Target Milestone: ---   
Target Release: 1.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-23 23:43:58 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:
Bug Depends On: 1030099    
Bug Blocks: 1012194    

Description Ruediger Landmann 2013-10-10 00:22:27 UTC
Description of problem:
DocBook <article>s are documents with more limited scope that <book>s. An simple article might not even include <section>s, just <para>s, <table>s and <figure>s. Further, an <article> might contain introductory material as direct child elements of <article> before it gets to any <section>s. 

PressGang cannot represent simple <article>s; it requires to have <section>s.

In practical terms, this means that although a single topic should be publishable as an <article> this is not possible right now; that single topic will need to be included as the sole <section> in an <article>. 

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

How reproducible:
100%

Steps to Reproduce:
1. Try to build a topic map to publish a single topic as an <article> without making the topic the sole <section> of that <article>

Actual results:
Do not find a way

Expected results:
PressGang should allow a topic to be reused as a stand-alone <article> without making it a <section>.

Additional info:
The mechanism could be similar to how <section>s are promoted to <chapter>s or <appendix>es or <preface>s already. In a topic map, this might look something like:

========

Title = Burning an ISO to CD
Product = Red Hat Enterprise Linux
Version = 6
Type = Article

Article: Burning an ISO to CD [1234567]

========

That is, if the type is Article and the first topic is an Article, then the content of that topic should form the body of the <article> itself and not get wrapped in an unnecessary <section>

(Even better, in a structure like this, there should be no need to define the Title parameter for the map; PressGang should use the <title> of the <section> as the <title> of the <article> when it promotes it).

Similarly, if the <article> contains <section>s after the main body of the article, this would be defined as:

========

Title = Burning an ISO to CD
Product = Red Hat Enterprise Linux
Version = 6
Type = Article

Article: Burning an ISO to CD [1234567]
  Section: Operating systems other than Linux [1234568]

Comment 2 Lee Newson 2014-01-29 03:58:53 UTC
Added in 1.4-SNAPSHOT build 201401291339

We've implemented this reusing the format from BZ#1030099

Example:

----------------------------------------------------------

Long Version:

Initial Text:
  Burning an ISO to CD [1234567]
Operating systems other than Linux [1234568]

----------------------------------------------------------

Short Version:

Title = Burning an ISO to CD
Product = Red Hat Enterprise Linux
Version = 6
Type = Article

Initial Text: Burning an ISO to CD [1234567]
Operating systems other than Linux [1234568]

----------------------------------------------------------

Comment 4 Matthew Casperson 2014-02-11 22:06:04 UTC
Created an article with only an initial text topic and confirmed that it built properly and that the resulting XML does not have a child section container.