Bug 1014434
Summary: | Revision History chronological order test is buggy (and error is misleading) | ||
---|---|---|---|
Product: | [Community] PressGang CCMS | Reporter: | Ruediger Landmann <rlandman> |
Component: | CCMS-Core | Assignee: | Lee Newson <lnewson> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 1.1 | CC: | lnewson, mcaspers |
Target Milestone: | --- | ||
Target Release: | 1.2 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-17 23:45:51 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: | |||
Bug Blocks: | 1012194, 1019027 |
Description
Ruediger Landmann
2013-10-02 02:24:21 UTC
Fixed in csprocessor 1.2-SNAPSHOT, build 201310121509 The problem here is due to the parser using lenient parsing and matching the wrong date format for the "2012-07-22" date. It was parsing this as something in the year 189, which makes the error message have meaning. As such I've reverted the lenient parsing to strict parsing. The downside to this means that the day name will be validated as well, but it doesn't make sense to allow something like "Fri May 28 2013" anyway (that date is actually a Tuesday). As for PressGang formatting the date format that would be fairly trivial to do, but I think it'd be best to file an RFE of it's own for that. I'm going to assume that date parsing done by Publican uses something like http://search.cpan.org/~gbarr/TimeDate-2.30/lib/Date/Parse.pm. If that is the case then there are examples of time formats that would be recognised by Publican and not by PressGang. I tested a couple of the example dates (http://search.cpan.org/~gbarr/TimeDate-2.30/lib/Date/Parse.pm#EXAMPLE_DATES) listed, and 2013:08:21T09:08:17.1823213 and 15 Aug 13 22:28:20 PST are examples of dates that PG doesn't recognise (although there would be more). I don't think time spent matching Perl date parsing rules is well spent. PG should suggest (if not enforce) a standard date format that becomes part of the style guide. As for the specific dates mentioned in the bugs, I can confirm that PG will not allow incorrect day names in the date. e.g. ERROR: This topic has invalid Docbook XML. Invalid revision, the name of the day specified in "Wed Oct 9 2010" doesn't match the date. I can also confirm that dates in the format 2013-10-22 and Wed Oct 9 2013 are correctly parsed. Tested dates not correctly ordered, and got the expected error: ERROR: This topic has invalid Docbook XML. The revisions in the Revision History are not in descending chronological order, starting from "Wed Oct 9 2013". See https://bugzilla.redhat.com/show_bug.cgi?id=1019027 for the editor enhancements RFE. |