This adds an additional test case to document the behavior
that if AdvancedSearchTypes contains 'itemtypes' or /is/
'itemtypes', that it returns the same results.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch ensures that the list of desired formats for a purchase
suggestion includes the list of item types so long as the
AdvancedSearchTypes system preference includes '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
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.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Display suggestion info in acquisition module:
basket.pl
neworderempty.pl
orderreceive.pl
parcel.pl
To Test:
Create a suggestion and accept it.
Create a new order from this suggestion
Receive this order
For each step, check if suggestion info are visible.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test provides more unit tests, all complete successfully.
perl t/db_dependent/Suggestions.t
Note: test case should be cleaned up after running tests.
Display changes are consistent and information about the suggestion
is shown on every important screen now.
I created an order from a suggestion and one from an existing record.
No problems found.
Enhancing C4::SearchSuggestion
And changing its API
Changing C4::Suggestions API taking a hashref for NewSuggestion and ModSuggestion
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>