Although the description of the syspref singleBranchMode implies that singleBranchMode is only relevant to the OPAC, in fact superlibrarians cannot change their branch on the staff client when it is set. Either the description of the syspref should be modified, or the syspref should be split into two, one that only impacts the OPAC, and one that only impacts the staff client.
I would contest that we shouldn't HAVE a singleBranchMode system preference. Rather, if only one branch is configured in the system, Koha should detect that, and not offer branch selection options.
I agree with Ian : SingleBranch is here to hide branch lists for the case of a single branch library (the list is useless) So, it shouldn't be here, and should just be detected through the number of lines in branches table. Having SingleBranch mode set and more than one branch sounds strange to me.
*** Bug 5053 has been marked as a duplicate of this bug. ***
This bug is still present in master as of 3.12 beta1. Although you can choose any branch when you're logging in, you can't change your library without logging out and logging in again. singleBranchMode blocks the form from appearing on the set library page.
*** Bug 7156 has been marked as a duplicate of this bug. ***
(In reply to Paul Poulain from comment #2) > Having SingleBranch mode set and more than one branch sounds strange to me. Same here, what's the point of having this pref enabled if you have more than 1 branch? (In reply to Ian Walls from comment #1) > I would contest that we shouldn't HAVE a singleBranchMode system preference. > Rather, if only one branch is configured in the system, Koha should detect > that, and not offer branch selection options. What about this idea? singleBranchMode could be set in Auth.pm and sent to templates.
Looking at the pref or doing a count of the branches in Auth.pm? Trying to understand :)
(In reply to Katrin Fischer from comment #7) > Looking at the pref or doing a count of the branches in Auth.pm? Trying to > understand :) Count the branches from Auth and remove the pref everywhere. $template->param( singleBranchMode => Koha::Branches->search->count );
Sounds good to me :)
(In reply to Jonathan Druart from comment #8) > (In reply to Katrin Fischer from comment #7) > > Looking at the pref or doing a count of the branches in Auth.pm? Trying to > > understand :) > > Count the branches from Auth and remove the pref everywhere. > $template->param( singleBranchMode => Koha::Branches->search->count ); Yes, that makes sense.
Created attachment 46311 [details] [review] Bug 4941: Make tests non DB dependent
Created attachment 46312 [details] [review] Bug 4941: DB Changes
Created attachment 46313 [details] [review] Bug 4941: Remove the singleBranchMode system preference The singleBranchMode system preference does not make sense. Either the install has only 1 library defined or several. In both case, we can easily guess the behavior to follow. So the idea of this patch is to replace the fetch of this syspref with a call to count the number of libraries defined in DB. Test plan: 1/ From a fresh Koha install, execute the DB entry to remove the pref. 2/ Define only 1 library 3/ Confirm that Koha behaves the same as before (try to change your library, look at the facets) 4/ Create another library (or more) and reinsert the pref and set it: insert into systempreferences (variable, value) values('singleBranchMode', 1); 5/ Execute the DB entry You should get a warning message. 6/ Repeat 3.
Current master, on top of 15294, patch does not apply Applying: Bug 4941: Remove the singleBranchMode system preference fatal: sha1 information is lacking or useless (C4/Auth.pm). Repository lacks necessary blobs to fall back on 3-way merge.
(In reply to Bernardo Gonzalez Kriegel from comment #14) > Current master, on top of 15294, patch does not apply Sorry, depends on bug 15295 too.
*** Bug 7314 has been marked as a duplicate of this bug. ***
Created attachment 46755 [details] [review] Bug 4941: Make tests non DB dependent Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 46756 [details] [review] Bug 4941: DB Changes Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 46757 [details] [review] Bug 4941: Remove the singleBranchMode system preference The singleBranchMode system preference does not make sense. Either the install has only 1 library defined or several. In both case, we can easily guess the behavior to follow. So the idea of this patch is to replace the fetch of this syspref with a call to count the number of libraries defined in DB. Test plan: 1/ From a fresh Koha install, execute the DB entry to remove the pref. 2/ Define only 1 library 3/ Confirm that Koha behaves the same as before (try to change your library, look at the facets) 4/ Create another library (or more) and reinsert the pref and set it: insert into systempreferences (variable, value) values('singleBranchMode', 1); 5/ Execute the DB entry You should get a warning message. 6/ Repeat 3. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Does what it says, but will change behaviour for any Koha install that has 2 branches defined, One circulation, and this preference set. If that is an acceptable change, we might need to make sure this is noted well in the release notes.
Created attachment 47199 [details] [review] Bug 4941: Make tests non DB dependent Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 47200 [details] [review] Bug 4941: Make tests non DB dependent Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Current status: Passed QA
Created attachment 47201 [details] [review] Bug 4940: DB Changes Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> http://bugs.koha-community.org/show_bug.cgi?id=4941 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 47202 [details] [review] Bug 4941: Remove the singleBranchMode system preference The singleBranchMode system preference does not make sense. Either the install has only 1 library defined or several. In both case, we can easily guess the behavior to follow. So the idea of this patch is to replace the fetch of this syspref with a call to count the number of libraries defined in DB. Test plan: 1/ From a fresh Koha install, execute the DB entry to remove the pref. 2/ Define only 1 library 3/ Confirm that Koha behaves the same as before (try to change your library, look at the facets) 4/ Create another library (or more) and reinsert the pref and set it: insert into systempreferences (variable, value) values('singleBranchMode', 1); 5/ Execute the DB entry You should get a warning message. 6/ Repeat 3. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Does what it says, but will change behaviour for any Koha install that has 2 branches defined, One circulation, and this preference set. If that is an acceptable change, we might need to make sure this is noted well in the release notes. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48394 [details] [review] Bug 4941: Make tests non DB dependent Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48395 [details] [review] Bug 4941: Make tests non DB dependent Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48396 [details] [review] Bug 4940: DB Changes Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> http://bugs.koha-community.org/show_bug.cgi?id=4941 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48397 [details] [review] Bug 4941: Remove the singleBranchMode system preference The singleBranchMode system preference does not make sense. Either the install has only 1 library defined or several. In both case, we can easily guess the behavior to follow. So the idea of this patch is to replace the fetch of this syspref with a call to count the number of libraries defined in DB. Test plan: 1/ From a fresh Koha install, execute the DB entry to remove the pref. 2/ Define only 1 library 3/ Confirm that Koha behaves the same as before (try to change your library, look at the facets) 4/ Create another library (or more) and reinsert the pref and set it: insert into systempreferences (variable, value) values('singleBranchMode', 1); 5/ Execute the DB entry You should get a warning message. 6/ Repeat 3. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Does what it says, but will change behaviour for any Koha install that has 2 branches defined, One circulation, and this preference set. If that is an acceptable change, we might need to make sure this is noted well in the release notes. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 48398 [details] [review] Bug 4941 [QA Followup] - Retain singleBranchMode in list of sysprefs passed to XSLT
Pushed to master, thanks Jonathan! Should be in the Koha 3.24 release!