Summary: | LocalUse Circulation Statistics offering empty results | ||
---|---|---|---|
Product: | Koha | Reporter: | Todd Goatley <tgoatley> |
Component: | Reports | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, lisette, lucas |
Version: | 25.05 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | Bug 40961: Fix query for localuse |
Description
Todd Goatley
2025-10-06 17:20:17 UTC
To recreate: 1. Set RecordLocalUseOnReturn to 'Record' 2. Record some local uses by checking in items 3. You can double check the DB that local uses are getting record with: select localuse from items where itemnumber = ITEMNUMBER; 4. Go to reports > Statistics wizards -> Circulation 5. Adjust "Type:" to "Local use" 6. Notice there are 0 results Created attachment 187489 [details] [review] Bug 40961: Fix query for localuse Very unsure about this patch. It skips looking for items.homebranch or borrowers.branchcode if local use is selected, because those values can be NULL. This is sort of a weird issue. If one records local use via checkin with the RecordLocalUseOnReturn syspref, those localuse entries will always lack a borrowernumber and therefor have a NULL for patron's home library. That means they won't come up in any query made via the wizard that selects a value for patron's home library. But if one records local use via a statistical patron, then there will be an associated borrowernumber and therefore a patron home library and folks may want to filter their results based on that value. Prior to Bug 20601, the patron library dropdown in the wizard didn't work and therefore didn't impact these queries. Expanding on that comment: the current behavior is technically correct but confusing to the user. |