[Bug 31779] New: Article Request form shows all locations in pickup library menu
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31779 Bug ID: 31779 Summary: Article Request form shows all locations in pickup library menu Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: ephetteplace@cca.edu QA Contact: testopia@bugs.koha-community.org To recreate: 1. have multiple locations/branches 2. set one to not be available as a pickup location 3. have an item where you can make article requests (e.g. a newspaper or journal) 4. go to the article request form for the item /cgi-bin/koha/opac-request-article.pl?biblionumber={{biblionumber}} 5. note the "pickup library" select menue at the bottom of the form Expected behavior: the location in step #2 will not be listed in the select menu because it is not an available pickup location. This is the case, for instance, on the holds form at /cgi-bin/koha/opac-reserve.pl?biblionumber={{biblionumber}}. Actual behavior: all libraries are listed. The template iterates over all branches `FOREACH b IN Branches.all` without discrimination. There's a question of whether article pickups and holds pickups should be treated the same, maybe there's some edge case where these are different, but for us and I would imagine the vast majority of libraries it doesn't make sense to offer a pickup location for articles when the branch itself doesn't process holds (usually means there are no circulation functions or staff at that location). I looked at the logic in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt to see if it could be easily copied over to the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt but it is not as straightforward as I'd expected. We will probably resort to OPACUserJS to work around this in the meantime. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31779 --- Comment #1 from Eric Phetteplace <ephetteplace@cca.edu> --- In case it's useful for other people, this is the custom JS I've added: if (location.pathname.match('/cgi-bin/koha/opac-request-article.pl')) { // remove invalid pickup library options $('option[value="NOTAPICKUPLIB1"], option[value="NOTAPICKUPLIB2"]').remove() } You need to add in your own branch codes. We actually only have one valid location so I added another line `$('#branchcode').parent().hide()` to hide the menu and its label altogether since there's no choice for users to make. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31779 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org CC| |gmcharlt@gmail.com, | |kyle.m.hall@gmail.com Component|OPAC |Circulation Version|22.05 |master Summary|Article Request form shows |Article request form shows |all locations in pickup |all locations in pickup |library menu |library menu --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Changing from OPAC to circulation as the article request form in staff probably shows the same behavior. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31779 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Article requests function| | -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org