Bug 23768

Summary: ISBN search in IntranetCatalogPulldown searches nothing if passed an invalid ISBN and using SearchWithISBNVariations
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: SearchingAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: hayleypelham, jonathan.druart, katrin.fischer, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00, 19.05.06, 18.11.12
Attachments: Bug 23768: Return invalid ISBN when searching with variations
Bug 23768: Return invalid ISBN when searching with variations
Bug 23768: Return invalid ISBN when searching with variations
Bug 23768: Adjust the test for invalid ISBN

Description Nick Clemens (kidclamp) 2019-10-07 17:44:04 UTC
To recreate:
1 - Enable SearchWithISBNVariations and  IntranetCatalogSearchPulldown 
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
Comment 1 Nick Clemens (kidclamp) 2019-10-07 17:49:19 UTC
Created attachment 93829 [details] [review]
Bug 23768: Return invalid ISBN when searching with variations

To test:
1 - Enable SearchWithISBNVariations and  IntranetCatalogSearchPulldown
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
6 - Apply patch, restart all the things
7 - Repeat search
8 - Search looks correctly formed
9 - Add the isbn above to a record, confirm it is returned by search
10 - Confirm searches for valid ISBNs still work as expected
Comment 2 Katrin Fischer 2019-10-08 20:52:13 UTC
Could we have a regression test for this one?
Comment 3 Katrin Fischer 2019-11-02 12:02:21 UTC
Created attachment 94963 [details] [review]
Bug 23768: Return invalid ISBN when searching with variations

To test:
1 - Enable SearchWithISBNVariations and  IntranetCatalogSearchPulldown
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
6 - Apply patch, restart all the things
7 - Repeat search
8 - Search looks correctly formed
9 - Add the isbn above to a record, confirm it is returned by search
10 - Confirm searches for valid ISBNs still work as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2019-11-02 12:02:38 UTC
A sign-off as incentive for a regression test?
Comment 5 Jonathan Druart 2019-11-07 10:49:46 UTC
Created attachment 95137 [details] [review]
Bug 23768: Return invalid ISBN when searching with variations

To test:
1 - Enable SearchWithISBNVariations and  IntranetCatalogSearchPulldown
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
6 - Apply patch, restart all the things
7 - Repeat search
8 - Search looks correctly formed
9 - Add the isbn above to a record, confirm it is returned by search
10 - Confirm searches for valid ISBNs still work as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2019-11-07 10:49:49 UTC
Created attachment 95138 [details] [review]
Bug 23768: Adjust the test for invalid ISBN

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2019-11-07 10:51:19 UTC
(In reply to Katrin Fischer from comment #4)
> A sign-off as incentive for a regression test?

There was a test, and it was failing :)
Comment 8 Martin Renvoize 2019-11-07 13:27:25 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Lucas Gass 2019-12-10 23:21:24 UTC
backported to 19.05.x for 19.05.06
Comment 10 Hayley Pelham 2019-12-17 05:22:56 UTC
Backported to 18.11.x for 18.11.12