Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

Eiren Smith
Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

Bugzilla 5.0.3.

There's a "Clone This Bug" link in the bottom-right of show_bug.cgi. When I click this link, I always have to choose a Classification and then a Product. For my company's use, I expect us to clone into the same Product 99.9% of the time. So I'd like to add product name to the URL behind that link. (If anyone internally complains, then I'll make this a "Clone This Bug (Same Product)" link later.

MY QUESTION
How can I get the product name of the displayed bug and add that product's name to the Clone This Bug URL? I know what it does to the URL, I just don't know how to extract the product name from the current bug so I can put it in the URL.

NOW
http://our_bugzilla_install.com/enter_bug.cgi?cloned_bug_id=12533

DESIRED
http://our_bugzilla_install.com/enter_bug.cgi?product=ExampleProdName&cloned_bug_id=12533

Thank you!
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

Eiren Smith
Thank you.

I found that particular URL defined in "navigate.html.tmpl". Here:

...\bugzilla\template\en\default\bug\navigate.html.tmpl

Next step is for me to actually make the change.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

Eiren Smith
Solved.

In a new custom\bugs\ copy of navigate.html.tmpl, I made a copy of this entry:

    <li>&nbsp;-&nbsp;<a href="enter_bug.cgi?cloned_bug_id=
                        [% bug.bug_id  FILTER uri %]">Clone This
                        [% terms.Bug %]</a></li>

and changed the copied version to this:

    <li>&nbsp;-&nbsp;<a href="enter_bug.cgi?product=
                        [% bug.product  FILTER uri %]&cloned_bug_id=
                        [% bug.bug_id  FILTER uri %]">Clone This
                        [% terms.Bug %] (
                        [% bug.product  FILTER uri %])</a></li>

That puts a "Clone This Bug (ProductName)" link next to the old "Clone This Bug" link and it has the URL I desire:

http://bugs.axiom-direct.com/enter_bug.cgi?product=Office*cloned_bug_id=12533
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Add Product name of cloned bug to Clone This Bug link so user doesn't have to choose Product manually.

Eiren Smith
In reply to this post by Eiren Smith
Solved.

In a new custom\bugs\ copy of navigate.html.tmpl, I made a copy of this entry:

    <li>&nbsp;-&nbsp;<a href="enter_bug.cgi?cloned_bug_id=
                        [% bug.bug_id  FILTER uri %]">Clone This
                        [% terms.Bug %]</a></li>

and changed the copied version to this:

    <li>&nbsp;-&nbsp;<a href="enter_bug.cgi?product=
                        [% bug.product  FILTER uri %]&cloned_bug_id=
                        [% bug.bug_id  FILTER uri %]">Clone This
                        [% terms.Bug %] (
                        [% bug.product  FILTER uri %])</a></li>

That puts a "Clone This Bug (ProductName)" link next to the old "Clone This Bug" link and it has the URL I desire:

  http://our_bugzilla_install.com/enter_bug.cgi?product=ProductName&cloned_bug_id=12533
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.