Bug 37701 - Log viewer doesn't show everything when Module 'All' is checked
Summary: Log viewer doesn't show everything when Module 'All' is checked
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Transaction logs (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-21 16:47 UTC by Lucas Gass (lukeg)
Modified: 2024-10-30 19:28 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:
Circulation function:


Attachments
Bug 37701: Remove object_type from viewlog (2.83 KB, patch)
2024-08-21 17:38 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 37701: Remove object_type from viewlog (2.88 KB, patch)
2024-08-21 18:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2024-08-21 16:47:01 UTC
To recreate:
1. Find a record and do 1 edit to the record.
2. Also do 1 edit to an item on that record.
3. From the navbar on the left click 'Modification log'
4. You should see both the item and record modifications in log.
5. Notice also that the 'Catalog' module checkbox is checked by default
6. Now check 'All' instead and click 'Submit'
7. Now the item modification is gone, you only see the record modification.
Comment 1 Lucas Gass (lukeg) 2024-08-21 17:33:14 UTC
In viewlog.pl there is 'object_type'. It is only passed when you come to the log viewer from the record link. I think it may be unnessesary? Without it you are not able to get item level info. related to the bib when you come to the log viewer in any other way than directly for the 'Modification log' link on the record detail page.
Comment 2 Lucas Gass (lukeg) 2024-08-21 17:38:13 UTC
Created attachment 170573 [details] [review]
Bug 37701: Remove object_type from viewlog

To test:
1. Find a record and do 1 edit to the record.
2. Also do 1 edit to an item on that record.
3. From the navbar on the left click 'Modification log'
4. You should see both the item and record modifications in log.
5. Notice also that the 'Catalog' module checkbox is checked by default
6. Now check 'All' instead and click 'Submit'
7. Now the item modification is gone, you only see the record modification.
8. APPLY PATCH and restart_all
9. Try again, you should now always see item information when viewing the log.
10. Test the log viewer from the link in on the record detail page.
11. Also test by going directly to the Log viewer tool. ( Tools > Log viewer)
Comment 3 Brendan Lawlor 2024-08-21 18:23:32 UTC
Created attachment 170574 [details] [review]
Bug 37701: Remove object_type from viewlog

To test:
1. Find a record and do 1 edit to the record.
2. Also do 1 edit to an item on that record.
3. From the navbar on the left click 'Modification log'
4. You should see both the item and record modifications in log.
5. Notice also that the 'Catalog' module checkbox is checked by default
6. Now check 'All' instead and click 'Submit'
7. Now the item modification is gone, you only see the record modification.
8. APPLY PATCH and restart_all
9. Try again, you should now always see item information when viewing the log.
10. Test the log viewer from the link in on the record detail page.
11. Also test by going directly to the Log viewer tool. ( Tools > Log viewer)

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 4 Pedro Amorim 2024-10-29 11:29:38 UTC
Taking a look here
Comment 5 Pedro Amorim 2024-10-29 11:52:22 UTC
This causes the following error when running a "All" report without object on the URL:
Can't call method "items" on an undefined value at /kohadevbox/koha/tools/viewlog.pl line 138

To reproduce:
1) Apply patch
2) Run a normal "All" report" from:
http://localhost:8081/cgi-bin/koha/tools/viewlog.pl

The line may or may not need to be:
if ( @modules == 1 && $modules[0] eq 'CATALOGUING' ) {

From:
https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10352&attachment=97148
Comment 6 Emily Lamancusa (emlam) 2024-10-30 19:28:15 UTC
The initial patch on bug 10352 had that line, but then it was changed to use the object_type parameter so that there was a way to differentiate between searching for a bib record (and all attached items), and searching for a specific item, when there's overlap between the biblionumbers in the system and the itemnumbers in the system - https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10352#c12

Could we go the opposite direction and expose the object_type paramater in the UI instead? Maybe a checkbox next to the object field, something like, "Search for biblio object and all attached items"?
Comment 7 Emily Lamancusa (emlam) 2024-10-30 19:28:51 UTC
Oops, sorry for the accidental status change!