Bug 987766 - Revision History date problems
Revision History date problems
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: DocBook-builder (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.2
Assigned To: Lee Newson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 02:50 EDT by Misty Stanley-Jones
Modified: 2014-06-18 03:05 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 19:49:33 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)

  None (edit)
Description Misty Stanley-Jones 2013-07-24 02:50:40 EDT
1. The day abbreviations don't accept all the choices (Thu, Thur, Thurs, Thursday). Not sure if this is easily fixable. It is a very low priority.

2. Multiple revision entries on the same day show up as out of order, even though they are perfectly fine. This is a little bit bigger of a deal.

For more info, view http://docbuilder.usersys.redhat.com/21333/#appe-Induction_Guide-Revision_History.
Comment 1 Lee Newson 2013-07-24 21:26:43 EDT
Had a look into the issue quickly this morning.

1. This doesn't seem to be something Java by default supports at all so to do that we'd possibly have to write our own parser or try and find one that does accept various day abbreviations.

2. It's not the duplicate dates that is the problem here, the problem is the "Mon July 27 2012" date. The Joda DateTime library which is used to parse the date is parsing the date as 23rd of July 2012, which is the main problem since the next date is the 25th of July 2012. I fixed the date up in that topic so that it is "Fri July 27 2012" and it is now working.

So for 1. unless I can find a library to handle that it is something to look at some other time. As for 2. I'll take a look into why it is parsing the date wrong, as the Day of the Week shouldn't be changing the date.
Comment 2 Misty Stanley-Jones 2013-07-24 21:30:51 EDT
Please consider this a low priority as we should be getting the dates correct in the revision history anyway.
Comment 3 Lee Newson 2013-07-28 19:58:05 EDT
Fixed point 2 in csprocessor 0.33.6, as for point 1 though since it's low priority I'll come back to it at a latter stage.
Comment 4 Misty Stanley-Jones 2013-07-28 21:40:48 EDT
How can I test point 2?
Comment 5 Lee Newson 2013-07-28 21:51:01 EDT
Misty if you use any revision history and change the day of the week to something that isn't correct (ie Mon July 26 2013, which is actually a Friday) and then include a revision before that (ie Wed July 24 2013), then the book should build fine. To be sure that it wasn't because of the duplicate dates feel free to include that was well. You can use Content Spec 16913 and Revision History 16906 to test if you want.

example:

<revision>
	<revnumber>0.32.2-0</revnumber>
  <date>Mon July 26 2013</date>
	...
</revision>
<revision>
	<revnumber>0.32.1-0</revnumber>
  <date>Wed July 24 2013</date>
	...
</revision>
<revision>
	<revnumber>0.32.0-0</revnumber>
  <date>Wed July 24 2013</date>
	...
</revision>

I should note that basically the day of the week is ignored now in a similar way to how publican handles it.
Comment 6 Lee Newson 2013-10-01 01:09:16 EDT
I've updated the builder to try and sanitise the Day name so that it can be successfully parsed by the Java libraries when a medium length day abbreviation is used. This will likely need to be improved as more combinations are found. Currently I've allowed for:

Tues
Thur
Thurs
Comment 8 Matthew Casperson 2013-10-15 00:25:46 EDT
"Thurs" does not work:

This topic has invalid Docbook XML. Invalid revision, the date "Thurs Oct 10 2013" is not in a valid format.

"Thur" and "Tues" work as advertised.
Comment 9 Lee Newson 2013-10-15 01:01:08 EDT
Fixed the problem in csprocessor 1.2-SNAPSHOT build 201310151455.

The problem was caused by replacing "Thur" before "Thurs" which meant "Thurs" became "Thus" and therefore wasn't replaced.
Comment 10 Matthew Casperson 2013-10-15 20:44:07 EDT
Confirmed that Japanese spec 13879 builds with an instance of "Thurs" in the revision history.

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