Bug 29152

Summary: Change to default search behavior when limiting by branch
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: SearchingAssignee: Nick Clemens <nick>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, kyle, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05
Bug Depends on: 21249    
Bug Blocks:    
Attachments: Bug 29152: Change default value for SearchLimitLibrary to 'homebranch'
Bug 29152: Change default value for SearchLimitLibrary to 'homebranch'

Description Andrew Fuerste-Henry 2021-10-01 14:59:39 UTC
Prior to bug 21249, branch limits in searching were enforced based on the item homebranch. Bug 21249 introduces a syspref to control how those limits are enforced. That's good. But on update the syspref is set to limit based on BOTH homebranch and holdingbranch. That's bad. 

From 21249:
$dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('SearchLimitLibrary', 'both', 'homebranch|holdingbranch|both', "When limiting search results with a library or library group, use the item's home library, or holding library, or both.", 'Choice')});

Should we not make that default to homebranch in order to not silently change how searches work? This makes a *huge* difference in search results.
Comment 1 Nick Clemens 2021-10-06 12:58:38 UTC
Created attachment 125799 [details] [review]
Bug 29152: Change default value for SearchLimitLibrary to 'homebranch'

Behvaiour before this option was added was 'homebranch'
We should preserve this rather than introduce a change

No atomic update added as liobraries may have already set/changed the value,
but safer to default to previous behvaiour
Comment 2 Martin Renvoize 2021-11-01 16:37:52 UTC
Created attachment 127180 [details] [review]
Bug 29152: Change default value for SearchLimitLibrary to 'homebranch'

Behvaiour before this option was added was 'homebranch'
We should preserve this rather than introduce a change

No atomic update added as liobraries may have already set/changed the value,
but safer to default to previous behvaiour

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2021-11-01 16:38:44 UTC
Trivial fix, no errors in testing.

PQA
Comment 4 Jonathan Druart 2021-11-02 15:53:52 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-11-05 12:58:55 UTC
Pushed to 21.05.x for 21.05.05
Comment 6 Fridolin Somers 2021-11-11 00:48:12 UTC
Depends on Bug 21249 not in 20.11.x