[Koha-bugs] [Bug 32565] Holds placed when all libraries are closed do not get added to holds queue if HoldsQueueSkipClosed and RealTimeHoldsQueue are enabled

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 22 12:21:27 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32565

Pedro Amorim <pedro.amorim at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pedro.amorim at ptfs-europe.co
                   |                            |m

--- Comment #9 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
This is my understanding of the suggested solution:
In order to address the problem reported in the original post, one would have
to configure the cronjob entry "build_holds_queue.pl --unallocated" on top of
the sys pref configurations stated in the original post (HoldsQueueSkipClosed =
"open" and RealTimeHoldsQueue = "enabled").
In other words, the patch alone does not prevent the issue, it aims to fix the
issue after it has occurred, when the cron runs by allocating the unallocated
holds. Please correct me if I'm wrong.

Observations with the patch:
- My understanding is that RealTimeHoldsQueue and the build_holds_queue.pl
cronjob are/were designed to be mutually exclusive, or at least for the most
part, i.e. either use one of the other (?).
This patch enforces the relationship between the syspref+cronjob, i.e. one
would be expected to use both RealTimeHoldsQueue and the build_holds_queue.pl
cronjob (at least when HoldsQueueSkipClosed is set to "open").
I think this is confusing. I think we should have one way or the other but,
honestly/ideally, just one standard way of doing this.

- With all of the above said, and having tested the patch, I don't think it
does what it's designed to do. To recreate, clean k-t-d:
1) Apply both patches
2) Enable RealTimeHoldsQueue and set HoldsQueueSkipClosed to "open"
3) Add a holiday to the calendar for all libraries for today, visit:
/cgi-bin/koha/tools/holidays.pl
-- Click today's day on the calendar and pick "Holiday repeated every same day
of the week"
-- Click "Copy to all libraries". Hit "Save.
4) Place a biblio-level hold on a biblio record and set the pickup location to
a library that has available copies, visit:
-- /cgi-bin/koha/reserve/request.pl?biblionumber=76&borrowernumber=51
-- Click the first "Place hold" button to place the biblio-level hold.
5) Verify that that hold got added to the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
6) Place a biblio-level hold on a biblio record where there are no other holds
and copies are available at another location, but not the pickup location,
visit:
-- /cgi-bin/koha/reserve/request.pl?biblionumber=437&borrowernumber=51
-- On the "pickup at" dropdown, pick something else other than "Centerville",
e.g. "Fairfield".
-- Click the first "Place hold" button to place the biblio-level hold.
7) Check the holds queue again, notice that this 2nd hold was not added to the
queue:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
8) Run the updated cronscript:
perl misc/cronjobs/holds/build_holds_queue.pl --force --unallocated
9) Notice nothing changed in the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1
10) Remove the holiday we created previously, visit:
/cgi-bin/koha/tools/holidays.pl
-- Click today's day on the calendar and pick "Delete this holiday"
-- Click "Copy to all libraries". Hit "Save.
11) Run the updated cronscript:
perl misc/cronjobs/holds/build_holds_queue.pl --force --unallocated
12) Notice nothing changed in the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1

At this point I would have expected the unallocated hold to have been placed,
but it isn't.

13) Lastly, run the cron script without 'unallocated':
perl misc/cronjobs/holds/build_holds_queue.pl --force
14) Notice both holds are now in the holds queue, visit:
/cgi-bin/koha/circ/view_holdsqueue.pl?branchlimit=&itemtypeslimit=&ccodeslimit=&locationslimit=&run_report=1

My understanding is that the downside of running the cron with --force while
having the syspref configured as above, is that the whole queue is rebuilt and
some items previously allocated may be swapped around (?), and this is why
having the cron with --force plus the sysprefs is not recommended. Correct me
if I'm wrong please.

I don't have a proposed fix of my own as I don't think I understand any of this
well enough to provide one efficiently.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list