Go to file
Tomas Cohen Arazi 3669cb0eed
Bug 36365: Add a way for compare_es_to_db.pl to fix problems
This patch adds a new option switch `--fix` (or `-f`) to make the script
try to fix the problems it found.

Bonus: `--help` option switch added.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ perl -MKoha::SearchEngine -MKoha::SearchEngine::Indexer -e 'my $i = Koha::SearchEngine::Indexer->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); $i->delete_index([1]);'
=> SUCCESS: Bibliographic record #deleted from ES index
3. Run:
  k$ koha-mysql kohadev
   > DELETE FROM biblio WHERE biblionumber=2 OR biblionumber=3;
=> SUCCESS: Bibliographic records 2 and 3 deleted directly from the
database, no reindex triggered by Koha.
4. Run:
  k$ perl misc/maintenance/compare_es_to_db.pl
=> SUCCESS: The results from (2) and (3) are explained. [1]
5. Run:
  k$ perl misc/maintenance/compare_es_to_db.pl --fix
=> SUCCESS: It says it is gonna fix things
6. Repeat 4
=> SUCCESS: The problems we generated are no longer reported! They've
been fixed!
7. Sign off :-D

[1] Note KTD ships some broken records on purpose so devs need to deal
with a not-perfect DB everyday, and catch misses in the code.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:16 +02:00
C4 Bug 38729: Linker should consider diacritics 2025-04-14 08:50:57 +02:00
Koha Bug 38761: Don't pass the 'all' param when getting plugins 2025-04-14 08:51:12 +02:00
acqui Bug 39044: Pass budgets to template 2025-02-13 15:31:00 +01:00
admin Bug 35604: Move available_backends() to Koha::ILL::Request::Config 2025-04-14 08:51:10 +02:00
api Bug 39260: Fix typo in acquisitions baskets API docs 2025-03-07 15:41:17 +01:00
authorities Bug 39559: YY is not interpreted as a default value for authorities 2025-04-14 08:51:01 +02:00
basket Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bin
…
bookings Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
catalogue Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
cataloguing Bug 32877: Fix cataloguing/value_builder/upload.pl 2025-04-14 08:51:02 +02:00
circ Bug 31167: Only mark due dates in the past red on overdues report 2025-03-21 17:50:27 +01:00
clubs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
course_reserves Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
debian Bug 39460: Fix koha-upgrade-schema when no DB change needed 2025-04-04 09:21:58 +02:00
docs Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
erm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
errors Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
etc Bug 36954: (follow-up) Return to the two logfiles pattern 2025-02-18 10:55:27 +01:00
ill Bug 35604: ConfirmAuto workflow stage 2025-04-14 08:51:05 +02:00
installer Bug 37211: DBRev 24.12.00.024 2025-04-14 08:51:16 +02:00
koha-tmpl Bug 37211: Use HTML textarea for the notes 2025-04-14 08:51:15 +02:00
labels Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
lib Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members Bug 37211: Make notes in patron transactions table editable 2025-04-14 08:51:12 +02:00
misc Bug 36365: Add a way for compare_es_to_db.pl to fix problems 2025-04-14 08:51:16 +02:00
offline_circ Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
opac Bug 35604: ConfirmAuto workflow stage 2025-04-14 08:51:05 +02:00
patron_lists Bug 37266: patron_lists/delete.pl should have CSRF protection 2025-03-06 13:54:49 +01:00
patroncards Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
plugins Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pos Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
preservation Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recalls Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reports Bug 39298: Add runtime parameter support to report templates 2025-04-11 09:52:36 +02:00
reserve Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reviews Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
rotating_collections Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
serials Bug 34971: (QA follow-up) Op is now cud-reopen 2025-02-12 15:28:17 +01:00
services Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
skel
…
suggestion Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
svc Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
t Bug 38761: Add tests 2025-04-14 08:51:11 +02:00
tags Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
tools Bug 26744: (QA follow up) Tidy 2025-03-10 11:42:32 +01:00
virtualshelves Bug 37434: Sort by publicationyear when copyrightdate is set in UNIMARC 2025-02-13 16:18:02 +01:00
xt Bug 39149: Make perltidy.t also check .PL files 2025-02-18 15:35:53 +01:00
.editorconfig
…
.git-blame-ignore-revs Bug 39096: Add 'tidy all' commits to a git blame ignore file 2025-02-17 13:10:25 +01:00
.gitignore Bug 35402: Update the OPAC and staff interface to Bootstrap 5 2024-08-23 15:58:41 +02:00
.htaccess
…
.mailmap Bug 39447: Update mailmap to reflect PTFS-Europes rename 2025-03-26 12:28:44 +01:00
.perlcriticrc
…
.perltidyrc Bug 30002: Adjust perltidy 2023-06-08 08:32:42 -03:00
.prettierrc.js Bug 38664: Treat .vue files like other JS files 2025-02-11 14:58:25 +01:00
.proverc.dist
…
.stylelintrc.json
…
INSTALL
…
Koha.pm Bug 37211: DBRev 24.12.00.024 2025-04-14 08:51:16 +02:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 39149: Tidy .PL files 2025-02-18 15:35:53 +01:00
README
…
README.md
…
README.robots
…
about.pl Bug 39154: Add sip.log test in about 2025-03-07 18:02:58 +01:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-14 15:04:37 -03:00
build-resources.PL
…
changelanguage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
cpanfile Bug 38944: Add new dependency Test::NoWarnings 2025-03-13 17:25:03 +01:00
cypress.config.ts Bug 38770: Remove @vue/cli-service and babel 2025-01-16 15:56:15 +01:00
eslint.config.mjs Bug 38524: Enable ESLint for .ts and .vue files 2025-01-16 15:56:17 +01:00
fix-perl-path.PL Bug 39149: Tidy .PL files 2025-02-18 15:35:53 +01:00
gulpfile.js Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
help.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
kohaversion.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mainpage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
package.json Bug 39188: Fix ESLint by Updating "globals" node package 2025-04-11 09:52:37 +02:00
rewrite-config.PL Bug 39149: Tidy .PL files 2025-02-18 15:35:53 +01:00
rspack.config.js Bug 38993: (follow-up) Add 'fetch' alias to rspack config 2025-03-17 11:59:52 +01:00
tsconfig.json
…
webpack.config.js Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
yarn.lock Bug 39188: Update yarn.lock 2025-04-11 09:52:38 +02:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo