Bug 14351 - Remove given-when from opac-search.pl
Summary: Remove given-when from opac-search.pl
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
Depends on: 13307
  Show dependency treegraph
Reported: 2015-06-06 15:29 UTC by Katrin Fischer
Modified: 2016-12-05 21:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:

Bug 14351: Remove given-when from opac-search.pl (1.63 KB, patch)
2015-06-07 23:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14351: Remove given-when from opac-search.pl (1.77 KB, patch)
2015-06-14 02:51 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 14351: Remove given-when from opac-search.pl (1.83 KB, patch)
2015-06-16 08:35 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-06-06 15:29:26 UTC
given ($pathcode)
  when ('"ads"') { $template->param('ReturnPath' => '/cgi-bin/koha/opac-search.pl?returntosearch=1'); }
    when ('"exs"') {
      $template->param('ReturnPath' => '/cgi-bin/koha/opac-search.pl?expanded_options=1&returntosearch=1');
        default {warn "ReturnPath swith error";}
Comment 1 Katrin Fischer 2015-06-07 23:58:02 UTC Comment hidden (obsolete)
Comment 2 M. Tompsett 2015-06-14 02:31:39 UTC
Comment on attachment 39964 [details] [review]
Bug 14351: Remove given-when from opac-search.pl

Review of attachment 39964 [details] [review]:

Lovely code clean up that improves readability!
Comment 3 M. Tompsett 2015-06-14 02:51:24 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-06-16 08:35:41 UTC
Created attachment 40162 [details] [review]
Bug 14351: Remove given-when from opac-search.pl

Reformats given-when to if-elsif-else in opac-search.pl
to remove the experimental feature and with it a lot
of warnings from the logs.

To test:
- Do several different advanced searches with and
  without expanded search options
- Verify the link back to the search appears above
  the results list and works correctly

See also: test plan on bug 13307

NOTE: Even installed firefox plug in to edit cookies to
      trigger else case. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 5 Tomás Cohen Arazi 2015-06-17 12:57:46 UTC
Patch pushed to master.

Thanks Katrina!
Comment 6 Chris Cormack 2015-06-17 22:22:35 UTC
Pushed to 3.20.x will be in 3.20.1
Comment 7 Liz Rea 2015-06-22 23:32:06 UTC

This patch doesn't apply cleanly to 3.18.x. If you feel it should be included, please provide a version for 3.18.x.

Comment 8 Katrin Fischer 2015-06-23 06:05:30 UTC
Bug 13307 is not in 3.18, so this is not needed.