Bug 28658 - With SearchMyLibraryFirst: If library isn't set for the OPAC, try to guess it by checking branchip
Summary: With SearchMyLibraryFirst: If library isn't set for the OPAC, try to guess it...
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Michael Hafen
QA Contact: Testopia
URL:
Keywords:
Depends on: 28657
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-02 17:09 UTC by Michael Hafen
Modified: 2023-11-03 20:11 UTC (History)
5 users (show)

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


Attachments
Proposed patch (1.54 KB, patch)
2021-07-02 17:12 UTC, Michael Hafen
Details | Diff | Splinter Review
Bug 28658 - With SearchMyLibraryFirst guess the opac clients library (1.60 KB, patch)
2023-04-11 10:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hafen 2021-07-02 17:09:30 UTC
If the SearchMyLibraryFirst syspref is set, the OPAC uses the logged in users branchcode to limit searches to their library.  If it's an anonymous session that doesn't happen.  This tries to guess the client library by checking for the client ip address in each libraries branchip setting.
Comment 1 Michael Hafen 2021-07-02 17:12:05 UTC
Created attachment 122573 [details] [review]
Proposed patch
Comment 2 Owen Leonard 2021-07-06 11:23:51 UTC
Is this ready for testing? If so please set the status to "Needs Signoff."
Comment 3 Lucas Gass 2022-04-27 15:19:06 UTC
Hi Micheal,

The dependency for this bug, Bug 28657, no longer applies cleanly to master. Therefore I am going to set this one to blocked until 28657 is rebased.
Comment 4 Michael Hafen 2022-04-27 17:27:05 UTC
Bug 28657 has been rebased.

Test plan:

1. Turn on SearchMyLibraryFirst system preference.
2. Make sure your computers ip address is covered by a branch's branchip.
3. Go to opac.
4. Observe that the branch isn't set.
5. Apply patch.  Restart things if necessary
6. Reload opac.
7. Observe that the branch is set.
Comment 5 Laura Escamilla 2023-04-07 13:04:35 UTC
Hi Michael, 

The dependency bug, Bug 28657, still does not apply cleanly to master. 

Auto-merging C4/Auth.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 28657: expand branches.branchip to allow for multiple ip ranges.
[33mhint: Use 'git am --show-current-patch=diff' to see the failed patch[m
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-28657-expand-branchesbranchip-to-allow-for-mul-gxoeH0.patch

Cannot apply cleanly patches from bug 28657. Everything will be left dirty.

I'm going to mark this bug as blocked again.
Comment 6 Michael Hafen 2023-04-10 21:44:19 UTC
Bug 28657 has been rebased.
Comment 7 ByWater Sandboxes 2023-04-11 10:49:40 UTC
Created attachment 149432 [details] [review]
Bug 28658 - With SearchMyLibraryFirst guess the opac clients library

If the SearchMyLibraryFirst syspref is set, the OPAC uses the logged in
users branchcode to limit searches to their library.  If it's an anonymous
session that doesn't happen.  This tries to guess the client library by
checking for the client ip address in each libraries branchip setting.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Comment 8 Marcel de Rooy 2023-09-29 08:43:27 UTC
Setting to Blocked. Dependency is in FQA
Comment 9 Michael Hafen 2023-10-05 19:47:46 UTC
Setting back to Signed Off.  Dependency is back to Needs signoff.
Comment 10 Katrin Fischer 2023-11-03 20:11:35 UTC
This is currently BLOCKED - we need a sign-off on the dependency first.