[Bug 7970] New: Holds not working in OPAC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Priority: P5 - low Change sponsored?: --- Bug ID: 7970 CC: gmcharlt@gmail.com Assignee: koha.sekjal@gmail.com Summary: Holds not working in OPAC QA Contact: koha.sekjal@gmail.com Severity: major Classification: Unclassified OS: All Reporter: amit.gupta@osslabs.biz Hardware: All Status: NEW Version: rel_3_8 Component: Hold requests Product: Koha Holds not working in OPAC -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high CC| |savitra.sirohi@osslabs.biz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha.sekjal@gmail.com |amit.gupta@osslabs.biz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|rel_3_8 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Amit, can you give some more details? Which error message is displayed? Item level or record level holds? Have you checked your settings for maxreserves, AllowOnShelfHolds, ...? Do you have a default rule definded for all libraries all itemtypes and all patron categories with an allowed number of holds > 0? I am resetting the version to master - 3.8 should only be used by the RM at the moment or later after release to file a bug specific for 3.8. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #2 from Savitra Sirohi <savitra.sirohi@osslabs.biz> --- Katrin, it works if we setup a "default rule definded for all libraries all itemtypes and all patron categories with an allowed number of holds > 0". When such a rule is not defined, the error "sorry, none of the items can be placed on hold", also "title cannot be requested" is shown. The problem seems to be that in CanBookbeReserved: my @items = get_itemnumbers_of($biblionumber); #get items linked via host records my @hostitems = get_hostitemnumbers_of($biblionumber); foreach my $item (@items){ return 1 if CanItemBeReserved($borrowernumber, $item); } -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #3 from Amit Gupta <amit.gupta@osslabs.biz> --- Created attachment 9223 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9223&action=edit Hold Request -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #4 from Amit Gupta <amit.gupta@osslabs.biz> --- Created attachment 9224 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9224&action=edit Holds not working in OPAC To test: - create circulation rules for branch only for example (Midway branch). - No need to set default circulation rules. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> 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=7970 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Holds not working in OPAC |Allow OPAC holds per | |library policy without | |default rule -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #5 from Savitra Sirohi <savitra.sirohi@osslabs.biz> --- My comment above got truncated for some reason: Katrin, it works if we setup a "default rule definded for all libraries all itemtypes and all patron categories with an allowed number of holds > 0". When such a rule is not defined, the error "sorry, none of the items can be placed on hold", also "title cannot be requested" is shown. The problem seems to be that in CanBookbeReserved: my @items = get_itemnumbers_of($biblionumber); #get items linked via host records my @hostitems = get_hostitemnumbers_of($biblionumber); foreach my $item (@items){ return 1 if CanItemBeReserved($borrowernumber, $item); } CanItemBeReserved is expecting an itemnumber, but is receiving a hashref instead. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |chris@bigballofwax.co.nz --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Doesn't this totally change the behaviour? - push (@items,@hostitems); + push (@hostitems,$items); Then - foreach my $item (@items){ + my %itemhash = %$items; + foreach my $item (keys %itemhash) { These are not equivalent, you are now totally ignoring the hostitems, whereas before it was looping over them -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9223|0 |1 is obsolete| | Attachment #9224|0 |1 is obsolete| | --- Comment #7 from Amit Gupta <amit.gupta@osslabs.biz> --- Created attachment 9393 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9393&action=edit Bug 7970 - Allow OPAC holds per library policy without default rule By default ReservesControlBranch systempreference is not inserting in systempreferences table. For this reason we have to set up default circulation rule for all libraries all itemtypes and all patron categories. After this we have to set only circulation rule by branch wise no need to set up for all libraries, itemtypes and patron categories. To Test: 1) Go to mysql use koha database 2) mysql> select * from systempreferences where variable = 'ReservesControlBranch'; +-----------------------+-----------------+-------------------------------+--------------------------------------+--------+ | variable | value | options | explanation | type | +-----------------------+-----------------+-------------------------------+--------------------------------------+--------+ | ReservesControlBranch | ItemHomeLibrary | ItemHomeLibrary|PatronLibrary | Patron can place a hold on the item. | Choice | +-----------------------+-----------------+-------------------------------+--------------------------------------+--------+ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=5795 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Amit, I wrote a patch for bug 5795 to add the missing entry to the sql file. I think you are right, that we also need an updatedatabase. Would it perhaps be possible to check for existence of the system preference in the update? So we could avoid a red error message for users who already have the preference. The Patch for 5759 is signed off - but missing the update. How to proceed? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Fridolyn SOMERS <fridolyn.somers@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@gmail.com --- Comment #9 from Fridolyn SOMERS <fridolyn.somers@gmail.com> --- Hie, you can mark bug 5795 as duplicate of this one.
Would it perhaps be possible to check for existence of the system preference in the update? So we could avoid a red error message for users who already have the preference.
I agree. Add an existence test in update and patch will be ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Amit - perhaps you could add another patch to update the database as follow-up to 5795? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #11 from Amit Gupta <amit.gupta@osslabs.biz> --- Kartin, I am confuse if value already exists in database so we need to update database version? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Amit, I think we have a problem here where some installations have the value and others not. Apparently it was missing from the syspref.sql file for a while, so new installations don't have the value. Older installations got it with an earlier database update. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9393|0 |1 is obsolete| | --- Comment #13 from Amit Gupta <amit.gupta@osslabs.biz> --- Created attachment 9398 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9398&action=edit Update the database as follow-up to Bug 5795 Update the database as follow-up to Bug 5795 If value is not exist it insert new value other wise update the existing value. To Test: 1) Go to mysql use koha database 2) select * from systempreferences where variable = 'ReservesControlBranch'; 3) Show old result if value is present other wise it shows +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ | variable | value | options | explanation | type | +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ | ReservesControlBranch | ItemHomeLibrary | ItemHomeLibrary|PatronLibrary | Branch checked for members reservations rights. | Choice | +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #14 from Fridolyn SOMERS <fridolyn.somers@gmail.com> --- If value exists, why update it with the same value ? (see patch 9398) Note that even in a database where pref was missing at install, a change of it in intranet would create it in database. That's why if value exists, no need to do something. Someone agree ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I agree that a change would create it and that thre is no need to change or udate if it already exists - I think this is what Amit's follow-up achieves, but have not tested it yet. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #16 from Fridolyn SOMERS <fridolyn.somers@gmail.com> --- if (C4::Context->preference('ReservesControlBranch')){ my $sth = $dbh->prepare("UPDATE systempreferences SET value = ? WHERE variable = 'ReservesControlBranch'"); $sth->execute(C4::Context->preference('ReservesControlBranch')); } ... This part of patch updates pref with the same value. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Oh, I see it now, I think you are right, we only need to do something if it doesn't exist at all. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #18 from Chris Cormack <chris@bigballofwax.co.nz> --- I agree no need to update it when it hasn't changed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9398|0 |1 is obsolete| | --- Comment #19 from Amit Gupta <amit.gupta@osslabs.biz> --- Created attachment 9450 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9450&action=edit Update the database as follow-up to Bug 5795 If sys pref ReservesControlBranch has null then update the table to insert a ItemHomeLibrary as value To Test: 1) Go to mysql use koha database 2) select * from systempreferences where variable = 'ReservesControlBranch'; Check if value set to ItemHomeLibrary. +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ | variable | value | options | explanation | type | +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ | ReservesControlBranch | ItemHomeLibrary | ItemHomeLibrary|PatronLibrary | Branch checked for members reservations rights. | Choice | +-----------------------+-----------------+-------------------------------+-------------------------------------------------+--------+ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Amit Gupta <amit.gupta@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |DUPLICATE --- Comment #20 from Amit Gupta <amit.gupta@osslabs.biz> --- *** This bug has been marked as a duplicate of bug 5795 *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7970 Owen Leonard <oleonard@myacpl.org> 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