Bug 18931 - Add a "data corrupted" section on the about page
Summary: Add a "data corrupted" section on the about page
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 18966 19000 19274
  Show dependency treegraph
 
Reported: 2017-07-12 18:09 UTC by Jonathan Druart
Modified: 2017-09-07 15:22 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.29 KB, patch)
2017-07-12 18:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
[16.05.x] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.15 KB, patch)
2017-07-20 17:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.33 KB, patch)
2017-07-21 14:12 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.19 KB, patch)
2017-07-21 14:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18931: Add items/deleteditems tables (2.22 KB, patch)
2017-07-24 20:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.35 KB, patch)
2017-07-24 21:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18931: Add items/deleteditems tables (2.28 KB, patch)
2017-07-24 21:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18931 - Follow up - Typo fix in SQL statement (1.34 KB, patch)
2017-07-24 21:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
[16.05.x] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.18 KB, patch)
2017-07-25 17:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931: Add items/deleteditems tables (2.32 KB, patch)
2017-07-25 17:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931 - Follow up - Typo fix in SQL statement (1.39 KB, patch)
2017-07-25 17:41 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931: (followup) Tidy text (3.15 KB, patch)
2017-07-25 17:41 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI (6.39 KB, patch)
2017-07-25 17:51 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931: (followup) Tidy text (4.29 KB, patch)
2017-07-25 18:00 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18931 - Follow up - Typo fix in template for holds (1.06 KB, patch)
2017-07-26 06:43 UTC, Mason James
Details | Diff | Splinter Review
pic (102.71 KB, image/png)
2017-07-26 06:49 UTC, Mason James
Details
Bug 18931: [QA Follow-up] Fix typo in closing p tag for items (2.00 KB, patch)
2017-07-28 05:58 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-07-12 18:09:31 UTC
If MySQL AUTO_INCREMENT messed ids (See https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix), we should add a warning on the about page.
Comment 1 Jonathan Druart 2017-07-12 18:56:47 UTC
Created attachment 65010 [details] [review]
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong
Comment 2 Jonathan Druart 2017-07-20 17:59:34 UTC
Created attachment 65157 [details] [review]
[16.05.x] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI
Comment 3 David Cook 2017-07-21 00:58:15 UTC
Looks good at a glance. I'll take another look at this once I've reviewed the other related bugs.
Comment 4 David Cook 2017-07-21 01:08:09 UTC
Looks like I need to attend to other things at the moment, but I was just thinking... could you actually put this check into a module instead of on the about.pl page? 

That way, administrators on the server could perhaps run a script to check all their Koha instances for this data problem easily and quickly?
Comment 5 Hugo Agud 2017-07-21 07:48:34 UTC
Good morning

I tried to apply this patch but get this error


CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
Failed to merge in the changes.
Patch failed at 0001 Bug 18931: Add a "data corrupted" section on the about page - MySQL AI
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/1605x-Bug-18931-Add-a-data-corrupted-section-on-th-WHdTUz.patch
Comment 6 Kyle M Hall 2017-07-21 14:12:06 UTC
Created attachment 65188 [details] [review]
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall 2017-07-21 14:20:27 UTC
Created attachment 65189 [details] [review]
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2017-07-21 14:23:29 UTC
My only suggestion is maybe it should stand out more? Maybe giant, red and blinking?
Comment 9 Katrin Fischer 2017-07-24 18:07:51 UTC
First patch applies nicely for me on 16.11.x.
Comment 10 Jonathan Druart 2017-07-24 20:47:35 UTC
Created attachment 65209 [details] [review]
Bug 18931: Add items/deleteditems tables
Comment 11 Katrin Fischer 2017-07-24 21:27:32 UTC
Created attachment 65210 [details] [review]
[SIGNED OFF] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2017-07-24 21:27:35 UTC
Created attachment 65211 [details] [review]
[SIGNED OFF] Bug 18931: Add items/deleteditems tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2017-07-24 21:27:39 UTC
Created attachment 65212 [details] [review]
Bug 18931 - Follow up - Typo fix in SQL statement

Fixes the table alias in the SQL statement for items and
adds items to the if clause for showing data problems.
Comment 14 Katrin Fischer 2017-07-24 21:29:05 UTC
Patches tested on 16.11.x successfully. Added a follow-up to fix some minor glitches.
Comment 15 Tomás Cohen Arazi 2017-07-25 17:40:44 UTC
Created attachment 65255 [details] [review]
[16.05.x] Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2017-07-25 17:40:58 UTC
Created attachment 65256 [details] [review]
Bug 18931: Add items/deleteditems tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 17 Tomás Cohen Arazi 2017-07-25 17:41:07 UTC
Created attachment 65257 [details] [review]
Bug 18931 - Follow up - Typo fix in SQL statement

Fixes the table alias in the SQL statement for items and
adds items to the if clause for showing data problems.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 18 Tomás Cohen Arazi 2017-07-25 17:41:14 UTC
Created attachment 65258 [details] [review]
Bug 18931: (followup) Tidy text

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 19 Tomás Cohen Arazi 2017-07-25 17:51:31 UTC
Created attachment 65259 [details] [review]
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 20 Tomás Cohen Arazi 2017-07-25 18:00:18 UTC
Created attachment 65260 [details] [review]
Bug 18931: (followup) Tidy text

Some minor style and idiomatic issues.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 21 Mason James 2017-07-26 06:43:39 UTC
Created attachment 65266 [details] [review]
Bug 18931 - Follow up - Typo fix in template for holds
Comment 22 Mason James 2017-07-26 06:47:37 UTC
(In reply to Mason James from comment #21)
> Created attachment 65266 [details] [review] [review]
> Bug 18931 - Follow up - Typo fix in template for holds

Ive tested this patchset on 16.05.x, it looks to be working well :)
Comment 23 Mason James 2017-07-26 06:49:25 UTC
Created attachment 65267 [details]
pic
Comment 24 Jonathan Druart 2017-07-26 16:52:47 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 25 Fridolin SOMERS 2017-07-27 09:07:00 UTC
Pushed to 17.05.x, will be in 17.05.02.

Nice work.
Comment 26 Katrin Fischer 2017-07-27 23:13:12 UTC
These patches have been pushed to 16.11.x and will be in 16.11.10.
Comment 27 Marcel de Rooy 2017-07-28 05:58:57 UTC
Created attachment 65299 [details] [review]
Bug 18931: [QA Follow-up] Fix typo in closing p tag for items

Close the p tag and add a br tag to visually divide the two sections
Data problems and Warnings regarding system configuration.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Discovered the problem when testing a duplicate key in deleteditems.
Comment 28 Jonathan Druart 2017-07-28 14:15:28 UTC
Comment on attachment 65299 [details] [review]
Bug 18931: [QA Follow-up] Fix typo in closing p tag for items

Moved to bug 19000
Comment 29 Mason James 2017-07-31 11:00:45 UTC
Pushed to 16.05.x, for 16.05.15 release