Bug 40740 - Validation for biblioitems in about/system information joins on biblionumber not biblioitemnumber
Summary: Validation for biblioitems in about/system information joins on biblionumber ...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: About (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lisette Scheer
QA Contact: Testopia
URL:
Keywords:
Depends on: 35033
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-02 15:28 UTC by Lisette Scheer
Modified: 2025-09-06 03:37 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch fixes an issue where the about page warns incorrectly when there are items in both the biblioitems and deletedbiblioitems tables on the same record.
Version(s) released in:
Circulation function:


Attachments
Bug 40740: Validation for biblioitems in about/system information joins on biblionumber not biblioitemnumber (1.51 KB, patch)
2025-09-02 15:36 UTC, Lisette Scheer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2025-09-02 15:28:27 UTC
select bi.biblioitemnumber, dbi.biblioitemnumber from biblioitems bi join deletedbiblioitems dbi on bi.biblionumber=dbi.biblionumber  

Warns if there's items from the same biblio, one not deleted, one is deleted.
Comment 1 Lisette Scheer 2025-09-02 15:36:34 UTC
Created attachment 186056 [details] [review]
Bug 40740: Validation for biblioitems in about/system information joins on biblionumber not biblioitemnumber

This patche fixes the validation for biblioitems to only warn when the biblioitemnumber is in both tables instead of the biblionumber.

To test:
1. Delete an item that has another item on the record.
2. Go to About and select the system configuration tab
3. Observe there is a warning.
4. Run a report select bi.biblioitemnumber, dbi.biblioitemnumber from biblioitems bi join deletedbiblioitems dbi on bi.biblionumber=dbi.biblionumber
5. You'll see the numbers don't match
6. Apply the patch
7. Repeat step 2
8. Observe no warning
9. Repeat step 4
10. Observe no results.
11. Sign off!
Comment 2 David Nind 2025-09-06 03:37:07 UTC
I didn't get a warning on the system information tab.

I deleted one of the items for Effective Perl programming (biblionumber = 139), in the default KTD it has two items.