Closed Bug 108926 Opened 23 years ago Closed 23 years ago

It would be nice to have a %current_user% variable to make queries more re-useable.

Categories

(Bugzilla :: Query/Bug List, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 41651

People

(Reporter: benj, Assigned: endico)

Details

I would like to create a query which i can share with my colleagues, that filters on each of our active bugs for the current milestone. The %version% variable is what made me think of it. This could be done by supporting a %current_user% in the Email fields of the query page, then I could create a query that filters on the current milestone, use the %current_user% field as an 'Assigned To' email address, and put a link to this query on the front page, or the footer, so all engineers could use it for their own queries. Similar to the 'My bugs' query, but with the ability to create as many 'my bugs' style queries as I wanted to. It would also be nice to have %current_milestone%, and %current_version% fields, but those could get more complex, if you wanted to support these across different products.
here is a client side javascript way to do it, since I don't know perl, for anyone who is interested in doing this, this code may give you some ideas. (I put it in my footer) <SCRIPT> function getCookie(sCookie) { var sName = sCookie.toLowerCase() + "="; if (document.cookie.length > 0) { var sCookies = (document.cookie).toLowerCase(); var offset = sCookies.indexOf(sName); if (offset != -1) { offset += sName.length; var end = sCookies.indexOf(";", offset); if (end == -1) { end = sCookies.length; } return (sCookies.substring(offset, end)); } } return null; } var sEmail = getCookie( "Bugzilla_login" ); var sCurrentMilestone = "Bugzilla 2.18"; var sURLBase = "http://bugzilla.mozilla.org/buglist.cgi?"; document.write("<A HREF=" + sURLBase + "Bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED" + "&target_milestone=" + sCurrentMilestone + "&field0-0-0=assigned_to&type0-0-0=equals" + "&value0-0-0=" + sEmail + "&field0-0-1=reporter&type0-0-1=equals" + "&value0-0-1=" + sEmail + ">My " + sCurrentMilestone + " Bugs</A>"); </SCRIPT>
Any JS solution wouldn't work fully because if you're not logged in and you refer to current_user you'd probably want to get a login. *** This bug has been marked as a duplicate of 41651 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.