Closed Bug 931192 Opened 7 years ago Closed 7 years ago

Add support for product aliases to search

Categories

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

Production
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: dkl, Assigned: glob)

References

Details

Attachments

(1 file, 2 obsolete files)

Smallish patch coming for review.
Attached patch 931192_1.patch (obsolete) β€” β€” Splinter Review
If you are comfortable with the changes and r+ then feel free to checkin so that they can be part of the next push.

dkl
Attachment #822532 - Flags: review?(glob)
Comment on attachment 822532 [details] [diff] [review]
931192_1.patch

i feel extremely uncomfortable with the idea of doing this hack, however i understand the need for it :(

if we're to hack searching, it needs to happen in the Bugzilla::Search class not in buglist.cgi to ensure we catch all ways to search (such as REST api).
Attachment #822532 - Flags: review?(glob) → review-
i have a reasonable idea on how to do this in a clean-ish way inside Search.pm, taking :)
Assignee: dkl → glob
adding product aliases across the whole system is complicated to do, even in a hacky way.  it's easy to catch some but not all instances, leading to confusion.


i think it's reasonable to limit this to just searching (by any mechanism/api) rather than trying to cover all places where a product rename touches (eg. enter_bug UI, bug.create api, reports).
Summary: Add custom BMO code to help temporarily deal with Boot2Gecko to Firefox OS product renaming → Add support for product aliases to search
Attached patch 931192_2.patch (obsolete) β€” β€” Splinter Review
non-hacky search-only product alias support
Attachment #822532 - Attachment is obsolete: true
Attachment #823195 - Flags: review?(dkl)
Comment on attachment 823195 [details] [diff] [review]
931192_2.patch

Review of attachment 823195 [details] [diff] [review]:
-----------------------------------------------------------------

Crashes when using quicksearch such as product:Boot2Gecko

Can't use string ("Boot2Gecko") as an ARRAY ref while "strict refs" in use at Bugzilla/Search.pm line 2730. at Bugzilla/Search.pm line 2730.

::: Bugzilla/Search.pm
@@ +2733,5 @@
> +            $aliased = 1;
> +        }
> +    }
> +    if ($aliased) {
> +        my $old_value = $args->{value};

This doesn't seem to be used anywhere else at first glance.
Attachment #823195 - Flags: review?(dkl) → review-
Attached patch 931192_3.patch β€” β€” Splinter Review
Attachment #823195 - Attachment is obsolete: true
Attachment #823353 - Flags: review?(dkl)
Comment on attachment 823353 [details] [diff] [review]
931192_3.patch

Review of attachment 823353 [details] [diff] [review]:
-----------------------------------------------------------------

Only minor issue I see is that if someone uses product=Book2Gecko&product=Firefox+OS then you end up with 'Firefox OS,Firefox OS' which is harmless and that will probably not happen anyway.

r=dkl
Attachment #823353 - Flags: review?(dkl) → review+
Btw - let me know if you need testing support when you land this before it gets pushed to production. I could run through a bunch of B2G queries to see how well this works.
(In reply to Jason Smith [:jsmith] from comment #9)
> Btw - let me know if you need testing support when you land this before it
> gets pushed to production. I could run through a bunch of B2G queries to see
> how well this works.

Once it is committed you will be able to test on our staging server https://bugzilla.allizom.org which is LDAP
protected. There is also https://bugzilla-dev.allizom.org which is a sanitized version of the prod database.

dkl
(In reply to David Lawrence [:dkl] from comment #10)
> Once it is committed you will be able to test on our staging server
> https://bugzilla.allizom.org which is LDAP protected.

most people won't have access to that system..

> There is also https://bugzilla-dev.allizom.org which is a
> sanitized version of the prod database.

but everyone does have access to bugzilla-dev :)


Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/Search.pm
Committed revision 9101.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
this is now live.
Marking verified - some sanity tests with some of the preexisting bug queries work great with this patch, so we're seeing the correct bugs returning here if Boot2Gecko is used with the product.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.