Bug 29082 - Add filtering methods to Koha::ArticleRequests
Summary: Add filtering methods to Koha::ArticleRequests
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
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
Modified: 2021-11-04 07:07 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
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


Attachments
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.22 KB, patch)
2021-09-22 18:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.29 KB, patch)
2021-09-24 12:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29082: Add filtering methods to Koha::ArticleRequests (6.34 KB, patch)
2021-09-24 15:14 UTC, Nick Clemens
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
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 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 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 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 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 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 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 2021-09-24 12:53:36 UTC
Works as expected, it well covered by tests.

Signing off
Comment 9 Nick Clemens 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 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 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!