Commit Graph

1974 Commits

Author SHA1 Message Date
Martin Renvoize 1f51dab88e
Bug 41268: (QA follow-up) Apply same simplification to remaining operations
This follow-up applies the same variable-based simplification pattern
to the remaining operations in smart-rules.pl:

- cud-set-branch-defaults: 2 code paths reduced to 1
- cud-add-branch-cat: 4 code paths reduced to 1
- cud-add-open-article-requests-limit: 4 code paths reduced to 1
- cud-del-open-article-requests-limit: 4 code paths reduced to 1
- cud-add-branch-item: 4 code paths reduced to 1

Note: cud-delete-branch-cat was NOT simplified because it contains
additional business logic (setting itemtype rules only when deleting
the default categorycode), which is not simply a matter of converting
'*' to undef.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Nick Clemens e9d675fcbc
Bug 41268: Use variables rather than conditionals
Testing plan:

- Apply patch
- Run tests
- Go to admin > circ and fine rules
- Create a few Holds and bookings policies
  - For All Libraries
  - For a specific library
- Delete the policies
- (optional) a simple `SELECT * FROM circulation_rules` can confirm policies were created/deleted correctly

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Fridolin Somers 15f21656fe
Bug 41043: Use op 'add_form' and 'edit_form' in z3950 servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/z3950servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new z3950 server
2) Enter mandatory datas in form and save
3) Edit this server
4) Copy this server
5) Repeat 1 to 4 for a SRU server

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:12 -07:00
Fridolin Somers d0cdf16a45
Bug 41043: Use op 'add_form' and 'edit_form' in oai servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/oai_servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new OAI repository
2) Enter mandatory datas in form and save
3) Edit this repository
4) Copy this repository

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:11 -07:00
Lucas Gass 3b149f0f50
Bug 33544: (RM follow-up) Add new line
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:05 -07:00
Martin Renvoize 9954466c10
Bug 33544: Move biblio ID into title link
This patch removes the separate biblio_id column and instead embeds
the biblio link directly within the title field of the details column,
reducing table width while maintaining access to the full record.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:04 -07:00
Pedro Amorim 589c6112b4
Bug 33544: Update columns_settings.yml for consolidated details column
This patch removes the now-unused individual column definitions from
columns_settings.yml, replacing them with a single 'details' column
configuration.

Note: Fields combined into a single column are no longer individually
sortable. I believe this is acceptable for the ILL requests fields selected
for display consolidation to reduce horizontal overflow.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:04 -07:00
Jonathan Druart 849f67988f
Bug 41076: Adjust our perl tidiness for v20250105
Generated using
  `perl misc/devel/tidy.pl --perl`

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-05 09:03:51 -07:00
Jonathan Druart 72b06d3576
Bug 41561: Remove 'tab' from admin/aqbudgetperiods
commit 4b312b141a
CommitDate: Wed Sep 19 16:17:16 2012 +0200
    Bug 8117: Divide budget periods into two tabs

It was used at the time
+$url = "aqbudgetperiods.pl?tab=2";

But this has been removed by
commit 870104ce11
Date:   Mon Mar 21 09:32:39 2016 -0400
     Bug 13464 - Standardize the pagination class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-28 14:24:00 -07:00
Nick Clemens 31d52435b6
Bug 37099: (QA follow-up) Combine fields in mappings for brevity
The syntax '630anr' is equivalent to mapping each individual field, this just keeps the file smaller

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:29 -07:00
Wainui Witika-Park 522024f2df
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings
Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:29 -07:00
Emmi Takkinen 05204294bb
Bug 41334: Move modified_holds tables column settings under Tools section
Bug 36135 added new tool to batch modify holds and two new datatables.
Table holds_to_modify was added to "Table settings" page under section
Tools>Page: batch_hold_modification but table modified_holds is under
Circulation>Page: holds section. It should be also moved to Tools section.

To test:
1. Navigate to page "Table settings" and open section Circulation.
2. Jump to Page: holds.
=> Note that modified_holds tables settings are displayed under this page.
3. Apply this patch.
4. Open Tools section and jump to page batch_hold_modification.
=> Note that modified_holds tables settings are now displayed under this
page and they are no longer present under Circulation>Page: holds.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-16 14:07:17 -07:00
Wainui Witika-Park 277bc4e294
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase
Add additional mappings to the title index for MARC21: 440a, 600t, 800t, 810t, 830np

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 15:20:08 -07:00
Martin Renvoize 856e6d3b38
Bug 39522: (follow-up) Remove debugging
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:33 -07:00
Jacob O'Mara 8e6b687f51
Bug 39522: Allow Valuebuilders to be installable as plugins
This patch adds hooks to allow 'Valuebuilder' plugins to be installable
using the standard plugin architecture for Koha. This enables cataloguing
plugins to be dynamically installed, enabled, and disabled through the
plugin system rather than being hardcoded framework components.

Test plan:
1. Install the example valuebuilder plugin from GitHub
   (https://github.com/Jacobomara901/koha-plugin-value-builder)
2. Go to Administration > Plugins
3. Verify the valuebuilder plugin appears in the plugins list
4. Enable/disable the plugin and confirm the custom valuebuilder
   appears/disappears in the framework configuration
5. Assign the custom valuebuilder to a MARC subfield in the
   bibliographic framework
6. Create/edit a bibliographic record and verify the valuebuilder
   button appears next to the configured subfield
7. Click the valuebuilder button and confirm it functions correctly
8. Disable the plugin and verify the valuebuilder button disappears
9. Re-enable the plugin and confirm functionality is restored
10. Uninstall the plugin and verify it's completely removed

Sponsored-by: Open Fifth <https://openfifth.co.uk>
Co-authored-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:31 -07:00
Jonathan Druart 7f9e2019a0
Bug 40680: Fix admin/matching-rules.pl
Attempt to call undefined import method with arguments (valid_normalization_routines) via package C4::Matcher (Perhaps you forgot to load the package?) at admin/matching-rules.pl line 27.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-01 08:33:58 -07:00
Jonathan Druart a42a263cbf
Bug 40680: Fix admin/columns_settings.pl
Attempt to call undefined import method with arguments (get_modules) via package C4::Utils::DataTables::TablesSettings (Perhaps you forgot to load the package?) at admin/columns_settings.pl line 8.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-01 08:33:58 -07:00
Pedro Amorim 3866d85555
Bug 37893: (QA follow-up): Nuke server params and listeners from UI
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:03 -07:00
Pedro Amorim fa527ac8ff
Bug 37893: SIP2 System preference overrides
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:56 -07:00
Pedro Amorim 507b90b13f
Bug 37893: SIP2 Listeners
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:54 -07:00
Pedro Amorim 6af2754853
Bug 37893: SIP accounts - Tables configuration
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:50 -07:00
Pedro Amorim 5e00a55b2e
Bug 37893: SIP2 tables configuration
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:46 -07:00
Owen Leonard 5f8cc2de5d
Bug 40086: Table settings for Article Requests tables
This patch adds table settings for the three tables on the article
requests page in the staff interface: New, Pending, and Processing. The
patch also disables sorting on the checkbox column and adds "anti-the"
sorting to the title column.

To test, apply the patch and restart services.

- If necessary, enable article requests in at least one rule in
  Circulation and Fine Rules.
- If there are no article requests in your system, log in to the OPAC as
  a user who can place article requests and submit multiple requests for
  various titles.
- Go to Circulation -> Article requests
- If there are no requests under the "Pending" and "Processing" tables,
  use the "Actions" menu to set some as pending and some as processing.
- Test the "Columns" menu for each table, confirming that the correct
  columns are shown or hidden according to your selections.
- Test sorting of the "Title" column to confirm that articles are
  ignored in sorting.
- Go to Administration -> Table settings -> Circulation -> Article
  requests and try making various changes to the default configuration.
- Return to the Article requests page to confirm that your selections
  are reflected there*
  * You may need to delete the table settings in local storage in order
    for the default table settings to be shown. In Firefox DevTools look
    under the "Storage" tab -> Local storage -> Delete all.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:19 -07:00
Tomas Cohen Arazi 6290b9ac7b
Bug 37711: Domains CRUD update
This patch adapts the `Identity provider domains` CRUD page to handle
the new configuration options.

To test:
1. Have an IdP with some domains set. Make sure there's at least one
   domain with auto-register enabled and one with it disabled.
2. Apply this patches
3. Run:
   $ ktd --shell
  k$ updatedatabase
=> SUCCESS: Updates successfully
4. Run:
  k$ yarn build
5. Refresh the IdP domains page
=> SUCCESS: The domains table shows both OPAC and staff auto-register
   options.
=> SUCCESS: The staff auto-register is disabled for both domains
=> SUCCESS: The OPAC auto-register matches what was set for each domain
regarding auto-register (remember that before this patchset,
auto-register only works for the OPAC).
6. Play with editing/adding/removing domain configurations
=> SUCCESS: Things work as expected, values are persisted on the DB
correctly.
7. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-05 07:12:32 -07:00
Fridolin Somers d8c6286b1c
Bug 39825: Add a direct link to items tag in MARC bibliographic framework page
In MARC bibliographic framework page, add a direct link to items tag (952 in MARC21 and 995 in UNIMARC) can be very useful.
Currently one needs to search for the tag, then click on actions, then click on "View subfields".

Test plan :
1) Go to Administration > MARC bibliographic framework
2) View any framework MARC structure
3) You see in tools bar new button "View items tag (952)"
4) Click on it, you see this tag subfields

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-03 14:13:43 -07:00
Martin Renvoize 4179211ce8
Bug 20253: Optionally use buyer's purchase order number from EDIFACT quote as basket name
This enhancement allows libraries to configure vendors to use the buyer's
purchase order number (from RFF+ON segments) as the basket name instead of
the EDIFACT filename, improving searchability and reference tracking.

Backend Changes:
- Added purchase_order_number() method to Koha::Edifact::Message to extract
  RFF+ON segments from message-level data (before first LIN segment)
- Modified process_quote() in Koha::EDI to use purchase order number for
  basket naming when configured, with fallback to filename

Frontend Changes:
- Updated admin/edi_accounts.pl to handle po_is_basketname parameter
- Added "Use purhase order numbers" option to EDI accounts template

Test Plan:
1. Apply patches and run database update
2. Go to Administration > Acquisitions > EDI accounts
3. Create or edit a vendor EDI account
4. Verify "Use purchase order numbers" option appears
5. Enable "Use purchase order numbers" and save
6. Process an EDIFACT quote file that contains RFF+ON segments
7. Verify the created basket name uses the purchase order number instead of filename
8. Process a quote file without RFF+ON segments
9. Verify the basket name falls back to the filename
10. Test with "Use purchase order numbers" disabled
11. Verify basket names use filenames regardless of RFF+ON presence
12. Run tests: prove t/Edifact.t t/db_dependent/Koha/EDI.t

The feature is optional and backward compatible - existing behavior is
unchanged unless explicitly configured.

Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-03 14:13:37 -07:00
Jonathan Druart 9f42c5fe28
Bug 38080: Fix order of columns in opac's holdings tables
The order of the columns in the yaml file must match the order of the
columns in the template file.

Test plan:
Confirm that, with bug 30633 applied, you can pick "shelving location"
as the default sort order and that the items are correctly sorted by
shelving location.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-31 15:26:14 -06:00
Jonathan Druart 3284a2f41f
Bug 30633: Default to 'Item type'
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-24 07:57:10 -06:00
Jonathan Druart 0c7e673b84
Bug 30633: Add default_sort_order to table settings
So we can pick a column from the table settings
http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-24 07:57:08 -06:00
Jonathan Druart 034587d8ec
Bug 41079: Turn on bKohaColumnsUseNames for the batch patron modification results table
A table cannot use the table settings if columns are displayed depending
on sysprefs.
Additionally DT's saveState does not work correctly if some columns are shown/hidden from one screen to
another.

We must add data-colname and turn bKohaColumnsUseNames on for this
table.

Also note that there were several discrepancies between the table
structure and the number of columns in the yaml file.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-24 07:57:04 -06:00
Owen Leonard c543c54971
Bug 38863: Show bookings options on itemtypes.pl
This patch adds a column to the table of item types in item types
administration to show if the item type is bookable by default. The
column is hidden by default.

To test, apply the patch and restart services.

- Go to Administration -> Item types
- If necessary, edit an item type and check the "Bookable" checkbox.
- In the table of item types, the "Bookbable" column should be hidden by
  default.
- Click the "Columns" button and check the "Bookable" menu item to show
  it. It should now appear.
- Click the "Configure" button and try making changes to the default
  configuration. Your changes should be reflected on the item types
  pages.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-15 16:12:09 -06:00
Owen Leonard 6589fff9ea
Bug 16721: Add table configuration to serial claims table
This patch adds table configuration options to the serial claims table,
including the option to set a default sort column.

The patch also moves the table column filter row to the top, which I
think is more standard in the staff interface.

To test, apply the patch and restart services.

- You'll need to have subscription issues which are missing, claimed, or
  late.
- Go to Serials -> Claims, and select a vendor.
- In the table of missing issues, confirm that all DataTable controls
  work correctly: Column visibility, export, and configuration options.
- Confirm that you can use Administration -> Table settings -> Serials
  -> Claims to hide columns by default or set the default order.
- Confirm that the column header filter forms work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-14 14:51:59 -06:00
Martin Renvoize bff78d2cb5
Bug 38489: (follow-up) Update EDI accounts list display
This patch updates the EDI accounts management page to display
the new file transport system instead of the old inline transport
configuration fields.

Changes:
- Replaced multiple transport-related columns (Transport, Remote host,
  Username, Password, Upload/Download ports and directories) with a
  single "File transport" column
- The file transport column displays the transport name with its
  connection test status in brackets
- Status indicators match the file_transports page:
  * "Tests passing" (green with checkmark icon) for successful tests
  * "Errors detected" (red with x icon) for failed tests
  * "Never used" (italic) for untested transports
- Updated the Perl controller to decode the JSON status field from
  the file_transports table and pass it to the template
- Uses get_inflated_columns to convert DBIx::Class results to plain
  hashrefs for template consumption

The display now correctly reflects the architectural change where
transport configuration is managed separately in the file_transports
table rather than duplicated in each EDI account.

Note: At a future date we should replace the raw DBIx::Class methods
with Koha::Object based classes. I propose Koha::EDI::Account(s).

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-14 14:51:51 -06:00
Martin Renvoize e5070c5c0b
Bug 38489: Update EDI accounts UI to use file transport selection
This patch updates the EDI accounts administration interface to use
the new file_transports system instead of direct transport configuration.

Changes:
- Replace transport configuration fields with transport selection dropdown
- Add file_transports data to template for selection options
- Remove password decryption since credentials are now managed by transports
- Simplify form handling to only manage EDI-specific fields
- Add helpful link to file transport administration

Sponsored-by: ByWater Solutions
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-14 14:51:46 -06:00
Martin Renvoize 7cce89820a
Bug 38489: Follow-up to bug 39190 to fix administration
We did some last minute renaming of things in bug 39190 but didn't catch
all the places. This patch updates the old 'sftp_servers' naming scheme
to 'file_transports' following the new pattern and restores edit and
delete functionality in the File transports management area.

Sponsored-by: ByWater Solutions
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-14 14:51:37 -06:00
Tomás Cohen Arazi 6b478e0da9
Bug 40163: (follow-up) Fix wrong GNU links and update test
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-24 09:25:04 -06:00
Tomas Cohen Arazi 1873d97c07
Bug 40163: Fix several http addresses in the code docs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-23 16:21:29 -06:00
Tomas Cohen Arazi 03ae77d8db
Bug 39190: Rename admin interface from sftp_servers to file_transports
Renamed admin interface files and URLs to reflect the evolution from
'SFTP servers' to 'File transports' functionality:

- admin/sftp_servers.pl -> admin/file_transports.pl
- sftp_servers.tt -> file_transports.tt
- Updated all URL references in templates and admin menu
- Updated body id from admin_sftp_servers to admin_file_transports

The functionality is now future-proof for the addition of new file
transports, so the naming should reflect his broader scope.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:24 -06:00
Tomas Cohen Arazi 264b60d4a0
Bug 39190: Adjust permission across the board
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:23 -06:00
Martin Renvoize a5acb762ee
Bug 39190: Remove old objects
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:18 -06:00
Martin Renvoize 3fef445515
Bug 39190: Re-implement the connection testing
We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:17 -06:00
Martin Renvoize c654a87f2d
Bug 39190: Update sftp_servers page to use new objects
Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:16 -06:00
Jake Deery f33638f14b
Bug 35761: Introduce central FTP/SFTP management
This patch adds a central FTP/SFTP management UI, with an associated
database object and class, plus the beginnings of an API. We can use
this code as a building block for adding FTP/SFTP connections to
other parts of the system, as well as to improve the usability of the
EDI transports. It is also now possible to test these connections
from within the Koha UI.

To test:-
You will need access to an FTP or SFTP server
Contact me if you need a disposable FTP/SFTP server

a)  Go to Koha Administration
b)  Notice no FTP/SFTP referenced on this page
c)  APPLY PATCH, reset_all
d)  Create new user, let's say sftpuser
e)  Set permissions for new user to include:
    1)  catalogue
    2)  parameters -> manage_sftp_servers
f)  Log in with this new user, go back to Koha Administration
    1)  Notice the FTP/SFTP servers option
g)  Undo step e2) for the sftpuser via the koha admin user
    1)  Refresh the Koha Administration page as the sftpuser
    2)  Notice how FTP/SFTP servers has disappeared
h)  Back to koha admin, go to Koha Administration -> FTP/SFTP Servers -> New
i)  Complete form depending on the FTP or SFTP server you have access to, Submit
    1)  Notice you are prompted to confirm before saving
j)  Select Edit, observe your details are the same, and Submit again
k)  Repeat step J one additional time
l)  Select Test, observe all tests passing
m)  Select Delete, confirm deletion, and observe server disappear
n)  Optionally, run prove on new tests
    1)  t/Koha/Auth/Permissions.t
    2)  t/db_dependent/Koha/SFTP/Server.t
    3)  t/db_dependent/api/v1/sftp_servers.t
o)  SIGN-OFF

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:11 -06:00
Pedro Amorim e9713e5a03
Bug 40734: Fix creating new library with additional fields
Test plan, dont apply patch yet:
1. Go to Administration > Additional fields > Libraries (branches) > New field
2. Enter a name for the field
3. Click Save
4. Go to Administration > Libraries > New library
   --> The form does not contain the additional field
5. Apply patch. Repeat.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:02 -06:00
Owen Leonard dc74b4821d
Bug 36135: (follow-up) Fix suspension search and other improvements
This patch tries to fix the hold suspension search by copying the code
from the expiration date search function.

The patch also makes these changes:

- Change page title to use i18n functions
- Add specific breadcrumb for results page
- Update headings between search and results page
- Correct table settings (definition was missing from
  columns_settings.yml
- Correct capitalization (e.g. "Pickup location" instead of "Pickup
  Location"
- Use include files for displaying title and patron in update results
- Add subtitle and medium to title in search results
- Remove quotes from DataTables option names
- Add hold date to the search results view.
  - Without a specified default sort, the table will sort the first
    column. Since the first column is checkboxes, we ought to explicitly
    set a default sorting column. I thought hold date seemed like a
    better default than title.

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 14:00:52 -06:00
Lucas Gass f769e3c1e6
Bug 36135: Add ability to batch modify holds
TO TEST:

0. APPLY PATCHES, updatedatabase, restart_all
1. Create a user with limited permissions, making sure you give them the "batch_modify_holds" permission
2. Login as chosen patron.
3. Navigate to Tools page.
4. Note there's a link "Batch modify holds".
5. Remove permission from user.
6. Link to new tool is not displayed.

7. Navigate to new tool Tools->Batch modify holds.
8. Fill in some criteria to search holds with.
9. Confirm that holds found match your search criteria.
10. Set e.g. new expiration date for all or just selected holds.
11. Confirm that holds were modified as they should have.
12. Confirm this also from database.

13. Find holds with a found/waiting status.
14. Attempt to modify their suspend status.
15. Alert box with text "One or more holds have found status and can't be suspended." should be displayed.
16. Play around, test different modifications.

17. Create SQL report which contains column for reserve_id.
18. e.g "SELECT reserve_id FROM reserves limit 10".
19.. Run report.
20. Over report select "Batch operations" should be displayed and under that there should be option "Batch modify holds".
21. Click "Batch modify holds" option.
22. Confirm that holds displayed in "Batch mofidy holds" tool are same as found with your report.

23. Do a holds search that will bring up multiple pages of results
24. Try selecting some holds from different pages to modify
25. Ensure all selected holds are being modified
26. Play around, test different modifications.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 14:00:48 -06:00
Shi Yao Wang b18db898ef
Bug 20644: (follow-up) Fix swagger description + put "inherit" by default
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-22 07:44:59 -06:00
Lucas Gass 126afcbab1
Bug 20644: (follow-up) Dont allow NULL value when the dropdown doesnt exist
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-22 07:44:49 -06:00
Pedro Amorim 7a94a17a74
Bug 40395: (QA follow-up): Add checkbox column to table settings
This fixes the empty entry when clicking 'Columns' on the top right of
the table

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:15 -06:00
Lisette Scheer 8819f2d41c
Bug 20644: (QA follow-up) Remove duplicate variable
I removed a duplicate variable and tidied.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:06 -06:00
Hammat Wele 99322896b9
Bug 20644: Add checkprevcheckout on item types
I have added the "Check for previous checkouts" option to item types. This option is visible only when the system preference "CheckPrevCheckout" is set to either :
- "Unless overridden by patron category or by item type, do"
or
- "Unless overridden by patron category or by item type, do not."

This option takes precedence over patron and patron category preferences.

TEST PLAN
1) Apply the patch.
2) Perform an atomic update (installer/data/mysql/updatedatabase.pl)
3) Set the "CheckPrevCheckout" system preference to "Unless overridden by patron category or by item type, do".
4) Go to "Koha administration > Item types > + New item type".
5) Fill in the necessary fields; the "Check for previous checkouts" field should be set to "Inherit from system preferences".
6) Click the "Save changes" button.
7) Create an item with the type you have created.
8) Check out this item for a patron, then check it in.
9) Check out the same item for the same patron again.
10) The message "Patron has previously checked out this title: <Title>. Check out anyway?" should appear.
11) Go to "Koha administration > Item types".
12) Edit the created item type.
13) Change the value of the "Check for previous checkouts" field to "No and try to override system preferences".
14) Click the "Save changes" button.
15) Check out the same item for the same patron.
16) The message should not appear.
17) Run the tests "Borrower_PrevCheckout.t" (prove t/db_dependent/Patron/Borrower_PrevCheckout.t) and "ItemTypes.t" (prove t/db_dependent/Koha/ItemTypes.t).
18) Verify that all tests pass successfully.

Signed-off-by: Laurence <laurence.rault@biblibre.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:42:58 -06:00
David Cook 6e3d0b1e48
Bug 40547: Background jobs should appear even when plugins disabled
This change fixes the background jobs so that the list page loads
even when plugins are disabled.

Test plan:
0. Apply the patch
1. Download https://github.com/HKS3/koha-normalize-marc2db/releases/download/v0.91/Koha.Plugin.HKS3.NormalizeMARC2DB-0.91.kpz
2. Upload plugin into KTD
3. Click "Run tool" for plugin
4. Go to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
5. Note that you see a pretty "Type"
6. Go to /etc/koha/sites/kohadev/koha-conf.xml and turn enable_plugins to 0
7. sudo koha-plack --restart kohadev
8. Go to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
9. Note it now says "Unknown job type 'plugin_marc2db_normalizeall'
10. Celebrate as this is preferable to a 500 error

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-31 12:41:54 -06:00
Owen Leonard 10d3a0940a
Bug 39897: Make EDI accounts a configurable DataTable
This patch adds DataTable features and table settings to the EDI
accounts administration page.

The patch also includes some minor simplification of template logic in
the table.

To test, apply the patch and restart_all.

- Go to Administration -> EDI accounts.
- If necessary, add at least a few random EDI accounts.
- Test the DataTable listing the accounts you added. Confirm that all
  DataTable features work correctly: Sorting, filtering, column display,
  etc.
- Click the "Configure" button to jump to the table settings page in
  Administration.
  - Alter the default configuration by hiding columns, changing default
    sort order, etc. It's probably wise to uncheck the "Save
    configuration state on page change" checkbox so that you can easily
    see if your configuration changes work.
- Return to Administration -> EDI accounts and confirm that the new
  configuration is being applied.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-23 16:36:41 -06:00
David Cook 01543503ce
Bug 36947: (QA follow-up) Fix locale-list to show selected values
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-11 15:26:57 -06:00
David Cook c0546d4c22
Bug 36947: (QA follow-up) Fix hash key name for locale-list syspref type
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-11 15:26:57 -06:00
Martin Renvoize 146aca25f5
Bug 36947: Add system preference for configurable locale-based facet sorting
This follow-up adds two major enhancements to the locale-based facet sorting
implementation:

1. **System Preference Integration**
   - Adds FacetSortingLocale system preference for configurable locale selection
   - Dynamically detects available system locales using Koha::I18N
   - Provides user-friendly dropdown with locale descriptions
   - Supports both Elasticsearch and Zebra search engines

2. **Zebra Search Engine Support**
   - Extends locale-based sorting to Zebra (in addition to existing Elasticsearch)
   - Implements _sort_facets_zebra() function in C4::Search
   - Maintains consistent Unicode-aware sorting behavior across search engines

Key Features:
- Dynamic locale detection via Koha::I18N::available_locales()
- Proper module architecture with comprehensive unit tests
- Clean fallback chain: preference → system LC_COLLATE → default
- Admin UI integration in System Preferences → I18N/L10N
- Universal facet sorting for international library systems

Test plan:
1. Apply patch and restart services
2. Install/run database update
3. Navigate to Administration → System Preferences → I18N/L10N
4. Verify "Sort facet names using" dropdown shows available system locales
5. Test facet sorting with different locales and both search engines
6. Run: prove t/Koha/I18N.t t/Koha/SearchEngine/Elasticsearch/Search.t t/db_dependent/Search_FacetSorting.t

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-11 15:26:56 -06:00
David Nind 3622664b91
Bug 40281: Hide the type column on the patron circulation history page
This fixes the patron circulation history page so that the type column
is hidden.

The type column on a patron's circulation history page was hidden by
Bug 38954 - Hide checkout type using colvis.

However, the commit for Bug 37273 - Add ID column to Agreements
table in the ERM, inadvertently reversed hiding the column.

Test plan:
1. Check out an item to a patron (for example, 39999000011418 to Mary
   Burton).
2. Look at the patron's circulation history page (Patrons > Mary Burton
   > Circulation history), and note there is a 'Type' column shown
   with a value of 'standard_checkout'.
3. Note that you can't hide the column, from either selecting the
   'Columns' or 'Configure' options for the table.
4. Apply the patch, restart everything (restart_all), and clear your
   browser cache.
5. Repeat step 2. Note that there is now no 'Type' column shown and
   it is not configurable, from either selecting the 'Columns' or
   'Configure' options for the table.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-30 16:00:47 -06:00
Lucas Gass 81859ce662
Bug 38939: Add reservenote column to members/holdshistory.pl
To test:
1. APPLY PATCH, restart_all
2. Make some holds for patrons in both the staff client and the OPAC. ( For OPAC turn on  OpacHoldNotes )
3. Make sure you add some notes to each of these holds.
4. Go to the patron account and click on the 'Holds history' tab.
5. Make sure the hold note is there and looks correct.
6. Ensure you can hide the coluimn properly via Table settings.

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-30 16:00:46 -06:00
Laura_Escamilla 4b18fba007
Bug 33729: Added dateaccessioned to column_settings.yml
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-30 16:00:45 -06:00
Tadeusz „tadzik” Sośnierz 53630add0d
Bug 40033: Call GetPlugins correctly in background_jobs.pl
Test plan:

1. Install a plugin that does not have any background_tasks, e.g. https://github.com/HKS3/HKS3GeoSearch/releases/tag/v0.12
2. Navigate to http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl, observe a 500
3. Apply patch
4. Observe no 500

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-02 15:26:22 -06:00
Jonathan Druart 492e6814a1
Bug 39834: Replace some tabs with spaces
In order to remove false positives with the QA script we should replace some tabs with spaces.

There are more but I wanted to make sure no regression would be
introduced

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-06-02 15:26:17 -06:00
Raphael Straub c184893a53
Bug 39540: Add a warning to the circulation rules page if CalcFine is overwritten.
This patch adds a warning to the "Circulation and fine rules" page in
"Koha administration" if there is an enabled plugin that implements the
overwrite_calc_fine plugin hook.

To test:
1) Apply the patch.
2) In your browser go to
   /cgi-bin/koha/admin/smart-rules.pl
   and check that there is no warning on the top of the page.
3) Install a plugin that implements overwrite_calc_fine.
4) Reload /cgi-bin/koha/admin/smart-rules.pl and check
   that now there is a warning that displays the installed
   plugin's name.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-20 15:15:32 +02:00
Matt Blenkinsop 0f2b79c444
Bug 30301: (QA follow-up) Restore correct terminology and add to columns settings
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-19 18:54:33 +02:00
Matt Blenkinsop 84076d5169
Bug 30301: Update templates
Signed-off-by: Hanna Leiker <tech.hanna@salinapublic.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-19 18:54:30 +02:00
Andrew Fuerste Henry fae2d791b9
Bug 39908: Hide diff column in log viewer by default
To test:
1 - go to the log viewer in tools, perform a search
2 - observe the diff column is visible by default
3 - apply patch, reset_all
4 - reload log viewer, repeat search
5 - observe the diff column is now hidden by default
6 - confirm you can toggle diff visibility in the log viewer page
7 - go to column settings and confirm you can toggle diff visibility there

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-16 14:25:48 +02:00
Martin Renvoize ad85f9f20e
Bug 39177: Add additional fields to credit types
Test plan, k-t-d:
1) Before defining any additional fields for account_credit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing credit type.
2) Add a new additional field to 'account_credit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_credit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account credit type:
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same credit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-15 09:20:49 +02:00
Martin Renvoize 9a6ef2e810
Bug 38457: Add additional fields to debit display
This patch adds the previously added additional fields to the display
in the debit types management page table

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-15 09:20:46 +02:00
Martin Renvoize dab1efd1bf
Bug 38457: Add additional fields to debit types
Test plan, k-t-d:
1) Before defining any additional fields for account_debit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing debit type.
2) Add a new additional field to 'account_debit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account debit type:
   <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same debit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-15 09:20:46 +02:00
Andrew Fuerste Henry 8dff277243
Bug 39628: Show diff in log viewer and column settings
To test:
1 - apply patch
2 - search the log viewer for item edits or something else that records a diff value
3 - see that diff in the new column
4 - confirm the diff value is present in exports and prints
5 - confirm you can use column config to hide that diff value

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-15 09:20:44 +02:00
Kyle M Hall fb9722a128
Bug 39878: EDIFACT vendor account records sets default port incorrectly for FTP
When creating or editing an EDI (EDIFACT vendor record) if the port is left empty it will be set to port 22. This is fine then the service is SFTP, but if FTP is selected the default to 21.

Test plan:
1) Enable EDIFACT
2) Create a new EDI Vendor account with the FTP transport selected. Pleave the ports unpopulated
3) Note the saved record has port 22 set
4) Apply this patch
5) Restart all the things!
6) Repeat stepts 1 and 2
7) The port should now be 21 for new ftp site and 22 for new stp sites!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-13 18:46:58 +02:00
Tadeusz „tadzik” Sośnierz 1da28b221a
Bug 39772: Extend background_tasks API to allow for human-readable job names
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-06 18:48:25 +02:00
Tadeusz „tadzik” Sośnierz c2eb2625b2
Bug 39772: Display package names for plugin jobs rather than "unknown" messages
This slightly improves the current situation, where on background_jobs.pl
each plugin job would be displayed as "Unknown job type 'plugin_...'".
After this patch, we display the implementing package name
(sourced from plugins' background_tasks()), which is slightly more
human-friendly and significantly less error-looking.

Test plan:

1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink)
2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl,
   enable the plugin and run a tool/report from it
3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
4. Apply the patch
5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-06 18:48:24 +02:00
Matt Blenkinsop 3e68c4cf2e
Bug 38010: (follow-up) Make vendor table columns configurable
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-06 18:48:14 +02:00
Matt Blenkinsop 8f93413671
Bug 38010: (QA follow-up) Update routes to include 'acquisition'
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:09 +02:00
Matt Blenkinsop 239ad17d3d
Bug 38010: Update links to vendor module
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:37 +02:00
Jonathan Druart 69b8341a8c
Bug 39325: Manual fixes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:23 +02:00
Jonathan Druart 1d844a7d2f
Bug 39325: Automatic fix
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:22 +02:00
Matt Blenkinsop e2e3de8e73
Bug 39518: Add new field to the UI
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:50 +02:00
Tomas Cohen Arazi 7a990de29d
Bug 35604: Move available_backends() to Koha::ILL::Request::Config
This patch removes the the Koha::ILL::Backends class as it is not
actually a Koha::Objects-based class as it claims, and also internally
instantiates the config class, which could just hold the only defined
method.

This method is only used in the preferences.pl page, and its occurence
is fixed by this patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:10 +02:00
Pedro Amorim e10e0c8f05
Bug 35604: New 'ill-backends' syspref type
UI rendering of sortable ILL backends

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:03 +02:00
Jonathan Druart b1efa3d71d
Bug 39300: Fix quick edit of subfields
Searching tag$subfield in the framework should redirect to the edition
of the tag with the subfield tab selected.
This has been broken when we used the wrapper for tabs on bug 33178.

Test plan:
Edit a framework
http://localhost:8081/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=
Search for 952$c
=> You are redirected to the edition of 952 and the "c" tab is selected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-10 09:13:14 +02:00
Lucas Gass 8d6842930b
Bug 15461: Add stand alone shelving location column to holdings table
To test:
1. APPLY patch and restart_all
2. Go the detail page for some records and see the shelving location column.
3. Make sure the data looks correct
4. Try Table settings to make sure the column can be properly hidden

NOTE: You cannot currently search the holdings table for AV descriptions, only the code.
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-17 11:59:50 +01:00
Martin Renvoize a70782ae0a
Bug 38663: (follow-up) Fix new library creation
We were attempting to use the a library method prior to saving the
library for the first time.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-10 11:42:29 +01:00
Pedro Amorim e501770f92
Bug 38663: Add AdditionalFields to Library
Test plan, k-t-d:
1) Add a new additional field to 'branches':
  <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=branches
2) Click 'New field'. Add a name. Click Save.
3) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
4) Edit a library:
  <staff_url>/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=CPL
5) Input various values in the different additional fields. Click
   'Submit'
6) Visit the detail page of the library and verify the additional fields
   data is displayed correctly:
<staff_url>/cgi-bin/koha/admin/branches.pl?op=view&branchcode=CPL

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-10 11:42:27 +01:00
Marcel de Rooy c80e9c015c
Bug 38904: Allow opac translation in admin/localization
Test plan:
Try to translate itemtype for an opac language not part of
intranet languages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-07 15:41:14 +01:00
Owen Leonard 6df6337080
Bug 39169: Automatically hide "active" and "budget period" columns on Acquisitions home page
This patch adds column configuration to the table settings for the
"Available funds" table on the Acquisitions home page. If a table has
column configration, hidden columns should be hidden in the
configuration rather than in the in-page table options.

To test, apply the patch and restart all services.

- Go to the Acquisitions home page
- In the "All available funds" section, you should not see "active" and
  "budget period" columns.
- NOTE: You may have to clear you browser's Local Storage in order for
  the change to show.
- If you go to Administration -> Table settings -> Acquisition ->
  acq_acqui-home you should see that the first two columns are hidden by
  default and cannot be toggled.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-21 16:41:15 +01:00
Janusz Kaczmarek 82707f469e
Bug 39012: Koha fails to import default MARC bibliographic framework
Test plan:
==========
1. In Administration > MARC bibliographic, from framework  menu on the
   right, prepare a csv file with framework export.
2. Try to import the fili into Default framework.
3. This should fail, with a redirect to a strange looking page, and
   with lots of errors in the logs.
4. Apply the patch ; restart all.
5. Repeat p. 2. You should succeed and you should be able to see the
   differences in the framework (if you exported from a different
   framework).

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-21 16:41:14 +01:00
Lucas Gass 478c64a7b4
Bug 35635: Split mandatory field into mandatory and opac_mandatory
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:53 +01:00
Eric Garcia d361c8adb6
Bug 37273: Added ID column to ERM Agreements and Licenses Tables
To test
1. Apply patch, yarn build, restart_all
2. System preferences -> ERMModule -> Enable
3. E-resource management -> Agreements -> "+New Agreement"
4. Notice ID is removed from name and put in it's own column
5. Repeat with licenses table

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:33 +01:00
Koha Development Team d659526b5a
Bug 38664: Tidy the whole codebase
This commit is generated using:
  % perl misc/devel/tidy.pl
*within* ktd, to get the same version of perltidy than what will be used
by our CI (currently v20230309).

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:24 +01:00
Jonathan Druart ab20d9371c
Bug 38714: systempreferences - remove localuse
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:56:08 +01:00
Petro Vashchuk 6f28ffbcc5
Bug 25711: Add ExpireReservesMaxPickUpDelayCharge to circulation rules
Add a feature that allows to define ExpireReservesMaxPickUpDelayCharge
in circulation rules per specific items/patron categories.
When value not found in circulation rules it uses global
ExpireReservesMaxPickUpDelayCharge, as it was before this smart-rules
feature was introduced.

To check the feature after applying the patch:
    1) Go to /cgi-bin/koha/admin/preferences.pl and set
ExpireReservesMaxPickUpDelay to allow.
    1) Go to /cgi-bin/koha/admin/smart-rules.pl circulation rules table
and notice the newly added "Expire reserve charge" row.
    2) In that row add numerical values to type/patron categories
that you will be using later to test this feature.
    3) Prepare an item for our next step, pick a biblio that has item
with the same item type you altered in smart rules and check it out.
    3) Place a hold on that item and set the expiration date as the
next day.
    4) Check in it after that.
    5) Do SQL request to change expiration date manually to "yesterday":
in "reserves" table, find the id of the hold that you placed and
"UPDATE reserves SET `expirationdate`='2020-07-19' WHERE
`reserve_id`=329;"
 Or alternatively:
    5) Wait for tomorrow, change server time or invent a time machine.
    6) Run cancel_expired_holds.pl cron job.
    7) Check that patron got charged in "accounting" left tab and
"transactions" upper tab: your patron should have debt of that amount
of fee you assigned in that rule
(/cgi-bin/koha/members/boraccount.pl?borrowernumber=...YourPatronID...)
    8) You can repeat this with other rules and different
numbers/biblio/item types to check that different fees apply according
to smart rules.
    9) If there's no matching smart rule or smart rule have an empty
string as a fee - global ExpireReservesMaxPickUpDelayCharge variable
value will be used.
   10) But in case if matching rule has zero ("0") as a value - that
allows to have no-fee smart-rule results, as a feature.

IMPORTANT:
Smart-rules filters only applied to item-level holds when item-type
for items is known. If there's biblio-level hold, in that case global
ExpireReservesMaxPickUpDelayCharge value will be used).

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-30 18:55:22 +01:00
Marcel de Rooy 1f6e409871
Bug 38630: (QA follow-up) Fixing few calls of getTranslatedLanguages
The fourth parameter is now removed and was never used.
Also replacing the 'both' interface by passing no interface to make
it consistent with call in additional-contents.
Resolving warn for empty interface or theme on Languages.pm L128.

Test plan:
Run t/db_dependent/Languages.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-30 18:05:25 +01:00
Jonathan Druart 5a6f89f3f0
Bug 38954: Hide checkout type using colvis
This is not the correct way to hide a column, we should use the DT's column
visibility plugin.

Test plan:
Have some checkouts for a patron, go to the checkout history page
Without this patch notice the "shift" => the table does not take the
whole available width.

Apply this patch, restart_all, remove localStorage entries

=> The table is now displayed properly

You can also play with on-site checkouts.

Before:
https://snipboard.io/uTWYit.jpg
https://snipboard.io/qxZE35.jpg

After:
https://snipboard.io/2L0F3Q.jpg
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:21 +01:00
Owen Leonard 94ef3bfb47
Bug 32890: Add DataTables to curbside pickups
This patch modifies the curbside pickups page in the staff interface so
that each table is a DataTable with configurable columns.

The patch also replaces the patron name output with patron-title.inc for
consistency and to display names 'surname, firstname' for correct
column sorting.

To test, apply the patch and restart services.

- Enable the CurbsidePickup system preference if necessary.
- Properly testing requires testing data. You can run this command to
  REPLACE your curbside pickup data with sample data:

  bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh)

- Go to Circulation -> Curbside pickups.
  - Test DataTable functionality under each tab: sorting, paging,
    filtering, column visibility, and export.
- Go to Administration -> Table settings -> Circulation -> Curbside
  pickup
  - Confirm that changes made to the configuration of each of the
    4 curbside pickup tables is correctly applied on the curbside
    pickups page.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:51 +01:00
Lucas Gass 13fc876876
Bug 38732: Add copy number column to manage bundles table
To test:
1. APPLY PATCH and restart_all
2. Go to an item record and click 'Manage bundle'
3. Make sure the item you are adding has a copy number.
4. Look at the bundle_table and notice the copy number displaying.
5. Make sure you can hide the column ( Gear icon: Columns ) and via Table settings.

Signed-off-by: Hebah Amin-Headley <hebah@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:49 +01:00
Lucas Gass 1ae30dedf6
Bug 38705: Add serial.publisheddatetext column to OPAC subscriptionst
1. Have or create an item with a serial subscription on it.
2. When receiving make sure you add some publisheddatetext (
   Publication date text )
3. Have a look at the record in the OPAC.
4. In the subscrptions tab there is no 'Publication date text' column.
5. APPLY PATCH and restart_all.
6. Still no 'Publication date text' column is visible.
7. Go to Administration > Table settings
8. Expose the column
9. Reload the OPAC page, you should see the new column.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:48 +01:00
danyonsewell ee69f07c29
Bug 36729: Add publisher/distributor number to standard identifier search index
Have written a patch to allow Publisher/Distributor number to be searched using the standard identifier search index.

Testing plan:

1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply the patch and restart everything (restart_all).
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Update the visibility for 028a in the default framework so that it is visible in the Editor.
7. Add a new record using the default framework and put a term in 028a.
8. Using the advanced search "Standard number" Field, search for the term you put in step 7.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-27 17:33:53 +01:00
Owen Leonard 8a433d4f20
Bug 37826: Remove the use of the script_name variable where it is unnecessary
Most of the places where a "script_name" variable used it is not
strictly necessary. Because it is also used inconsistently, I think it's
better to simply remove the use of the variable where it isn't strictly
necessary.

This patch removes creation of the template variable from several
scripts and updates the corresponding template with the URL itself.

To test, apply the patch and restart services. Test the following pages,
including the various permutations where they are present, e.g. New,
Edit, Delete.

- Administration -> Cities and towns -> Search via the header search
  form
- Administratoin -> Currencies and exchange rates -> Search via the
  header search form
- Administration -> Desks
- Administration -> Budgets
- Administration -> Authority types
- Administration -> Authority types -> MARC structure -> Subfields
- Administration -> Classification configuration
- Administration -> MARC bibliographic framework
- Administration -> MARC bibliographic framework -> MARC structure ->
  Subfields
- Administration -> Record matching rules
- Administration -> OAI repositories
- Administration -> Patron attribute types
- Administration -> System preferences -> Local use
- Administration -> Z39.50/SRU servers
- Acquisitions -> Vendor -> Contracts
- Acquisitions -> Vendor -> Basket -> Export as CSV
- Acquisitions -> Vendor -> Basket -> Edit basket
- Acquisitions -> Vendor -> Basket groups
- Tools -> Import patrons
- Tools -> Notices and slips

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-27 17:33:51 +01:00
Jonathan Druart 80c0fd02bf
Bug 38482: Remove save state for the holdings tables
On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.

Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed

Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed

This can be considered a bug, that why we are disabling the feature for this
table.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: PhilipOrr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:02:01 +01:00