Bug 29082 - Add filtering methods to Koha::ArticleRequests
Summary: Add filtering methods to Koha::ArticleRequests
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
: 28684 (view as bug list)
Depends on: 27947
Blocks: 29083
  Show dependency treegraph
 
Reported: 2021-09-22 18:18 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2022-06-06 20:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Add re-usable pre-filtered searches to the Article Requests system.
Version(s) released in:
21.11.00
Circulation function:


Attachments
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.22 KB, patch)
2021-09-22 18:25 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.29 KB, patch)
2021-09-24 12:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.34 KB, patch)
2021-09-24 15:14 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29082: Add filtering methods to Koha::ArticleRequests (5.88 KB, patch)
2021-10-01 22:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 29082: Simplify tests (2.65 KB, patch)
2021-10-04 10:45 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 Tomás Cohen Arazi (tcohen) 2021-09-22 18:18:04 UTC
I propose to add:
- filter_by_current
- filter_by_finished

to be reused in several areas.
Comment 1 Tomás Cohen Arazi (tcohen) 2021-09-22 18:25:18 UTC
Created attachment 125159 [details] [review]
Bug 29082: Add filtering methods to Koha::ArticleRequests

This patch adds handy methods for filtering Koha::ArticleRequests
resultsets.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/ArticleRequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi (tcohen) 2021-09-22 19:18:47 UTC
*** Bug 28684 has been marked as a duplicate of this bug. ***
Comment 3 Marcel de Rooy 2021-09-23 07:57:27 UTC
Please specify on top of which bug this should be placed.
Comment 4 Tomás Cohen Arazi (tcohen) 2021-09-23 11:23:30 UTC
(In reply to Marcel de Rooy from comment #3)
> Please specify on top of which bug this should be placed.

No particular dependency, it is a standalone dev, self-contained.
Comment 5 Marcel de Rooy 2021-09-23 11:37:55 UTC
(In reply to Tomás Cohen Arazi from comment #4)
> (In reply to Marcel de Rooy from comment #3)
> > Please specify on top of which bug this should be placed.
> 
> No particular dependency, it is a standalone dev, self-contained.

Sure? I thought I saw a new status somewhere ;)
Comment 6 Tomás Cohen Arazi (tcohen) 2021-09-23 12:28:53 UTC
(In reply to Marcel de Rooy from comment #5)
> (In reply to Tomás Cohen Arazi from comment #4)
> > (In reply to Marcel de Rooy from comment #3)
> > > Please specify on top of which bug this should be placed.
> > 
> > No particular dependency, it is a standalone dev, self-contained.
> 
> Sure? I thought I saw a new status somewhere ;)

Right
Comment 7 Martin Renvoize (ashimema) 2021-09-24 12:52:51 UTC
Created attachment 125239 [details] [review]
Bug 29082: Add filtering methods to Koha::ArticleRequests

This patch adds handy methods for filtering Koha::ArticleRequests
resultsets.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/ArticleRequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2021-09-24 12:53:36 UTC
Works as expected, it well covered by tests.

Signing off
Comment 9 Nick Clemens (kidclamp) 2021-09-24 15:14:54 UTC
Created attachment 125263 [details] [review]
Bug 29082: Add filtering methods to Koha::ArticleRequests

This patch adds handy methods for filtering Koha::ArticleRequests
resultsets.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/ArticleRequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Tomás Cohen Arazi (tcohen) 2021-10-01 22:08:58 UTC
Created attachment 125639 [details] [review]
Bug 29082: Add filtering methods to Koha::ArticleRequests

This patch adds handy methods for filtering Koha::ArticleRequests
resultsets.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/ArticleRequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Tomás Cohen Arazi (tcohen) 2021-10-01 22:09:58 UTC
Rebased on top of bug 27945 changes.
Comment 12 Jonathan Druart 2021-10-04 10:45:49 UTC
Created attachment 125691 [details] [review]
Bug 29082: Simplify tests
Comment 13 Jonathan Druart 2021-10-07 09:20:55 UTC
Pushed to master for 21.11, thanks to everybody involved!