Closed
Bug 1139992
Opened 10 years ago
Closed 7 years ago
Dashboard doesnt pick up attachment flagged bugs
Categories
(Firefox OS Graveyard :: Gaia::Bugzilla Lite, defect)
Firefox OS Graveyard
Gaia::Bugzilla Lite
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: daleharvey, Unassigned)
References
Details
No description provided.
Reporter | ||
Comment 1•10 years ago
|
||
This is a question about the bugzilla API, I want to basically recreate the dashboard as shown by bugzilla default, currently making a request like ... (the params just turn into url params)
this.app.bugzilla.searchBugs({
j_top: 'OR',
f1:'assigned_to',
f2:'requestees.login_name',
f3:'setters.login_name',
v1: this.app.user.name,
v2: this.app.user.name,
v3: this.app.user.name,
o1: 'equals',
o2: 'equals',
o3: 'equals',
order: 'Last Changed',
resolution: '---',
query_format: 'advanced',
include_fields: 'summary,id,assigned_to,flags,last_change_time'
});
It doesnt necessarily need to be a single request, since assigned bugs are only open and flagged bugs covers closed ones it seems like it would need at least 2 requests, but I cant figure out how to search for bugs where an attachment incudes a review flag for a particular user. Byron you have any idea about this?
Assignee: nobody → dale
Flags: needinfo?(glob)
unfortunately a limitation of bugzilla's search is you cannot apply multiple criteria to related fields... ie. bugzilla doesn't know that a "flag name" and "flag requestee" can apply to the same object.
the closest you can get is right now is to search for bugs which have a "review" flag, and which have a user as a "requestee". there will be false positives for bugs where, for example, that user is the requestee for a feedback and there's another review flag.
https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status&f1=flagtypes.name&f2=requestees.login_name&o1=substring&o2=equals&resolution=---&v1=review&v2=glob%40mozilla.com
we already have a custom api for dealing with review requests:
https://bugzilla.mozilla.org/rest/review/flag_activity/requestee/glob@mozilla.com?type_name=review
however this always returns all flag, not ones that are currently waiting.
looking at this it's trivial to implement status filtering, and i've filed bug 1140234.
Flags: needinfo?(glob)
See Also: → 1140234
Reporter | ||
Comment 3•10 years ago
|
||
> unfortunately a limitation of bugzilla's search is you cannot apply multiple criteria to
> related fields... ie. bugzilla doesn't know that a "flag name" and "flag requestee"
> can apply to the same object.
Sorry I confused this by saying review flags, I meant as is implemented by Bugzilla's "My Dashboard" I want any flags requested for and by a user
https://bugzilla.mozilla.org/bzapi/bug?j_top=OR&f1=assigned_to&f2=requestees.login_name&f3=setters.login_name&v1=dale%40arandomurl.com&v2=dale%40arandomurl.com&v3=dale%40arandomurl.com&o1=equals&o2=equals&o3=equals&order=Last%20Changed&query_format=advanced&include_fields=summary%2Cid%2Cassigned_to%2Cflags%2Clast_change_time
Is close for me but misses anything where the request is on a patch and not on the bug itself (https://bugzilla.mozilla.org/show_bug.cgi?id=1131338 and https://bugzilla.mozilla.org/show_bug.cgi?id=1139239)
> https://bugzilla.mozilla.org/rest/review/flag_activity/requestee/glob@mozilla.com?type_name=review
I would need the corresponding /requester/ which doesnt look like it exists.
Sorry I think my wording previously was bad, I am basically asking what queries would let me rebuild bugzillas 'My Dashboard' view, thanks for the help
Flags: needinfo?(glob)
(In reply to Dale Harvey (:daleharvey) from comment #3)
> > unfortunately a limitation of bugzilla's search is you cannot apply multiple criteria to
> > related fields... ie. bugzilla doesn't know that a "flag name" and "flag requestee"
> > can apply to the same object.
>
> Sorry I confused this by saying review flags, I meant as is implemented by
> Bugzilla's "My Dashboard" I want any flags requested for and by a user
unfortunately that doesn't alter my response - bugzilla's search doesn't allow you construct a query that would satisfy your requirements :(
> https://bugzilla.mozilla.org/bzapi/bug?j_top=OR&..
for new work you should be using bugzilla's native rest api, not the deprecated bzapi.
https://wiki.mozilla.org/BMO/REST
> > https://bugzilla.mozilla.org/rest/review/flag_activity/requestee/glob@mozilla.com?type_name=review
> I would need the corresponding /requester/ which doesnt look like it exists.
"setter":
https://bugzilla.mozilla.org/rest/review/flag_activity/setter/glob@mozilla.com
extending search to do what you want is bug 677757, however this isn't an easy issue to fix within the search code. i worked on a sub-set on this (allow grouping of queries when searching the same field) in bug 780820 -- that took me about 6 months of solid work to implement.
> i am basically asking what queries would let me rebuild bugzillas 'My Dashboard' view
http://fitzgen.github.io/bugzilla-todos/ (https://github.com/fitzgen/bugzilla-todos) may be useful.
Flags: needinfo?(glob)
Reporter | ||
Comment 5•10 years ago
|
||
> http://fitzgen.github.io/bugzilla-todos/
Also misses out attachment flags, as does bzdeck.
This seems like a fairly large hole in the API since the Dashboard is the main entry point to bugzilla, https://bugzilla.mozilla.org/show_bug.cgi?id=677757 hasnt had much progress in 2 years.
> for new work you should be using bugzilla's native rest api
Switched cheers
(In reply to Dale Harvey (:daleharvey) from comment #5)
> This seems like a fairly large hole in the API
agreed. i've added this to our agenda for this week's team meeting; i'll see if there's any quick-wins we can do here.
Reporter | ||
Comment 7•10 years ago
|
||
Awesome, thanks a lot
Reporter | ||
Updated•10 years ago
|
Component: Gaia::Feedback → Bugzilla Lite
Reporter | ||
Comment 8•10 years ago
|
||
Hey Byron
This will get very high on my wishlist shortly, I have subscribed to the developer list and will get a dev setup locally. Where I am looking for new features from the bugzilla API I can hopefully try helping out and add those new features.
Should I send out a developer@ email asking for suggestions on possible quick wins for adding this feature or do you have any pointers?
Thanks a lot
Comment 10•10 years ago
|
||
i _did_ raise this in our bteam meeting and it was a contender as a q2 goal. while it isn't an official goal, it's something that i'm keen to see happening early in the quarter.
> [..] I can hopefully try helping out and add those new features.
excellent! it's interesting times for the API; we're in the middle of an overhaul of how we version our api (currently there's no versioning), and we're on the cusp of starting work on a new much more restful api, as the current one started life as an xmlrpc interface and is clearly showing its non-restful origins.
> Should I send out a developer@ email asking for suggestions on possible
> quick wins for adding this feature or do you have any pointers?
probably the quickest-winest way to approach this would be add a new Flag package to webservices with methods for initially searching for flags by grouped criteria (eg. flag name + requestee, or flag type + status + setter).
implementation-wise this involves creating a Bugzilla::WebService::Flag package similar to Bugzilla::WebService::FlagType.
the best place to start would be to file a bug (in bugzilla::webservice) with a outline of your requirements -- what you need to query on, and what need back, etc. if you aren't scared off by the required work i'm happy to mentor you.
Flags: needinfo?(glob)
Reporter | ||
Comment 11•10 years ago
|
||
Thanks for the help, should get to this soon but other people are looking to help out and not working on this at this moment so unassigning
Assignee: dale → nobody
Updated•9 years ago
|
Blocks: 2.5_BugzillaLite
Reporter | ||
Comment 12•9 years ago
|
||
So talked about this with Dylan and he says they can expose the rpc that the dashboard uses over the rest api so we can use the same code. No rush but adding needinfo so you remember, cheers Dylan
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(dylan)
Reporter | ||
Comment 13•9 years ago
|
||
So talked about this with Dylan and he says they can expose the rpc that the dashboard uses over the rest api so we can use the same code. No rush but adding needinfo so you remember, cheers Dylan
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(dylan)
Reporter | ||
Comment 14•9 years ago
|
||
err sorry I guess I need to fix double posting :)
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(dylan)
Reporter | ||
Comment 15•9 years ago
|
||
readding
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(dylan)
Updated•8 years ago
|
Flags: needinfo?(dylan)
Comment 16•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•