Bug 7314 - Remove singleBranchMode system preference in favour of counting configured branches
Summary: Remove singleBranchMode system preference in favour of counting configured br...
Status: RESOLVED DUPLICATE of bug 4941
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P4 minor (vote)
Assignee: Ian Walls
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-03 14:53 UTC by Ian Walls
Modified: 2018-10-11 16:01 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Walls 2011-12-03 14:53:33 UTC
Instead of relying on a system preference to determine whether there is only a single branch in the system or not, why not just count how many distinct branches are in the branches table?  This will reduce the number of moving parts, so to speak.

Proposed subroutine in C4::Branch:

GetBranchCount().  No inputs, returns integer value 0 or greater, corresponding to the output of SELECT count(*) FROM branches;

Once this subroutine is in place, we can slowly remove references to singleBranchMode syspref, which will fix numerous bugs involved with that particular feature.
Comment 1 Nicole C. Engard 2011-12-14 14:14:58 UTC
Ian, the description for singlebranchmode says "Allow/Don't allow patrons to select their branch on the OPAC." but it doesn't actually just do that. It also controls whether staff can choose their branch in the staff client. I think we need some such preference to let the libraries decide if their patrons and staff can choose a branch in the opac and staff client.
Comment 2 Katrin Fischer 2011-12-14 14:21:39 UTC
I think the description makes no sense as is. By design the SingleBranchMode is made to hide all things related to branches if you only have 1 branch. 

Because it makes no sense to have a branch facet, a pickup library or search for branches when there is only 1 branch. And the same applies to the staff interface. If there is only 1 branch, hiding the options is supposed to make it less confusing. So I think correcting the system preference description is the fix here, but there might be some additional functionality that is desirable.

For example:
- Make it possible to specify which branches are visible in the OPAC (so you could have an ILL library, internal departments as branches and such)
- Make it possible to specify which libraries can be pickup locations
- Make it a permission, if a staff user can change the library from his home library to another
Comment 3 Marc Véron 2016-01-05 15:51:18 UTC
Is this kind of duplicate of Bug 4941 ?
Comment 4 Jonathan Druart 2016-01-06 13:26:50 UTC

*** This bug has been marked as a duplicate of bug 4941 ***