Open Bug 103866 Opened 23 years ago Updated 4 years ago

query on bugs not depending on un-fixed bugs

Categories

(Bugzilla :: Query/Bug List, enhancement, P3)

2.15
enhancement

Tracking

()

People

(Reporter: aha, Assigned: rkarabut)

References

Details

Attachments

(1 file, 3 obsolete files)

I wanna have way to filter bug list for bugs, which depends only on
resolved/verified/closed bugs or which doesn't depend on any bug (by other
words: on bugs not blocked by dependencies). 

Inverted query is also useful.
This is kind of bug #8527, except statuses should be customisable (bug #101179),
and moving to ASLEEP might not be automatic.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.20
[RFE] is deprecated in favor of severity: enhancement.  They have the same meaning.
Severity: normal → enhancement
Summary: [RFE] query on bugs not depending on un-fixed bugs → query on bugs not depending on un-fixed bugs
*** Bug 158952 has been marked as a duplicate of this bug. ***
*** Bug 168803 has been marked as a duplicate of this bug. ***
Assignee: endico → nobody
Bugzilla 2.20 feature set is now frozen as of 15 Sept 2004.  Anything flagged
enhancement that hasn't already landed is being pushed out.  If this bug is
otherwise ready to land, we'll handle it on a case-by-case basis, please set the
blocking2.20 flag to '?' if you think it qualifies.
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
*** Bug 252461 has been marked as a duplicate of this bug. ***
Blocks: 16743
The trunk is now frozen to prepare Bugzilla 2.22. Only bug fixes are accepted, no enhancement bugs. As this bug has a pretty low activity (especially from the assignee), it's retargetted to ---. If you want to work on it and you think you can have it fixed for 2.24, please retarget it accordingly (to 2.24).
Target Milestone: Bugzilla 2.22 → ---
QA Contact: mattyt-bugzilla → default-qa
I hacked up a mod to my own 2.22, one without a UI yet.  FYI, the hack is in attachment 249426 [details] [diff] [review], and a good idea for the UI may be obtained from attachment 233044 [details] [diff] [review] .  Works well for me, and well enough so that I can use a given dep tree for a particular ticket to plan my work.  Sorry for the spam.
Assignee: nobody → query-and-buglist
SQL query, returning ids of bugs, DEPENDING on non-fixed bugs, looks like this:

select blocked from dependencies join bugs on (dependencies.dependson = bugs.bug_id) where resolution = '' group by blocked;

so if we want to query on bugs, NOT depending on non-fixed bugs, we should add to the WHERE clause something like this:

WHERE ... AND bug_id not in (select blocked from dependencies join bugs on (dependencies.dependson = bugs.bug_id) where resolution = '' group by blocked) ...

I have to point, that we need to check, if a bug id is not in this list. We cannot revert any of other logical condition in order to eliminate subquery, because of bugs, not depending on other bugs at all. So its ids are not in 'dependencies' table at all.

Unfortunately, my perl experience is not good enough to write a whole patch to resolve this bug, but if this (tested and actually worked on my bugzilla installation) sql query will be helpful to someone with more strong perl skills than mine - it will be fine.
Attached patch bugzilla-4.5.6-blocked.patch (obsolete) — Splinter Review
Proposed patch
Attachment #8532912 - Flags: review?(gerv)
Hi Fedor,

Thanks for the patch! I think the question here is whether this ability is widely useful enough to justify the added complexity in the search UI. So we may have to have a discussion about that first.

glob: what's your view?

Gerv
(In reply to Gervase Markham [:gerv] from comment #16)
> Hi Fedor,
> 
> Thanks for the patch! I think the question here is whether this ability is
> widely useful enough to justify the added complexity in the search UI. So we
> may have to have a discussion about that first.
> 
> glob: what's your view?
> 
> Gerv

Hello there,

Actual author of the patch here. Frankly, I feel the same way about UI changes and I think it could be done in a way better corresponding with overall interface structure (I couldn't find a reasonable template for radio buttons while I was working on this, and I kinda like radio buttons). Also, the way it's done now there's a minor oversight with radio not responding to the request params. Feel free to make suggestions, I will try to address them this week. Maybe a single-choice select next to the Resolution box would do?
And yeah, we could of course just dispose of the search template changes entirely. I don't think they are really needed that often, people who gonna use this feature could just use the custom search.
Adding the blocked_somewhere field without any UI changes and corresponding helpers. The field could be used in custom search by people who actually need this.
Attachment #8533334 - Flags: review?(gerv)
Attachment #8532912 - Flags: review?(gerv) → review-
Attachment #8532912 - Flags: review-
Comment on attachment 8533334 [details] [diff] [review]
Adding the blocked_somewhere field without any UI changes and corresponding helpers

Again, thanks for the patch :-) But I'm not the right person to review this. I don't know this code well. Also, I don't know if SQL subselects are supported across all our DBs, and whether you have to use special $dbh calls for them.

I'm not sure about "Blocked Somewhere" - it isn't immediately clear to me what that means.

LpSolit might know the right things to review this...

Gerv
Attachment #8533334 - Flags: review?(gerv) → review?(LpSolit)
Comment on attachment 8533334 [details] [diff] [review]
Adding the blocked_somewhere field without any UI changes and corresponding helpers

I will let glob review this, but I really don't like 'Blocked Somewhere'. This means nothing to me. 'Depends on an open bug' or something similar would be clearer IMHO.
Attachment #8533334 - Flags: review?(LpSolit) → review?(glob)
(In reply to Frédéric Buclin from comment #21)
> Comment on attachment 8533334 [details] [diff] [review]
> Adding the blocked_somewhere field without any UI changes and corresponding
> helpers
> 
> I will let glob review this, but I really don't like 'Blocked Somewhere'.
> This means nothing to me. 'Depends on an open bug' or something similar
> would be clearer IMHO.

Sure. I'm not too keen on it myself, that's just a name I slapped on it in working phase. But 'depends on an open bug' doesn't really tell what it does clearly enough too, I guess, because it doesn't directly imply a nested dependency. Any ideas?
(In reply to Gervase Markham [:gerv] from comment #20)
> Comment on attachment 8533334 [details] [diff] [review]

> I don't know this code well. Also, I don't know if SQL subselects are
> supported across all our DBs, and whether you have to use special $dbh calls
> for them.

Well, I have to assume they are, because there's a similar CASE for percentage_complete right above mine.
Attached patch 103866-2.patch (obsolete) — Splinter Review
New custom search field will be used mainly with "is empty" and "is not empty" logical operators.
So I suggest an "Unresolved dependencies list" as a name, for a whole phrases "Unresolved dependencies list is empty" and "Unresolved dependencies list is not empty" with an obvious meaning.

Do we need to rename all internal stuff in patch accordingly? Subs and Vars I mean. If yes, I will do.
Attachment #8532912 - Attachment is obsolete: true
Attachment #8542004 - Flags: review?(LpSolit)
Attachment #8542004 - Flags: review?(LpSolit) → review?(glob)
Assignee: query-and-buglist → rkarabut
Comment on attachment 8542004 [details] [diff] [review]
103866-2.patch

fedor, thanks for this patch, however to avoid confusion it's probably better if ratmir continued to work on this patch and provide required updates.

i hope to be able to review ratmir's patch soon.
Attachment #8542004 - Flags: review?(glob)
Hi, just checking in; I'm waiting for the review and suggestions on proper naming.
(In reply to Byron Jones ‹:glob› from comment #25)
> fedor, thanks for this patch, however to avoid confusion it's probably
> better if ratmir continued to work on this patch and provide required
> updates.

To avoid confusion: I'm the person, who personally interested in resolving this bug.
Ratmir are the person with good perl skills, who wrote this patch for me, on my order.

Now my perl skills are good enough to make all patch polishing in order to satisfy any code maintainer and finally to commit this function. So may be it's probably better if my patches will be reviewed too?

> i hope to be able to review ratmir's patch soon.

I hope too ))

And again. If I can do anything for speeding up a successfull patch commiting - just say, I will do :)
ratmir, are you ok with fedor taking over this bug?
Flags: needinfo?(rkarabut)
(In reply to Byron Jones ‹:glob› from comment #28)
> ratmir, are you ok with fedor taking over this bug?

Sure, though I fail to see any particular reason for that. I'm around
Flags: needinfo?(rkarabut)
So, we have a 3 month old patch for 14 years old bug, that works perfectly well in my bugzilla installation.
We have one good developer and another one not so good. They are ready to work on this bug, if this patch makes any questions.
And I have absolutely no ideas what can I do to help this bug comes to FIXED state.
Byron, please, tell me directly, what are we waiting for right now?
Flags: needinfo?(glob)
(In reply to Fedor Ezeev from comment #30)
> Byron, please, tell me directly, what are we waiting for right now?

for me to find the time to review this.

this isn't a high priority bug and reviewing changes to search generally take a while so i need to put aside a reasonable chunk of my day.  just because something works for you doesn't mean it'll work on all our supported databases and version, nor does it mean that it's the most efficient sql query (meaning on large sites it may be unreasonably slow).
Flags: needinfo?(glob)
Attachment #8533334 - Flags: review?(glob) → review?(justdave)
Attachment #8533334 - Flags: review?(justdave)
:sigh:  trying to clean up loose stuff sitting around, hate that this sat here for 3 years, I haven't been paying attention much to my review queue (there hasn't been much in it and I haven't been directly involved in the code part of Bugzilla in a while).  Anyhow, neither of these patches will apply to the current code base, all but one chunk fails.

I did update the patch for the current code, it mostly got nailed by other fields getting added in the same spot. :)
Attached file Github Pull Request
Moving the patch to Github
Attachment #8533334 - Attachment is obsolete: true
Attachment #8542004 - Attachment is obsolete: true

Any news?
Can I do something to help push this code to any release?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: