Bug 35033

Summary: Add a validation for biblioitems in about/system information
Product: Koha Reporter: Blou <philippe.blouin>
Component: AboutAssignee: Blou <philippe.blouin>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, marie-luce.laflamme, philippe.blouin, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38617
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06,22.11.12
Circulation function:
Attachments: Bug 35033: Add a validation for biblioitems in about/system information
Bug 35033: Add a validation for biblioitems in about/system information
Bug 35033: Add a validation for biblioitems in about/system information
Bug 35033: Add a validation for biblioitems in about/system information
Bug 35033: (QA follow-up): tidy up code

Description Blou 2023-10-11 15:51:05 UTC
In the About section, under the System information tab, we get validation between issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart.

But there's no validation for biblioitems.  And yes, on issues during creation, most probably, discrepencies do occur, as I've now discovered on 10 different clients.

This patch will simply add the same test (and display) as the others, but for biblioitems.

Testing
0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created.
1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber.  An simple SQL will do
insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin;
2) Go to about, see there's no warning in systeminformation.
3) apply the patch, validate that an error appears.
Comment 1 Blou 2023-10-11 15:59:42 UTC
Created attachment 156852 [details] [review]
Bug 35033: Add a validation for biblioitems in about/system information

In the About section, under the System information tab, we get validation between
issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart.

But there's no validation for biblioitems.

This patch will simply add the same test (and display) as the others, but for biblioitems.

Testing
0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created.
1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber.  An simple SQL will do
insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin;
2) Go to about, see there's no warning in systeminformation.
3) apply the patch, validate that an error appears.
Comment 2 Blou 2023-10-11 16:04:59 UTC
Created attachment 156853 [details] [review]
Bug 35033: Add a validation for biblioitems in about/system information

In the About section, under the System information tab, we get validation between
issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart.

But there's no validation for biblioitems.

This patch will simply add the same test (and display) as the others, but for biblioitems.

Testing
0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created.
1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber.  An simple SQL will do
insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin;
2) Go to about, see there's no warning in systeminformation.
3) apply the patch, validate that an error appears.
Comment 3 David Nind 2023-10-22 18:40:38 UTC
Created attachment 157621 [details] [review]
Bug 35033: Add a validation for biblioitems in about/system information

In the About section, under the System information tab, we get validation between
issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart.

But there's no validation for biblioitems.

This patch will simply add the same test (and display) as the others, but for biblioitems.

Testing
0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created.
1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber.  An simple SQL will do
insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin;
2) Go to about, see there's no warning in systeminformation.
3) apply the patch, validate that an error appears.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Victor Grousset/tuxayo 2023-10-30 17:59:13 UTC
Created attachment 158098 [details] [review]
Bug 35033: Add a validation for biblioitems in about/system information

In the About section, under the System information tab, we get validation between
issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart.

But there's no validation for biblioitems.

This patch will simply add the same test (and display) as the others, but for biblioitems.

Testing
0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created.
1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber.  An simple SQL will do
insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin;
2) Go to about, see there's no warning in systeminformation.
3) apply the patch, validate that an error appears.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-10-30 17:59:17 UTC
Created attachment 158099 [details] [review]
Bug 35033: (QA follow-up): tidy up code
Comment 6 Victor Grousset/tuxayo 2023-10-30 17:59:39 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 7 Tomás Cohen Arazi (tcohen) 2023-10-31 14:06:46 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-11-08 08:29:44 UTC
Pushed to 23.05.x for 23.05.06
Comment 9 Matt Blenkinsop 2023-11-13 15:29:19 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x