With the option to have real time updates to tmp_holdsqueue (and maybe don't run the build_holdqueue?) as a consequence, it would be interesting to see when an entry was added or updated in the queue. We should have a timestamp!
Created attachment 142767 [details] [review] Bug 31948: Add timestamp to tmp_holdsqueue table With the option to have real time updates to tmp_holdsqueue a timestamp will be really helpful to help find the most recently added entries. To test: * Place some holds on a record with available items * Run build_holds-queue.pl * Verify the hold shows up under circulation > holds queue * Apply patch * Run build_holds_queue.pl again * Verify this works without any issues * Turn on RealTimeHoldsQueue * Update pick-up location, add another hold * Make sure these changes are reflected in the holds queue as well * Look at the database and verify timestamps are set
*** Bug 18440 has been marked as a duplicate of this bug. ***
Created attachment 142773 [details] [review] Bug 31948: Add timestamp to tmp_holdsqueue table With the option to have real time updates to tmp_holdsqueue a timestamp will be really helpful to help find the most recently added entries. To test: * Place some holds on a record with available items * Run build_holds-queue.pl * Verify the hold shows up under circulation > holds queue * Apply patch * Run build_holds_queue.pl again * Verify this works without any issues * Turn on RealTimeHoldsQueue * Update pick-up location, add another hold * Make sure these changes are reflected in the holds queue as well * Look at the database and verify timestamps are set Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 142774 [details] [review] Bug 31948: Add timestamp to tmp_holdsqueue table With the option to have real time updates to tmp_holdsqueue a timestamp will be really helpful to help find the most recently added entries. To test: * Place some holds on a record with available items * Run build_holds-queue.pl * Verify the hold shows up under circulation > holds queue * Apply patch * Run build_holds_queue.pl again * Verify this works without any issues * Turn on RealTimeHoldsQueue * Update pick-up location, add another hold * Make sure these changes are reflected in the holds queue as well * Look at the database and verify timestamps are set Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle, hope it's ok with you - we are counting you for QA and Owen as SO. If you
(In reply to Katrin Fischer from comment #5) > Kyle, hope it's ok with you - we are counting you for QA and Owen as SO. If > you Yeah, he reviewed it per my request so it is PQA.
Pushed to master for 22.11. Nice work everyone, thanks!
+ $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request}); Hmm. No check if column exists? Not idempotent.. Resulting in: Upgrade to 22.06.00.075 [09:27:16]: Bug 31948 - Add timestamp to tmp_holdsqueue table ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate column name 'timestamp' at /usr/share/koha/C4/Installer.pm line 739
(In reply to Marcel de Rooy from comment #8) > + $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp > NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER > item_level_request}); > > Hmm. No check if column exists? Not idempotent.. > > Resulting in: > Upgrade to 22.06.00.075 [09:27:16]: Bug 31948 - Add timestamp to > tmp_holdsqueue table > ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate column > name 'timestamp' at /usr/share/koha/C4/Installer.pm line 739 Hi Marcel, you are right, we should add the check. Sorry for missing it. I probably won't be able to provide the patch today or tomorrow tho :(
Enhancement will not be backported to 22.05.x
(In reply to Katrin Fischer from comment #9) > (In reply to Marcel de Rooy from comment #8) > > + $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp > > NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER > > item_level_request}); > > > > Hmm. No check if column exists? Not idempotent.. > > > > Resulting in: > > Upgrade to 22.06.00.075 [09:27:16]: Bug 31948 - Add timestamp to > > tmp_holdsqueue table > > ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate column > > name 'timestamp' at /usr/share/koha/C4/Installer.pm line 739 > > Hi Marcel, you are right, we should add the check. Sorry for missing it. I > probably won't be able to provide the patch today or tomorrow tho :( Moved the resolution of this to bug 33051 and removed the additional_work_needed keyword.