Closed
Bug 284446
Opened 20 years ago
Closed 20 years ago
Requesting Hooks for Test Runner
Categories
(Bugzilla :: User Interface, enhancement)
Bugzilla
User Interface
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: ed.fuentetaja, Assigned: myk)
Details
Attachments
(3 files, 1 obsolete file)
|
8.78 KB,
text/plain
|
Details | |
|
4.23 KB,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
|
639 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
This is to request several "hooks" in Bugzilla's templates to allow for an
easier integration of Test Runner with Bugzilla. Test Runner is an add-on that
let users manage test plans, test cases and their results. It has been around
for some years. Visit http://sourceforge.net/projects/testrunner/ for more info.
So far I have a patch that modifies a few Bugzilla files, but the hook mechanism
is a great idea and I would like to take advantage of it.
Next is the list of places where hooks would be needed. Line numbers are
referred to Bugzilla 2.18 stable release. I'm also copying a couple of lines
before and after, in hope it'll help you pinpoint the spot.
Please let me know if you have any questions or comments. Keep up the good work!
-----------------------------------------------------------------------------------------
bug/create/create.html.tmpl, line 340
</table>
<input type="hidden" name="form_name" value="enter_bug">
<<----- I'd like to add here a link back to Test Runner in case the user reached
this page through a Test Runner page ----->>
</form>
-----------------------------------------------------------------------------------------
global/footer.html.tmpl, line 163
<a href="show_activity.cgi?id=[% bug.bug_id %]">View [% terms.Bug %]
Activity</a>
|
<a href="long_list.cgi?buglist=[% bug.bug_id %]">Format For Printing</a>
<<----- I'd like to add here a link to Test Runner to let the use get the list
of test cases that reported this bug ----->>
</b>
</font>
-----------------------------------------------------------------------------------------
bug/process/results.html.tmpl, line 56
<td>
<a href="show_bug.cgi?id=[% id %]">Back To [% terms.Bug %]# [% id %]</a>
</td>
<<----- I'd like to add here a link back to Test Runner in case the user reached
this page through a Test Runner page ----->>
</tr>
</table>
-----------------------------------------------------------------------------------------
global/useful-links.html.tmpl, line 111
[% END %]
</div>
</div>
<<----- I'd like to add here some useful links to Test Runner ----->>
</div>
</form>
-----------------------------------------------------------------------------------------
index.html.tmpl, line: 85
<a href="quicksearch.html">[Help]</a>
</p>
</form>
<<----- I'd like to add here some useful links to Test Runner ----->>
</td>
<td align="right"><img src="ant.jpg" width="329" height="220" border="2"
alt="ant.jpg [8.5k]"></td>
</tr></table>
-----------------------------------------------------------------------------------------
list/list.html.tmpl, line 156
<a href="mailto:
[% bugowners FILTER html %]">Send Mail to [%
terms.Bug %] Owners</a> |
[% END %]
<<----- I'd like to add here a link to Test Runner to let the user create
regresion tests from this list of bugs ----->>
</td>
[% END %]
Reproducible: Always
| Reporter | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
Although review isn't required for hooks, I'd like a second opinion on the
names and locations of these. Gerv, can you take a look and let me know what
you think? Ed, these hooks are all essentially in the places you requested,
although I made a few changes:
* the bug creation form hook appears after the form, since there's no
logical connection between the content you want to add and the form
on the page;
* the hook we're adding so you can add a link to test cases that reported
this bug is in bug/knob.html.tmpl rather than global/footer.html.tmpl;
* the hook on the bug change results page is within the TD tag that says
"Back to Bug #nnn" rather than after that tag so that you don't have
to include TD tags around your link and we can reorganize the page
later and stop using a table for formatting without breaking your hook;
* the home page hook is within the list, which is where all the other
"things you can do from here" links are located.
Attachment #177092 -
Flags: review?(gerv)
| Assignee | ||
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•20 years ago
|
||
Comment on attachment 177092 [details] [diff] [review]
patch v1: tentative locations and names of hooks
r=gerv, although I think each hook should be accompanied by a small comment
explaining its semantics, so it can be put in the right place if the template
gets reorganised.
E.g.
+ [%# Additional links appended to the end of the front page list of actions %]
+ [% Hook.process("links") %]
Gerv
Attachment #177092 -
Flags: review?(gerv) → review+
| Assignee | ||
Comment 4•20 years ago
|
||
Here's a version with comments that say what kind of content is being hooked
into the template (f.e. "links" or "sections of links") and its purpose (f.e.
"more things users can do with this installation").
Attachment #177092 -
Attachment is obsolete: true
Attachment #177502 -
Flags: review?(gerv)
Comment 5•20 years ago
|
||
Comment on attachment 177502 [details] [diff] [review]
patch v2: adds comments explaining hooks' purpose
r=gerv.
Gerv
Attachment #177502 -
Flags: review?(gerv) → review+
| Assignee | ||
Comment 6•20 years ago
|
||
Thanks Gerv.
Checking in template/en/default/index.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/index.html.tmpl,v <--
index.html.tmpl
new revision: 1.21; previous revision: 1.20
done
Checking in template/en/default/bug/knob.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/knob.html.tmpl,v <--
knob.html.tmpl
new revision: 1.16; previous revision: 1.15
done
Checking in template/en/default/bug/create/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v
<-- create.html.tmpl
new revision: 1.48; previous revision: 1.47
done
Checking in template/en/default/bug/process/results.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/process/results.html.tmpl,v
<-- results.html.tmpl
new revision: 1.8; previous revision: 1.7
done
Checking in template/en/default/global/useful-links.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl,v
<-- useful-links.html.tmpl
new revision: 1.37; previous revision: 1.36
done
Checking in template/en/default/list/list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v
<-- list.html.tmpl
new revision: 1.35; previous revision: 1.34
done
Status: NEW → RESOLVED
Closed: 20 years ago
Flags: approval+
Resolution: --- → FIXED
| Reporter | ||
Comment 7•20 years ago
|
||
Thanks for your interest. Everything is alright with me, but for one item. I'm
gonna answer now Myk at comment #1:
>the bug creation form hook appears after the form, since there's no
>logical connection between the content you want to add and the form
>on the page;
This is not going to work. I add inside the form a hidden input field. I use
this field to keep the test case log id value between calls. This page might be
called from Test Runner, if that's teh case I'd like to be able to return to the
same test case log id I come from. In addition to this I also need to patch the
file enter_bug.cgi to make it send the test case log id to the template, to fill
up this hidden input field.
So this is why I'd need the hook _inside_ the form. I understand this is not
very clean. There might be other solutions for this problem...
>the hook we're adding so you can add a link to test cases that reported
>this bug is in bug/knob.html.tmpl rather than global/footer.html.tmpl;
Yes, you are right. I copied the wrong template nmae.
>the hook on the bug change results page is within the TD tag that says
>"Back to Bug #nnn" rather than after that tag so that you don't have
>to include TD tags around your link and we can reorganize the page
>later and stop using a table for formatting without breaking your hook;
Alright, no problem.
>the home page hook is within the list, which is where all the other
>"things you can do from here" links are located.
Fine.
Thanks a lot again!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 8•20 years ago
|
||
> >the bug creation form hook appears after the form, since there's no
> >logical connection between the content you want to add and the form
> >on the page;
>
> This is not going to work. I add inside the form a hidden input field.
Ok, I suspected you might, but you only mentioned the link back to test runner,
for which it didn't seem necessary to be inside the form. I'll create a
followup patch with a hook inside the form. Do you still want to add a link to
the end of the page in addition to the hidden field? If so, I might create a
second hook for the form instead of combining the two into one hook so that
extensions can reuse the hook inside the form to add UI before the "Commit" button.
| Reporter | ||
Comment 9•20 years ago
|
||
Yeah, sorry I didn't make myself clearer.
>Do you still want to add a link to
>the end of the page in addition to the hidden field? If so, I might create a
>second hook for the form instead of combining the two into one hook so that
>extensions can reuse the hook inside the form to add UI before the "Commit"
>button.
Either way would work, but, since you ask, maybe it would be better to have
both. These is how I modify the create.html.tmpl template (from the "Test Runner
patch for Bugzilla 2.18" attachment):
</table>
<input type="hidden" name="form_name" value="enter_bug">
+
+ [% IF tc_log_entry_id %]
+ <input type="hidden" name="tc_log_entry_id" value="[% tc_log_entry_id %]" />
+ [% IF mark_failed %]
+ <input type="hidden" name="mark_failed" value="1" />
+ [% END %]
+ <a href="tr_caselogform.cgi?id=[% tc_log_entry_id %]">Back to test case log
entry.</a>
+ [% END %]
+
</form>
I could put the hidden field inside the form with the first hook and put the
anchor outside the form using the second hook.
Anyway, just one hook inside the form also works for me.
Thanks!
| Assignee | ||
Comment 10•20 years ago
|
||
| Assignee | ||
Comment 11•20 years ago
|
||
Sorry for the delay. I've checked in a hook that lets you add form controls to
the form. Note that you'll have to surround it with some table tags so that it
fits into the table-based layout of the page. I realize that your form field is
a hidden one, but I put the hook at the end of the visible form fields so that
extensions can add both visible and hidden form fields to the form.
Checking in template/en/default/bug/create/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v
<-- create.html.tmpl
new revision: 1.49; previous revision: 1.48
done
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Target Milestone: --- → Bugzilla 2.20
You need to log in
before you can comment on or make changes to this bug.
Description
•