Commit Graph

7193 Commits

Author SHA1 Message Date
Martin Renvoize b7a68f1f49
Bug 40445: Add configuration options and UI enhancements
This patch adds configuration options for cashup reconciliation and
enhances the user interface with preview functionality and improved
interaction patterns.

Configuration Options:

1. CashupReconciliationNoteRequired (System Preference):
   - Optional validation requiring reconciliation notes when discrepancies exist
   - Ensures documentation of surplus/deficit causes when needed
   - Can be disabled for less stringent workflows
   - Applied at cashup completion time

2. CashupReconciliationNoteAuthorisedValue (System Preference):
   - Allows use of authorized value dropdown for reconciliation notes
   - Provides standardized note options (e.g., "Till count error", "Cash removed")
   - Falls back to free text textarea when not configured
   - Improves consistency and reporting capabilities

UI Enhancements:

1. Cashup Summary Preview:
   - Preview cashup summary for in-progress cashups
   - Shows current transaction totals before completion
   - Clearly indicates preview vs. final summary status
   - Helps staff verify amounts before committing

2. Improved User Experience:
   - Conditional note fields based on configuration
   - Authorized value dropdowns when configured
   - Clear validation messages
   - Responsive UI updates

Backend changes:
- Enhanced Koha::REST::V1::CashRegisters::Cashups with preview support
- Database atomicupdate script for system preferences
- Validation logic for required notes

Frontend changes:
- Preview modal functionality in cashup_modal.js
- Conditional rendering of note input fields
- Authorized value dropdown integration
- Enhanced summary display logic

Test plan:
1. Apply patches and run database update
2. Configure CashupReconciliationNoteRequired:
   - Enable preference
   - Perform cashup with discrepancy without note - should fail
   - Add note and retry - should succeed
   - Disable preference - verify note optional
3. Configure CashupReconciliationNoteAuthorisedValue:
   - Create AV category (e.g., CASHUP_NOTE) with values
   - Set preference to category name
   - Verify dropdown appears in cashup modal
   - Clear preference - verify textarea shown
4. Test cashup preview:
   - Start cashup on register
   - Click "Preview cashup summary"
   - Verify current totals displayed
   - Add transaction and re-preview - verify updated
   - Complete cashup - verify final summary

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-27 12:12:36 +00:00
Martin Renvoize 6a38111462
Bug 40445: Add CASHUP_SURPLUS and CASHUP_DEFICIT account types
This patch adds two new system account types to support cashup reconciliation:

- CASHUP_SURPLUS (credit type): Used when actual cash found exceeds expected amount
- CASHUP_DEFICIT (debit type): Used when actual cash found is less than expected amount

Both types are system-managed and cannot be manually added by staff. They will be
automatically created during cashup processes when discrepancies are detected.

Changes include:
- Atomicupdate script for existing installations
- Mandatory YAML files for fresh installations

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-27 12:12:33 +00:00
Pedro Amorim c798a0c49b
Bug 41084: (RM follow-up): Remove atomicupdate file
Should have been part of e5aa0c0

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-20 09:15:49 +00:00
Pedro Amorim e5aa0c0737
Bug 41084: DBRev 26.06.00.004
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-17 13:49:11 +00:00
Katrin Fischer 667df54aed
Bug 41084: Re-format database update for new way of addind system preferences
... also adds say_success.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-17 13:49:09 +00:00
Tomás Cohen Arazi 5b3baf4170
Bug 41084: Add EnableZotero system preference
This system preference will be used to enable opac-export.pl?format=utf8
regardless of the OpacExportOptions values, specifically for Zotero
integration support.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-17 13:49:07 +00:00
Pedro Amorim d59c3b1433
Bug 42397: DBRev 26.06.00.003
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-19 12:00:20 +00:00
Pedro Amorim 25bfb77b0b
Bug 42397: Atomicupdate
1) Enable ILLModule and IllLog system preferences.
2) Install a metadata enrichment plugin that supports ILL batches (restart plack if needed), e.g.:
  https://github.com/openfifth/koha-plugin-api-pubmed/releases
3) Visit ILL module:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
4) Click the 'New ILL requests batch' button
5) Enter any name, cardnumber '42' and any library. Click 'Continue'
6) Add a pubmedid (e.g. '123') and click process identifiers.
7) Click 'Add items to batch' and 'Finish and view batch'.
8) Visit the ILL request we just created:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1
9) Confirm it explodes with a nasty 500 error
10) Apply patches, updatedatabase and restart plack.
11) Repeat 8). Confirm it no longer explodes
12) Click' ILL request log'. Confirm it shows the correct log(s) relative to this ILL request
13) Visit the log viewer and query for 'Interlibrary loans':
http://localhost:8081/cgi-bin/koha/tools/viewlog.pl?src=&user=&modules=ILL&actions=&object=&info=&interfaces=&from=&to=&output=screen&basename=Export&report_name=&do_it=1
14) Confirm only ILL requests are shown, do the same for ILL batches:
http://localhost:8081/cgi-bin/koha/tools/viewlog.pl?do_it=1&src=&user=&modules=ILL_BATCHES&actions=&object=&info=&interfaces=&from=&to=&output=screen&basename=Export&report_name=&do_it=1
15) Confirm only ILL batches are shown
16) Run all ILL batch relevant tests:
prove t/db_dependent/Koha/ILL/Batch*

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-19 12:00:19 +00:00
Lucas Gass 82d189a756
Bug 42795: Do not try to update ES mappings if not using ES patch for main
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-19 12:00:13 +00:00
Pedro Amorim 566ea8876b
Bug 28915: DBRev 26.06.00.002
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:16 +00:00
Pedro Amorim f099cb0d62
Bug 28915: (RM follow-up): Remove dead code + typo fix
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:15 +00:00
Lucas Gass bc54c59423
Bug 28915: (follow-up) Update kohatructure.sql
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:10 +00:00
Andrew Fuerste Henry 6942279435
Bug 28915: (follow-up) atomicupdate to increase from_subfield size
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:08 +00:00
Jonathan Druart 3c67759548
Bug 42802: Update kohastructure.sql
Test plan:
root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-db-compare-only --compare-with v24.05.00
should pass with this patch

Without this patch you get:
Running [diff /tmp/current_db.sql /tmp/upgraded_db.sql && diff -q /tmp/current_db.sql /tmp/upgraded_db.sql || { echo "ERROR - DB structures are not identical" && exit 1; }]...
7207c7207
< /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-09 14:08:07 +00:00
Pedro Amorim bad922332b
Bug 42764: (QA Follow-up): Fix DB update mismatch
perl /kohadevbox/misc4dev/run_tests.pl --run-db-compare-only --compare-with v24.05.00

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-08 14:16:16 +00:00
Owen Leonard b021ad4a2e
Bug 42518: Capitalization: Refund Payout Receipt
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-05 14:26:00 +00:00
Pedro Amorim 370de0a3aa
Bug 42764: DBRev 26.06.00.001
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-05 14:25:48 +00:00
Pedro Amorim 93593ce70c
Bug 42764: (QA follow-up): Update DB schema
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-05 14:25:46 +00:00
Pedro Amorim dcd04a26ca
Bug 42764: (QA follow-up): Atomicupate: Fix typo in SQL table comment
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-05 14:25:43 +00:00
Martin Renvoize 04809de849
Bug 42764: Fix spelling errors across the codebase
Correct genuine spelling errors identified by the codespell 2.4.x
full scan after the KTD container OS upgrade. Changes are in
comments, POD, strings, and template text across 55 files.

"SAN Ouest Provence" (the French library co-operative and Koha
sponsor) is preserved as a proper noun. Perl copyright lines
receive an inline # codespell:ignore annotation; about.tt files
(contributor attribution pages) are added to the Koha::Devel::Files
codespell exception list so that future uses of "Provence" as a
typo for "Province" are still caught in all other files.

Notable user-visible fixes:
- "submiting" -> "submitting" in authority and bibliographic merge screens
- "deleteable" -> "deletable" in patron exception messages
- "Acquistions" -> "Acquisitions" in reports dictionary

Test plan:
1. Apply patches
2. In the staff interface, go to Cataloguing > Merge records and
   confirm the submit button reads "Submitting" (not "Submiting")
3. In the staff interface, go to Authorities > Merge and confirm
   the same correction
4. Attempt to delete a patron with outstanding issues and confirm
   the error message reads "deletable" (not "deleteable")
5. prove xt/author/codespell.t
=> All tests pass

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-03 16:09:04 +00:00
Pedro Amorim c98e3a8247
DBRev 26.06.00.000: Start of a new release cycle
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-02 15:07:13 +00:00
Lucas Gass e4bb3afa5b
Koha 26.05.00 is here!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:10 -06:00
Lucas Gass 394f669003
26.05.00: Update kohastructure.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:09 -06:00
Jan Kissig cf984da25a
Bug 42412: Fix Incorrect date error in db-revs when using MySQL
In Bug 36466 db_revs/251200019.pl was introduced to update wrong date values (0000-00-00) with NULL.
This can fail on MySQL as it is running with sql_mode NO_ZERO_DATE activated which does not allow to select or update date fields with values='0000-00-00'.

This patch changes the update queries in db_revs/251200019.pl to use Installer::sanitize_zero_date on both columns.

Test plan:
As the test shall be done using MysQL and Mariadb start 2 ktds:
MySQL) DB_IMAGE=mysql:8.0 ktd --proxy --name mysql8 up -d
MariaDB) ktd --proxy --name maria up -d

a) checkout a version prior 36466: git checkout v24.11.14-1
b) reset_all
c) Connect to staff interface (mysql8-intra.localhost and maria-intra.localhost)
d) Go to Serials and create a new subscription
e) run the following to enter database client in each ktd shell: koha-mysql kohadev
f-mysql) run the following commands to be allowed to change planneddate and publisheddate to '0000-00-00':
 SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
 update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
f-maria)
 update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
g) verify via: select * from serial;
h) checkout main via: git checkout main
i-mysql) run  updatedatabase
 Upgrade to 25.12.00.019  [09:35:55]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
        ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do Incorrect date error in db-revs when using MySQL

        In 36466 db_revs/251200019.pl
        for column 'planneddate' at row 1 at /kohadevbox/koha/C4/Installer.pm line 818
i-maria) do not run updatedatabase yet
j) apply patch
k-mysql) run  updatedatabase
Upgrade to 25.12.00.019  [09:37:02]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
        Incorrect date planneddate and publisheddate fixed
...
-> is successful now
k-maria) run updatedatabase
l) verify via: select * from serial;

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-19 09:13:44 -06:00
Lucas Gass ed9ac6e94b
Bug 32773: DBRev 25.12.00.064
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 16:05:38 -06:00
Brendan Lawlor a7912704ea
Bug 32773: (follow-up) Set is_fast_add for sample FA frameworks
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 16:05:38 -06:00
Brendan Lawlor c11a324468
Bug 32773: Add column biblio_framework.is_fast_add
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 16:05:28 -06:00
Lucas Gass 4189602829
Bug 37762: (RM follow-up) Fix table order
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:55 -06:00
Pedro Amorim 233cf7e756
Bug 37762: (QA follow-up): Update kohastructure.sql to match atomicupdate
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:55 -06:00
Lucas Gass 8a380eff1a
Bug 37762: DBRev 25.12.00.063
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:52 -06:00
Pedro Amorim c32d08e560
Bug 37762: Catalogue: Hook to biblios
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:44 -06:00
Pedro Amorim db7854682e
Bug 37762: Circulation: Hook to checkouts/checkins
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:43 -06:00
Pedro Amorim 950c9ccb96
Bug 37762: Circulation: Hook to holds
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:43 -06:00
Pedro Amorim 2f17713637
Bug 37762: ISO18626 Koha DB changes
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:41 -06:00
Lucas Gass 4a47cc611f
Bug 41956: DBRev 25.12.00.062
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-07 07:56:07 -06:00
Pedro Amorim 5d716d1e28
Bug 41956: Remove visual_hold_group_id
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:21:00 -06:00
Lucas Gass 4c9805f960
Bug 41983: DBRev 25.12.00.061
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:59 -06:00
Pedro Amorim 0f7ccaa8ae
Bug 41983: (QA follow-up): Fix atomicupdate hold_group_id column
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:58 -06:00
Pedro Amorim a4f5cc19a1
Bug 41983: Add hold_group_id column to tmp_holdsqueue table
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:57 -06:00
Lucas Gass 2b1425a80e
Bug 39107: DBRev 25.12.00.060
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:52 -06:00
Emily Lamancusa 4a57c1f779
Bug 39107: (QA follow-up) Use existing foreign_key_exists function
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:52 -06:00
Saiful Amin fe24b5030e
Bug 39107: Remove illrequests_safk FK constraint on illrequests.status_alias as required by MySQL 8.4+
MySQL 8.4 requires foreign keys to reference PRIMARY KEY or UNIQUE keys.
Since authorised_values.authorised_value is only unique in combination
with category (composite UNIQUE key av_uniq), the FK constraint is not
compatible with MySQL 8.4+.

Data integrity for illrequests.status_alias is maintained at the application layer:
- Koha::ILL::Request->status_alias() validates values against
  authorised_values (category='ILL_STATUS_ALIAS') before storing
- All ILL request operations in Koha use this object layer
- CASCADE behaviors (ON DELETE SET NULL, ON UPDATE CASCADE) are already
  handled by the application layer when modifying/deleting authorised values.

Test Plan, using KTD:
1. Prepare KTD for MySQL 8.4
    - In koha-testing-docker, edit 'compose/db-mysql.yml'
    - Comment out the line 5:
    `# command: --default-authentication-plugin=mysql_native_password`

    Note: This is required because MySQL 8.4 doesn't support the native password plugin.

2. Start a new instance with MySQL 8.4
    - `DB_IMAGE=mysql:8.4 ktd up`
    - Observe that it fails to start with the errors such as 'DBD::mysql::st execute failed'

3. Apply the patch
    - `git bz apply 39107`

4. Start the instance again
    - `DB_IMAGE=mysql:8.4 ktd up`
    - Observe that it starts successfully

5. Update the database (Optional, only for existing instances)
    - `perl installer/data/mysql/updatedatabase.pl`

6. Access Koha Staff and OPAC interfaces and verify that everything works as expected

7. Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 15:20:44 -06:00
Lucas Gass ce92e707e1
Bug 37671: (follow-up) Add INSERT IGNORE to db_rev
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-06 09:52:18 -06:00
Lucas Gass 610c3d0184
Bug 40658: DBRev 25.12.00.059
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-05 13:41:59 -06:00
Nick Clemens 258a947b64
Bug 40658: Atomic update to ensure local-number is sortable
I don't know if this is appropriate for master as it requires Koha objects,
but this is helpful for upgrading sites to avoid any problems from old mappings
for local-number

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-05 13:41:58 -06:00
Jonathan Druart d0bd802da6
Bug 42374: Restore require Koha::Plugins (instead of use)
See comment 4 for a detail explanation of the problem.

Test plan:
hit /cgi-bin/koha/installer/install.pl
login with the DB credentials
upgrade
=> Without this patch you get
```
ISBN_RANGE_MESSAGE is set to [] but that file does not exist!
Trying to use the default locations
```
=> With this patch applied: "Everything went okay. Update done."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:32 -06:00
David Cook bf867d08c2
Bug 42374: Remove buggy ISBN_RANGE_MESSAGE env variable value
This patch removes an ISBN_RANGE_MESSAGE env variable that is
accidentally set by Business::ISBN::Data.

Test plan:
- git checkout v25.11.03-2
- reset_all
- git checkout -b 42374 origin/main
- Apply the patch
- restart_all
- Go to staff interface (e.g. http://localhost:8081/)
- Log into web installer
- Click "Update your database"
- Note it works

- Repeat the process but instead of using the web installer
use updatedatabase.pl directly (say through koha-upgrade-schema)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:31 -06:00
Lucas Gass a601b14f26
Bug 42406: DBRev 25.12.00.058
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:31 -06:00
David Cook ea3b9d9c14
Bug 42406: (QA follow-up) fix little inconsistencies and errors
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:30 -06:00
Nick Clemens 3107cdc368
Bug 42406: Split delete_reports into delete_own_reports and delete_all_reports
This patch splits delete_reports into delete_own_reports and delete_all_reports

While delete_all_reports supercedes delete_own_reports it seems to make more sense than
delete_own_reports and delete_others_reports.

With delete_all_reports we can have a user who can delete all, without specific permission to delete their own
The other way we would have delete others, and you could not delete your own, which seems more odd

To test:
 1 - Have 2 users - 1 with delete_reports, 1 without
 2 - Apply patches, update database
 3 - Confirm user with permission now has 'delete_all_reports' and other user still has no reports deletion permission
 4 - Give the second user 'delete_own_reports' permission
 5 - Create 4 reports as each user
 6 - Confirm view/edit pages show the delete button for each user, and confirm they both work
 7 - You shoudl have 2 reports left for each user
 8 - Confirm each user can delete their own report from the saved SQL list:
     http://localhost:8081/cgi-bin/koha/reports/guided_reports.pl?op=list
 9 - There should be 1 report from each
10 - Give the second user 'delete_all_reports' permission in one tab and reload the saved reports in another tab
11 - Select both reports in the second tab
12 - Remove 'delete_all_reports' from the second user, leaving 'delete_own_reports' in the first tab
13 - Click 'Delete selected' in the reports tab
14 - Confirm you get 'You do not have permission to continue'
15 - Hit back, deselect other users report, confirm you can delete your own with 'Delete selected'
16 - Sign off

Signed-off-by: Judy Poyer <jpoyer@aacpl.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:29 -06:00