Bug 23281 - Add Koha::Objects::Limit::Library
Summary: Add Koha::Objects::Limit::Library
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 17755
Blocks: 15497 23271 23272 23599 23830
  Show dependency treegraph
 
Reported: 2019-07-08 17:08 UTC by Tomás Cohen Arazi
Modified: 2020-06-04 20:33 UTC (History)
4 users (show)

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


Attachments
Bug 23281: Add Koha::Objects::Limit::Library (3.11 KB, patch)
2019-07-08 18:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types (2.68 KB, patch)
2019-07-08 18:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search (1.45 KB, patch)
2019-07-08 18:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23281: Add Koha::Objects::Limit::Library (3.18 KB, patch)
2019-07-11 10:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types (2.75 KB, patch)
2019-07-11 10:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search (1.52 KB, patch)
2019-07-11 10:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23281: Add Koha::Objects::Limit::Library (3.23 KB, patch)
2019-08-17 19:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types (2.79 KB, patch)
2019-08-17 19:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search (1.56 KB, patch)
2019-08-17 19:23 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2019-07-08 17:08:35 UTC
Add a generic class that can be used to add ->search_with_library_limits method to classes that already rely on Koha::Object::Limit::Library, but handle searching with limits manually.
Comment 1 Tomás Cohen Arazi 2019-07-08 18:25:03 UTC
Created attachment 91415 [details] [review]
Bug 23281: Add Koha::Objects::Limit::Library
Comment 2 Tomás Cohen Arazi 2019-07-08 18:25:09 UTC
Created attachment 91416 [details] [review]
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types

This patch makes Koha::Patron::Attribute::Types inherit from
Koha::Objects::Limit::Library so it now has the
->search_with_library_limits method.

Tests are adjusted so it is clear that there is no behaviour change
compared to the (previsouly) called ->search

To test:
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests pass!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests still pass!
- Sign off :-D
Comment 3 Tomás Cohen Arazi 2019-07-08 18:25:18 UTC
Created attachment 91417 [details] [review]
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search
Comment 4 Tomás Cohen Arazi 2019-07-08 18:28:11 UTC
Note to testers: Koha::Patron::Attribute::Tyes->search is not actually used in the code. It should be used for getting rid of C4::AttributeTypes. Once we have a clear idea about this patchset, this tasks could be done easily during this release cycle.

I have already filed bug 23272 and bug 23271, that would benefit from this dev.
Comment 5 Kyle M Hall 2019-07-11 10:20:52 UTC
Created attachment 91459 [details] [review]
Bug 23281: Add Koha::Objects::Limit::Library

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall 2019-07-11 10:21:02 UTC
Created attachment 91460 [details] [review]
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types

This patch makes Koha::Patron::Attribute::Types inherit from
Koha::Objects::Limit::Library so it now has the
->search_with_library_limits method.

Tests are adjusted so it is clear that there is no behaviour change
compared to the (previsouly) called ->search

To test:
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests pass!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall 2019-07-11 10:21:05 UTC
Created attachment 91461 [details] [review]
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Katrin Fischer 2019-08-17 19:23:05 UTC
Created attachment 92337 [details] [review]
Bug 23281: Add Koha::Objects::Limit::Library

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2019-08-17 19:23:09 UTC
Created attachment 92338 [details] [review]
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types

This patch makes Koha::Patron::Attribute::Types inherit from
Koha::Objects::Limit::Library so it now has the
->search_with_library_limits method.

Tests are adjusted so it is clear that there is no behaviour change
compared to the (previsouly) called ->search

To test:
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests pass!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2019-08-17 19:23:13 UTC
Created attachment 92339 [details] [review]
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Martin Renvoize 2019-08-19 09:25:18 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Fridolin Somers 2019-09-05 15:07:58 UTC
Enhancement not pushed to 19.05.x