Last Comment Bug 7873 - duplicate isn't always resolved DUP when marking as such
: duplicate isn't always resolved DUP when marking as such
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: unspecified
: All All
: P2 critical with 1 vote (vote)
: Bugzilla 2.12
Assigned To: Dave Miller [:justdave] (
: default-qa
: 12686 32871 32950 43018 58941 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 1999-06-09 16:04 PDT by Hixie (not reading bugmail)
Modified: 2012-12-18 20:46 PST (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Patch to make duplicate flagging happen AFTER privs checking (5.37 KB, patch)
2001-03-10 16:17 PST, Dave Miller [:justdave] (
no flags Details | Diff | Splinter Review

Description Hixie (not reading bugmail) 1999-06-09 16:04:46 PDT
I submitted a change to a bug without changing anything (just put in a number
in the dup field, didn't change the radio button [javascript is disabled here]
and hit submit), then I clicked BACK, checked the radiobutton and resubmitted
it. As expected, it detected a clash. This is normal.

Unfortunately, it did so _after_ adding the notation to the other bug (bug
7516, if that matters). When I then clicked "submit the changes anyway", it
told me "unknown action 7835".

I don't want to try to reproduce it, we never know how far reaching the
bug could be, and I don't want to mess up bugzilla.
Comment 1 Hixie (not reading bugmail) 1999-10-08 12:16:59 PDT
*** Bug 12686 has been marked as a duplicate of this bug. ***
Comment 2 Terry Weissman 2000-04-13 07:29:25 PDT is the new owner of Bugzilla and Bonsai.  (For details,
see my posting in netscape.public.mozilla.webtools,
news:// .)
Comment 3 Tara Hernandez 2000-04-28 12:12:47 PDT
*mutter**grumble*I don't *want* to have to specify a comment for a
Comment 4 Matthew Tuck [:CodeMachine] 2000-05-10 05:17:42 PDT
I think the solution is to prevent overriding the previous action in a midair
collision.  I've never heard of any other system doing it.  I don't like the
idea that someone can undo my action anyway.

Bug #31117 asks to allow applying both changes, if possible, which could replace
the lost functionality in part.

Though another possibility would be to have the duplicate message be one record
rather than one on each bug report, and do something tricky.
Comment 5 Hixie (not reading bugmail) 2000-05-10 05:58:25 PDT
Um, the solution AFAICT is simply to add the notation to the other bug _after_ 
checking that the bug being changed has not been touched. It's not complicated 
or anything...

The problem is that this code in process_bug.cgi:

508         AppendComment($num, $::FORM{'who'}, "*** Bug $::FORM{'id'} has been 
marked as a duplicate of this bug. ***");
509         if ( Param('strictvaluechecks') ) {
510           CheckFormFieldDefined(\%::FORM,'comment');
511         }
512         $::FORM{'comment'} .= "\n\n*** This bug has been marked as a 
duplicate of $num ***";
514         print "<TABLE BORDER=1><TD><H2>Notation added to bug $num</H2>\n";
515         system("./processmail $num $::FORM{'who'}");
516         print "<TD><A HREF=\"show_bug.cgi?id=$num\">Go To BUG# 

...happens before this code (same module):

647     if (defined $::FORM{'delta_ts'} && $::FORM{'delta_ts'} ne $delta_ts) {
648         print "
649 <H1>Mid-air collision detected!</H1>
650 Someone else has made changes to this bug at the same time you were trying 
651 The changes made were:
652 <p>
653 ";

I'm not exactly sure how this should be fixed, but the easiest way of doing it
would be to set a flag in the "SET DUPLICATE" handling code (first snippet 
quoted above) and only actually do the work after the clash detection (second
snippet quoted above).

Comment 6 Matthew Tuck [:CodeMachine] 2000-05-10 06:55:47 PDT
I see what you mean upon rereading.  What I was talking about above was
preventing the problem where a midair collision occurs and the second person
overrides the first's dupe resolve, but leaves the other bug's notation.
Comment 7 Dave Miller [:justdave] ( 2000-07-17 19:28:55 PDT
*** Bug 32950 has been marked as a duplicate of this bug. ***
Comment 8 Dave Miller [:justdave] ( 2000-07-17 20:41:41 PDT
*** Bug 32871 has been marked as a duplicate of this bug. ***
Comment 9 Dave Miller [:justdave] ( 2000-07-17 20:44:12 PDT
updating the summary to more accurately reflect the direction this bug is going 
(and making it more general, since the problem seems to be more widespread than 
just mid-air collisions)
Comment 10 Sean Richardson 2000-07-18 06:57:22 PDT
From bug 32950, "Bugzilla DUPL messages appears on DUP-to bug, but not on DUP-of 
bug", essentially the same problem can happen if the user attempting to mark
one bug as a DUP of another lacks any of the relevant privileges or is not
logged in at that time. 

Neither check is being made until a comment has been added to the DUP-to bug.
An extension of Ian's quasi-patch to also make the checks for logged-in status 
and privileges before making *any* modifications should fix these problems too.
Comment 11 Jesse Ruderman 2000-11-05 04:30:01 PST
*** Bug 58941 has been marked as a duplicate of this bug. ***
Comment 12 Matthew Tuck [:CodeMachine] 2001-02-18 00:27:41 PST
*** Bug 43018 has been marked as a duplicate of this bug. ***
Comment 13 Dave Miller [:justdave] ( 2001-02-27 19:27:41 PST
moving to real milestones...
Comment 14 Dave Miller [:justdave] ( 2001-03-10 15:34:53 PST
This just became a critical severity and a 2.12 blocker.

Now that we have the duplicates stored in a table, the duplicate table is 
aparently getting updated at the same time the marking is put on the other bug, 
and if that person didn't have privs for it, the duplicate bug doesn't get 
closed, and now no one else can do it either because it's already in the dupes 
table and it won't let you re-dupe it.
Comment 15 Dave Miller [:justdave] ( 2001-03-10 15:48:12 PST
Comment 16 Dave Miller [:justdave] ( 2001-03-10 16:17:33 PST
Created attachment 27364 [details] [diff] [review]
Patch to make duplicate flagging happen AFTER privs checking
Comment 17 Dave Miller [:justdave] ( 2001-03-10 16:54:54 PST

Checked in.
Comment 18 Gervase Markham [:gerv] 2001-03-14 08:05:12 PST
Good catch, people - apologies that I wasn't around to fight the fire here.

Comment 19 Dave Miller [:justdave] ( 2001-09-02 23:25:22 PDT
Moving closed bugs to Bugzilla product

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