[Bug 36742] New: Do not show Libraries in OPAC menu if there is just one public library
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Bug ID: 36742 Summary: Do not show Libraries in OPAC menu if there is just one public library Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org We are testing now for libraries>1 but we should check for the number of public libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl Version|unspecified |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This raises the question whether we are using singleBranchMode correctly. That variable comes from a time that we did not have the possibility to mark a library non public or designate a library as pickup location or not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30873 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 168267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168267&action=edit Bug 36742: Do not show library selection options if there is one or fewer public libraries If a system has only one library or only one library which is public we don't need to show library-selection menus. It doesn't make sense to show a dropdown with only one choice. This patch updates instances of Branches.all to add a "public => 1" parameter. To test, apply the patch and start with a set of multiple public libraries in your system (where public means the entry in Administration -> Libraries for that library has the "Public" option set to "Yes"). Log in to the OPAC test these pages, in each case confirming that the the library dropdown appears correctly. - OPAC home page (with OpacAddMastheadLibraryPulldown enabled) - OPAC news section (with existing news items and OpacNewsLibrarySelect enabled) - Advanced search (Location and availability section) - The "Most popular" page (with OpacTopissue enabled) - The suggestion entry form (with suggestion enabled) - The article request entry form (with ArticleRequests enabled and circulation rules configured to allow requests) Test again with only one library or only one public library. Test again with no public libraries. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 31817 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Needs Signoff |Patch doesn't apply --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- sha1 failure again I'm afraid Owen :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30873 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30873 [Bug 30873] "Libraries" link on OPAC should be hideable by system preference -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Martin Renvoize from comment #4)
sha1 failure again I'm afraid Owen :(
Sorry, forgot to link the dependency -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168267|0 |1 is obsolete| | --- Comment #6 from Jake Deery <jake.deery@ptfs-europe.com> --- Created attachment 168317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168317&action=edit Bug 36742: Do not show library selection options if there is one or fewer public libraries If a system has only one library or only one library which is public we don't need to show library-selection menus. It doesn't make sense to show a dropdown with only one choice. This patch updates instances of Branches.all to add a "public => 1" parameter. To test, apply the patch and start with a set of multiple public libraries in your system (where public means the entry in Administration -> Libraries for that library has the "Public" option set to "Yes"). Log in to the OPAC test these pages, in each case confirming that the the library dropdown appears correctly. - OPAC home page (with OpacAddMastheadLibraryPulldown enabled) - OPAC news section (with existing news items and OpacNewsLibrarySelect enabled) - Advanced search (Location and availability section) - The "Most popular" page (with OpacTopissue enabled) - The suggestion entry form (with suggestion enabled) - The article request entry form (with ArticleRequests enabled and circulation rules configured to allow requests) Test again with only one library or only one public library. Test again with no public libraries. Sponsored-by: Athens County Public Libraries Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Jake Deery <jake.deery@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |jake.deery@ptfs-europe.com --- Comment #7 from Jake Deery <jake.deery@ptfs-europe.com> --- Really nice, Owen. All the pages you've mentioned work so far. I do see a library dropdown on /cgi-bin/koha/opac-memberentry.pl — both when logged in, and when logged out — as well as on the facets (holding libraries). I can also see holdings for non-public libraries within the record's holdings table. Do we want to see non-public libraries here? This might not be a question in the scope of this bug, though. Signed off with thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Jake Deery from comment #7)
I do see a library dropdown on /cgi-bin/koha/opac-memberentry.pl
We have a preference for controlling which libraries go here. I wonder if that's enough?
I can also see holdings for non-public libraries within the record's holdings table.
I'm not sure about this. We have OpacHiddenItems and 942n "Suppress in OPAC." Do we need another layer? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #9 from Jake Deery <jake.deery@ptfs-europe.com> --- No — probably not, Owen. I wasn't familiar with either of these options, and they do exactly what you've described. I'll learn. Nice one on this one, it'll be a nifty enhancement :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Assignee|m.de.rooy@rijksmuseum.nl |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Owen, It seems that this changes makes a difference for e.g. article requests. I do not see any branch saved in the record anymore. This is in the 1 branch case. Previously this branch was saved in the record. That implies that you only see the request when looking for All libraries in staff. Can imagine that having no branch in the record is an unwished side-effect? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #11 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 168377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168377&action=edit Bug 36742: (follow-up) Add hidden branchcode input for OPAC article requests This patch adds a hidden input containing the logged-in user's branchcode to the article request form when there is only one public branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Marcel de Rooy from comment #10)
Can imagine that having no branch in the record is an unwished side-effect?
Agreed. I think it would cause confusion to have requests which were only visible if you viewed all libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Still looking at the suggestions part: git grep branchcode_hidden koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt: [% UNLESS ( branchcode_hidden || AllPublicBranches.size < 2 )%] It seems that branchcode_hidden is only there? Is it just some old artifact? And similarly: git grep branchcode_required koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt: [% IF ( branchcode_required ) %] How should this work? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- It would be nice if the query to get the branches were lazy loaded. As it stands the query looks to be unused unless OpacAddMastheadLibraryPulldown is enabled for at least one instance. Setting to FQA just because we need a response to Marcel. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Marcel de Rooy from comment #13)
It seems that branchcode_hidden is only there? Is it just some old artifact?
git blame knows: Bug 23420: Add OPACSuggestionUnwantedFields system pref
git grep branchcode_required koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt: [% IF ( branchcode_required ) %]
Bug 22657: Remove JavaScript from OPAC suggestion validation of required fields Both changes are very specific to the suggestions page. branchcode_hidden is about hiding the library selection field on the suggestions form. branchcode_required is about marking the library option as required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Sorry for this late reply. Owen, could you rebase please? Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168317|0 |1 is obsolete| | Attachment #168377|0 |1 is obsolete| | --- Comment #17 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 172520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172520&action=edit Bug 36742: Do not show library selection options if there is one or fewer public libraries If a system has only one library or only one library which is public we don't need to show library-selection menus. It doesn't make sense to show a dropdown with only one choice. This patch updates instances of Branches.all to add a "public => 1" parameter. To test, apply the patch and start with a set of multiple public libraries in your system (where public means the entry in Administration -> Libraries for that library has the "Public" option set to "Yes"). Log in to the OPAC test these pages, in each case confirming that the the library dropdown appears correctly. - OPAC home page (with OpacAddMastheadLibraryPulldown enabled) - OPAC news section (with existing news items and OpacNewsLibrarySelect enabled) - Advanced search (Location and availability section) - The "Most popular" page (with OpacTopissue enabled) - The suggestion entry form (with suggestion enabled) - The article request entry form (with ArticleRequests enabled and circulation rules configured to allow requests) Test again with only one library or only one public library. Test again with no public libraries. Sponsored-by: Athens County Public Libraries Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #18 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 172521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172521&action=edit Bug 36742: (follow-up) Add hidden branchcode input for OPAC article requests This patch adds a hidden input containing the logged-in user's branchcode to the article request form when there is only one public branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172520|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 172524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172524&action=edit Bug 36742: Do not show library selection options if there is one or fewer public libraries If a system has only one library or only one library which is public we don't need to show library-selection menus. It doesn't make sense to show a dropdown with only one choice. This patch updates instances of Branches.all to add a "public => 1" parameter. To test, apply the patch and start with a set of multiple public libraries in your system (where public means the entry in Administration -> Libraries for that library has the "Public" option set to "Yes"). Log in to the OPAC test these pages, in each case confirming that the the library dropdown appears correctly. - OPAC home page (with OpacAddMastheadLibraryPulldown enabled) - OPAC news section (with existing news items and OpacNewsLibrarySelect enabled) - Advanced search (Location and availability section) - The "Most popular" page (with OpacTopissue enabled) - The suggestion entry form (with suggestion enabled) - The article request entry form (with ArticleRequests enabled and circulation rules configured to allow requests) Test again with only one library or only one public library. Test again with no public libraries. Sponsored-by: Athens County Public Libraries Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172521|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 172525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172525&action=edit Bug 36742: (follow-up) Add hidden branchcode input for OPAC article requests This patch adds a hidden input containing the logged-in user's branchcode to the article request form when there is only one public branch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Do not show Libraries in |Do not show libraries in |OPAC menu if there is just |OPAC menu if there is just |one public library |one public library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like this good a bit "broader" and now fixes more cases when there is only one public library. We should adapt the bug description. I just fail to find the right words right now. Something about making the OPAC accounting for there only being one public library... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed |release-notes-needed Summary|Do not show libraries in |Improve OPAC behavior for |OPAC menu if there is just |instances with only one |one public library |library, including | |libraries page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Bug 36742 depends on bug 30873, which changed state. Bug 30873 Summary: "Libraries" link on OPAC should be hideable by system preference https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30873 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Bug 36742 depends on bug 30873, which changed state. Bug 30873 Summary: "Libraries" link on OPAC should be hideable by system preference https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30873 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED CC| |lucas@bywatersolutions.com Resolution|--- |FIXED --- Comment #23 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Missing deps for 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |This makes some changes in release notes| |how installations with only | |one library marked as | |public are handled. This | |affects and improves the | |display in several pages in | |the OPAC: | | | |- OPAC home page | |with | |`OpacAddMastheadLibraryPull | |down` enabled | |- OPAC news | |section with existing news | |items and | |`OpacNewsLibrarySelect` | |enabled | |- Advanced search - | |location and availability | |section | |- The "Most | |popular" page with | |`OpacTopissue` enabled | |- | |The suggestion entry form | |with `suggestion` enabled | |- | |The article request entry | |form with `ArticleRequests` | |enabled and circulation | |rules configured to allow | |requests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Bug 36742 depends on bug 30873, which changed state. Bug 30873 Summary: "Libraries" link on OPAC should be hideable by system preference https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30873 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36742 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40903 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40903 [Bug 40903] OPAC advanced search applies a location limit of the logged-in library by default -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org