[Bug 13478] New: Force item holds only for specific biblios
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Bug ID: 13478 Summary: Force item holds only for specific biblios Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7825 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 34513 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34513&action=edit Bug 13478: Force item holds only for specific biblios This patch adds the option to selectively force item holds for specific biblionumbers. These numbers are saved in a separate table. The patch adds routine C4::Reserves::CheckBiblioForceItemHolds. It is tested in Reserves.t. The preference OPACItemHolds gets a new choice: selectiveforce. The description of the pref is adjusted. Please note that this option is specifically targeted for the OPAC. Staff users still have both possibilities. A follow-up patch adds the possibility for staff users to add or remove a biblio from the list of books with forced item holds. TEST PLAN: [ 1] Run the database revision. [ 2] Run the unit test t/db_dependent/Reserves.t. [ 3] Set OPACItemHolds to force. [ 4] Add a hold in the OPAC; verify that you cannot place a next/av hold. [ 5] Set OPACItemHolds to Allow. [ 6] Add a hold in the OPAC; verify that you can place both hold types. [ 7] Set OPACItemHolds to Do not allow. [ 8] Add a hold in the OPAC; verify that you can only place next/av holds. [ 9] Add two biblio numbers into table biblio_force_item_holds. [10] Set OPACItemHolds to Selectively force. [11] Add a hold on three biblionumbers at once (including these two). Verify that you have two hold types for the single biblio and that you have only item holds for the two other biblios. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- I will open a new report to add the option of adding to the list. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13479 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34513|0 |1 is obsolete| | --- Comment #3 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 34947 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34947&action=edit Bug 13478: Database revision for table biblio_force_item_holds TEST PLAN: [1] Run the database revision. Check if the new table is present. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 34948 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34948&action=edit Bug 13478: Force item holds only for specific biblios This patch adds the option to selectively force item holds for specific biblionumbers. These numbers are saved in a separate table. The patch adds routine C4::Reserves::CheckBiblioForceItemHolds. It is tested in Reserves.t. The preference OPACItemHolds gets a new choice: selectiveforce. The description of the pref is adjusted. Please note that this option is specifically targeted for the OPAC. Staff users still have both possibilities. A follow-up patch adds the possibility for staff users to add or remove a biblio from the list of books with forced item holds. TEST PLAN: [ 1] Run the unit test t/db_dependent/Reserves.t. [ 2] Set OPACItemHolds to force. [ 3] Add a hold in the OPAC; verify that you cannot place a next/av hold. [ 4] Set OPACItemHolds to Allow. [ 5] Add a hold in the OPAC; verify that you can place both hold types. [ 6] Set OPACItemHolds to Do not allow. [ 7] Add a hold in the OPAC; verify that you can only place next/av holds. [ 8] Add two biblio numbers into table biblio_force_item_holds. [ 9] Set OPACItemHolds to Selectively force. [10] Add a hold on three biblionumbers at once (including these two). Verify that you have two hold types for the single biblio and that you have only item holds for the two other biblios. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34947|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 36193 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36193&action=edit Bug 13478: Database revision for table biblio_force_item_holds Easy conflict on updatedatabase.pl fixed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org --- Comment #6 from Nick Clemens <nick@quecheelibrary.org> --- All seemed to work as expected except for the test in step 2 (output below): t/db_dependent/Reserves.t .. 1/57 Subroutine C4::Context::userenv redefined at t/db_dependent/Reserves.t line 42. t/db_dependent/Reserves.t .. 29/57 C4::Context->userenv not defined! at /usr/share/koha/lib/C4/Items.pm line 2282 Undefined subroutine &C4::Reserves::CheckBiblioForceItemHolds called at t/db_dependent/Reserves.t line 512. # Looks like you planned 57 tests but ran 53. # Looks like your test exited with 255 just after 53. t/db_dependent/Reserves.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 4/57 subtests Test Summary Report ------------------- t/db_dependent/Reserves.t (Wstat: 65280 Tests: 53 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 57 tests but ran 53. Files=1, Tests=53, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.72 cusr 0.04 csys = 0.79 CPU) Result: FAIL Could be something I am missing but passed on master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #6) Thanks for testing ! > t/db_dependent/Reserves.t .. 1/57 Subroutine C4::Context::userenv redefined > at t/db_dependent/Reserves.t line 42. This warning is as expected (just as it is now). > t/db_dependent/Reserves.t .. 29/57 C4::Context->userenv not defined! at > /usr/share/koha/lib/C4/Items.pm line 2282 I have this result: ok 30 - patron not notified a second time (bug 11445) C4::Context->userenv not defined! at /usr/share/koha/testclone/C4/Items.pm line 2282. This warning is also to be expected (we could call this a separate bug in master). Test number 31 calls DelItemCheck($dbh, $bibnum, $itemnumber) and this routine goes to userenv on line 2287 in Items.pm. In conclusion: Not related to this report. > Undefined subroutine &C4::Reserves::CheckBiblioForceItemHolds called at > t/db_dependent/Reserves.t line 512. This is actually very strange. (I do not see this warning; for me the test passes.) Note that this routine CheckBiblioForceItemHolds is created by the first patch. Is your perl5lib path pointing at the right koha clone, or something like that ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34948|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 36237 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36237&action=edit Bug 13478: Force item holds only for specific biblios This patch adds the option to selectively force item holds for specific biblionumbers. These numbers are saved in a separate table. The patch adds routine C4::Reserves::CheckBiblioForceItemHolds. It is tested in Reserves.t. The preference OPACItemHolds gets a new choice: selectiveforce. The description of the pref is adjusted. Please note that this option is specifically targeted for the OPAC. Staff users still have both possibilities. A follow-up patch adds the possibility for staff users to add or remove a biblio from the list of books with forced item holds. TEST PLAN: [ 1] Run the unit test t/db_dependent/Reserves.t. [ 2] Set OPACItemHolds to force. [ 3] Add a hold in the OPAC; verify that you cannot place a next/av hold. [ 4] Set OPACItemHolds to Allow. [ 5] Add a hold in the OPAC; verify that you can place both hold types. [ 6] Set OPACItemHolds to Do not allow. [ 7] Add a hold in the OPAC; verify that you can only place next/av holds. [ 8] Add two biblio numbers into table biblio_force_item_holds. [ 9] Set OPACItemHolds to Selectively force. [10] Add a hold on three biblionumbers at once (including these two). Verify that you have two hold types for the single biblio and that you have only item holds for the two other biblios. Signed-off-by: Nick <nick@quecheelibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36193|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@quecheelibrary.org> --- Created attachment 36238 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36238&action=edit Bug 13478: Database revision for table biblio_force_item_holds TEST PLAN: [1] Run the database revision. Check if the new table is present. Signed-off-by: Nick <nick@quecheelibrary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #10 from Nick Clemens <nick@quecheelibrary.org> --- Ah, fixed it, but then did a new koha-shell and didn't fix it again, d'oh
Is your perl5lib path pointing at the right koha clone, or something like that ?
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Signed Off |In Discussion --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Would it not make much more sense to simply have a new `biblio` table field `force_item_level_holds` rather than creating a completely new table with only a single column? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #12 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #11)
Would it not make much more sense to simply have a new `biblio` table field `force_item_level_holds` rather than creating a completely new table with only a single column?
Not really, it is somewhat arbitrary. If many libraries would not use this feature or just mark some exceptions as such, it is much cheaper in terms of space to have an additional small table. I would choose now for a small start: Moving the data into biblio at some point in time is just a trivial db rev with a few lines and the table is gone! Back to Signed off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- FWIW I think Kyle is right, we don't need to create a new table for a 1:1 relationship. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I talked to Kyle earlier about this and I am also in favor of not adding another table. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36237|0 |1 is obsolete| | Attachment #36238|0 |1 is obsolete| | --- Comment #15 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 36566 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36566&action=edit Bug 13478: Force item holds only for specific biblios This patch adds the option to selectively force item holds for specific biblionumbers. The patch adds routine C4::Reserves::CheckBiblioForceItemHolds. It is tested in Reserves.t. The preference OPACItemHolds gets a new choice: selectiveforce. The description of the pref is adjusted. Please note that this option is specifically targeted for the OPAC. Staff users still have both possibilities. A follow-up report (13479) will add the possibility for staff users to enable the forced item hold on biblio level. TEST PLAN: [ 1] Run the unit test t/db_dependent/Reserves.t. [ 2] Set OPACItemHolds to force. [ 3] Add a hold in the OPAC; verify that you cannot place a next/av hold. [ 4] Set OPACItemHolds to Allow. [ 5] Add a hold in the OPAC; verify that you can place both hold types. [ 6] Set OPACItemHolds to Do not allow. [ 7] Add a hold in the OPAC; verify that you can only place next/av holds. [ 8] Enable forced item holds for two biblionumbers: UPDATE biblio SET forced_item_holds=1 WHERE biblionumber=? [ 9] Set OPACItemHolds to Selectively force. [10] Add a hold on three biblionumbers at once (including these two). Verify that you have two hold types for the single biblio and that you have only item holds for the two other biblios. Signed-off-by: Nick <nick@quecheelibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: Added the column to biblio and removed the separate table. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #16 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 36567 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36567&action=edit Bug 13478: Database revision (new biblio column and pref description) TEST PLAN: [1] Run the database revision. Check if the new column is present. Signed-off-by: Nick <nick@quecheelibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: Added a new column to biblio instead of the new table. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #17 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- In view of the overwhelming requests for a new column instead of a new small table :) I have slightly adjusted the two patches. Back to Signed off. If Nick could resign or one of the column requestors (Kyle, Jonathan, Katrin), that would be welcome too. In that case feel free to set back to NSO and add your SO. Thanks. BTW I will soon submit something for the follow-up report (13479). But no need to wait for that.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #18 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Probably resign is something different than re-sign (sign off again).. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #19 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. de Rooy from comment #17)
BTW I will soon submit something for the follow-up report (13479). But no need to wait for that..
If you do not like to run the update statement manually (in the test plan), apply the 13479 preliminary patch. And you can do it in the staff client. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36566|0 |1 is obsolete| | Attachment #36567|0 |1 is obsolete| | --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 36866 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36866&action=edit [PASSED QA] Bug 13478: Force item holds only for specific biblios This patch adds the option to selectively force item holds for specific biblionumbers. The patch adds routine C4::Reserves::CheckBiblioForceItemHolds. It is tested in Reserves.t. The preference OPACItemHolds gets a new choice: selectiveforce. The description of the pref is adjusted. Please note that this option is specifically targeted for the OPAC. Staff users still have both possibilities. A follow-up report (13479) will add the possibility for staff users to enable the forced item hold on biblio level. TEST PLAN: [ 1] Run the unit test t/db_dependent/Reserves.t. [ 2] Set OPACItemHolds to force. [ 3] Add a hold in the OPAC; verify that you cannot place a next/av hold. [ 4] Set OPACItemHolds to Allow. [ 5] Add a hold in the OPAC; verify that you can place both hold types. [ 6] Set OPACItemHolds to Do not allow. [ 7] Add a hold in the OPAC; verify that you can only place next/av holds. [ 8] Enable forced item holds for two biblionumbers: UPDATE biblio SET forced_item_holds=1 WHERE biblionumber=? [ 9] Set OPACItemHolds to Selectively force. [10] Add a hold on three biblionumbers at once (including these two). Verify that you have two hold types for the single biblio and that you have only item holds for the two other biblios. Signed-off-by: Nick <nick@quecheelibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: Added the column to biblio and removed the separate table. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 36867 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36867&action=edit [PASSED QA] Bug 13478: Database revision (new biblio column and pref description) TEST PLAN: [1] Run the database revision. Check if the new column is present. Signed-off-by: Nick <nick@quecheelibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: Added a new column to biblio instead of the new table. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13479 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13478 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply --- Comment #22 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- There we go -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org