Closed
Bug 625194
Opened 15 years ago
Closed 13 years ago
Set the QA contact for all bugs in the Bugzilla product to default-qa@bugzilla.bugs
Categories
(Developer Services :: General, task)
Developer Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: LpSolit, Assigned: fox2mike)
References
()
Details
Attachments
(2 files, 1 obsolete file)
|
4.72 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
|
249.36 KB,
text/plain
|
Details |
See the URL. The tabular report shows that many bugs in the Bugzilla product have a QA contact which is not default-qa@bugzilla.bugs (fortunately, only for closed bugs). I don't know about bugbot and other Bugzilla devs, but I personally only watch the default QA contact to keep an eye on what's going on in this product, especially status and resolution changes. I fixed ~30 bugs manually, some pretty old, some others which have recently been retargetted to the Bugzilla product without resetting the default QA contact. But the remaining bugs in the tabular report are just too many, and I don't want to spam hundreds of users for something so minor. So my request is to fix them all at once from the MySQL command-line, so that this change doesn't affect delta_ts nor spam everybody. Just in case someone one day starts playing with a bug and nobody notices because the bug is out of our radar. (Consider this as being low priority.)
Comment 1•15 years ago
|
||
justdave, is this something you can do against the live database?
Dave
Comment 2•15 years ago
|
||
justdave, ping
Updated•14 years ago
|
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
Comment 3•13 years ago
|
||
Can this be done now by watching the components instead? Do you still need this to be migrated?
dkl
| Reporter | ||
Comment 4•13 years ago
|
||
(In reply to David Lawrence [:dkl] from comment #3)
> Do you still need this to be migrated?
Would still be good to do, yes, independently of the component watching.
| Reporter | ||
Comment 5•13 years ago
|
||
Also, another good reason to do it is that the wrong people would be spammed. For instance, there are 141 bugs with reviewers@ as QA contact. We shouldn't spam this mailing-list if someone edits these bugs.
Comment 6•13 years ago
|
||
Here is a script that could be used to move the Bugzilla qa contacts back to their default values. It can also be done for assignees as well as I made the script work either way. This is not particularly useful for Mozilla related products but we could use it to help out the Bugzilla product. Since it is pretty generic I am letting LpSolit take a look at it along with glob.
dkl
Updated•13 years ago
|
Attachment #675919 -
Flags: review?(glob)
| Reporter | ||
Comment 7•13 years ago
|
||
Comment on attachment 675919 [details] [diff] [review]
Patch to reset assignee/qacontact for specific product and component (v1)
Err... that's not what I want here. All I want is to SILENTLY change the QA contact, not spam everybody by updating delta_ts. If you update delta_ts but don't send emails, sanitycheck.cgi will complain and the next time someone clicks the "Send unsent emails" link, this is going to generate a lot of spam. What your script does can already be done in a mass-change. No need for this script. (Note that your script isn't safe anyway, because you forgot -T in the shebang, and so nothing is tainted.)
It's a trivial SQL command which I'm asking for:
UPDATE bugs SET qa_contact = (SELECT userid FROM profiles WHERE login_name = 'default-qa@bugzilla.bugs') WHERE product_id = (SELECT id FROM products WHERE name = 'Bugzilla');
Attachment #675919 -
Flags: review?(glob)
Attachment #675919 -
Flags: review?(LpSolit)
Attachment #675919 -
Flags: review-
Comment 8•13 years ago
|
||
(In reply to Frédéric Buclin from comment #7)
> Comment on attachment 675919 [details] [diff] [review]
> Patch to reset assignee/qacontact for specific product and component (v1)
>
> Err... that's not what I want here. All I want is to SILENTLY change the QA
> contact, not spam everybody by updating delta_ts. If you update delta_ts but
> don't send emails, sanitycheck.cgi will complain and the next time someone
> clicks the "Send unsent emails" link, this is going to generate a lot of
> spam. What your script does can already be done in a mass-change. No need
> for this script. (Note that your script isn't safe anyway, because you
> forgot -T in the shebang, and so nothing is tainted.)
We do not run sanitycheck.cgi on a normal basis and therefore probably would not send the unsent emails.
But in the script, I also set lastdiffed which should keep the sanitycheck.cgi from complaining about the unsent emails for those affected by my script.
I will submit a new patch that uses -T for taint checking. Forgot to add that before.
>
> It's a trivial SQL command which I'm asking for:
>
> UPDATE bugs SET qa_contact = (SELECT userid FROM profiles WHERE login_name =
> 'default-qa@bugzilla.bugs') WHERE product_id = (SELECT id FROM products
> WHERE name = 'Bugzilla');
Doing just this statement doesn't properly update bugs_activity with the user changes which is why the script was needed.
dkl
| Reporter | ||
Comment 9•13 years ago
|
||
(In reply to David Lawrence [:dkl] from comment #8)
> Doing just this statement doesn't properly update bugs_activity with the
> user changes which is why the script was needed.
That's exactly what I'm asking for! :)
Comment 10•13 years ago
|
||
Attachment #675919 -
Attachment is obsolete: true
Attachment #676672 -
Flags: review?(LpSolit)
Updated•13 years ago
|
Attachment #676672 -
Flags: review?(glob)
| Reporter | ||
Comment 11•13 years ago
|
||
Comment on attachment 676672 [details] [diff] [review]
Patch to reset assignee/qacontact for specific product and component (v2)
This is a bmo only script, so I will let glob review it. It goes way further than what I was asking for.
Attachment #676672 -
Flags: review?(LpSolit)
Comment 12•13 years ago
|
||
(In reply to Frédéric Buclin from comment #9)
> (In reply to David Lawrence [:dkl] from comment #8)
> > Doing just this statement doesn't properly update bugs_activity with the
> > user changes which is why the script was needed.
>
> That's exactly what I'm asking for! :)
I would not be happy to make this change to the bug attributes without recording the change in the bugs activity table properly. There is a change in the activity for when the qa contact was changed to the non-default, user why shouldn't there be an entry for when the script changes it back. I would rather not purposely introduce this kind of inconsistency. So the script keeps that from occurring.
dkl
Comment 13•13 years ago
|
||
Comment on attachment 676672 [details] [diff] [review]
Patch to reset assignee/qacontact for specific product and component (v2)
Review of attachment 676672 [details] [diff] [review]:
-----------------------------------------------------------------
r=glob, with the issues noted to be fixed on commit.
nit: this file contains trailing spaces, please remove.
::: contrib/reorg-tools/reset_default_user.pl
@@ +51,5 @@
> +}
> +
> +# We will need these for entering into bugs_activity
> +my $who = Bugzilla::User->new({ name => 'nobody@mozilla.org' });
> +my $field = Bugzilla::Field->new({ name => $field_name });
you need to validate that $field_name is either assigned_to or qa_contact.
currently the script will accept any valid field, but then later on silently morph it to assigned_to (in most cases).
@@ +133,5 @@
> + undef, $bug_id, $who->id, $timestamp, $field->id, $old_user->login, $new_user->login);
> + $dbh->do("UPDATE bugs SET delta_ts = ?, lastdiffed = ? WHERE bug_id = ?",
> + undef, $timestamp, $timestamp, $bug_id);
> +
> + print "done.\n";
you need a transaction block for these statements.
Attachment #676672 -
Flags: review?(glob) → review+
Comment 14•13 years ago
|
||
Thanks
(In reply to Byron Jones ‹:glob› from comment #13)
> > +# We will need these for entering into bugs_activity
> > +my $who = Bugzilla::User->new({ name => 'nobody@mozilla.org' });
> > +my $field = Bugzilla::Field->new({ name => $field_name });
>
> you need to validate that $field_name is either assigned_to or qa_contact.
> currently the script will accept any valid field, but then later on silently
> morph it to assigned_to (in most cases).
I do that earlier before those statements:
+if (!$product || $help
+ || ($field_name ne 'assigned_to' && $field_name ne 'qa_contact'))
+{
+ usage();
+ exit(1);
+}
> you need a transaction block for these statements.
done
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
added contrib/reorg-tools/reset_default_user.pl
Committed revision 8379.
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
added contrib/reorg-tools/reset_default_user.pl
Committed revision 8402.
Comment 15•13 years ago
|
||
LpSolit. Are you ready to go for us to reset the qa contact on Bugzilla product bugs? I can go ahead and move this bug over to IT for them to do that changes to production. Including closed bugs, this script will update 5000+ bugs (no email sent). Or do you only want the open bugs the be updated?
Steps:
# cd /path/to/bugzilla/code
# perl -wT -I. contrib/reorg-tools/reset_default_user.pl --field qa_contact --product Bugzilla
dkl
Flags: needinfo?(LpSolit)
| Reporter | ||
Comment 16•13 years ago
|
||
(In reply to David Lawrence [:dkl] from comment #15)
> LpSolit. Are you ready to go for us to reset the qa contact on Bugzilla
> product bugs?
Yes, let's do it. Also for closed bugs.
Flags: needinfo?(LpSolit)
Comment 17•13 years ago
|
||
(In reply to Frédéric Buclin from comment #16)
> (In reply to David Lawrence [:dkl] from comment #15)
> > LpSolit. Are you ready to go for us to reset the qa contact on Bugzilla
> > product bugs?
>
> Yes, let's do it. Also for closed bugs.
Cool. Will do it now then.
Admin, please execute the following steps on a BMO web head of your choice:
# cd /path/to/bugzilla/code
# perl -wT -I. contrib/reorg-tools/reset_default_user.pl --field qa_contact --product Bugzilla
Thanks
dkl
Assignee: dkl → server-ops-devservices
Status: ASSIGNED → NEW
Component: General → Server Operations: Developer Services
Product: bugzilla.mozilla.org → mozilla.org
QA Contact: shyam
| Assignee | ||
Comment 19•13 years ago
|
||
Sorry for the delay!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Component: Server Operations: Developer Services → General
Product: mozilla.org → Developer Services
You need to log in
before you can comment on or make changes to this bug.
Description
•