Bug 35789 - Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Summary: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 35788
Blocks: 35790
  Show dependency treegraph
 
Reported: 2024-01-12 13:33 UTC by Jonathan Druart
Modified: 2024-02-20 17:43 UTC (History)
3 users (show)

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


Attachments
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount (3.22 KB, patch)
2024-01-12 14:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount (3.27 KB, patch)
2024-01-15 14:00 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-01-12 13:33:29 UTC
Can be replaced with biblio.article_requests.filter_by_current.count
Comment 1 Jonathan Druart 2024-01-12 14:51:13 UTC
Created attachment 160972 [details] [review]
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

Can be replaced with biblio.article_requests.filter_by_current.count

Test plan:
Turn on article requests (syspref + circ rule)
Request an article (detail page of a bib record)
On the left you see "Article requests" tab with the number of current
article requests.

It should show the correct number (same as before this patch).
Comment 2 David Nind 2024-01-13 18:09:16 UTC
The patch no longer applies - sha1 error:

Bug 35789 - Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

160972 - Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
error: sha1 information is lacking or useless (Koha/Template/Plugin/Biblio.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Comment 3 Tomás Cohen Arazi 2024-01-15 13:48:59 UTC
(In reply to David Nind from comment #2)
> The patch no longer applies - sha1 error:

The dependencies were not correct. Fixed.
Comment 4 Tomás Cohen Arazi 2024-01-15 14:00:38 UTC
Created attachment 161042 [details] [review]
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

Can be replaced with biblio.article_requests.filter_by_current.count

Test plan:
Turn on article requests (syspref + circ rule)
Request an article (detail page of a bib record)
On the left you see "Article requests" tab with the number of current
article requests.

It should show the correct number (same as before this patch).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi 2024-01-15 14:02:45 UTC
Test plan follows correctly. I'd like to add that the AR count also displays on the detail view, not just the left tab. And it works.

QA script happy, behavior correct, code is correct. Straight QA.