[Bug 17624] New: OPACXSLTResultsHideNFL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Bug ID: 17624 Summary: OPACXSLTResultsHideNFL Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |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=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|OPACXSLTResultsHideNFL |Hide not-for-loan items on | |search results' | |availability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57540 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57540&action=edit Bug 17624: Hide not-for-loan items on search results' availability Currently, not for loan items are listed as copies for reference on the OPAC XSLT search results. This reports add a preference to hide or show these not-for-loan items on the OPAC XSLT results view. It is: OPACXSLTResultsHideNFL. By default, it will still show them. So, no behavior change here. Note: This patch also removed a double line in the pref file that resulted in a small empty table row at the end of the Appearance section for OPAC preferences. Test plan: [1] Run the dbrev via the web installer. Verify that the pref is still off. This means that not-for-loans should be listed on the Availability line as "Copies available for reference". [2] Set the pref to Hide. [3] Verify that the not-for-loans are not shown in the search results. Note that you still see them in the details view (no problem: they are listed just as what they are: not for loan). [4] Set OpacItemLocation to Location. Look at the search results again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57541 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57541&action=edit Bug 17624: [Follow-up] Consistency between Availability and Location If OpacItemLocation is set to location, the opac results xslt shows something like: Availability: Copies available for loan: Library(1). Copies available for reference: Library(1). Location(s): Location_1 callnumber_1 Note that the reference item is not listed under Location, since the logic for that section is different. Simply stated: Available is created by two separate if statements, but Location is one if-else statement. This patch changes the Location logic to two if statements. In this process some single choose/when's are replaced by simple if's. Actually, the change is quite minimal. Test plan: [1] Set OPACXSLTResultsHideNFL to Show. Set OpacItemLocation to Location. [2] Use a biblio with two items. Put data in callnumber and location. Mark one item as not for loan. [3] Verify that you now see both items in the Location line of the search results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hmm Still looking little bit at another approach -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Hide not-for-loan items on |Hide (some) not-for-loan |search results' |items on search results' |availability |availability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What about hiding Staff collection only? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Marcel de Rooy from comment #4)
What about hiding Staff collection only?
+1 It does make more sense to me -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we should not start hardcode special behaviour to configurable sample values. A lot of people use them differently or change them, which is something we never have discouraged. It would be safer to make this a configuration option, as we have in other cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #6)
I think we should not start hardcode special behaviour to configurable sample values. A lot of people use them differently or change them, which is something we never have discouraged. It would be safer to make this a configuration option, as we have in other cases.
I agree. As you know, notforloan<0, notforloan==0 and notforloan>0 are tested already. It seems that we do not test ==1 though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, but all positive values show a specific behaviour already - you can't put a hold on them and you can't check them out without override. (notforloan>0) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57540|0 |1 is obsolete| | Attachment #57541|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57833&action=edit Bug 17624: Separate XSLT item status for Staff Collection In order to differentiate a regular not for loan with a not-for-loan that has the status "Staff Collection", this patch slightly adjusts the status in C4::XSLT::buildKohaItemsNamespace. This status is used in the OPAC results XSLT. If you do not have items with notforloan>=2, there will be no change in behavior. If you use notforloan=2 and did not change its authorised value description, a count for Staff Collection will be added in the Availability line. The items with notforloan==2 will no longer be viewed as "for reference". Higher values for notforloan will no longer be listed too as "for reference". (Same for a modified notforloan==2.) Note: I also considered using a plugin here or a specific preference. This solution is by far the simplest. Currently, we are presenting the item status in various places on various ways. A better solution would depend on consolidating the item status code in Koha::Item. Test plan: [1] Pick a biblio with three items: one should be for loan, set the other two to Not for loan and Staff Collection. [2] Look for this biblio on OPAC search results. Check Availability. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57834&action=edit Bug 17624: [Follow-up] Consistency between Availability and Location If OpacItemLocation is set to location, the opac results xslt shows something like: Availability: Copies available for loan: Library(1). Copies available for reference: Library(1). Location(s): Location_1 callnumber_1 Note that the reference item is not listed under Location, since the logic for that section is different. Simply stated: Available is created by two separate if statements, but Location is one if-else statement. This patch changes the Location logic to two if statements. In this process some single choose/when's are replaced by simple if's. Actually, the change is quite minimal. NOTE: A conditional <br> tag is removed from the XSLT between the reference section and the status counts. Test plan: [1] Set OpacItemLocation to Location. [2] Use a biblio with two items. Put data in callnumber and location. Mark one item as not for loan. [3] Verify that you now see both items in the Location line of the search results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Hide (some) not-for-loan |Add Staff Collection status |items on search results' |for items in C4::XSLT |availability | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Apart from consolidating item status code, we also should take into account the relation between Not-for-loan and Use-restrictions on the item record when resolving this more globally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am no fan of this approach. I think hardcoding behaviour for numeric values will break behaviour for libraries. I am still in favor of this being a configuration option. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #12)
I am no fan of this approach. I think hardcoding behaviour for numeric values will break behaviour for libraries. I am still in favor of this being a configuration option.
I have spent hours on other options. I will leave it at this point for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Comment #1 is|1 |0 private| | Comment #2 is|1 |0 private| | Comment #3 is|1 |0 private| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |BLOCKED --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Blocking this patch until a marvel(l)ous idea comes up.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Lisette <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |RESOLVED Resolution|--- |WONTFIX -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17624 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org