Closed
Bug 277466
Opened 20 years ago
Closed 19 years ago
saved search's old name is used when running a search
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: kniht, Assigned: robzilla)
References
Details
Attachments
(1 file, 8 obsolete files)
|
3.08 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
1. click on a saved search 2. edit the search 3. run the search 4. It prefills with the name of the saved search - change the name to something else and click "Remember search" 5. got to the saved searches tab of your user preferences 6. click on "Run" for your newly named saved search Result: it prefills the "Remember search" box with the old search name instead of the new name you just ran
| Assignee | ||
Updated•20 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Comment 1•20 years ago
|
||
patch attached with fix.
Chose to remove the "query_based_on" parameter from "urlquerypart" in the
template that saves the query. Also changed the prefs panel "Run" links to run
the searches by name, instead of by query
Another option would be to remove query_based_on in the CGI by replacing
$vars->{'urlquerypart'} =~ s/(order|cmdtype)=[^&]*&?//g;
with
$vars->{'urlquerypart'} =~ s/(order|cmdtype|urlquerypart)=[^&]*&?//g;
in buglist.cgi, but then we lose it when we do other operations (like change
the columns).Assignee: justdave → robzilla
Attachment #172492 -
Flags: review?
| Assignee | ||
Updated•20 years ago
|
Whiteboard: patch awaiting review
If I apply the patch and run thru the scenario listed in the description it works correctly.
Comment 3•20 years ago
|
||
Comment on attachment 172492 [details] [diff] [review] robzilla_v1 >+ value="[% urlquerypart.replace('query_based_on=[^&]*&?', '') FILTER html %]"> Looks good. r=LpSolit Nit: I wonder if '&query_based_on=[^&]*' would work better. This would avoid a trailing '&' when query_based_on is the last element of the URL.
Attachment #172492 -
Flags: review? → review+
Updated•20 years ago
|
Flags: approval?
Target Milestone: --- → Bugzilla 2.20
Updated•20 years ago
|
Whiteboard: patch awaiting review
| Assignee | ||
Comment 4•20 years ago
|
||
(In reply to comment #3) > Nit: I wonder if '&query_based_on=[^&]*' would work better. This would avoid a > trailing '&' when query_based_on is the last element of the URL. > No, that wouldn't work, because it could be the first url parameter, in which case there is no leading &. e.g. query.cgi?query_based_on=abc&..... Anyways, doesn't the regexp that I wrote remove the trailing '&' ?
| Assignee | ||
Comment 5•20 years ago
|
||
removing approval request until Nit from above is fixed (as per chat with LpSolit on IRC)
Flags: approval?
| Assignee | ||
Comment 6•20 years ago
|
||
ok, instead of making some complicated regexp, opted for a more readable solution and just removed a trailing '&' after running the original regexp. this patch also converts some line endings elsewhere in the file to UNIX format.
Attachment #172492 -
Attachment is obsolete: true
Attachment #185109 -
Flags: review?(LpSolit)
Comment 7•20 years ago
|
||
Comment on attachment 185109 [details] [diff] [review] robzilla_v2 >+ value="[% urlquerypart.replace('query_based_on=[^&]*&?', '').replace('&$', '') FILTER html %]"> Robzilla, could you please have a look at Bugzilla::CGI::canonicalise_query() ? What about calling this routine with @exclude = ("query_based_on") ? Nit: moreover, please don't include line ending conversion in your patch if not directly related to the bug.
| Assignee | ||
Comment 8•20 years ago
|
||
Attachment #185109 -
Attachment is obsolete: true
Attachment #185152 -
Flags: review?(LpSolit)
| Assignee | ||
Updated•20 years ago
|
Attachment #185109 -
Flags: review?(LpSolit)
Comment 9•20 years ago
|
||
Comment on attachment 185152 [details] [diff] [review] robzilla_v3 Nit: can you please change the comment in buglist.cgi, too, along these lines? # The list of query fields in URL query string format, used when creating # URLs to the same query results page with different parameters (such as # a different sort order or when taking some action on the set of query -# results). To get this string, we start with the raw URL query string -# buffer that was created when we initially parsed the URL on script startup, -# then we remove all non-query fields from it, f.e. the sort order (order) -# and command type (cmdtype) fields. -$vars->{'urlquerypart'} = $::buffer; -$vars->{'urlquerypart'} =~ s/(order|cmdtype)=[^&]*&?//g; +# results). +# We are therefore interested in query fields only, which means we ignore +# the non-query fields order, cmdtype and query_based_on. +$vars->{'urlquerypart'} = $cgi->canonicalise_query('order', + 'cmdtype', + 'query_based_on'); $vars->{'order'} = $order; # The user's login account name (i.e. email address).
| Assignee | ||
Updated•20 years ago
|
Attachment #185152 -
Flags: review?(LpSolit)
| Assignee | ||
Comment 10•20 years ago
|
||
ok, nit fixed.
Attachment #185152 -
Attachment is obsolete: true
Attachment #185155 -
Flags: review?(LpSolit)
| Assignee | ||
Updated•20 years ago
|
Whiteboard: patch awaiting review
Comment 11•20 years ago
|
||
Comment on attachment 185155 [details] [diff] [review] robzilla_v4 >+$vars->{'urlquerypart'} = $cgi->canonicalise_query('order', >+ 'cmdtype', >+ 'query_based_on'); Does not work. You cannot edit a saved query anymore.
Attachment #185155 -
Flags: review?(LpSolit) → review-
| Assignee | ||
Comment 12•20 years ago
|
||
use $params->canonicalise_query, instead of $cgi->canonicalise_query (to fix the problem stated above), and do it *before* calling Bugzilla::Search, so that the query is not modified by that call.
Attachment #185155 -
Attachment is obsolete: true
Attachment #185222 -
Flags: review?(LpSolit)
Comment 13•20 years ago
|
||
Comment on attachment 185222 [details] [diff] [review] robzilla_v5 >+$vars->{'urlquerypart'} = $params->canonicalise_query('order', >+ 'cmdtype', >+ 'query_based_on'); Per my discussion with joel and my own tests, it appears that the right fix is to use your patch v4, but with $cgi replaced by $params, as above. It seems that Search.pm optimizes the query, so it looks safe to keep it in its original place.
Attachment #185222 -
Flags: review?(LpSolit) → review-
Updated•20 years ago
|
Whiteboard: patch awaiting review
Comment 14•19 years ago
|
||
Untested modified v4 as per comment 13. I don't really know how this patch works, I just got bitten by the bug and I comprehend the words in comment 13 :)
Attachment #185222 -
Attachment is obsolete: true
Attachment #190225 -
Flags: review?(LpSolit)
Updated•19 years ago
|
Attachment #190225 -
Flags: review?(LpSolit)
Comment 15•19 years ago
|
||
Corrected line breaks.
Attachment #190225 -
Attachment is obsolete: true
Attachment #190226 -
Flags: review?(LpSolit)
Comment 16•19 years ago
|
||
Comment on attachment 190226 [details] [diff] [review] robzilla v4.1 I want a second review on this. Should go into 2.21 only!
Attachment #190226 -
Flags: review?(bugreport)
Attachment #190226 -
Flags: review?(LpSolit)
Attachment #190226 -
Flags: review+
Updated•19 years ago
|
Severity: normal → minor
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Comment 17•19 years ago
|
||
The previous patch is slightly bitrotten. Here is an updated one.
Attachment #190226 -
Attachment is obsolete: true
Attachment #191813 -
Flags: review?(bugreport)
Updated•19 years ago
|
Attachment #190226 -
Flags: review?(bugreport)
Updated•19 years ago
|
Attachment #191813 -
Flags: review?(bugreport) → review+
Updated•19 years ago
|
Flags: approval?
Comment 18•19 years ago
|
||
I think this might conflict with the patch on bug 301508...
Comment 19•19 years ago
|
||
re-request approval once you've ensured there's no conflict with that patch.
Flags: approval?
QA Contact: mattyt-bugzilla → default-qa
Updated•19 years ago
|
Attachment #191813 -
Attachment description: unbitrotten patch, v4.2 → unbitrotten patch for 2.20, v4.2
Comment 20•19 years ago
|
||
$::buffer has been replaced by $buffer. Carrying forward r+
Attachment #192160 -
Flags: review+
Updated•19 years ago
|
Flags: approval?
Updated•19 years ago
|
Attachment #191813 -
Attachment is obsolete: true
Updated•19 years ago
|
Flags: approval? → approval+
Comment 21•19 years ago
|
||
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.304; previous revision: 1.303 done Checking in template/en/default/account/prefs/saved-searches.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl,v <--saved-searches.html.tmpl new revision: 1.7; previous revision: 1.6 done Checking in template/en/default/list/list.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v <-- list.html.tmpl new revision: 1.38; previous revision: 1.37 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 22•19 years ago
|
||
*** Bug 317663 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•