Bug 35789

Summary: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, david, fridolin.somers, martin.renvoize, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Circulation function:
Bug Depends on: 35788    
Bug Blocks: 35790    
Attachments: Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

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 (tcohen) 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 (tcohen) 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 (tcohen) 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.
Comment 6 Katrin Fischer 2024-03-22 11:14:52 UTC
We don't have the database update here that came with other similar patches, but maybe it's unlikely that this has been used in notices.
Comment 7 Katrin Fischer 2024-03-22 11:28:24 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-05-22 14:18:59 UTC
Not backported to 23.11.x
Comment 9 Caroline Cyr La Rose 2024-07-04 18:39:45 UTC
Architecture change, nothing to add/edit in the Koha manual.