Closed
Bug 71790
Opened 24 years ago
Closed 22 years ago
Duplicate resolution field should include bug number of original
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement, P1)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: justdave, Assigned: burnus)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 6 obsolete files)
1.66 KB,
patch
|
bbaetz
:
review+
|
Details | Diff | Splinter Review |
I'm thinking something like this in bug_form.pl:
Status: RESOLVED
Resolution: DUPLICATE (53623)
Where the number in parens is the number of the original bug, clickable, of
course. I thought of this trying to come up with some way to display the
duplicate data from the database in the bug. That data is now saved in the
database, but is not displayed anywhere. We currently have to trust that the
comments are correct to find the original of a duplicate.
Comment 1•24 years ago
|
||
I'm thinking for BZ3 we might want to associate a field with each status. For
example, INVALID might have an invalidation reason, or some such.
This would work the same.
Comment 2•24 years ago
|
||
Apparently we already have this data, so 2.16.
Target Milestone: --- → Bugzilla 2.16
Updated•23 years ago
|
Priority: -- → P2
Comment 3•23 years ago
|
||
->New (old by now?) product Bugzilla
Assignee: tara → endico
Component: Bugzilla → Query/Bug List
Product: Webtools → Bugzilla
Version: other → unspecified
Reporter | ||
Comment 4•23 years ago
|
||
correcting component
Assignee: endico → myk
Component: Query/Bug List → Creating/Changing Bugs
Reporter | ||
Comment 5•23 years ago
|
||
We are currently trying to wrap up Bugzilla 2.16. We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut. Thus this is being retargetted at 2.18. If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
Reporter | ||
Comment 6•23 years ago
|
||
*** Bug 114318 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 7•23 years ago
|
||
*** Bug 120513 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 8•23 years ago
|
||
*** Bug 123737 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 10•22 years ago
|
||
Assignee | ||
Comment 11•22 years ago
|
||
Take bug (note: I'm away the next two weeks).
Assignee: myk → burnus
Assignee | ||
Updated•22 years ago
|
Attachment #116645 -
Flags: review?(bbaetz)
Assignee | ||
Comment 12•22 years ago
|
||
Attachment #116645 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #116646 -
Flags: review?(bbaetz)
Assignee | ||
Updated•22 years ago
|
Attachment #116645 -
Flags: review?(bbaetz)
Comment 13•22 years ago
|
||
Comment on attachment 116646 [details] [diff] [review]
v1.2 - a "==" is not a "eq"
I'd much rather you did this (on demand) in Bug.pm. Also, don't use SendSQL -
use the DBI methods instead.
Attachment #116646 -
Flags: review?(bbaetz) → review-
Assignee | ||
Comment 14•22 years ago
|
||
Attachment #116646 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #119131 -
Flags: review?(bbaetz)
Assignee | ||
Comment 15•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #119131 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #119286 -
Flags: review?(bbaetz)
Assignee | ||
Updated•22 years ago
|
Attachment #116646 -
Flags: review-
Comment 16•22 years ago
|
||
Comment on attachment 119286 [details] [diff] [review]
v2.0.1 Uses $dbh with placeholder (cf. suggestions at developer@)
>Index: Bug.pm
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/Bug.pm,v
>retrieving revision 1.30
>diff -u -r1.30 Bug.pm
>--- Bug.pm 23 Feb 2003 07:31:07 -0000 1.30
>+++ Bug.pm 3 Apr 2003 12:22:34 -0000
>@@ -262,6 +262,22 @@
> return $self;
> }
>
>+sub duplicate_bug_id {
>+ my ($self) = @_;
>+
>+ return $self->{'duplicate_bug_id'} if exists $self->{'duplicate_bug_id'};
>+
>+ if ($self->{'resolution'} eq 'DUPLICATE') {
>+ my $dbh = Bugzilla->dbh;
>+ return $self->{'duplicate_bug_id'} =
>+ $dbh->selectrow_array(q{SELECT dupe_of
>+ FROM duplicates
>+ WHERE dupe = ?},
>+ undef,
>+ $self->{'bug_id'});
>+ }
>+}
If it isn't a duplicate, what should you return? (And should you cache that
result?) Or should you just die?
What happen when process_bug reopens a bug, and then the next bug shows is the
same bug, and the result ends up cached? (I don't know if this matters in our
current process_bug handling, mind you)
>Index: show_bug.cgi
> $vars->{'displayfields'} = \%displayfields;
>+$vars->{'GetBugLink'} = \&GetBugLink;
You don't need this....
>Index: template/en/default/bug/edit.html.tmpl
>+ <td>
>+ [% bug.resolution FILTER html %]
>+ [% IF bug.resolution == "DUPLICATE" %]
>+ [% bug_id = bug.duplicate_bug_id %]
>+ of [% GetBugLink(bug_id,"Bug $bug_id") %]
... because this becomes
[% "Bug $bug_id" FILTER bug_link($bug_id) %]
bug_link is a dynamic filter - it will filter the input text with a link to the
argument bug id.
I suppose it should take a bug object one day, not just the id, and when it
does, duplicate_bug_id can reutrn a bug object. Doesn't matter for now, though.
Attachment #119286 -
Flags: review?(bbaetz) → review-
Assignee | ||
Comment 17•22 years ago
|
||
> What happen when process_bug reopens a bug, and then the next bug shows is
the
> same bug, and the result ends up cached? (I don't know if this matters in our
> current process_bug handling, mind you)
I haven't check this, but I copied the code from the other items
(groups, actual_time, longdescs, user, choices).
I also return now a undef.
Attachment #119286 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #119289 -
Flags: review?(bbaetz)
Comment 18•22 years ago
|
||
Comment on attachment 119289 [details] [diff] [review]
v2.0.2 Use FILTER bug_link("Bug $bug_id") instead
>+sub duplicate_bug_id {
>+ my ($self) = @_;
>+
>+ return $self->{'duplicate_bug_id'} if exists $self->{'duplicate_bug_id'};
>+
>+ if ($self->{'resolution'} eq 'DUPLICATE') {
>+ my $dbh = Bugzilla->dbh;
>+ return $self->{'duplicate_bug_id'} =
>+ $dbh->selectrow_array(q{SELECT dupe_of
>+ FROM duplicates
>+ WHERE dupe = ?},
>+ undef,
>+ $self->{'bug_id'});
>+ }
>+ return undef;
>+}
That embedded return() is really obscure; it looks like this function just
returns undef. Consider using a local variable, initialised to undef anf set
inside the if test, for clarity.
You can also probably call it dup_id instead of duplicate_bug_id :-)
>- <td>[% bug.resolution FILTER html %]</td>
>+ <td>
>+ [% bug.resolution FILTER html %]
>+ [% IF bug.resolution == "DUPLICATE" %]
>+ [% bug_id = bug.duplicate_bug_id %]
>+ of [% bug_id FILTER bug_link("Bug $bug_id") %]
This is a bit confusing; better to just use bug.dup_id in both places, rather
than have a local. Or, rename the local to something like dup_id.
>+ [% END %]
>+ </td>
Nit: no capital b on Bug, as it's not the beginning of a sentence. (We may get
this wrong elsewhere; that's no excuse. :-)
Gerv
Comment 19•22 years ago
|
||
bug.dup id won't work inside the string - you'd hve to concatenate, or use
${bug.dup_id} (I _think_ that that works) which isn't as nice.
Updated•22 years ago
|
Attachment #119131 -
Flags: review?(bbaetz)
Assignee | ||
Comment 20•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #119289 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #119726 -
Flags: review?(bbaetz)
Assignee | ||
Updated•22 years ago
|
Attachment #119289 -
Flags: review?(bbaetz)
Comment 21•22 years ago
|
||
Comment on attachment 119726 [details] [diff] [review]
v2.0.3: Review nits fixed.
r=bbaetz. Looks nice, works, etc.
However, that FILTER should be the other way arround - we filter the _text_ by
applying a link to the particular bug.
I stuffed up the code in Bugzilla/Template.pm - GetBugLink takes the bug# as
the first item, not the text. The only other user of this happens to just
linkify the number, so I never noticed. Oops.
Eitehr fix that too, or don't, and I'll file a bug when this gets checked in.
Attachment #119726 -
Flags: review?(bbaetz) → review+
Assignee | ||
Comment 22•22 years ago
|
||
> I stuffed up the code in Bugzilla/Template.pm - GetBugLink takes the bug# as
> the first item, not the text.
> Eitehr fix that too, or don't, and I'll file a bug when this gets checked in.
I will fix this; the check-in will contain these extra changes (compared to
attachment 119726 [details] [diff] [review]):
++++ Bugzilla/Template.pm 8 Apr 2003 11:15:18 -0000
+- return &::GetBugLink($text, $bug);
++ return &::GetBugLink($bug, $text);
++++ template/en/default/bug/edit.html.tmpl 8 Apr 2003 11:15:18 -0000
-+ of [% bug.dup_id FILTER bug_link("bug ${bug.dup_id}") %]
++ of [% "bug ${bug.dup_id}" FILTER bug_link(bug.dup_id) %]
Status: NEW → ASSIGNED
Flags: approval?
Reporter | ||
Updated•22 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 23•22 years ago
|
||
FIXED. I could swear that I'd clicked on Commit yesterday...
Checked in:
mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl 1.32
mozilla/webtools/bugzilla/Bugzilla/Template.pm 1.4
mozilla/webtools/bugzilla/Bug.pm 1.31
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 24•19 years ago
|
||
Attachment #214029 -
Flags: review?(documentation)
Comment 25•19 years ago
|
||
Comment on attachment 214029 [details] [diff] [review]
docs patch about 'Bugzilla Database Tables' section, for 2.18
which bugs are duplicates of which other bugs.
Attachment #214029 -
Flags: review?(documentation) → review-
Updated•18 years ago
|
Attachment #214029 -
Attachment is obsolete: true
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•