Bug 23413 - Add a holds routine to Koha::Items to fetch related holds
Summary: Add a holds routine to Koha::Items to fetch related holds
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-01 18:10 UTC by Nick Clemens
Modified: 2019-10-25 09:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23413: Add a holds method to Koha::Items (2.64 KB, patch)
2019-08-01 18:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23413: Add a holds method to Koha::Items (2.69 KB, patch)
2019-08-09 20:20 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 23413: Add a holds method to Koha::Items (2.76 KB, patch)
2019-08-10 12:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23413: (QA follow-up) Fix terminology (949 bytes, patch)
2019-08-10 12:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23413: (follow-up) Rename variables (907 bytes, patch)
2019-09-03 11:21 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23413: Update tests to use build_sample_biblio (2.07 KB, patch)
2019-09-03 11:21 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23413: Update tests to use build_sample_biblio (3.08 KB, patch)
2019-09-03 11:27 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23413: Remove wrong return (690 bytes, patch)
2019-10-24 15:41 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 23413: Fix tests (1.54 KB, patch)
2019-10-25 09:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-08-01 18:10:58 UTC

    
Comment 1 Nick Clemens 2019-08-01 18:12:10 UTC
Created attachment 91912 [details] [review]
Bug 23413: Add a holds method to Koha::Items

To test;
1 - prove -v t/db_dependent/Koha/Items.t
Comment 2 Maryse Simard 2019-08-09 20:20:02 UTC
Created attachment 92123 [details] [review]
Bug 23413: Add a holds method to Koha::Items

To test;
1 - prove -v t/db_dependent/Koha/Items.t

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Katrin Fischer 2019-08-10 12:17:34 UTC
Created attachment 92128 [details] [review]
Bug 23413: Add a holds method to Koha::Items

To test;
1 - prove -v t/db_dependent/Koha/Items.t

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2019-08-10 12:17:37 UTC
Created attachment 92129 [details] [review]
Bug 23413: (QA follow-up) Fix terminology

Changed the POD of the new method to use holds.
Comment 5 Martin Renvoize 2019-08-13 10:33:45 UTC
Nice work!

Pushed to master for 19.11.00
Comment 6 Fridolin SOMERS 2019-09-02 12:39:41 UTC
Fix terminology corrects POD, but vars are still incorrect :
    my $transfer_rs = $self->_result->reserves->search($params);
Should be my $holds_rs ?
Comment 7 Nick Clemens 2019-09-03 11:21:19 UTC
Created attachment 92542 [details] [review]
Bug 23413: (follow-up) Rename variables
Comment 8 Nick Clemens 2019-09-03 11:21:23 UTC
Created attachment 92543 [details] [review]
Bug 23413: Update tests to use build_sample_biblio

Before these changes the tests fail if run under Elasticsearch

This makes sure they pass either way
Comment 9 Nick Clemens 2019-09-03 11:27:00 UTC
Created attachment 92544 [details] [review]
Bug 23413: Update tests to use build_sample_biblio

Before these changes the tests fail if run under Elasticsearch

This makes sure they pass either way
Comment 10 Jonathan Druart 2019-10-24 15:22:18 UTC
Martin, the follow-ups are not pushed.
Comment 11 Jonathan Druart 2019-10-24 15:26:12 UTC
Also, we should not need the following return statement:
336     return unless $transfer_rs->count;

We need it for ->checkout for instance, because it could be undef.

But we should not return undef for ->holds, otherwise it will explode on $items->holds->count
Comment 12 Nick Clemens 2019-10-24 15:41:05 UTC
Created attachment 94686 [details] [review]
Bug 23413: Remove wrong return
Comment 13 Martin Renvoize 2019-10-24 15:58:42 UTC
Nice work!

Pushed to master for 19.11.00
Comment 14 Jonathan Druart 2019-10-25 09:43:08 UTC
Created attachment 94722 [details] [review]
Bug 23413: Fix tests