Bug 34686

Summary: reserve_id should be linked in tmp_holdsqueue
Product: Koha Reporter: Michaela Sieber <michaela.sieber>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: RESOLVED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: clemens.tubach, kyle, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34676
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 34686: Add reserve_id to tmp_holdsqueue table (database update)
Bug 34686: Write reserve_id to tmp_holdsqueue

Description Michaela Sieber 2023-09-01 09:31:14 UTC
It would be helpful to have the reserves_id linked in the tmp_holdsqueue lines
Comment 1 Katrin Fischer 2023-09-05 07:26:46 UTC
I think it's a great idea and we could also use it when updating entries instead of relying on borrowernumber/biblionumber or similar.
Comment 2 Katrin Fischer 2023-09-10 13:07:40 UTC
*** Bug 18196 has been marked as a duplicate of this bug. ***
Comment 3 Katrin Fischer 2023-09-22 16:28:26 UTC
Created attachment 156112 [details] [review]
Bug 34686: Add reserve_id to tmp_holdsqueue table (database update)
Comment 4 Katrin Fischer 2023-09-22 16:28:28 UTC
Created attachment 156113 [details] [review]
Bug 34686: Write reserve_id to tmp_holdsqueue

To test:
* Apply patch
* Run database update, dbic, restart_all
* Activate RealTimeHoldsQueue
* Place a hold on an available item
* Verify the reserve_id is now showing in tmp_holdsqueue
  SELECT * from tmp_holdsqueue;
* Run misc/cronjobs/holds/build_holds_queue.pl --force
* Verify the tmp_holdqueue still has the reserve_id
* Turn off RealTimeHoldsQueue
* Place another hold on an available item
* Run misc/cronjobs/holds/build_holds_queue.pl
* Verify the reserve_id is in tmp_holdsqueue
Comment 5 Katrin Fischer 2023-09-22 16:31:10 UTC
Patches worked in my tests, but might need some refinement.

@Nick or @Kyle - could you have a look maybe?
Comment 6 Nick Clemens (kidclamp) 2023-12-14 14:31:27 UTC
We have this information in the hold_fill_targets, what is the use case for adding it here?
Comment 7 Katrin Fischer 2024-01-02 08:24:01 UTC
(In reply to Nick Clemens from comment #6)
> We have this information in the hold_fill_targets, what is the use case for
> adding it here?

We didn't know about hold_fill_targets at the time. I think using it to create the link will be enough.