Summary: | Only show host items when system preference EasyAnalyticalRecords is enabled | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Cataloging | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | RESOLVED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | major | ||
Priority: | P5 - low | CC: | flyingendpaper, Igor.A.Sychev, jonathan.druart, lucas, m.de.rooy, martin.renvoize |
Version: | Main | Keywords: | regression |
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27683 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22140 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | Heather Hernandez |
Documentation submission: | https://gitlab.com/koha-community/koha-manual/-/merge_requests/1050 | Text to go in the release notes: | |
Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |
Bug Depends on: | 33496 | ||
Bug Blocks: | |||
Attachments: |
Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled
Bug 37964: Add units test Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled Bug 37964: Add units test Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled Bug 37964: Add units test |
Description
Fridolin Somers
2024-09-19 14:14:18 UTC
Note that catalogue/detail.pl calls $biblio->items( host_items => 1 ). But better use the preference inside $biblio->items() like other methods. Created attachment 171776 [details] [review] Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled After Bug 33496, host items are displayed even when system preference EasyAnalyticalRecords is disabled. Test plan : 1) Build an analytical record with 773$0 and $9 2) Enable 'EasyAnalyticalRecords' 3) Go to catalogue details page => You see the linked item 4) Disable EasyAnalyticalRecords 5) Go to catalogue details page => You dont see the linked item Please provide tests. Created attachment 171779 [details] [review] Bug 37964: Add units test Created attachment 171848 [details] [review] Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled After Bug 33496, host items are displayed even when system preference EasyAnalyticalRecords is disabled. Test plan : 1) Build an analytical record with 773$0 and $9 2) Enable 'EasyAnalyticalRecords' 3) Go to catalogue details page => You see the linked item 4) Disable EasyAnalyticalRecords 5) Go to catalogue details page => You dont see the linked item Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 171849 [details] [review] Bug 37964: Add units test Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> I've looked at the code, and it's actually confusing to have both ->items and ->host_items. $biblio->items should return $self->host_items when host_items is passed OR we replace the occurrences when ->items is called with the host_items flag to simply call ->host_items. I think I prefer the latter. (In reply to Jonathan Druart from comment #7) > I've looked at the code, and it's actually confusing to have both ->items > and ->host_items. > > $biblio->items should return $self->host_items when host_items is passed OR > we replace the occurrences when ->items is called with the host_items flag > to simply call ->host_items. I think I prefer the latter. Ok, forget that. It includes both. Created attachment 171926 [details] [review] Bug 37964: Only show host items when system preference EasyAnalyticalRecords is enabled After Bug 33496, host items are displayed even when system preference EasyAnalyticalRecords is disabled. Test plan : 1) Build an analytical record with 773$0 and $9 2) Enable 'EasyAnalyticalRecords' 3) Go to catalogue details page => You see the linked item 4) Disable EasyAnalyticalRecords 5) Go to catalogue details page => You dont see the linked item Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 171927 [details] [review] Bug 37964: Add units test Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Amended-by: Jonathan Druart Tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> It feels like there is something better to do here but not finding a solution during the 5min I looked into it. Yeah, I had a nagging feeling too.. but likewise couldn't see anything obvious. Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant I rise to major because behavior is quite annoying for librarians. Please backport :) Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 *** Bug 35545 has been marked as a duplicate of this bug. *** It's in the manual! Woo-hoo!!! |