[Bug 12242] New: Allow hiding branches from the OPAC search pulldowns
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 Bug ID: 12242 Summary: Allow hiding branches from the OPAC search pulldowns Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: pasi.kallinen@pttk.fi Reporter: pasi.kallinen@pttk.fi QA Contact: testopia@bugs.koha-community.org We have a branch where items go during db conversion, if the item has any errors. This branch should not be shown to the patrons. Patch to follow... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 --- Comment #1 from paxed <pasi.kallinen@pttk.fi> --- Created attachment 28202 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28202&action=edit Allow hiding branches from the OPAC search pulldowns Libraries may have branches which are not in actual use, for example our system has a branch where items with errors go during database conversion from our old ILS. These branches should not be shown to the patron. This patch adds a new syspref OpacHideBranches, where you can list branch codes, separated by pipe, to hide from the OPAC. To test: 1) Apply patch 2) Check OPAC where library pulldowns are shown, eg. Advanced Search so that all libraries are listed. 3) Edit syspref OpacHideBranch, set it to some branch codes, separated by pipe. 4) Check OPAC that those libraries do not show up in the pulldowns. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 paxed <pasi.kallinen@pttk.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 28202 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28202 Allow hiding branches from the OPAC search pulldowns Review of attachment 28202: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12242&attachment=28202) ----------------------------------------------------------------- ::: C4/Auth.pm @@ +417,5 @@
+ \@include_branches; + } else { + $tmpbranches; + } + },
Inline functions like this are difficult to maintain. They are also difficult to write tests for. If you modify C4 or Koha libraries, you need to write a test. This is only possible if you write this as a function. I'm assuming GetBranchesLoop is in C4/Branches, and I think this function would better fit there. This also seems like a convoluted way of doing it, but I could be wrong. ::: installer/data/mysql/sysprefs.sql @@ +235,4 @@
('OPACFRBRizeEditions','0','','If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), ('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'), ('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'), +('OpacHideBranches','',NULL,'Hide these branches from OPAC search branches pull-down. (Use short branch names, separated by pipe-characters.)','Free'),
I'm not sure a system preference is the best way to do it, because you also have search groups which could show up in the drop downs. Perhaps modifications to the library and group entry screens? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- I am failing this because of the lack of tests when modifying a C4 or Koha library. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12242 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #4 from Magnus Enger <magnus@enger.priv.no> --- paxed: Will you be using some other functionality to hide the items from searches? What happens if an item connected to your hidden branch turns up in a search? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org