Open Bug 1381566 Opened 9 years ago Updated 9 years ago

Add alternative query option to resolve_bugs.pl

Categories

(bugzilla.mozilla.org :: General, enhancement)

Production
enhancement
Not set
normal

Tracking

()

People

(Reporter: dylan, Unassigned)

Details

Attachments

(1 file)

45 bytes, text/x-github-pull-request
Details | Review
Editing https://github.com/mozilla-bteam/bmo/blob/master/scripts/resolve_bugs.pl#L48-L51 should allow resolve_bugs to operate on arbitrary search results of bugs. Probably the most flexible option is to add a --query option, parse that using URI->new(), and pass the hash to Bugzilla::Search.
So to actually explain what I want to do here: Goal: Emma wants to be able to mass close bugs -- or at least for me to be able to mass close bugs without a lot of effort. Implementation idea: scripts/resolve_bugs.pl is an existing script that can mass resolve bugs. Currently, it takes a product and an optional component argument and mass-updates the resolution field on all bugs in that product/component. This looks like: perl scripts/resolve_bugs.pl --product=Firefox --component=Aardvark --resolution=WONTFIX It seems like what we want here is to generalize the searching part of this. The lowest-friction thing we could do would be for people to provide a URL to a bug search, and for the script to be able to use that URL to figure out what to close. So to do that, we add a --buglist option, that takes a search URL. We parse that search URL (using URI->new) and extract the query string as a hash, and pass that hash to the constructor of Bugzilla::Search->new(). There are a lot of different ways this could go: 1. remove the old options and require --buglist? 2. if --buglist is passed, don't require --product and ignore it 3. merge the query from --buglist with the --product (and --component) options that are already passed to Bugzilla::Search Number 2 is what should be done.
Attached file github pull request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: