Closed
Bug 277454
Opened 20 years ago
Closed 20 years ago
Bugs in inactivated groups don't show padlocks on the buglist
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: justdave, Assigned: Wurblzap)
References
Details
Attachments
(2 files, 6 obsolete files)
7.34 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
6.32 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Last night I posted a blog entry asking for help fixing the op_sys field on a
bunch of corrupted bugs on bugzilla.mozilla.org. This morning, people were
mentioning that they appeared to be all done, but when I ran the query myself, I
still got 15 of them. We couldn't figure out why nobody else could see them --
they didn't have padlock icons on them. Then I opened one of the bugs and
looked at it, and it was in the Netscape Confidential group, which was disabled
a long time ago to prevent people from placing new bugs in that group.
The code at fault appears to be the code that tests whether the bug is hidden by
a n implied or manual group setting. Disabled groups show up as neither, and
wind up without a lock. I would think they should be assumed to be manual.
Reporter | ||
Updated•20 years ago
|
Assignee: justdave → query-and-buglist
Flags: blocking2.20+
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: --- → Bugzilla 2.20
Assignee | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
I don't like changing this bit of code very much; I wonder if the right thing
would be to have an explicit clause for the deactivated group case and then
explicitly set it to "manual" with a comment explaining why.
Updated•20 years ago
|
Severity: normal → critical
Assignee | ||
Comment 3•20 years ago
|
||
I have no qualms at all touching this piece of code :)
Actually, I think the real cause of this bug is a semi-corrupt database. I
suspect the bugs in question show up in sanity check as "Have groups not
permitted for their products".
Assignee | ||
Updated•20 years ago
|
Whiteboard: [patch awaiting review]
Assignee | ||
Updated•20 years ago
|
Attachment #178455 -
Flags: review? → review?(LpSolit)
Reporter | ||
Comment 4•20 years ago
|
||
OK, the conversion code in checksetup.pl for when the group_control_map table
was introduced appears to be at fault here. A record for group_control_map was
never created for this group, which was already disabled before the
group_control_map mechanism was introduced.
See http://lxr.mozilla.org/bugzilla/source/checksetup.pl#3300
![]() |
||
Comment 5•20 years ago
|
||
Comment on attachment 178455 [details] [diff] [review]
Patch
Your patch is correct and makes the code easier to read... but justdave is
right, the correct fix is to remove 'AND isactive != 0' from this query in
checksetup.pl, line 3301:
$sth = $dbh->prepare("SELECT groups.id, products.id, groups.name, " .
"products.name FROM groups, products " .
"WHERE isbuggroup != 0 AND isactive != 0");
Moreover, checksetup.pl should fix corrupted DBs. For that, it has to look at
groups associated with bugs in bug_group_map which are in a product which is
not associated with that group in group_control_map. If such invalid
group-product combinations are found, it should add it to group_control_map
with CONTROLMAPSHOWN as a default in order to keep these bugs private. If the
group has the same name as a product, then some additional checks may be
required in order to set the correct values in group_control_map.
Attachment #178455 -
Flags: review?(LpSolit) → review-
![]() |
||
Comment 6•20 years ago
|
||
I guess 2.18 is affected too and this bug produces data corruption for disabled
groups.
Flags: blocking2.18.2?
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Reporter | ||
Comment 7•20 years ago
|
||
It was discussed on IRC that it's probably not safe to just have checksetup.pl
fix this, because there's no way to tell at this point if the missed conversion
is the reason for the corruption. There appears to be a test for this in
sanitycheck already on the tip, probably that test should get backported to 2.18
and make sure the repair options offer allowing those groups as an option.
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Reporter | ||
Updated•20 years ago
|
Flags: blocking2.18.2? → blocking2.18.2+
Target Milestone: Bugzilla 2.20 → Bugzilla 2.18
Updated•20 years ago
|
Whiteboard: [patch awaiting review]
Assignee | ||
Comment 8•20 years ago
|
||
o Makes buglist.cgi display padlocks even for semi-broken bugs
o Remedies checksetup.pl
o Fixes sanitycheck.cgi to complain about semi-broken bugs, offering to set up
SHOWN/NA group_control_map entries
Attachment #178455 -
Attachment is obsolete: true
Attachment #186582 -
Flags: review?
Assignee | ||
Comment 9•20 years ago
|
||
Style changes only, as per discussion on IRC.
Attachment #186582 -
Attachment is obsolete: true
Attachment #186585 -
Flags: review?(LpSolit)
Assignee | ||
Updated•20 years ago
|
Attachment #186582 -
Flags: review?
![]() |
||
Comment 10•20 years ago
|
||
Comment on attachment 186585 [details] [diff] [review]
HEAD patch 2.1.1
>+ qq{INSERT INTO group_control_map (
>+ group_id, product_id, entry,
>+ membercontrol, othercontrol, canedit
>+ )
>+ VALUES (
>+ ?, ?, 0,
>+ $shown, $na, 0
>+ )});
( Nit: /me does not like parens alone on a line... sigh )
>+ PutFooter();
>+ exit;
>+}
Nit: do you really want to stop sanitycheck at this level? If you want to
submit a new patch with these two lines removed, feel free to carry forward my
r+.
This patch needs to be backported to 2.18.
r=LpSolit
Attachment #186585 -
Flags: review?(LpSolit) → review+
Assignee | ||
Comment 11•20 years ago
|
||
Continues sanitycheck after repairing, and writes a nice finishing status
summary.
Attachment #186585 -
Attachment is obsolete: true
Attachment #186814 -
Flags: review?(LpSolit)
Assignee | ||
Comment 12•20 years ago
|
||
Attachment #186815 -
Flags: review?(LpSolit)
![]() |
||
Comment 13•20 years ago
|
||
Comment on attachment 186814 [details] [diff] [review]
HEAD Patch 2.2
>+if (defined $cgi->param('createmissinggroupcontrolmapentries')) {
>+ my $na = CONTROLMAPNA;
>+ my $shown = CONTROLMAPSHOWN;
Usually, we inform the user that something is being fixed, such as:
Status("OK, now fixing missing entries in group_control_map.");
I think you should do the same here. Add a convenient message and carry forward
my r+.
r=LpSolit
Attachment #186814 -
Flags: review?(LpSolit) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #186815 -
Flags: review?(LpSolit)
Assignee | ||
Comment 14•20 years ago
|
||
o Added a starting Status() call
o Tweaked the update message
o Tweaked the repair link text
Attachment #186814 -
Attachment is obsolete: true
Attachment #186933 -
Flags: review?(LpSolit)
Assignee | ||
Comment 15•20 years ago
|
||
Attachment #186815 -
Attachment is obsolete: true
Attachment #186934 -
Flags: review?(LpSolit)
![]() |
||
Comment 16•20 years ago
|
||
Comment on attachment 186933 [details] [diff] [review]
HEAD Patch 2.3
r=LpSolit
Attachment #186933 -
Flags: review?(LpSolit) → review+
![]() |
||
Comment 17•20 years ago
|
||
Comment on attachment 186934 [details] [diff] [review]
Branch patch 2.3
>+ WHERE COALESCE(gcm.membercontrol, $na) = $na
>+ } . $dbh->sql_group_by('bugs.product_id, bgm.group_id'));
$dbh->sql_group_by() does not exist in 2.18. Use GROUP BY instead.
Else the patch works fine.
Attachment #186934 -
Flags: review?(LpSolit) → review-
Assignee | ||
Comment 18•20 years ago
|
||
Uses GROUP BY.
Attachment #186934 -
Attachment is obsolete: true
Attachment #187007 -
Flags: review?(LpSolit)
![]() |
||
Comment 19•20 years ago
|
||
Comment on attachment 187007 [details] [diff] [review]
Branch patch 2.3.1
r=LpSolit
Attachment #187007 -
Flags: review?(LpSolit) → review+
![]() |
||
Updated•20 years ago
|
Flags: approval?
Flags: approval2.18?
Reporter | ||
Updated•20 years ago
|
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
![]() |
||
Comment 20•20 years ago
|
||
Tip:
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi
new revision: 1.296; previous revision: 1.295
done
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.408; previous revision: 1.407
done
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v <-- sanitycheck.cgi
new revision: 1.95; previous revision: 1.94
done
2.18.1:
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.289.2.32; previous revision: 1.289.2.31
done
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v <-- sanitycheck.cgi
new revision: 1.72.2.3; previous revision: 1.72.2.2
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•