Bug 980690 - RFE: Add validation for BZ link specs
Summary: RFE: Add validation for BZ link specs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.2
Assignee: Lee Newson
QA Contact: belong
URL:
Whiteboard:
Depends On: 1005623
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 03:26 UTC by belong
Modified: 2013-10-17 23:50 UTC (History)
2 users (show)

Fixed In Version: 1.0.0
Clone Of:
Environment:
Last Closed: 2013-10-17 23:50:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1020560 0 unspecified CLOSED RFE: Do bug link validation before downloading all the topics 2021-02-22 00:41:40 UTC

Internal Links: 1020560

Description belong 2013-07-03 03:26:47 UTC
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 04:39:38 UTC
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-30 01:48:00 UTC
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-09 01:59:46 UTC
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-09 02:20:41 UTC
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 06:41:12 UTC
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 04:38:38 UTC
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 22:35:47 UTC
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.