Bug 980690 - RFE: Add validation for BZ link specs
RFE: Add validation for BZ link specs
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity medium
: ---
: 1.2
Assigned To: Lee Newson
belong
: FutureFeature
Depends On: 1005623
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-02 23:26 EDT by belong
Modified: 2013-10-17 19:50 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.0.0
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 19:50:00 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 belong 2013-07-02 23:26:47 EDT
Description of problem:

Currently the values given in content specs for BZ links are not validated.

Steps to Reproduce:
1. Create a content spec with -> BZKEYWORDS = "Documentation"
2. Generate book from content spec
3. Click on "Report a bug"
4. Fill out form and click "Submit Bug"

Actual results:
An error is reported - it doesn't recognize the keyword "Documentation" with the quotes.

Expected results:
It would be helpful if CSProcessor could validate the syntax of the value for BZKEYWORDS and potentially all BZ link specs. Otherwise I have to do a full test of the "Report a bug" link for every book I create to validate that the links work correctly. It would be incredibly annoying for reviewers and customers if the "Report a bug" link fails half way through submitting one.
Comment 1 Lee Newson 2013-07-03 00:39:38 EDT
Verified that this is possible using the Bugzilla XMLRPC interface.

The relevant methods are:

Keywords: https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#fields
Product/Component/Version: https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Product.html#get
Comment 2 Lee Newson 2013-08-29 21:48:00 EDT
Added in 1.0.0.

The csprocessor will now validate all the Bugzilla options against the server. I've also added the "BZServer" metadata attribute in case you want to use a Bugzilla server that isn't Red Hat's.

The options when validated, will produce warnings if the content cannot be found (to allow for maintenances or other network related problems). Upon building if the elements can't be found then a build error will be thrown.
Comment 3 belong 2013-09-08 21:59:46 EDT
Verified locally using: csprocessor validate <file>

However, it still does not work using: csprocessor preview <id>.

Suspect this is due to the PressGang server being blocked from the BZ server??
Comment 4 Lee Newson 2013-09-08 22:20:41 EDT
The validation on the server is due to the server being blocked. We will implement a mechanism to use the teiid database that is preferred when connecting an to the Red Hat instance internally.

As for the build/assemble/preview. That is reproducible and is caused a new feture we added late last week where it would not revalidate if it was validated recently, however that rule shouldn't apply for builds (setting it to assigned for that reason).
Comment 5 Lee Newson 2013-10-09 02:41:12 EDT
Fixed in 1.2-SNAPSHOT, Build 201310091629

When building the content spec it will always do bug link validation unless the "--skip-bug-link-validation" option is used.
Comment 7 Matthew Casperson 2013-10-15 00:38:38 EDT
Confirmed that invalid Bugzilla products, components and versions cause validation errors when trying to build the book. Also confirmed that --skip-bug-link-validation will allow the books to be built.

My only suggestion is that the validation be done at the start of the build, instead of at the end. Otherwise you can spend a minute or so waiting for a large spec to download and build only to find out that the bugzilla details were incorrect.
Comment 10 Lee Newson 2013-10-17 18:35:47 EDT
Moving this to RELEASE_PENDING and created BZ#1020560 as the RFE to handle what mentioned in comment #7.

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