Bugzilla – Attachment 21261 Details for
Bug 10808
Thesaurus search form does not correspond to current search query
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 10808 - Thesaurus search form does not correspond to current search query
SIGNED-OFF-Bug-10808---Thesaurus-search-form-does-.patch (text/plain), 9.97 KB, created by
Bernardo Gonzalez Kriegel
on 2013-09-20 00:43:07 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10808 - Thesaurus search form does not correspond to current search query
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-09-20 00:43:07 UTC
Size:
9.97 KB
patch
obsolete
>From 58a7376bbddc102ff770f067abca3a91a6111e8e Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 30 Aug 2013 10:54:00 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 10808 - Thesaurus search form does not > correspond to current search query > >When cataloging a field defined with a thesaurus, an authority search popup is displayed with a search from. Once operators, values and sort selected in this form the search can be performed. The bug is that the values entered are kept but not the selected operators and sort. >The same bug was existing in authorities module, solved by Bug 8692. > >This patch corrects the bug. >Also uses in 'sort by' options the same text as search in authorities module : Heading A-Z (default), Heading Z-A, None. >Also removes duplicated code in auth_finder.pl : value_mainstr => $query->param('value_mainstr') || "", ... > >Test plan : >- Create a new biblio with a framework containing a field linked to a thesaurus. For example : 600 >- Click on small icon of main entry. For example : 600$a >=> You get a search form with all operators to "contains" and sort by "Heading A-Z" >- Enter a value in each text box and perform search >=> You get a search form with values in text boxes and all operators to "contains" >- Select "starts with" in all operator comboboxes and perform search >=> You get a search form with all operators to "starts with" >- Select "is exactly" in all operator comboboxes and perform search >=> You get a search form with all operators to "is exactly" >- Select "Heading Z-A" in sort by and perform search >=> You get a search form with "Heading Z-A" in sort by >- Select "None" in sort by and perform search >=> You get a search form with "None" in sort by > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Comment: With both patches applied no koha-qa errors > >Test >1) Original behavior is whatever selection you do before patch, >search form returns to default options >2) After patch, selection remains >--- > authorities/auth_finder.pl | 10 +-- > .../prog/en/includes/auth-finder-search.inc | 66 +++++++++++++++++++- > 2 files changed, 68 insertions(+), 8 deletions(-) > >diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl >index 8182299..09e8d45 100755 >--- a/authorities/auth_finder.pl >+++ b/authorities/auth_finder.pl >@@ -160,11 +160,10 @@ if ( $op eq "do_search" ) { > from => $from, > to => $to, > numbers => \@numbers, >- authtypecode => $authtypecode, >- value_mainstr => $query->param('value_mainstr') || "", >- value_main => $query->param('value_main') || "", >- value_any => $query->param('value_any') || "", >- value_match => $query->param('value_match') || "", >+ operator_mainstr => ( @operator > 0 && $operator[0] ) ? $operator[0] : '', >+ operator_main => ( @operator > 1 && $operator[1] ) ? $operator[1] : '', >+ operator_any => ( @operator > 2 && $operator[2] ) ? $operator[2] : '', >+ operator_match => ( @operator > 3 && $operator[3] ) ? $operator[3] : '', > ); > } else { > ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -183,6 +182,7 @@ if ( $op eq "do_search" ) { > } > > $template->param( >+ op => $op, > value_mainstr => $query->param('value_mainstr') || "", > value_main => $query->param('value_main') || "", > value_any => $query->param('value_any') || "", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >index d54cf64..12a882e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >@@ -123,9 +123,21 @@ function finderjumpfull(page) > <input type="hidden" name="and_or" value="and" /> > <input type="hidden" name="excluding" value="" /> > <select name="operator" id="mainmainentry"> >+ [% IF ( operator_mainstr == 'contains' ) %] >+ <option value="contains" selected="selected">contains</option> >+ [% ELSE %] > <option value="contains">contains</option> >+ [% END %] >+ [% IF ( operator_mainstr == 'start' ) %] >+ <option value="start" selected="selected">starts with</option> >+ [% ELSE %] > <option value="start">starts with</option> >+ [% END %] >+ [% IF ( operator_mainstr == 'is' ) %] >+ <option value="is" selected="selected">is exactly</option> >+ [% ELSE %] > <option value="is">is exactly</option> >+ [% END %] > </select> > <input id="value_mainstr" style="width:400px;" type="text" name="value_mainstr" value="[% value_mainstr |html %]" /> > <div id="yvaluecontainermainmainentry"></div> >@@ -137,9 +149,21 @@ function finderjumpfull(page) > <input type="hidden" name="and_or" value="and" /> > <input type="hidden" name="excluding" value="" /> > <select name="operator" id="mainentry"> >+ [% IF ( operator_main == 'contains' ) %] >+ <option value="contains" selected="selected">contains</option> >+ [% ELSE %] > <option value="contains">contains</option> >+ [% END %] >+ [% IF ( operator_main == 'start' ) %] >+ <option value="start" selected="selected">starts with</option> >+ [% ELSE %] > <option value="start">starts with</option> >+ [% END %] >+ [% IF ( operator_main == 'is' ) %] >+ <option value="is" selected="selected">is exactly</option> >+ [% ELSE %] > <option value="is">is exactly</option> >+ [% END %] > </select> > <input id="value_main" style="width:400px;" type="text" name="value_main" value="[% value_main |html %]" /> > <div id="yvaluecontainermainentry"></div> >@@ -151,9 +175,21 @@ function finderjumpfull(page) > <input type="hidden" name="and_or" value="and" /> > <input type="hidden" name="excluding" value="" /> > <select name="operator" id="marclistanywhere"> >+ [% IF ( operator_any == 'contains' ) %] >+ <option value="contains" selected="selected">contains</option> >+ [% ELSE %] > <option value="contains">contains</option> >+ [% END %] >+ [% IF ( operator_any == 'start' ) %] >+ <option value="start" selected="selected">starts with</option> >+ [% ELSE %] > <option value="start">starts with</option> >+ [% END %] >+ [% IF ( operator_any == 'is' ) %] >+ <option value="is" selected="selected">is exactly</option> >+ [% ELSE %] > <option value="is">is exactly</option> >+ [% END %] > </select> > <input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any |html %]" /> > <div id="yvaluecontainermarclist"></div> >@@ -164,18 +200,42 @@ function finderjumpfull(page) > <input type="hidden" name="and_or" value="and" /> > <input type="hidden" name="excluding" value="" /> > <select name="operator" id="marclistheading"> >+ [% IF ( operator_match == 'contains' ) %] >+ <option value="contains" selected="selected">contains</option> >+ [% ELSE %] > <option value="contains">contains</option> >+ [% END %] >+ [% IF ( operator_match == 'start' ) %] >+ <option value="start" selected="selected">starts with</option> >+ [% ELSE %] > <option value="start">starts with</option> >+ [% END %] >+ [% IF ( operator_match == 'is' ) %] >+ <option value="is" selected="selected">is exactly</option> >+ [% ELSE %] > <option value="is">is exactly</option> >+ [% END %] > </select> > <input type="text" name="value_match" value="[% value_match |html %]" /> > </li> > <li> > <label for="orderby">Sort by: </label> > <select name="orderby" id="orderby"> >- <option value="">No order</option> >- <option value="HeadingAsc" selected="selected">Heading ascendant</option> >- <option value="HeadingDsc">Heading descendant</option> >+ [% IF ( orderby == 'HeadingAsc' ) %] >+ <option value="HeadingAsc" selected="selected">Heading A-Z</option> >+ [% ELSE %] >+ <option value="HeadingAsc">Heading A-Z</option> >+ [% END %] >+ [% IF ( orderby == 'HeadingDsc' ) %] >+ <option value="HeadingDsc" selected="selected">Heading Z-A</option> >+ [% ELSE %] >+ <option value="HeadingDsc">Heading Z-A</option> >+ [% END %] >+ [% IF ( orderby == '' && op ) %] >+ <option value="" selected="selected">None</option> >+ [% ELSE %] >+ <option value="">None</option> >+ [% END %] > </select> > </li></ol></fieldset> > [% IF source == 'auth' %] >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10808
:
20730
|
20731
|
21261
|
21262
|
21322
|
21323