Closed Bug 1032323 Opened 6 years ago Closed 6 years ago

canonicalise_query() should omit parameters with empty values so generated URLs are shorter

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Broken out from bug 594928 comments 4-5.

This will partly fix bug 594928, as well as reduce the cruftyness of URLs generated via other consumers of canonicalise_query():
https://github.com/bugzilla/bugzilla/search?q=canonicalise_query
Attached patch Upstream PatchSplinter Review
Bug 594928 comment 5 says that for assignee etc, an empty value means "use default". So as long as there are no other cases for which the caveat in the last sentence of bug 594928 comment 5 applies, then this should work... I hope! :-)
Attachment #8448138 - Flags: review?(glob)
Comment on attachment 8448138 [details] [diff] [review]
Upstream Patch

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

this was a tricky one to review, but as far as i can tell this shouldn't cause any bad side-effects.

::: Bugzilla/CGI.pm
@@ +665,1 @@
>  Values in C<@exclude> are not included in the result.

nit: the blank line between paragraphs shouldn't be removed; will fix on commit
Attachment #8448138 - Flags: review?(glob) → review+
Flags: approval?
Target Milestone: --- → Bugzilla 5.0
(In reply to Byron Jones ‹:glob› from comment #2)
> this was a tricky one to review, but as far as i can tell this shouldn't
> cause any bad side-effects.

Thank you - yeah there were quite a few consumers! :-)
Flags: approval? → approval+
thank you for the patch ed :)

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   2f10cf7..515a56d  master -> master
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.