Bug 35307 - Expired holds are missing an input, so updating holds causes loss of data
Summary: Expired holds are missing an input, so updating holds causes loss of data
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 23.05
Hardware: All All
: P5 - low critical (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
Depends on:
Blocks:
 
Reported: 2023-11-09 21:25 UTC by Nick Clemens (kidclamp)
Modified: 2024-01-03 11:25 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.06,22.11.13


Attachments
Bug 35307: Add a hidden input for expired holds (1.62 KB, patch)
2023-11-13 16:04 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 35307: Add a hidden input for expired holds (1.66 KB, patch)
2023-11-14 23:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 35307: Add a hidden input for expired holds (1.72 KB, patch)
2023-11-15 20:01 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-11-09 21:25:15 UTC
In 23.05 when viewing a list of holds expired holds show as 'Expired: mm/dd/yyyy'

The table is a form, and when submitted, these expired rows have no input - so the array of expiration dates fetched is out of sync and rows after an expired hold can have dates set incorrectly.

To test:
1 - Place 3 holds on a bib, each for a different patron
2 - IN the db, set the first hold to be expired:
    UPDATE reserves SET expirationdate='2023-01-01' WHERE reserve_id=1;
3 - Refresh the holds page for the biblio
4 - Note the first hold now says 'Expired' in the expiration date column
5 - Set an expiration date for the last hold
6 - Click 'Update holds'
7 - Note the date is applied to the second hold
Comment 1 Nick Clemens (kidclamp) 2023-11-13 16:04:23 UTC
Created attachment 158888 [details] [review]
Bug 35307: Add a hidden input for expired holds

To test:
 1 - Place 3 holds on a bib, each for a different patron
 2 - IN the db, set the first hold to be expired:
    UPDATE reserves SET expirationdate='2023-01-01' WHERE reserve_id=1;
 3 - Refresh the holds page for the biblio
 4 - Note the first hold now says 'Expired' in the expiration date column
 5 - Set an expiration date for the last hold
 6 - Click 'Update holds'
 7 - Note the date is applied to the second hold
 8 - Delete the holds
 9 - Apply patch
10 - Repeat 1-6
11 - Confirm only the correct hold is updated
Comment 2 David Nind 2023-11-14 23:13:08 UTC
Created attachment 158957 [details] [review]
Bug 35307: Add a hidden input for expired holds

To test:
 1 - Place 3 holds on a bib, each for a different patron
 2 - IN the db, set the first hold to be expired:
    UPDATE reserves SET expirationdate='2023-01-01' WHERE reserve_id=1;
 3 - Refresh the holds page for the biblio
 4 - Note the first hold now says 'Expired' in the expiration date column
 5 - Set an expiration date for the last hold
 6 - Click 'Update holds'
 7 - Note the date is applied to the second hold
 8 - Delete the holds
 9 - Apply patch
10 - Repeat 1-6
11 - Confirm only the correct hold is updated

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-11-14 23:20:10 UTC
Can confirm that this is not an issues on master, and that the patch fixes the issue on 23.05.x.
Comment 4 Victor Grousset/tuxayo 2023-11-15 20:01:17 UTC
Created attachment 159006 [details] [review]
Bug 35307: Add a hidden input for expired holds

To test:
 1 - Place 3 holds on a bib, each for a different patron
 2 - IN the db, set the first hold to be expired:
    UPDATE reserves SET expirationdate='2023-01-01' WHERE reserve_id=1;
 3 - Refresh the holds page for the biblio
 4 - Note the first hold now says 'Expired' in the expiration date column
 5 - Set an expiration date for the last hold
 6 - Click 'Update holds'
 7 - Note the date is applied to the second hold
 8 - Delete the holds
 9 - Apply patch
10 - Repeat 1-6
11 - Confirm only the correct hold is updated

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-11-15 20:19:26 UTC
Thanks David for double checking master/main

Bug affects 22.11.x but not 22.05.x
Comment 6 Victor Grousset/tuxayo 2023-11-15 20:19:47 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 7 Fridolin Somers 2023-11-17 07:32:04 UTC
Pushed to 23.05.x for 23.05.06
Comment 8 Frédéric Demians 2023-12-18 10:13:31 UTC
Pushed to 22.11.x for 22.11.13