Show bug or label icon on overview if labeled #550
I would like to update documentation and help texts accordingly if someone could provide me a hint where this would be appropriate or how we can add the corresponding user documentation.
Related issue: https://progress.opensuse.org/issues/10212
Tested against production database dump from openqa.opensuse.org, querying with
yields comparable results for before and after change (, e.g. origin/master: 1.7s+0.8s, feature/bug_and_label: 1.8s+0.8s)
As we parse the comments for generating the overview page we can now do some simple parsing and show a "bug" icon if a corresponding reference in a comment has been found or a "label" icon if the keyword "label:" has been used. This way we can show bug references using the convention "<bugtracker_abbreviation>#<bug_id>", e.g. "bsc#1234" or labels in the (not yet) convention "label:<single_word_label>", e.g. "label:false_positive" or "label:broken_test". Priority is as follows: bug > label > any comment. Based on this only one icon is shown not to clutter up the overview page. Currently the behaviour based on multiple bugs or labels found is undefined.
Extract util methods for resolving common bug references to a complete bugurl or an HTML 'a href' tag. Add a helper 'bugurl_for' for use in templates and use this helper within 'test/overview.html.ep' to make the bug icon a link. The use of "OpenQA::Utils" within "OpenQA::WebAPI::Plugin::Helpers" - which does not look like a good "plugin" candidate itself - might be disputable or a candidate for refactoring.