Go to file
Tomás Cohen Arazi c8fc47d88b
Bug 40855: Add unit tests for Standard ILL backend edititem method
This patch adds comprehensive unit tests for the edititem() method in the
Standard ILL backend to establish baseline behavior before refactoring.

The tests cover:
- Form stage (initial load) - displays current attributes for editing
- Commit stage (form submission) - processes updates with validation
- Core field updates (title, author, year, etc.)
- Custom field handling (null-delimited key/value pairs)
- Attribute persistence after updates

These tests demonstrate the current raw SQL implementation behavior
and will ensure the upcoming refactoring maintains compatibility.

Current behavior tested:
- edititem() uses multi-stage workflow (init -> form -> commit)
- Validation requires 'type' and 'branchcode' fields
- Custom fields use null-delimited strings for multiple values
- Method returns 'create' (not 'edititem') in commit stage
- Raw SQL delete-all-and-recreate pattern for attribute updates

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/ILL/Backend/Standard.t
=> SUCCESS: Tests pass! Current edititem behavior documented
3. Tests establish baseline for upcoming refactoring
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-23 16:21:33 -06:00
C4 Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Koha Bug 40850: (follow-up) Use add_or_update_attributes in Standard backend 2025-09-23 16:21:33 -06:00
acqui Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
admin Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
api Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
authorities Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
basket Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
bin
…
bookings Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
catalogue Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cataloguing Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circ Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
clubs Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
course_reserves Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
debian Bug 40163: (follow-up) Fix Bugzilla URL 2025-09-23 16:21:30 -06:00
docs Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
erm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
errors Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
etc Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ill Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
installer Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
koha-tmpl Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods 2025-09-23 16:21:31 -06:00
labels Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
lib Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
misc Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
offline_circ Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
opac Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods 2025-09-23 16:21:31 -06:00
patron_lists Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
patroncards Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
plugins Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pos Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
preservation Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
recalls Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reports Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reserve Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reviews Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
rotating_collections Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
services Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
skel
…
suggestion Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
svc Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
t Bug 40855: Add unit tests for Standard ILL backend edititem method 2025-09-23 16:21:33 -06:00
tags Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
tools Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
virtualshelves Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
xt Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
.codespell-ignore Bug 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
.editorconfig Bug 27375: Set YAML file settings in .editorconfig 2021-11-03 15:40:52 +01:00
.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 40838: Add generated bookings CSS assets to gitignore 2025-09-19 08:42:47 -06:00
.htaccess
…
.mailmap 25.05.00: Update .mailmap (part 4) 2025-05-26 10:19:09 -03:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.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 Bug 19821: Install sample data, ES mappings and Version syspref 2021-10-25 11:27:40 +02:00
.stylelintrc.json Bug 31528: (follow-up) A few additional rules 2022-10-03 08:23:15 -03:00
INSTALL Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links 2020-10-15 12:56:30 +02:00
Koha.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
LICENSE Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
MANIFEST.SKIP
…
Makefile.PL Bug 40773: Do not map "vue/dist" files in Makefile 2025-09-18 13:51:56 -06:00
README
…
README.md Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
README.robots
…
about.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-14 15:04:37 -03:00
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-02-10 11:07:57 -03:00
changelanguage.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cpanfile Bug 40663: Update GD::Barcode::QRcode to v2.01 2025-09-05 15:10:34 -06:00
cypress.config.ts Bug 40346: Use KOHA_INTRANET_URL for the baseUrl 2025-07-21 14:01:23 -06: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 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
gulpfile.js Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
help.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
kohaversion.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mainpage.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
package.json Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-08 15:42:03 -06:00
rewrite-config.PL Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
rspack.config.js Bug 40173: Make http-client reusable from Cypress tests 2025-07-21 14:01:07 -06:00
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
yarn.lock Bug 40170: Update yarn.lock 2025-07-10 09:43:26 -06: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 https://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

https://koha-community.org/

Koha Logo