]> git.koha-community.org Git - koha.git/log
koha.git
6 months agoBug 33393: Add note to system preference explaining text length
Alex Buckley [Tue, 2 May 2023 05:56:52 +0000 (05:56 +0000)]
Bug 33393: Add note to system preference explaining text length

Sponsored-by: Pymble Ladies' College
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33393: Enable libraries to configure their own text in the 1-Page order PDF
Alex Buckley [Thu, 30 Mar 2023 22:01:54 +0000 (22:01 +0000)]
Bug 33393: Enable libraries to configure their own text in the 1-Page order PDF

Test plan:
1) Apply patches and restart services
2) Upgrade Koha schema:
sudo koha-upgrade-schema <instance>
3) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
4) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to English 1-page layout option.
5) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
6) Create a basket for this vendor. Add many orders to this basket, for
example 25 items (this is to make the Order PDF cover multiple pages).
7) Close the basket and add it to a basket group of the same name.
8) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
9) Click the button to Export as PDF.
10) View the exported PDF. Confirm the PDF is multiple pages long. If it
is not then re-open the basketgroup and add more orders to the basket
and repeat steps 7, 8, and 9
11) If the PDF is multiple pages long then confirm:
- The text "Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if you are unable to supply item(s)." appears above the order table.
- The page numbers at the bottom of the first page are not obscured by
the order table.
- That the order table starts near the top of the second page, and not
half way down.
12) Change content in the '1PageOrderPDFText' syspref (use the Enter key
    to split text over multiple lines) and save
13) Back in the Acquisitions module click the button to Export as PDF
14) View the exported PDF. Confirm the following:
- The text above the order table is what you saved in the
1PageOrderPDFText system preference
- The page numbers at the bottom of the first page are not obscrued by
the order table.
- That the order table starts near the top of the second page and not
halfway down.
15) Empty the 1PageOrderPDFText system preference and save
16) Back in the Acquisitions module click te button to Export as PDF
17) View the exported PDF and confirm the line of text between the
Tel/Fax line and the order table has been removed.

Sponsored-by: Pymble Ladies' College
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33393: Add system preference
Alex Buckley [Thu, 30 Mar 2023 21:56:15 +0000 (21:56 +0000)]
Bug 33393: Add system preference

Sponsored-by: Pymble Ladies' College
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35967: Add more test cases
Tomas Cohen Arazi [Mon, 11 Mar 2024 13:45:08 +0000 (10:45 -0300)]
Bug 35967: Add more test cases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35967: (QA follow-up) `status` is not nullable
Tomas Cohen Arazi [Mon, 11 Mar 2024 13:38:33 +0000 (10:38 -0300)]
Bug 35967: (QA follow-up) `status` is not nullable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35967: Add REST API endpoint to list patron recalls
Aleisha Amohia [Thu, 1 Feb 2024 00:43:26 +0000 (00:43 +0000)]
Bug 35967: Add REST API endpoint to list patron recalls

This enhancement adds a REST API endpoint to list a patron's recalls:

/api/v1/patrons/{patron_id}/recalls

This depends on the logged in patron having the manage_recalls subpermission.

To test:

1. Log in to the staff interface as your superlibrarian self (Patron A)
2. Go to Koha Administration -> Global system preferences. Enable the UseRecalls system preference
3. Set the relevant recalls circulation and fines rules
4. Search for an item (Item A)
5. Check out Item A to yourself (Patron A)
6. Log in to the OPAC as Patron B, a patron who does not have the manage_recalls permission
7. Search for Item A and request a recall
8. While still logged in to the OPAC as Patron B, hit this URL: https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls (swap out your URL and Patron B's borrowernumber)
9. Confirm you are given an error: "Authorization failure. Missing required permission(s)."
10. Log out of the OPAC and log back in, this time as Patron A
11. Hit the URL again https://your-opac-url/api/v1/patrons/patron-b-borrowernumber/recalls
12. Confirm you are able to view a list of Patron B's recalls
13. Confirm tests pass: t/db_dependent/api/v1/patrons_recalls.t

Sponsored-by: Auckland University of Technology
PA amended: QA follow-up: tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: (QA follow-up): available_backends fix reduce
Pedro Amorim [Fri, 19 Apr 2024 13:28:02 +0000 (13:28 +0000)]
Bug 19605: (QA follow-up): available_backends fix reduce

available_backends was only considering dir backends for reduce, it should consider all backends, including plugin backends.

This relates to the ILLOpacbackends syspref, where if you add a backend name that happens to be a plugin, it was not disabling it for the OPAC.
This change considers all backends for Illopacbackends, regardless of if its a plugin or a directory backend.

This was made evident while writing tests for bug 36197.
Regression tests for this particular use case, and others, are part of bug 36197.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Another fix after bug 35536
Pedro Amorim [Thu, 28 Mar 2024 16:56:34 +0000 (16:56 +0000)]
Bug 19605: Another fix after bug 35536

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Fix after bug 35536
Tomas Cohen Arazi [Mon, 25 Mar 2024 17:18:09 +0000 (14:18 -0300)]
Bug 19605: Fix after bug 35536

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Clarify method name
Tomas Cohen Arazi [Sat, 9 Mar 2024 13:00:17 +0000 (10:00 -0300)]
Bug 19605: Clarify method name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Rename method and use the instantiated plugin in the call
Tomas Cohen Arazi [Sat, 9 Mar 2024 12:47:45 +0000 (09:47 -0300)]
Bug 19605: Rename method and use the instantiated plugin in the call

This patch makes the backend instantiation happen through a plugin
object method instead of a static one. This way, the (already)
instantiated plugin can be reused (if needed) in the plugin workflow
like this:

sub new_il_backend {
    my ($self, $params) = @_;
    return Custom::Backend->new(
        {
            config => $params->{config},
            logger => $params->{logger},
            plugin => $self,
        }
    );
}

The passed plugin object would then be used to retrieve whatever
plugin-defined configurations, template paths or even helper methods. On
INN-Reach, it gives the backend access to API user agents, task queue
injection, etc.

This patch also renames the method so it is more straight-forward this is
related to ILL.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Tidy
Tomas Cohen Arazi [Sat, 9 Mar 2024 12:10:03 +0000 (09:10 -0300)]
Bug 19605: Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Add support for ILL backends as plugins
Pedro Amorim [Mon, 30 Oct 2023 12:14:04 +0000 (11:14 -0100)]
Bug 19605: Add support for ILL backends as plugins

This is designed to maintain existing functionality of loading ILL
backends through the backend_dir config (default Koha/Illbackends/).

A check for a plugin of a given backend name takes precedence over a
backend of the same name loaded the old way through backend_dir, this
means that if this happens, the backend plugin is used and NOT the
backend present in backend_dir.

Old backend_dir backends AND new backend plugins coexist.

Test plan, k-t-d:
1) Enable ILLModule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Install the plugin ILL backend example .kpz located at:
https://github.com/ammopt/koha-ill-backend-plugin/releases/tag/1.0.0
3) koha-plack --restart kohadev
4) Visit ILL requests:
/cgi-bin/koha/ill/ill-requests.pl
5) Click "+ New ILL request". Notice it lists 'FreeForm' and
   'PluginBackend'
6) Click 'PluginBackend'. Enter a '123' in pubmedid, '42' in cardnumber
   and pick a library. Click 'Marke request'
7) Notice the request is created successfully.
8) Visit plugins:
/cgi-bin/koha/plugins/plugins-home.pl
9) Click "View plugin by class". Pick "ill backend plugins". Notice the
   correct plugin is listed.
10) Click "configure" on the ILL backend plugin. Notice it's a normal
    plugin configuration page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Update expandTemplate to expand_template method name
Pedro Amorim [Mon, 30 Oct 2023 12:22:52 +0000 (12:22 +0000)]
Bug 19605: Update expandTemplate to expand_template method name

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19605: Add 'ill_backend' plugin category
Pedro Amorim [Mon, 30 Oct 2023 12:09:39 +0000 (11:09 -0100)]
Bug 19605: Add 'ill_backend' plugin category

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33174: Add warning about how many holds are being cancelled
Lucas Gass [Wed, 8 Mar 2023 21:12:39 +0000 (21:12 +0000)]
Bug 33174: Add warning about how many holds are being cancelled

To test:
1. Apply patch
2. Find or make a record with many holds on it.
3. Go to the Holds tab ( request.pl ).
4. Select some hodls to cancel and press "Cancel selected"
5. A modal popup will appear. Notice the warning telling you exactly how many holds you are about to cancel. Confirm the count is accurate.
6. Try using the select all button and make sure the warning is accurate.
7. Make sure you can cancel the holds.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35862: Display modal search results to the right of form above 1200px
Lucas Gass [Wed, 6 Mar 2024 23:44:08 +0000 (23:44 +0000)]
Bug 35862: Display modal search results to the right of form above 1200px

To test:
1. Apply patch
2. Rebuild CSS ( yarn build )
3. Look at some of the places where there is a modal patron search.
    -suggestion/suggestion.pl: Set to patron
    -members/memberentry.pl: Add guarantor

4. Make sure the modal looks good before and after you have searched for a patron.
5. Play with many different screen sizes, ensuring everything looks good and makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34575: Add a CSS class to patron email
Pedro Amorim [Fri, 22 Dec 2023 10:36:42 +0000 (10:36 +0000)]
Bug 34575: Add a CSS class to patron email

Adds a CSS class to the patron email section in the 'name-address' column of search results in members-home.pl
No functional behaviour change.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34574: Add CSS class to datatable select filter
Pedro Amorim [Thu, 21 Dec 2023 14:11:35 +0000 (14:11 +0000)]
Bug 34574: Add CSS class to datatable select filter

Test plan:

1) Create a new patron category, visit:
/cgi-bin/koha/admin/categories.pl?op=add_form
2) Add a category code, en enrollment period, a category type and a really long description like:
"This is a real long description of the patron category code for demo purposes"
3) Now do the same but for a library, visit:
/cgi-bin/koha/admin/branches.pl?op=add_form
4) Add a library code and a really long name like:
"This is a real long library name for demo purposes"
5) Visit patrons home:
/cgi-bin/koha/members/members-home.pl
6) Hit "Search". Notice the "library" and "category" columns grow in width to match the largest option (added in previous steps)
7) Apply patch, add the following CSS to IntranetUserCSS:
.dt-select-filter{
max-width:200px;
}
8) repeat 5) and 6). Notice the columns no longer grow in width.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35151: DBRev 23.12.00.024
Katrin Fischer [Fri, 19 Apr 2024 17:11:56 +0000 (17:11 +0000)]
Bug 35151: DBRev 23.12.00.024

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35151: (follow-up) Remove ILLModuleCopyrightClearance from sysprefs.sql
Katrin Fischer [Fri, 19 Apr 2024 17:10:42 +0000 (17:10 +0000)]
Bug 35151: (follow-up) Remove ILLModuleCopyrightClearance from sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents
Owen Leonard [Thu, 26 Oct 2023 14:38:14 +0000 (14:38 +0000)]
Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents

This patch moves the ILLModuleCopyrightClearance system preference into
HTML customizations, making it possible to have language- and
library-specific content.

To test you should have some content in the ILLModuleCopyrightClearance
system preference before applying the patch. Apply the patch, run the
database update process, and rebuild the OPAC CSS.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from ILLModuleCopyrightClearance is now stored there.
- The HTML customization entry form should offer
  ILLModuleCopyrightClearance as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Enable the "opaclanguagesdisplay" preference if necessary.
- Edit the ILLModuleCopyrightClearance HTML customization and add unique
  content to the "fr-FR" tab.

- Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if
  necessary. You must have at least one ILL backend installed.
- Log into the OPAC and click the "Interlibrary loan requests" in the
  sidebar menu on the user summary page.
- Click "Create new request."
- You should be taken to a page with your ILLModuleCopyrightClearance
  content shown along with "Yes" and "No" buttons.
  - Clicking "Yes" should take you to the form for creating a new
    request.
- Switch to your updated translation and confirm that the content
  appears correctly.
- Remove all "ILLModuleCopyrightClearance" html customizations. Test the
  "Create new request" process in the OPAC again.
  - There should be no confirmation step before arriving at the form for
    creating a new ILL request.
- Go to Administration -> System preferences and search for
  "ILLModuleCopyrightClearance." It should return no results.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36105: Add 'No status alias' option
Pedro Amorim [Thu, 15 Feb 2024 15:18:38 +0000 (15:18 +0000)]
Bug 36105: Add 'No status alias' option

1) Install FreeForm and enable ILLModule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit /cgi-bin/koha/admin/authorised_values.pl add search for 'alias', click on ILL_STATUS_ALIAS
3) Click on the 'New authorized value for ILL_STATUS_ALIAS' button and add 'alias_code' in authorized value and 'Alias Description' in Description
4) Visit /cgi-bin/koha/ill/ill-requests.pl and create a new FreeForm request
5) After created, click 'Manage request', and then click the 'Edit request' button
6) Edit the Status and select 'Alias Description', click 'Submit'
7) Create a second request but do not set a status alias this time
7) Visit /cgi-bin/koha/ill/ill-requests.pl and select 'Alias description' on the 'Status aliases:' left-side filter
8) Notice the correct record is returned.
9) Now repeat 7) and select 'No status alias'. Notice the request with an empty status_alias is returned
10) Repeat 7 but select 'All status aliases'. Notice both requests are returned

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nell O’Hora <nohora@aub.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32132: DBIC schema update
Katrin Fischer [Fri, 19 Apr 2024 17:03:30 +0000 (17:03 +0000)]
Bug 32132: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32132: DBRev 23.12.00.023
Katrin Fischer [Fri, 19 Apr 2024 17:01:54 +0000 (17:01 +0000)]
Bug 32132: DBRev 23.12.00.023

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32132: Do not allow NULL value in column aqbudgets.budget_period_id
Emmi Takkinen [Fri, 2 Feb 2024 07:02:59 +0000 (09:02 +0200)]
Bug 32132: Do not allow NULL value in column aqbudgets.budget_period_id

If budget_period_id column is set as NULL, "Late orders"
page dies on error 500. Logs read:

Template process failed: undef error - DBIC result _type isn't of the _type Aqbudget at
/home/koha/Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt line 157

This patch makes changes to column aqbudgets.budget_period_id so that it
no longer allows NULL values. This is in line with aqbudgets tables foreign key
"budget_period_id" which has ON DELETE CASCADE clause.

To test:
1. Run prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should fail
2. Run updatedatabase.pl and restart services if needed
3. Rerun prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should now pass

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: DBIC schema update
Katrin Fischer [Fri, 19 Apr 2024 16:26:03 +0000 (16:26 +0000)]
Bug 35724: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: DBRev 23.12.00.022
Katrin Fischer [Fri, 19 Apr 2024 16:22:21 +0000 (16:22 +0000)]
Bug 35724: DBRev 23.12.00.022

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: (QA follow-up) Also account for port in FTP
Martin Renvoize [Tue, 27 Feb 2024 11:08:59 +0000 (11:08 +0000)]
Bug 35724: (QA follow-up) Also account for port in FTP

We were only passing port into SFTP connections.. now that we allow
defining it, we should also pass it to FTP connections just in case
someone is still using those.

This patch adds such functionality and defaults to port 21 in this case
when the port isn't defined.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: Sync database update and kohasctructure and set to int(11)
Martin Renvoize [Tue, 27 Feb 2024 11:01:42 +0000 (11:01 +0000)]
Bug 35724: Sync database update and kohasctructure and set to int(11)

We use int(11) in the smtp_servers table for port, so I think it makes
sense to use the same here too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: Define non-standard ports for EDI SFTP in EDI accounts
Alex Buckley [Mon, 8 Jan 2024 14:47:37 +0000 (14:47 +0000)]
Bug 35724: Define non-standard ports for EDI SFTP in EDI accounts

Not all EDI vendors accept Koha servers connecting on port 22, sometimes
they require a different port to be used, so it would be helpful for
librarians to be able to configure non-standard EDI SFTP ports
themselves.

Test plan:
1. Set EDIFACT syspref = 'Enable' and define a EDI account: Administration > Acquisition parameters > EDI
accounts.
2. Create an EDI order: https://koha-community.org/manual/latest/en/html/acquisitions.html#ordering-via-edi
3. Confirm you can upload the EDI order and download the vendor invoice.
4. Apply patches, update database, and restart services.
5. Go to the EDI account you made in #1.
6. Confirm there are two new fields: Upload port and Download port, both
have the value of 22.
7. Create a new EDI order.
8. Confirm you can upload the EDI order and download the vendor invoice.
9. Change the EDI account. Set the Download port = 10022.
10. Create a third EDI order.
11. Confirm you can upload the EDI order and download the vendor
invoice.

Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: Template changes
Alex Buckley [Mon, 8 Jan 2024 14:45:04 +0000 (14:45 +0000)]
Bug 35724: Template changes

Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35724: Database changes
Alex Buckley [Mon, 8 Jan 2024 14:40:38 +0000 (14:40 +0000)]
Bug 35724: Database changes

Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36138: Add reason to status column on opac-holdshistory, if there is a reason
Lucas Gass [Tue, 20 Feb 2024 20:49:29 +0000 (20:49 +0000)]
Bug 36138: Add reason to status column on opac-holdshistory, if there is a reason

TO TEST:
1. Turn on OPACHoldsHistory
2. Make some holds for a patron and then cancel them with a reason.
3. Log in as that patron and go to the 'Holds history' tab. Notice the text in the 'Status' column is 'Cancelled' but nothing shows up regarding the reason.
4. Apply patch and try again, this time you should see the reason for cancellation.

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35362: Update patron module pop-up windows with consistent footer markup
Owen Leonard [Fri, 17 Nov 2023 16:29:39 +0000 (16:29 +0000)]
Bug 35362: Update patron module pop-up windows with consistent footer markup

This patch updates two patron-related templates in order to style
submission and close buttons in a fixed footer at the bottom of the
window, with markup consistent with other pop-up windows.

The patch also updates the "Update child" popup js so that it uses
the same window-opening function we use elsewhere. I also added form
validation to the category selection form to help prevent errors if
someone submits the form without making a selection.

To test, apply the patch and go to the Patrons module

- Click "New patron" and add a patron with the same first and last name
  of a patron already in the database.
- When you save the new patron record the page should reload with an
  error message: "Duplicate patron record?"
- Click "View existing record"
- A pop-up window should appear with patron information.
- Confirm that the window's footer looks correct.

- Locate a patron with an age-limited child category. In the sample data
  the "Juvenile" category works.
- View the patron detail page and click More -> Update child to adult
  patron.
- A pop-up window should appear with patron category selection options.
- Try submitting the form without making a selection. You should see a
  message about fields being required.
- Select a category and submit the form to confirm that the controls
  work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35108: Hide empty fields on ILL manage request page
Pedro Amorim [Thu, 19 Oct 2023 14:13:48 +0000 (14:13 +0000)]
Bug 35108: Hide empty fields on ILL manage request page

Optionally empty fields are: orderid, biblio_id, batch,
type, type_disclaimer_value, type_disclaimer_date, cost,
price_paid, notesstaff, notesopac.

Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put '42' in the cardnumber, and pick a library. Click 'create'.
6) Notice how there is a lot of unnecessary empty field entries
7) Apply patch, restart plack (koha-plack --restart kohadev)
8) Refresh the page, notice all the empty fields entries are no longer displayed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35108: Move request id to page header
Pedro Amorim [Thu, 19 Oct 2023 14:00:12 +0000 (14:00 +0000)]
Bug 35108: Move request id to page header

Redundant information, can be moved to header for more visibility and less horizontal length

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36093: (QA follow-up) Fix unit tests
Matt Blenkinsop [Fri, 19 Apr 2024 09:02:13 +0000 (09:02 +0000)]
Bug 36093: (QA follow-up) Fix unit tests

This patch removes some unnecessary lines from the test file

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36093: Add unit test and fix QA tests
Matt Blenkinsop [Fri, 1 Mar 2024 10:29:40 +0000 (10:29 +0000)]
Bug 36093: Add unit test and fix QA tests

prove t/db_dependent/api/v1/erm_custom_reports.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36093: Fix missing array reference
Matt Blenkinsop [Wed, 14 Feb 2024 12:29:01 +0000 (12:29 +0000)]
Bug 36093: Fix missing array reference

This patch adds an array reference where it was previously missed.

Test plan:
Review patch diff and observe that the array reference is now correctly added

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36634: Replace cud-show with show in tools/automatic_item_modification_by_age.pl
Jonathan Druart [Thu, 18 Apr 2024 06:50:55 +0000 (08:50 +0200)]
Bug 36634: Replace cud-show with show in tools/automatic_item_modification_by_age.pl

It's never used in the template anyway but for consistency it would be better to use "show" (it's not CUD)

No change expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 8461: Tidy
Nick Clemens [Fri, 12 Apr 2024 11:21:07 +0000 (11:21 +0000)]
Bug 8461: Tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 8461: Display information on withdrawn item when checked in
Nick Clemens [Wed, 24 Jan 2024 14:49:53 +0000 (14:49 +0000)]
Bug 8461: Display information on withdrawn item when checked in

This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.

To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36623: (follow-up) Fix translation 'Cronjobs'
Matt Blenkinsop [Thu, 18 Apr 2024 14:38:51 +0000 (14:38 +0000)]
Bug 36623: (follow-up) Fix translation 'Cronjobs'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34963: Restore the ability to blank fields when editing a suggestion
Jonathan Druart [Wed, 17 Apr 2024 09:48:16 +0000 (11:48 +0200)]
Bug 34963: Restore the ability to blank fields when editing a suggestion

Regression introduced by bug 23991.
We don't want to remove the fields from the edition if they are empty.

Ideally we should have separate parameters for edition and search, but
this is the low-effort fix, and hopefully won't introduce side-effects.

Test plan:
Try to edit a suggestion and blank some fields
Try to search for suggestions using the search form on the left of the
screen

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35973: DBRev 23.12.00.021
Katrin Fischer [Fri, 19 Apr 2024 15:52:33 +0000 (15:52 +0000)]
Bug 35973: DBRev 23.12.00.021

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35973: (QA follow-up) Ad exec flag to update
Nick Clemens [Fri, 19 Apr 2024 13:30:28 +0000 (13:30 +0000)]
Bug 35973: (QA follow-up) Ad exec flag to update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35973: Correct wrong values for RedirectGuaranteeEmail system preference
Katrin Fischer [Sun, 17 Mar 2024 16:46:26 +0000 (16:46 +0000)]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference

The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.

This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.

To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
  before applying the patch
* Verify in the database, that the values was set to yes or no
  You can use a report like:
    SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
  Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35394: Correction to booked items logic
Martin Renvoize [Fri, 8 Mar 2024 15:25:10 +0000 (15:25 +0000)]
Bug 35394: Correction to booked items logic

This patch fixes the overly extreme message that was designed to appeared
when someone tried to check out a booked item to the wrong user.
However, the message never appeared due to a logic error within
CanBookBeIssued which this patch also resolved.

Test plan
1) Make an item bookable
2) Add a booking for the item to patron A from tomorrow
3) In the database, update the booking start_date to today (or wait a
   day before the next step)
4) Attempt to check the book out to patron B.
   Note that you are displayed with the new message 'The item is booked
   for another patron' and you are unable to check the item out.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36635: Fix vendor's issue show view
Jonathan Druart [Thu, 18 Apr 2024 06:54:48 +0000 (08:54 +0200)]
Bug 36635: Fix vendor's issue show view

Should be "show" not "cud-show"

Test plan:
Create an issue for a vendor, click on the issue's id on the issue list
table
Notice that with the patch applied the issue is displayed. Without the
patch the "show" view is empty

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 27893: (QA follow-up) Rephrase warning
Marcel de Rooy [Fri, 19 Apr 2024 07:05:53 +0000 (07:05 +0000)]
Bug 27893: (QA follow-up) Rephrase warning

See comment24 as well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 27893: (QA follow-up) Terminology
Marcel de Rooy [Fri, 19 Apr 2024 07:03:02 +0000 (07:03 +0000)]
Bug 27893: (QA follow-up) Terminology

See comment24.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 27893: Optionally skip biblio with open orders in batch delete
Marcel de Rooy [Mon, 19 Feb 2024 13:24:47 +0000 (13:24 +0000)]
Bug 27893: Optionally skip biblio with open orders in batch delete

If the user unchecks the skip checkbox (on by default), we must
make sure that order cancellation is done in background job.

Test plan:
Pick two biblios. One has linked open orders, the other not.
Go to batch delete records. Select 'Enter list of numbers'.
Enter both biblio numbers and check that only one is used on the
follow-up form.
Run the deletion without the skip open orders and verify
that linked order line is cancelled.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 27893: Cancel acq orders in addbiblio.pl
Marcel de Rooy [Mon, 19 Feb 2024 11:43:32 +0000 (11:43 +0000)]
Bug 27893: Cancel acq orders in addbiblio.pl

When the user confirms removal although we have linked orders,
we should cancel them.

Test plan:
Add order line to a basket.
Goto newly added biblio record, remove items, remove biblio.
Notice the warning about attached order lines.
Confirm. Check the basket again after deletion took place (cancelled line).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36068: (QA follow-up) Add OPTIONS section in POD
Marcel de Rooy [Thu, 18 Apr 2024 14:31:37 +0000 (14:31 +0000)]
Bug 36068: (QA follow-up) Add OPTIONS section in POD

Test plan:
Run script with --help.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36068: Do not overwrite cancellation date in ->cancel
Marcel de Rooy [Wed, 14 Feb 2024 15:57:50 +0000 (16:57 +0100)]
Bug 36068: Do not overwrite cancellation date in ->cancel

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36068: Add maint script acq_cancel_obsolete_orders.pl
Marcel de Rooy [Thu, 8 Feb 2024 15:29:30 +0000 (15:29 +0000)]
Bug 36068: Add maint script acq_cancel_obsolete_orders.pl

Introducing $orders->filter_by_obsolete and $orders->cancel.

Test plan:
Run t/db_dependent/Koha/Acquisition/Orders.t
Create basket with few orders. Remove some biblio records.
Run acq_cancel_obsolete_orders.pl -c

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36563: Turn into array only if required
Pedro Amorim [Thu, 11 Apr 2024 10:40:16 +0000 (10:40 +0000)]
Bug 36563: Turn into array only if required

Test plan, apply first patch:
1- Visit item search:
   http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl
2- Set "Home library" -> "is not" -> "Centerville". Notice you get items
   from Centerville.
3- Apply second patch, repeat step 2, notice you now don't get items
   from Centervile.
4- Test other use cases, like 'is' and 'is not' for multiple choices

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36563: Dirty fix
Jonathan Druart [Wed, 10 Apr 2024 10:04:18 +0000 (12:04 +0200)]
Bug 36563: Dirty fix

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36473: (follow-up) Additionally warn the stringified exception
Nick Clemens [Thu, 18 Apr 2024 11:17:33 +0000 (11:17 +0000)]
Bug 36473: (follow-up) Additionally warn the stringified exception

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36473: (follow-up) Add biblionumber to warning
Nick Clemens [Thu, 18 Apr 2024 10:35:52 +0000 (10:35 +0000)]
Bug 36473: (follow-up) Add biblionumber to warning

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36473: (follow-up) Correct biblio to bibliographic
Nick Clemens [Thu, 18 Apr 2024 10:33:40 +0000 (10:33 +0000)]
Bug 36473: (follow-up) Correct biblio to bibliographic

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36386: Pass user and group to Net::Server
Marcel de Rooy [Thu, 21 Mar 2024 14:17:35 +0000 (14:17 +0000)]
Bug 36386: Pass user and group to Net::Server

This prevents the User/Group Not Defined warns in syslog.

Test plan:
Restart sip and check your syslog.

KTD Test Plan:
1) Stop your SIP server
2) Run "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/koha-conf.xml"
   We need valid XML without any valid SIP settings to the output goes
   to the command line
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) No warnings!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36623: Remove localhost reference
Matt Blenkinsop [Wed, 17 Apr 2024 15:03:53 +0000 (15:03 +0000)]
Bug 36623: Remove localhost reference

This patch removes a reference to localhost from a url within ERM

Test plan:
This is quite hard to test without sushi credentials and is quite an easy fix. Check the patch diff to verify that the localhost reference has now been removed from the url

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30068: Remove table_settings_borrowers_table from circulation.tt
Jonathan Druart [Wed, 17 Apr 2024 10:06:03 +0000 (12:06 +0200)]
Bug 30068: Remove table_settings_borrowers_table from circulation.tt

The history is a mess, but here we init a JS variable that is never
used.

Test plan:
  git grep table_settings_borrowers_table
should not return anything after this patch applied

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36490: Correct tab-switching keyboard shortcut for header search forms
Owen Leonard [Tue, 2 Apr 2024 12:41:42 +0000 (12:41 +0000)]
Bug 36490: Correct tab-switching keyboard shortcut for header search forms

This patch updates staff-global.js so that we correctly define the
keyboard shortcuts for search header tabs following the switch to using
the WRAPPER for tabs in Bug 35850.

To test, apply the patch clear your browser cache if necessary.

- Go to the staff interface.
- Test each keyboard shortcut to confirm that the header search tabs
  activate correctly:
  - Check in: Alt-r
  - Renew: Alt-w
  - Search: Alt-q
  - Check out: Alt-u
- Test that the keyboard shortcut takes you to the correct page if the
  header search form doesn't exist on the page, e.g. the Authorities
  home page.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36420: Allow Basic authentication using `cardnumber`
Tomas Cohen Arazi [Wed, 27 Mar 2024 12:01:32 +0000 (12:01 +0000)]
Bug 36420: Allow Basic authentication using `cardnumber`

This patch makes the API Basic authentication work with cardnumbers.
The used `checkpw_internal` method already does the fallback check.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests explode! [1]
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

[1] This highlights an underlying bug! Instead of getting 403, etc we get a 500. This is because of the internal fallback mechanism allowing the cardnumber+password combination, but then the Koha::Patron->find... not finding :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36420: Unit tests
Tomas Cohen Arazi [Wed, 27 Mar 2024 12:00:48 +0000 (12:00 +0000)]
Bug 36420: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30987: Fix relationship fields for patron full and quick add forms
Lucas Gass [Mon, 26 Feb 2024 15:59:29 +0000 (15:59 +0000)]
Bug 30987: Fix relationship fields for patron full and quick add forms

To test:
1. APPLY PATACH and restart services.
2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate."
3. Populate the system preference with at least 1 choice.
4. Find a patron category with can_be_guarantee set to 'Yes'.
5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show )
6. The values in the dropdown should refelct the borrowerRelationship values.
7. With BorrowerMandatoryField make relationship mandatory.
8. Try step 5 again, this time the Relationship field should be mandatory.
9. Remove the field from  BorrowerMandatoryField and add it to BorrowerUnwantedField.
10. Do step 5 again, the relationship field should not show on the quick add form.

Signed-off-by: Myka Kennedy Stephens <mkstephens@fosgail.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36630: Change Post to GET to fix CSRF error on item search batch operations buttons
Brendan Lawlor [Wed, 17 Apr 2024 20:57:34 +0000 (20:57 +0000)]
Bug 36630: Change Post to GET to fix CSRF error on item search batch operations buttons

This patch changes the form that submits to batchMod.pl from the Item search results page. The form method does not need to be a POST.

    To recreate:

    1. Do an item search
    2. On the results page 'click Select visible rows'
    3. Click 'Batch operations' and select 'Batch item modification'
    4. See Programming error - op 'show' must start with 'cud-' for POST http://localhost:8081/intranet/tools/batchMod.pl (referer: http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl)
    5. Click 'Batch operations' and select 'Batch item deletion'
    6. See the same error

    To test:
    1. Apply patch and repeat steps to recreate the issue
    2. See that the batchMod.pl page loads with no error.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36577: (bug 34478 follow-up) marc21_linking_section.pl not working
Janusz Kaczmarek [Thu, 11 Apr 2024 12:36:25 +0000 (12:36 +0000)]
Bug 36577: (bug 34478 follow-up) marc21_linking_section.pl not working

After applying "Bug 34478: op =~ ^cud- everywhere" the plugin
marc21_linking_section.pl stopped working properly.  Since the plugin
does not perform a CUD operation, the GET request can be used, and so
the use of CSRF token is not needed.

The patch fixes also problems with result page numbers display.

Test plan
=========
1. Configure a MARC bibliographic framework to use the plugin
   marc21_linking_section.pl (e.g. in 773 $t).
2. Start creating a new record and go to 773 $t. Activate the plugin to find
   the any record to become the host record (perform a search for any
   common word, like 'and').
3. You will get no results.
4. Apply the patch, restart plack etc.
5. Repeat p. 2 - you should now see some results, possibly more than one
   page.  You should be able to change page with Next/Previous arrows and
   also with the page numbers.

BTW, QA people - maybe it would pay to remove the commented code present there
since the very beginning (2012).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36597: Fix deletion of circulation desks broken by CSRF
Owen Leonard [Fri, 12 Apr 2024 12:31:15 +0000 (12:31 +0000)]
Bug 36597: Fix deletion of circulation desks broken by CSRF

Our CSRF work introduced a problem with deleting circulation desks: The
"delete_confirm" does not need "cud-" because it's a GET operation
leading to a POSTed deletion after the confirmation is submitted.

To test, apply the patch and restart services.

- Go to Administration -> Circulation desks.
- If necessary, create a circulation desk.
- Click the "Delete" button for you new desk.
- You should be taken to a confirmation page which shows details of the
  desk you're deleting.
- Confirming the deletion should result in deletion of the desk.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33832: Allow updating username without changing password on member-password.pl
Brendan Lawlor [Fri, 12 Apr 2024 15:29:37 +0000 (15:29 +0000)]
Bug 33832: Allow updating username without changing password on member-password.pl

This patch updates the change password page on the staff interface to
allow for changing the patron's username without changing the password.
If the new password is an empty string we can skip setting the patron's
password and sending the new password to the template.

Test plan:
1. From a patron record tool bar click 'Change password'
2. Notice that if you try to change the user's name without also
   changing the password the page just reloads and nothing happens
3. Apply patch and restart_all
4. From the patron record click 'Change password' again
5. Set the user's new username and  password eg. '1234Abc' and click
   'Save'
6. Confirm that you can log in to the OPAC with the user
7. Return to the patron record and click 'Change password' again
8. This time change just the 'New username field' and click 'Save'
6. Notice that the username is updated
7. Confirm you can log into the OPAC with the new username and the
   original password '1234Abcd'
8. Make sure that the change password form still validates passwords
   for length and matching errors etc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35810: (QA follow-up) Add aria label for accessibility
Emily Lamancusa [Tue, 20 Feb 2024 14:49:48 +0000 (09:49 -0500)]
Bug 35810: (QA follow-up) Add aria label for accessibility

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35810: Add back to top button on staff pages
Thibaud Guillot [Mon, 15 Jan 2024 10:19:51 +0000 (11:19 +0100)]
Bug 35810: Add back to top button on staff pages

Test plan:

1) Apply this patch and rebuild css with 'yarn build'
2) For example, perform a search from catalogue
3) Scroll down to see the button appear and scroll up to see it
   disappear

Note that it's works also on patron search etc..

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35432: Expand comments to explain the priority of filling requests
Nick Clemens [Wed, 29 Nov 2023 16:37:04 +0000 (16:37 +0000)]
Bug 35432: Expand comments to explain the priority of filling requests

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35432: Remove PULL_BRANCHES and use ifs over unless
Nick Clemens [Wed, 29 Nov 2023 15:00:18 +0000 (15:00 +0000)]
Bug 35432: Remove PULL_BRANCHES and use ifs over unless

PULL_BRANCHES and PULL_BRANCHES2 felt a little arbitrary, moved
to using a last in the outer loop.

Swapped 'next unless' for an if to more directly show when we are acting

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35432: Simplay HoldsQueuePrioritize branch check
Nick Clemens [Wed, 29 Nov 2023 14:50:41 +0000 (14:50 +0000)]
Bug 35432: Simplay HoldsQueuePrioritize branch check

The code here is going to check items held the the pickup location for a request
or from the least cost branch matching the patron's home library against the HoldsQueuePrioritizeBranch
setting

The loop is the same in both case, so lets simplify this a bit to make the intent more clear

To test:
1 - prove -v t/db_dependent/HoldsQueue.t
2 - It should pass before and after this patch

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35432: Add _can_item_fill_request subroutine
Nick Clemens [Wed, 29 Nov 2023 14:15:09 +0000 (14:15 +0000)]
Bug 35432: Add _can_item_fill_request subroutine

There are a series of repeated checks throughout MapItemsToHoldRequests.

This patch simply consolidates them into a single routine that can be called.

To test:
1 - prove t/db_dependent/HoldsQueue.t
2 - Confirm it passes before and after this patch is applied

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35432: Add comments and POD
Nick Clemens [Wed, 29 Nov 2023 14:02:08 +0000 (14:02 +0000)]
Bug 35432: Add comments and POD

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 20388: (QA follow-up) Tidy
Nick Clemens [Fri, 12 Apr 2024 07:36:52 +0000 (07:36 +0000)]
Bug 20388: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 20388: Alert if the search field already exists
Jonathan Druart [Tue, 19 Mar 2024 15:00:04 +0000 (16:00 +0100)]
Bug 20388: Alert if the search field already exists

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 20388: Add trash icon to the delete button
Jonathan Druart [Tue, 19 Mar 2024 14:33:12 +0000 (15:33 +0100)]
Bug 20388: Add trash icon to the delete button

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 20388: Adjust code
Jonathan Druart [Tue, 19 Mar 2024 14:28:30 +0000 (15:28 +0100)]
Bug 20388: Adjust code

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 20388: Elasticsearch - Ability to add search fields from UI
Alex Arnaud [Wed, 7 Apr 2021 13:20:53 +0000 (13:20 +0000)]
Bug 20388: Elasticsearch - Ability to add search fields from UI

Test plan:

  - apply this patch,
  - check that SearchEngine system preference is set to Elasticsearch,
  - go to Admin > Search engine configuration,
  - on the search fields tab, fill a new line at the bottom of the table
    (name, label, type)
  - click on the "Add" button and save,
  - check that the new search field has been saved,
  - also test field deletions,
  - check that you can't delete already mapped fields.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36343: DBRev 23.12.00.020
Katrin Fischer [Tue, 16 Apr 2024 15:21:00 +0000 (15:21 +0000)]
Bug 36343: DBRev 23.12.00.020

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36343: (QA follow-up) Add warning in DB update
Martin Renvoize [Tue, 16 Apr 2024 12:13:55 +0000 (13:13 +0100)]
Bug 36343: (QA follow-up) Add warning in DB update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36343: (QA follow-up) Adjust two other occurrences
Marcel de Rooy [Fri, 5 Apr 2024 07:29:40 +0000 (07:29 +0000)]
Bug 36343: (QA follow-up) Adjust two other occurrences

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36343: Add support for 'payload' to _after_biblio_action
Martin Renvoize [Mon, 18 Mar 2024 13:36:11 +0000 (13:36 +0000)]
Bug 36343: Add support for 'payload' to _after_biblio_action

This patch adds support for the payload key into the _after_bilio_action
plugin hook wrapper routine.

This brings it more inline with how these 'action hooks' appear in Holds
and circulation.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36593: Add missing koha_object(s)_class methods to LibraryHour.pm (bug 9796)
Tomas Cohen Arazi [Mon, 15 Apr 2024 09:57:49 +0000 (06:57 -0300)]
Bug 36593: Add missing koha_object(s)_class methods to LibraryHour.pm (bug 9796)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36593: Add 'time' column type support to TestBuilder
Tomas Cohen Arazi [Mon, 15 Apr 2024 09:56:53 +0000 (06:56 -0300)]
Bug 36593: Add 'time' column type support to TestBuilder

This simple patch adds support for the 'time' column type.

To test:
1. Run:
   $ ktd --shell
  k$ perl -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my
$hour = $b->build_object({ class => "Koha::Library::Hours" });'
=> FAIL: It explodes as it doesn't know how to deal with the 'time'
column type
2. Apply this patch and the follow-up
3. Run:
  k$ prove -MDDP -Mt::lib::TestBuilder -e 'my $b =
t::lib::TestBuilder->new; my $h = $b->build_object({ class => "Koha::Library::Hours" }); p($h->unblessed);'
=> SUCCESS: It generates an hour!
4. Run:
  k$ prove t/db_dependent/TestBuilder.t
=> SUCCESS: It builds all the things!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces...
Janusz Kaczmarek [Sat, 11 Mar 2023 10:45:32 +0000 (11:45 +0100)]
Bug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning

Bug 28268, in
Koha::MetadataRecord::Authority::get_all_authorities_iterator,
introduced a warning:

warn "Something went wrong reading record for authority $row->authid: $@\n";

But a method cannot be called from within quotes in Perl - extrapolation
does not work for functions/methods.  So, if something really goes
wrong, this line of code produces a warning like:

Something went wrong reading record for authority
Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty
String at /usr/share/perl5/MARC/File/XML.pm line 450.

which is not very informative -- authid is missing.

Test plan
=========
Hard to reproduce.  This problem occurs only in rare cases of some weird problem
in stores authority data or if a auth record had been deleted after a ES reindex
action has been initiated.  But the problem in the code and the fix seem obvious.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36552: (QA follow-up) Add a theoretical check on $record
Marcel de Rooy [Fri, 12 Apr 2024 08:10:18 +0000 (08:10 +0000)]
Bug 36552: (QA follow-up) Add a theoretical check on $record

Theoretically, it might be empty? Note the check too in the
other script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36552: (QA follow-up) Add POSIX module
Marcel de Rooy [Fri, 12 Apr 2024 08:07:40 +0000 (08:07 +0000)]
Bug 36552: (QA follow-up) Add POSIX module

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36552: Update record 'date entered on file' when duplicating a record
Janusz Kaczmarek [Wed, 26 Apr 2023 23:04:48 +0000 (01:04 +0200)]
Bug 36552: Update record 'date entered on file' when duplicating a record

The 'date entered on file' (MARC21: 008/0-5, UNIMARC: 100a/0=7) of a record created
by duplication of an existing record should be set to the current date instead of
having the value of the original record.

Test plan
=========
1. Check the 'date entered on file' of an existing biblio / authotiry record
   (MARC21: 008/0-5, UNIMARC: 100a/0=7).
2. Duplicate the record by Edit > Edit as new (duplicate)
3. Control the 'date entered on file' value - it will equal to that of the
   original record.
4. Apply the patch (restart plack).
5. Repeat step 2.
6. Check the date - it should be the current date.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34621: Tidy import_patrons.pl
Kyle M Hall [Mon, 18 Mar 2024 11:04:23 +0000 (07:04 -0400)]
Bug 34621: Tidy import_patrons.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34621: Tidy Import.t
Kyle M Hall [Mon, 18 Mar 2024 11:00:37 +0000 (07:00 -0400)]
Bug 34621: Tidy Import.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34621: implement Patron import option to 'Renew existing patrons' 'from the curre...
Kyle M Hall [Fri, 25 Aug 2023 17:37:46 +0000 (17:37 +0000)]
Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date'

Test Plan:
1) Test importing a patron with the "from the current membership expiry date" option,
   note it does not work
2) Apply this patch
3) Restart all the things!
4) Re-test, note the expiration was renewed from the patron's current
   expiration date!

Signed-off-by: David Nind <david@davidnind.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36473: Handle Invalid Metadata Exceptions in totalissues.pl
Nick Clemens [Mon, 1 Apr 2024 14:32:08 +0000 (14:32 +0000)]
Bug 36473: Handle Invalid Metadata Exceptions in totalissues.pl

This patch wraps the call for record in an eval, and catches any invalid metadata
exceptions, letting the warning show, but allowing the script to continue
To test:
1 - In default KTD record 369 has problems, otherwise you need to break a record
2 - Run : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v
3 - It dies at record 369 (or the one you broke)
4 - Apply patch
5 - Run again
6 - It succeeds, but skips the bad record

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>
6 months agoBug 36473: Unit tests
Laura Escamilla [Tue, 2 Apr 2024 13:43:00 +0000 (13:43 +0000)]
Bug 36473: Unit tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>