Bug 39710 - Cannot load holds history if there are deleted biblios
Summary: Cannot load holds history if there are deleted biblios
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Matt Blenkinsop
URL:
Keywords: rel_24_11_candidate
Depends on:
Blocks: 38395
  Show dependency treegraph
 
Reported: 2025-04-23 12:09 UTC by Nick Clemens (kidclamp)
Modified: 2025-05-02 12:06 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39710: Unit test (1.30 KB, patch)
2025-04-23 12:18 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39710: Handle deleted biblios in holds history (2.12 KB, patch)
2025-04-23 12:18 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39710: Unit test (1.34 KB, patch)
2025-04-23 14:06 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39710: Handle deleted biblios in holds history (2.17 KB, patch)
2025-04-23 14:06 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 39710: Unit test (1.41 KB, patch)
2025-05-01 14:38 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 39710: Handle deleted biblios in holds history (2.24 KB, patch)
2025-05-01 14:38 UTC, Matt Blenkinsop
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) 2025-04-23 12:09:54 UTC
To recreate:
 - place a hold
 - cancel the hold
 - look in patron hold history, see the title
 - delete the biblio
 - reload patron hold history, error
[2025/04/23 11:43:28] [WARN] OpenAPI >>> GET api/v1/patrons/5/holds [{"message":"Expected integer - got null.","path":"\/body\/3\/biblio_id"},{"message":"Expected integer - got null.","path":"\/body\/4\/biblio_id"}]
Comment 1 Nick Clemens (kidclamp) 2025-04-23 12:18:57 UTC
Created attachment 181367 [details] [review]
Bug 39710: Unit test
Comment 2 Nick Clemens (kidclamp) 2025-04-23 12:18:59 UTC
Created attachment 181368 [details] [review]
Bug 39710: Handle deleted biblios in holds history

To test:
 - place a hold
 - cancel the hold
 - look in patron hold history, see the title
 - delete the biblio
 - reload patron hold history, error
[2025/04/23 11:43:28] [WARN] OpenAPI >>> GET api/v1/patrons/5/holds [{"message":"Expected integer - got null.","path":"\/body\/3\/biblio_id"},{"message":"Expected integer - got null.","path":"\/body\/4\/biblio_id"}]
 - apply patch, yarn build, restart_all
 - reload patron hold history
 - success
 - enable OPACHoldsHistory preference
 - sign in to OPAC as patron
 - confirm holds history can be loaded
Comment 3 Roman Dolny 2025-04-23 14:06:15 UTC
Created attachment 181374 [details] [review]
Bug 39710: Unit test

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 4 Roman Dolny 2025-04-23 14:06:18 UTC
Created attachment 181375 [details] [review]
Bug 39710: Handle deleted biblios in holds history

To test:
 - place a hold
 - cancel the hold
 - look in patron hold history, see the title
 - delete the biblio
 - reload patron hold history, error
[2025/04/23 11:43:28] [WARN] OpenAPI >>> GET api/v1/patrons/5/holds [{"message":"Expected integer - got null.","path":"\/body\/3\/biblio_id"},{"message":"Expected integer - got null.","path":"\/body\/4\/biblio_id"}]
 - apply patch, yarn build, restart_all
 - reload patron hold history
 - success
 - enable OPACHoldsHistory preference
 - sign in to OPAC as patron
 - confirm holds history can be loaded

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 5 Matt Blenkinsop 2025-05-01 14:38:10 UTC
Created attachment 181828 [details] [review]
Bug 39710: Unit test

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 6 Matt Blenkinsop 2025-05-01 14:38:13 UTC
Created attachment 181829 [details] [review]
Bug 39710: Handle deleted biblios in holds history

To test:
 - place a hold
 - cancel the hold
 - look in patron hold history, see the title
 - delete the biblio
 - reload patron hold history, error
[2025/04/23 11:43:28] [WARN] OpenAPI >>> GET api/v1/patrons/5/holds [{"message":"Expected integer - got null.","path":"\/body\/3\/biblio_id"},{"message":"Expected integer - got null.","path":"\/body\/4\/biblio_id"}]
 - apply patch, yarn build, restart_all
 - reload patron hold history
 - success
 - enable OPACHoldsHistory preference
 - sign in to OPAC as patron
 - confirm holds history can be loaded

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 7 Katrin Fischer 2025-05-02 06:55:27 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Andrew Fuerste-Henry 2025-05-02 12:06:12 UTC
Can this please be backported to 24.11?