Bug 11466 - Purchase suggestion itemtypes, only default available if AdvancedSearchTypes not equal 'itemtypes'
Summary: Purchase suggestion itemtypes, only default available if AdvancedSearchTypes ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-02 07:22 UTC by Olli-Antti Kivilahti
Modified: 2014-12-07 20:07 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11466 - Purchase suggestion itemtypes, only default available if AdvancedSearchTypes not equal 'itemtypes' (3.11 KB, patch)
2014-01-02 08:29 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11466 - Purchase suggestion itemtypes, only default available if AdvancedSearchTypes not equal 'itemtypes' (3.38 KB, patch)
2014-01-08 20:43 UTC, Nicole C. Engard
Details | Diff | Splinter Review
[PASSED QA] Bug 11466 - Purchase suggestion itemtypes, only default available if AdvancedSearchTypes not equal 'itemtypes' (3.53 KB, patch)
2014-01-12 22:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2014-01-02 07:22:58 UTC
When system preference AdvancedSearchTypes has other values than 'itemtypes', for ex 'itemtypes|loc', itemtypes selection in opac-suggestions.pl is not populated with available itemtypes.

This patch fixes the issue by broadening the strict comparison of
($advanced_search_types eg 'itemtypes') #fails 'itemtypes|loc'
to 
($advanced_search_types =~ 'itemtypes') #succeeds 'itemtypes|loc'
Comment 1 Olli-Antti Kivilahti 2014-01-02 08:29:03 UTC Comment hidden (obsolete)
Comment 2 Olli-Antti Kivilahti 2014-01-02 08:29:37 UTC
Sponsored by the Joensuu Regional Library
Comment 4 Nicole C. Engard 2014-01-08 20:43:40 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-01-12 22:29:15 UTC
Created attachment 24216 [details] [review]
[PASSED QA] Bug 11466 - Purchase suggestion itemtypes, only default available if AdvancedSearchTypes not equal 'itemtypes'

--------------
-- Synopsis --
--------------

When system preference AdvancedSearchTypes has other values than 'itemtypes',
for ex 'itemtypes|loc', itemtypes selection in opac-suggestions.pl
is not populated with available itemtypes.

This patch fixes the issue by broadening the strict comparison of
($advanced_search_types eg 'itemtypes') #fails 'itemtypes|loc'
to
($advanced_search_types =~ 'itemtypes') #succeeds 'itemtypes|loc'

Unit tests included

---------------
-- Test plan --
---------------

REPLICATING THE ISSUE
1. Set system preference  AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have only the default value

AFTER APPLYING THIS PATCH
1. Set system preference  AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have itemtypes available for selection

Thanks for testing!
You are awesome!
gg

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tests worked as expected. Placed a suggestion and saw the whole
list of item types, chose one, saved, checked staff and it loaded
as expected. Changed item type in staff and it applied in both
views.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests including new regression tests.
Restores old functionality.
Comment 6 Galen Charlton 2014-05-04 23:26:11 UTC
Pushed to master.  Thanks, Olli!