Bug 831000 - [CCMS to Confluence] RFE: Inject Topic ID as a "remap" attribute in <section> elements
[CCMS to Confluence] RFE: Inject Topic ID as a "remap" attribute in <section>...
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
1.x
All All
unspecified Severity high
: ---
: ---
Assigned To: Lee Newson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 18:07 EDT by Jared MORGAN
Modified: 2015-08-09 21:22 EDT (History)
3 users (show)

See Also:
Fixed In Version: 0.24.8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-17 01:56:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ORG-1444 Major Closed Store topic IDs from CCMS into Confluence page metadata during DocBook import 2013-06-03 20:26:24 EDT

  None (edit)
Description Jared MORGAN 2012-06-11 18:07:25 EDT
/login.xhtml

Challenge

https://engineering.redhat.com/docs/en-US/Engineering_Content_Services/1/html-single/JBoss_Confluence_and_CCMS/index.html

I need a consistent way of mapping a CCMS topic exported using CS Processor to a Confluence <section>.

Currently, CS Processor includes XML Comments with key CCMS metadata. Specifically "Topic ID: nnnn".

At the moment, I think a lot of this information is manually entered into the <section> topic body, which poses maintenance issues and potential user error.

Proposal

CS Processor removes unwanted XML comments (such as "how to write a topic"), but extracts and preserves critical CCMS metadata such as Topic ID, and topic type (Concept | Task | Reference) at a minimum. This information is included as discreet XML comments at the top of the exported <section>.

For example:

<section>
<!-- Topic ID: nnnn -->
<!-- Content Type: [Concept | Task | Reference] -->

...

</section>

The Confluence Import tool can then consistently scrape this information on import, and add the metadata into custom fields.

Summary

Having the metadata presented in Confluence exports will allow the CCMS and Confluence initiative to proceed, and guarantee that work implemented now in Confluence import will not need to be re-engineered at a later stage.
Comment 1 Jared MORGAN 2012-06-13 17:06:39 EDT
(In reply to comment #0)
> /login.xhtml
> 
> Challenge
> 
> https://engineering.redhat.com/docs/en-US/Engineering_Content_Services/1/
> html-single/JBoss_Confluence_and_CCMS/index.html
> 
> I need a consistent way of mapping a CCMS topic exported using CS Processor
> to a Confluence <section>.
> 
> Currently, CS Processor includes XML Comments with key CCMS metadata.
> Specifically "Topic ID: nnnn".
> 
> At the moment, I think a lot of this information is manually entered into
> the <section> topic body, which poses maintenance issues and potential user
> error.
> 
> Proposal
> 
> CS Processor removes unwanted XML comments (such as "how to write a topic"),
> but extracts and preserves critical CCMS metadata such as Topic ID, and
> topic type (Concept | Task | Reference) at a minimum. This information is
> included as discreet XML comments at the top of the exported <section>.
> 
> For example:
> 
> <section>
> <!-- Topic ID: nnnn -->
> <!-- Content Type: [Concept | Task | Reference] -->
> 
> ...
> 
> </section>

==NEW PROPOSAL==

=Background=

After testing the XML Scraping capabilities of Confluence, Vlastimil discovered that scraping XML comments is not handled in his toolchain.

He discovered that the XML attribute "remap" could be mapped consistently in the import process. The remap attribute is a valid DocBook 4.5 attribute for <section> elements. I tested this attribute and it does not break Publican builds.

=Request=

When CSProcessor exports DocBook XML, the topic ID is put inside a remap attribute on the <section> element.

For example:

<section id="Install_OpenJDK_on_Red_Hat_Enterprise_Linux" remap="Topic ID: 301">
...
</section>

If you wanted to make the string shorter, to something like "TID_301" that would also work. 

Having the string with no spaces would also make converting the attribute to a Confluence "Label" trivial.


> 
> The Confluence Import tool can then consistently scrape this information on
> import, and add the metadata into custom fields.
> 
> Summary
> 
> Having the metadata presented in Confluence exports will allow the CCMS and
> Confluence initiative to proceed, and guarantee that work implemented now in
> Confluence import will not need to be re-engineered at a later stage.
Comment 2 JBoss JIRA Server 2012-06-13 18:17:24 EDT
Jared Morgan <jmorgan@redhat.com> made a comment on jira ORG-1444

I think both suggestions are excellent. 

I tested the remap attribute in Publican builds, and the attribute is "acceptable" according to Publican validation (which it _should_ be).

What I will need to do now is approach the CCMS team and check whether they can insert the Topic ID in the section element when they export.

I have already raised a RFE in Bugzilla regarding this: https://bugzilla.redhat.com/show_bug.cgi?id=831000. I have linked this issue to the BZ for tracking.
Comment 3 JBoss JIRA Server 2012-06-14 18:25:53 EDT
Jared Morgan <jmorgan@redhat.com> made a comment on jira ORG-1444

The CS Processor developer has mapped Topic IDs to the remap attribute. It was one line of code in the CS Processor tool :D.

Once he has released the RPM for testing, I'll export the same book and test the import process again.
Comment 4 JBoss JIRA Server 2012-06-15 08:04:53 EDT
Vlastimil Eliáš <velias@redhat.com> made a comment on jira ORG-1444

Great, I'll implement use of {{remap}} attribute during DocBook import into confluence and then install it to the Staging for tests. 
Do you know what exactly will be stored in this field so I can convert it to the page label properly?
"TID_301" or "Topic ID: 301"?
Comment 5 Lee Newson 2012-06-17 17:01:24 EDT
Added and I'll add a release number when I do the next build.

I've added the Topic ID's into each section using the remap attribute. After talking to Jared I've implemented the format as: TID_<TOPIC ID> where <TOPIC ID> is the numerical id for the topic.
Comment 6 Lee Newson 2012-06-18 22:10:15 EDT
Released in version 0.24.8.
Comment 7 JBoss JIRA Server 2012-06-20 06:59:22 EDT
Vlastimil Eliáš <velias@redhat.com> updated the status of jira ORG-1444 to Coding In Progress
Comment 8 JBoss JIRA Server 2012-06-20 08:37:16 EDT
Vlastimil Eliáš <velias@redhat.com> updated the status of jira ORG-1444 to Resolved
Comment 9 JBoss JIRA Server 2012-06-20 08:37:16 EDT
Vlastimil Eliáš <velias@redhat.com> made a comment on jira ORG-1444

remap attribute import implemented in "DocBook Import for Confluence" 1.1.2

This version is now installed in STAGING environment for testing purposes.
There is one page with label from testing import
https://docs-stg.jboss.org/author/display/ACTS/TreeCache+Basics
Comment 10 JBoss JIRA Server 2012-06-29 08:13:04 EDT
Vlastimil Eliáš <velias@redhat.com> updated the status of jira ORG-1444 to Closed

Note You need to log in before you can comment on or make changes to this bug.