]> git.koha-community.org Git - koha.git/log
koha.git
4 weeks agoBug 33339: Prevent Formula Injection (CSV Injection) in CSV files
Kyle M Hall [Thu, 27 Jul 2023 16:30:54 +0000 (12:30 -0400)]
Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files

The system is vulnerable to Formula Injection attacks as the data
stored within the database and exported as CSV/Excel is not being
sanitized or validated against implanted formula payloads

This patch modifies all uses of Text::CSV and derived classes to pass
the "formula" parameter with value of "empty" which replaces formulas
by empty string.

Test Plan:
1) Apply this patch
2) For guided_reports.pl, attempt to export CSV where you've set a column to a formula somehow
   ( such as "=1+3" )
3) Export that CSV file
4) Note the formula has not been exported
5) Repeat this plan for the remaining scripts that export CSV files
   where users can define the outputted data

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Fixed two conflicts. I have tested that this works as advertised on:
- Reports (Download > Comma separated text (.csv)) [Text::CSV::Encoded]
- Circulation > Overdues > Download file of all overdues [Text::CSV_XS]
- misc/export_borrowers.pl [Text::CSV]
This covers all modules used, and both GUI and command line.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Change none to empty in the commit message ! None is the default,
doing nothing. Empty clears the formulas.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38418: Make SIP/Transaction.t run on all dateformat values
Tomas Cohen Arazi [Mon, 11 Nov 2024 16:48:51 +0000 (13:48 -0300)]
Bug 38418: Make SIP/Transaction.t run on all dateformat values

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
4 weeks agoBug 38328: Cannot delete ILL batch statuses
Phil Ringnalda [Fri, 1 Nov 2024 18:22:59 +0000 (11:22 -0700)]
Bug 38328: Cannot delete ILL batch statuses

You are permitted to delete ILL batch statuses that you (rather than the
system) add, but the UI didn't get the CSRF memo about delete ops needing to
be POSTs with op="cud-delete", so it still uses a GET of ?op="delete" and
fails.

Test plan:
 1. Set the preference ILLModule to 'Enable'
 2. Administration - Interlibrary loan batch statuses - New batch status
 3. Give it a name, an uppercase code, and Save
 4. Click the Delete button to the right of your new status
 5. The page is blank, and if you navigate back to Interlibrary loan batch
    statuses, you'll see that yours was not deleted
 6. Apply patch, reload page
 7. Click the Delete button to the right of your new status, verify it is
    deleted

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38322: (QA follow-up) Fix spelling
Martin Renvoize [Wed, 13 Nov 2024 09:35:50 +0000 (09:35 +0000)]
Bug 38322: (QA follow-up) Fix spelling

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38322: Adjust tests
Nick Clemens [Fri, 1 Nov 2024 12:54:09 +0000 (12:54 +0000)]
Bug 38322: Adjust tests

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>
4 weeks agoBug 38069: Fix jump to the correct table
Jonathan Druart [Wed, 13 Nov 2024 11:46:41 +0000 (12:46 +0100)]
Bug 38069: Fix jump to the correct table

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36221: (QA follow-up): Fix translation entry concat
Pedro Amorim [Wed, 13 Nov 2024 11:01:53 +0000 (11:01 +0000)]
Bug 36221: (QA follow-up): Fix translation entry concat

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 34088: (follow-up) fix env vars in koha-upgrade-schema
David Cook [Wed, 13 Nov 2024 00:10:11 +0000 (00:10 +0000)]
Bug 34088: (follow-up) fix env vars in koha-upgrade-schema

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 28633: Fix patrons_search.t
Jonathan Druart [Wed, 13 Nov 2024 14:45:56 +0000 (15:45 +0100)]
Bug 28633: Fix patrons_search.t

This does not belong here, but raised to me here, so attaching on this
one.
This feels like it's coming from bug 33484, but those tests were passing
after it has been pushed.

This patch fixes the following error:
Error while executing command: stale element reference: The element reference of <input type="text"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

Since bug 33484 the row with the filters is redrawn on table redraw. So
we need to search for the input every time the table is redrawn.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 23426: (follow-up) Enhance sip_cli_emulator.pl for test plan
Jan Kissig [Thu, 7 Nov 2024 13:32:05 +0000 (13:32 +0000)]
Bug 23426: (follow-up) Enhance sip_cli_emulator.pl for test plan

This follow up enhances the sip_cli_emulator.pl to use start-item and/or end-item as params. With these new params the original test plan can be extended:

Test plan:
a) create several manual invoices for patron 23529000035676 : http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=19
b) run
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=1 --end-item=2
   to get fine 1 and 2 or
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=3 --end-item=3
   to retrieve fine 3

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 23426: (follow-up) This patch reintroduces the former implementation of fine...
Jan Kissig [Thu, 7 Nov 2024 12:42:59 +0000 (12:42 +0000)]
Bug 23426: (follow-up) This patch reintroduces the former implementation of fine items

The original implementation of fine items was accidently overwritten with this patch. This follow up reverts these changes but keeps additional improvements that were also part of this patch.
These are:
- Returning the active currency as part of the response (BH)
- Fixing the number of items in the response which are specified in BP and BQ when other items as fine items are requested.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoRevert "Bug 38391: Redraw the filters row on table redraw"
Katrin Fischer [Wed, 13 Nov 2024 15:31:22 +0000 (15:31 +0000)]
Revert "Bug 38391: Redraw the filters row on table redraw"

This reverts commit af6b0510d7f00fae32f001afb2aaccd9064a9092.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up) Capitalization: Please Note
Katrin Fischer [Tue, 12 Nov 2024 16:34:30 +0000 (16:34 +0000)]
Bug 36221: (QA follow-up) Capitalization: Please Note

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (follow-up) Style and markup fixes
Owen Leonard [Mon, 11 Nov 2024 18:17:13 +0000 (18:17 +0000)]
Bug 36221: (follow-up) Style and markup fixes

This patch makes several changes to make the updated forms more
consistent with how other pages work:

- Form labels should have ":" after them.
- Form fields should have a hint when they are required.
  - Required fields should not be indicated with an asterisk.
- In the OPAC, <select> should have a "form-select" class if the form is
  otherwise being styled with Bootstrap classes.
- Primary submit buttons should have a "btn btn-primary" class.
- The Font Awesome 6 icon for a delete operation is "fa-trash-can."
- Error messages should be wrapped in <div class="alert alert-warning">.
- All language strings in JS files should be wrapped in __('').
- Terminology: "Library" instead of "Branch," "Patron" instead of
  "Member."

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): fix space between the 2 custom fields <input>
Victor Grousset/tuxayo [Tue, 5 Nov 2024 18:04:37 +0000 (19:04 +0100)]
Bug 36221: (QA follow-up): fix space between the 2 custom fields <input>

It was missing in the JS that adds new empty custom fields.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix opac check
Pedro Amorim [Tue, 5 Nov 2024 11:16:01 +0000 (11:16 +0000)]
Bug 36221: (QA follow-up): Fix opac check

To address Victor's comment #32

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): add placeholder attr to staff custom fields
Victor Grousset/tuxayo [Tue, 5 Nov 2024 09:15:25 +0000 (10:15 +0100)]
Bug 36221: (QA follow-up): add placeholder attr to staff custom fields

In the prepopulated fields when editing item metadata that had custom
fields (tt generated). So it's consistent when adding new empty fields
(done in JS)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix translatability in JS concat
Pedro Amorim [Mon, 4 Nov 2024 17:01:18 +0000 (17:01 +0000)]
Bug 36221: (QA follow-up): Fix translatability in JS concat

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix incorrect input type on HTML
Pedro Amorim [Mon, 4 Nov 2024 16:25:10 +0000 (15:25 -0100)]
Bug 36221: (QA follow-up): Fix incorrect input type on HTML

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix year value
Pedro Amorim [Wed, 30 Oct 2024 09:34:49 +0000 (09:34 +0000)]
Bug 36221: (QA follow-up): Fix year value

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: OPAC Styling
Pedro Amorim [Mon, 4 Mar 2024 14:18:21 +0000 (14:18 +0000)]
Bug 36221: OPAC Styling

Test plan, dont apply patches yet:
1) Enable ILLModule
2) Create a new OPAC ILL request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?method=create&backend=Standard
3) Notice the style. Apply patches. Repeat

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Apply styling improvements to DVD
Pedro Amorim [Mon, 4 Nov 2024 16:28:11 +0000 (15:28 -0100)]
Bug 36221: (QA follow-up): Apply styling improvements to DVD

qa tools throw:
ill_text_input_field: not found

But I believe this is a false positive.
We can clearly see it working by going to:

http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard

And picking 'DVD' or any other type.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: Move patron section to top of create form
Pedro Amorim [Fri, 8 Mar 2024 15:21:16 +0000 (15:21 +0000)]
Bug 36221: Move patron section to top of create form

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: Preparation
Pedro Amorim [Mon, 4 Mar 2024 14:20:35 +0000 (14:20 +0000)]
Bug 36221: Preparation

This refactors the code for more DRY

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix translatability of 'Delete'
Pedro Amorim [Mon, 4 Nov 2024 13:16:45 +0000 (13:16 +0000)]
Bug 35570: (QA follow-up): Fix translatability of 'Delete'

This is also fixing the delete->trash icon and spacing between label+icon

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix terminology
Pedro Amorim [Mon, 4 Nov 2024 13:16:17 +0000 (13:16 +0000)]
Bug 35570: (QA follow-up): Fix terminology

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix styling of confirmation buttons
Pedro Amorim [Mon, 4 Nov 2024 13:15:34 +0000 (13:15 +0000)]
Bug 35570: (QA follow-up): Fix styling of confirmation buttons

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38383: (follow-up) Undo global text-info change
Owen Leonard [Tue, 12 Nov 2024 13:02:43 +0000 (13:02 +0000)]
Bug 38383: (follow-up) Undo global text-info change

Adding an !important override to installer.scss isn't ideal but it's
an acceptable interim solution pending a more thorough review of how we
customize Bootstrap's text-* classes.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38383: Improve font color contrast on web installer
Emily Lamancusa [Fri, 8 Nov 2024 20:49:22 +0000 (15:49 -0500)]
Bug 38383: Improve font color contrast on web installer

Update the font colors for info, warning, and database errors on the web
installer to meet WCAG accessibility guidelines for color contrast.

For the yellow text, it is impossible to meet minimum contrast levels on
a white background without losing the yellow-ness of the yellow. This
patch opts for a dark text color with a light yellow highlight, to
meet contrast standards while allowing the yellow to be easily
distinguished from other message colors.

To test:
1. Apply patch for test dbrev
2. Trigger a database update from the web installer
   In KTD this can be done by:
      i. Changing the Version system preference to a slightly lower
         number (for example, from 24.0600057 to 24.0600056)
      ii. Reload the staff client
      iii. Log in with koha_kohadev, password
--> Note that the blue and yellow colors are very light
3. If possible, use browser tools to check the accessibility of the
   different colors of text (in Firefox, right click on the text and
   choose "Inspect accessibility properties")
--> Note that some of the text does not meet WCAG accessibility standard
4. Apply this patch and yarn build
5. Clear browser cache and refresh the page
--> Note that the blue and yellow text is more readable
6. If possible, repeat step 3
--> Note that all text now meets WCAG standards

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>
5 weeks agoBug 37178: Disable sorting on comments column
Pedro Amorim [Mon, 1 Jul 2024 10:30:08 +0000 (10:30 +0000)]
Bug 37178: Disable sorting on comments column

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38235: Unit tests
Janusz Kaczmarek [Tue, 22 Oct 2024 11:39:09 +0000 (11:39 +0000)]
Bug 38235: Unit tests

BTW, tiny adjustments to existing tests to work with modified
C4::Suggestions::ModSuggestion.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38235: Suggestion confirmation letter sent when it should not
Janusz Kaczmarek [Tue, 22 Oct 2024 11:00:09 +0000 (11:00 +0000)]
Bug 38235: Suggestion confirmation letter sent when it should not

When processing a new order (creating basket, receiving order, etc.)
using a bibliographic record once already linked to an old
suggestion (already completed in the past), Koha generates and sends
a confirmation letter that should not be sent at all.

This is because suggestions in Koha are linked to a biblionumber (and
not the order), and so the old suggestion is identified - erroneously -
as relevant.  Then C4::Suggestions::ModSuggestion sends a letter
whenever it receives STATUS as a parameter, paying no attention to
whether the status is changed.  So, in this case, a suggestion already
in the status AVAILABLE is "updated" to the status AVAILABLE and the
letter is generated.  To solve this problem, it should be enough to
check whether STATUS is actually changed.

Test plan:
==========

1. As a patron, make a purchase suggestion.  As a librarian, accept it and
   process it, as usual, through the acquisition process.
2. At the patron account, as librarian, check the generated notices (the
   most recent should be "Suggested purchase available").
3. Make a new aquisition order for the same bibliographic record
   ("From an existing record:") and receive it as usual.
4. Go to the account of the patron that made the original suggestion and
   check the notices.  Note the second, irrelevant letter "Suggested
   purchase available".
5. Apply the patch; restart_all.
6. Repeat p. 3 and 4.  Note that no new notice has been generated.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38385: Improve DB update output on error (UI)
Jonathan Druart [Thu, 7 Nov 2024 10:33:03 +0000 (11:33 +0100)]
Bug 38385: Improve DB update output on error (UI)

When an error occurred during the DB update the UI is not correct.

1. say_success, say_info, etc. show the span tags and are not colored
2. "Everything went okay" shown even if atomic updates failed
3. The same error can be displayed several time (see https://snipboard.io/IGiKgM.jpg)

Test plan:
Create a new db rev and/or atomic update
Have some say_* statement to render messages, and raise an error

For instance:
    say_info( $out, "Use blue for further information" );

    try {
        say_warning( $out, "Use yellow for warning/a call to action" );
        $dbh->do(q{});
    } catch {
        say_failure( $out, "Use red for danger/failure" );
        $_->rethrow;
    };

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38011: (QA follow-up) Improve database update output
Martin Renvoize [Tue, 12 Nov 2024 07:41:03 +0000 (07:41 +0000)]
Bug 38011: (QA follow-up) Improve database update output

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37850: (QA follow-up): Update illemail REST API attribute name
Pedro Amorim [Mon, 21 Oct 2024 11:33:46 +0000 (11:33 +0000)]
Bug 37850: (QA follow-up): Update illemail REST API attribute name

To test
1) yarn api:bundle && koha-plack --restart kohadev
2) Enable ILLModule and put some 'ILL staff email:' on some library
3) Access <staff_url>/api/v1/libraries
4) Notice the attribute reads ill_email

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36182: Show vendor name if acquisition_source is a vendor_id
Pedro Amorim [Tue, 7 May 2024 12:45:24 +0000 (12:45 +0000)]
Bug 36182: Show vendor name if acquisition_source is a vendor_id

This will make it so if acquisition_source is of an existing vendor_id, it'll show the vendor name instead of the id.
If it's not of an existing vendor_id, show the raw value instead.

I'm not 100% happy with this patch as it adds an edge case to Item::strings_map but I believe the only alternative
is to make 952$e Source of acquisition an AV field in the default framework.
Not only that, but this would have to be an AV field of type 'vendors' that'd have to allow to pick from existing vendors (similar to current 'branches').
The above is a ton more work than initial suggestions would imply.
Happy to be proven wrong (in fact, hoping I am).

This is compatible with main Koha only, not backportable to 23.11

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36182: Add booksellerid columns to holdings table
Pedro Amorim [Mon, 22 Apr 2024 11:21:20 +0000 (11:21 +0000)]
Bug 36182: Add booksellerid columns to holdings table

1) Apply patch, reset_all
2) Configure holdings_table, visit:
<staff_url>/cgi-bin/koha/admin/columns_settings.pl?module=catalogue&page=detail&table=holdings_table
3) Confirm holdings_booksellerid is there and is hidden by default
4) Visit a record:
<staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
5) Edit one of the items and add a value to field 'e' Source of acquisition
5.5) You may need to click the 'show filters' link in order to have the 'Columns' table button show up
6) Go back to the record and click on the 'Columns' above the table
7) Click 'Source of acquisition'. Confirm it shows as expected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (follow-up) Set preferred name and adjust counts for tests
Nick Clemens [Tue, 12 Nov 2024 14:47:07 +0000 (14:47 +0000)]
Bug 28633: (follow-up) Set preferred name and adjust counts for tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38390: Add subscriptions+count to vendors embed
Martin Renvoize [Thu, 7 Nov 2024 12:59:40 +0000 (12:59 +0000)]
Bug 38390: Add subscriptions+count to vendors embed

This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Terminology and capitalization
Katrin Fischer [Mon, 11 Nov 2024 16:11:37 +0000 (16:11 +0000)]
Bug 34355: (QA follow-up) Terminology and capitalization

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: DBIC schema update
Katrin Fischer [Mon, 11 Nov 2024 15:38:07 +0000 (15:38 +0000)]
Bug 34355: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: DBRev 24.06.00.062
Katrin Fischer [Mon, 11 Nov 2024 15:28:32 +0000 (15:28 +0000)]
Bug 34355: DBRev 24.06.00.062

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Tidy
Nick Clemens [Tue, 5 Nov 2024 16:32:50 +0000 (16:32 +0000)]
Bug 34355: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Remove debugging comment from archiving command
Nick Clemens [Tue, 5 Nov 2024 16:29:53 +0000 (16:29 +0000)]
Bug 34355: (QA follow-up) Remove debugging comment from archiving command

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Respect AcqCreateItem syspref
Matt Blenkinsop [Thu, 31 Oct 2024 16:59:05 +0000 (16:59 +0000)]
Bug 34355: (QA follow-up) Respect AcqCreateItem syspref

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Restore MarcFieldsToOrder prices and budgets
Matt Blenkinsop [Thu, 31 Oct 2024 14:50:39 +0000 (14:50 +0000)]
Bug 34355: (QA follow-up) Restore MarcFieldsToOrder prices and budgets

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Permissions fixes
Matt Blenkinsop [Wed, 30 Oct 2024 11:35:54 +0000 (11:35 +0000)]
Bug 34355: (QA follow-up) Permissions fixes

This patch addresses some permissions errors and updates the breadcrumbs to reflect this

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Make record staging code DRY
Matt Blenkinsop [Mon, 21 Oct 2024 14:18:36 +0000 (14:18 +0000)]
Bug 34355: (QA follow-up) Make record staging code DRY

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Fix template errors
Matt Blenkinsop [Mon, 21 Oct 2024 13:13:05 +0000 (13:13 +0000)]
Bug 34355: (QA follow-up) Fix template errors

This patch addresses the following issues:
- Fixes a duplication of the SerialsDefaultReplyTo syspref
- Re-introduces include files for overlay rules

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Add a delete flag to the cronjob
Matt Blenkinsop [Mon, 21 Oct 2024 12:51:34 +0000 (12:51 +0000)]
Bug 34355: (QA follow-up) Add a delete flag to the cronjob

This patch adds a 'delete' flag to the cronjob to select whether a file should be deleted or archived once processed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Migrate vendor dropdown to a kohaSelect
Matt Blenkinsop [Mon, 21 Oct 2024 09:52:03 +0000 (09:52 +0000)]
Bug 34355: (QA follow-up) Migrate vendor dropdown to a kohaSelect

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Add permission marc_order_manage to govern control of accou...
Matt Blenkinsop [Mon, 21 Oct 2024 09:51:42 +0000 (09:51 +0000)]
Bug 34355: (QA follow-up) Add permission marc_order_manage to govern control of account creation

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Add unit tests
Matt Blenkinsop [Wed, 31 Jul 2024 13:17:47 +0000 (13:17 +0000)]
Bug 34355: Add unit tests

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Add a plugin hook - before_orderline_create
Matt Blenkinsop [Tue, 12 Sep 2023 11:48:32 +0000 (11:48 +0000)]
Bug 34355: Add a plugin hook - before_orderline_create

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Add match_field and match_value to allow multiple accounts in the same...
Matt Blenkinsop [Thu, 7 Sep 2023 10:47:15 +0000 (10:47 +0000)]
Bug 34355: Add match_field and match_value to allow multiple accounts in the same file directory

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Fix form rendering issue
Matt Blenkinsop [Thu, 10 Aug 2023 14:23:18 +0000 (14:23 +0000)]
Bug 34355: Fix form rendering issue

This patch also fixes the referencing of import_record_id_selected

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Add cronjob and required methods
Matt Blenkinsop [Mon, 24 Jul 2023 13:53:22 +0000 (13:53 +0000)]
Bug 34355: Add cronjob and required methods

This patch adds a cronjob to take a marc file from the Koha file directory system and import it before creating order lines

Test plan:

This test plan involves running a cronjob, not sure how easy this is in the sandboxes

1) In system preferences, click Search and then select the Acquisitions option from the left hand menu
2) Enable MarcOrderingAutomation
3) Paste the following into MarcFieldsToOrder
price: 975$p
quantity: 975$q
budget_code: 975$h
4) Paste the following into MarcItemFieldsToOrder
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
Now save the sysprefs
5) In the administration homepage, under Acquisition parameters there should now be a link called "MARC order accounts"
6) Click on this and click the New account button
7) Choose a vendor and a budget
8) Enter a description
9) Enter the following in download directory - "/var/lib/koha/kohadev/tmp/koha_kohadev_upload"
10) Select any record matching settings you want (not important for the test plan, this uses the same code as the marc file staging that already exists in Koha)
11) Check Yes under Check for embedded item record data
12) Click submit
13) We now need to upload a MARC file into the directory that we put in the account. The easiest way to do this is through the marc staging tool
14) Navigate to Cataloging > Stage MARC records for import
15) Upload the file attached to this bug using the Choose file button
16) Click Upload file.
17) Leave the page without completing the new form that appears, we don't want to stage this file. The file we uploaded is now in the directory ready for the cronjob to process as if it had been transferred via SFTP.
18) In the CLI run, perl misc/cronjobs/marc_ordering_process.pl -v -c
19) The logging should show that the file has been processed for that account
20) Navigate to Acquisitions
21) Search for the Vendor that you put in the MARC ordering account
22) There should be a basket created on the vendor with the name of the file you uploaded (there will also be a reference at the start e.g. ea2323966faef2c59a6056dbd1f7d658_filename.marcxml. This is because we used the marc staging tool to upload the file and that adds a reference to filenames. This will not appear when using files from an SFTP location).
23) Click in the basket
24) There should be three orderlines, complete with accounting details that have been mapped from the file.
One line should have a fund of Fund 1_2, quantity of 4 and a replacement price of 6.75, one should have Secondary fund, 2, 6.40 and one should have Main fund,2, 6.30

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Add account creation
Matt Blenkinsop [Mon, 24 Jul 2023 13:52:41 +0000 (13:52 +0000)]
Bug 34355: Add account creation

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: Update menus
Matt Blenkinsop [Mon, 24 Jul 2023 13:52:18 +0000 (13:52 +0000)]
Bug 34355: Update menus

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: DB schemas and atomicupdate
Matt Blenkinsop [Wed, 31 Jul 2024 13:02:50 +0000 (13:02 +0000)]
Bug 34355: DB schemas and atomicupdate

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38394: (follow-up) Remove some more say_failure
Katrin Fischer [Mon, 11 Nov 2024 15:40:16 +0000 (15:40 +0000)]
Bug 38394: (follow-up) Remove some more say_failure

Using a false template some more occurences of say_failure
were accidentally added. This removes them again.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38376: Add id to openURL as DOI
Pedro Amorim [Wed, 6 Nov 2024 11:31:03 +0000 (11:31 +0000)]
Bug 38376: Add id to openURL as DOI

Test plan:
1) Enable ILLModule
2) Login on OPAC (if you haven't already)
3) Access the following openURL link:
localhost:8080/cgi-bin/koha/opac-illrequests.pl?atitle=Music%20in%20an%20Emergent%20History%20of%20Psychology.&aulast=Klempe%20SH&backend=Standard&cardnumber=kohaadmin&custom_field=example1&date=2024&id=10.1007%2Fs12124-023-09778-9&genre=article&issn=19363567&issue=1&custom_field2=example2&method=create&opac=1&openurl=1&pages=1-11&spage=1&title=Integrative%20psychological%20%26%20behavioral%20science&volume=58
4) Notice the 'id' is considered a custom field, and is not converted into the DOI native field.
5) Apply patch. Restart plack. Repeat 4. Notice the native field is populated and a custom field entry no longer exists.

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>
5 weeks agoBug 38011: DBIC schema update
Katrin Fischer [Mon, 11 Nov 2024 15:00:02 +0000 (15:00 +0000)]
Bug 38011: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38011: DBRev 24.06.061
Katrin Fischer [Mon, 11 Nov 2024 14:56:22 +0000 (14:56 +0000)]
Bug 38011: DBRev 24.06.061

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38011: (QA follow-up) Improve database update
Martin Renvoize [Thu, 7 Nov 2024 11:27:42 +0000 (11:27 +0000)]
Bug 38011: (QA follow-up) Improve database update

This patch ensure's we fix errant values in subscriptions prior to
adding the foreign key constraint.

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>
5 weeks agoBug 38011: (QA follow-up) Additional unit tests
Martin Renvoize [Thu, 7 Nov 2024 11:51:24 +0000 (11:51 +0000)]
Bug 38011: (QA follow-up) Additional unit tests

Add an additional unit test for the default null on the new constraint.

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>
5 weeks agoBug 38011: Add a foreign key between vendors and subscriptions
Matt Blenkinsop [Thu, 26 Sep 2024 13:30:02 +0000 (13:30 +0000)]
Bug 38011: Add a foreign key between vendors and subscriptions

Test plan:
prove t/db_dependent/Koha/Subscription.t
prove t/db_dependent/Koha/Acquisition/Booksellers.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Amended-by: Jonathan Druart
Rename $rs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 17976: (QA follow-up) Add missing transaction rollback
Martin Renvoize [Mon, 11 Nov 2024 13:17:56 +0000 (13:17 +0000)]
Bug 17976: (QA follow-up) Add missing transaction rollback

We were missing the transaction wrapper for the overdue_fines test added
in this patchset.  This caused problems in subsequent tests.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36026: Use only configured TLS options for database connection
Lukas Koszyk [Thu, 10 Oct 2024 13:35:54 +0000 (13:35 +0000)]
Bug 36026: Use only configured TLS options for database connection

Database connections with TLS require client private keys
and certificates for authentication but MariaDB also supports
authentication by user and password.

This patch allows omitting the TLS options for certificate based
client authentication.

This is not easily testable within a development environment like ktd.
But the patch has been verified by different parties on
production and testing systems installed with Debian packages.

0) Apply patch.
1) Configure the database to support TLS connections.
2) Set "<tls>yes</tls>" in the config section in koha-conf.xml.
3) Run "koha-plack --reload <koha_instance>".
4) Open Koha's staff interface in the browser.
5) Observe an internal server error.
6) Apply patch.
7) Repeat step 3 and 4.
8) Observe the error is gone.
9) Run "prove -v t/db_dependent/Koha/Database.t"

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Cornelius Amzar <cornelius.amzar@bsz-bw.de>
Signed-off-by: Markus John <markus.john@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37865: Fix uninitialized value $op warns
Andrii Nugged [Mon, 29 Jul 2024 13:13:34 +0000 (16:13 +0300)]
Bug 37865: Fix uninitialized value $op warns

[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 144.
[WARN] Use of uninitialized value $op in string eq at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 253.
These happen in cases when $op is undef and circulation.pl or returns.pl tries to directly compare it to a string.

To reproduce:
1. Go to "Check Out" and "Check In" circulation pages, or refresh already opened one.
2. Check your logs for "Use of uninitialized value $op" warning.
3. Apply patch.
4. Repeat step 1 and check that no new "Use of uninitialized value $op" error were logged.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: (QA follow-up) Fix spelling in system preference description and sysprefs.sql
Katrin Fischer [Mon, 11 Nov 2024 13:51:37 +0000 (13:51 +0000)]
Bug 33766: (QA follow-up) Fix spelling in system preference description and sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: DBRev 24.06.00.060
Katrin Fischer [Mon, 11 Nov 2024 13:46:50 +0000 (13:46 +0000)]
Bug 33766: DBRev 24.06.00.060

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: (follow-up) Enable use of translation functions in html_helpers.inc
Owen Leonard [Mon, 8 Jul 2024 16:28:14 +0000 (16:28 +0000)]
Bug 33766: (follow-up) Enable use of translation functions in html_helpers.inc

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: (follow-up) Change "cardnumber" to "card number"
Owen Leonard [Thu, 31 Aug 2023 16:14:08 +0000 (16:14 +0000)]
Bug 33766: (follow-up) Change "cardnumber" to "card number"

"Cardnumber' isn't really a word, and I think it comes off as
librarian-speak. This patch updates it to "Card number"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: (follow-up) Enable translation for strings
Owen Leonard [Thu, 31 Aug 2023 15:55:26 +0000 (15:55 +0000)]
Bug 33766: (follow-up) Enable translation for strings

In my test the strings inside a SET directive were not picked up for
translation. This patch adds the t() function around the new strings in
order to allow them to be translated.

To test, apply the patch and test the translation process for any
language, in this example fr-FR:

- Run 'perl translate update fr-FR'
- Open misc/translator/po/fr-FR-messages.po
- Look for the affected strings: "Username", "Cardnumber", and
  "Cardnumber or username."
- Update the po file with translations of the strings
- Run 'perl translate install fr-FR'
- View the OPAC in your translated language and test each setting of
  OPACLoginLabelTextContent to confirm that the translated strings
  appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33766: (sign-off follow-up) Fix sentence case
Matt Blenkinsop [Thu, 31 Aug 2023 15:23:49 +0000 (15:23 +0000)]
Bug 33766: (sign-off follow-up) Fix sentence case

"Cardnumber or Username" is now "Cardnumber or username"

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
5 weeks agoBug 33766: (follow-up) Fix ambiguous "Login" field
Paul Derscheid [Thu, 17 Aug 2023 14:48:33 +0000 (14:48 +0000)]
Bug 33766: (follow-up) Fix ambiguous "Login" field

This follow-up fixes some problems w/ the unconventional
parts of the first commit. We now use conditionals in
a BLOCK to map the selected value from the preference
to string representations which should now be easily
translatable.

To test:
- Check that the label for
    - The masthead inc
    - The opac-auth template
    - The opac-main template
    - The opac-password-recovery template
    - The opac-registration-confirmation template
    - The opac-reset-password template
    - The sco-main template
  reflect the changes you made to the syspref

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
5 weeks agoBug 33766: Fix ambiguous "Login" field
Paul Derscheid [Thu, 17 Aug 2023 12:31:08 +0000 (12:31 +0000)]
Bug 33766: Fix ambiguous "Login" field

This patch introduces a new syspref 'OPACLoginLabelTextContent' which can be set
to the following values
- Cardnumber
- Username
- Cardnumber or Username

To test:
- Check that the label for
    - The masthead inc
    - The opac-auth template
    - The opac-main template
    - The opac-password-recovery template
    - The opac-registration-confirmation template
    - The opac-reset-password template
    - The sco-main template
  reflect the changes you made to the syspref

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
5 weeks agoBug 30699: (follow-up) Update to fix selenium test
Owen Leonard [Mon, 11 Nov 2024 12:53:20 +0000 (12:53 +0000)]
Bug 30699: (follow-up) Update to fix selenium test

Changing an <a> to a <button> breaks test, and changing *all* the
a#updatechild's to <button>s also breaks the test, so the simple
solution is to change the <button> back to <a>.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37809: (follow-up) Allow embedding item.biblio too
Tomas Cohen Arazi [Tue, 3 Sep 2024 19:37:22 +0000 (16:37 -0300)]
Bug 37809: (follow-up) Allow embedding item.biblio too

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>
5 weeks agoBug 37809: (follow-up) Remove wrong embed
Tomas Cohen Arazi [Mon, 2 Sep 2024 14:56:58 +0000 (11:56 -0300)]
Bug 37809: (follow-up) Remove wrong embed

It seems to me like a copy and paste error coming from the holds
endpoint.

To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
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>
5 weeks agoBug 37809: Add more embed options to checkouts endpoints
Tomas Cohen Arazi [Mon, 2 Sep 2024 14:55:59 +0000 (11:55 -0300)]
Bug 37809: Add more embed options to checkouts endpoints

This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.

* patron
* item
* library

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>
5 weeks agoBug 23486: (follow-up) Display text for new option
David Nind [Thu, 17 Oct 2024 19:24:33 +0000 (19:24 +0000)]
Bug 23486: (follow-up) Display text for new option

Change display text for creation option from "Patron creation" to
"Creating a patron" - for consistency with other values.

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>
5 weeks agoBug 23486: Add creation to TrackLasPatronActivity triggers
Nick Clemens [Fri, 20 Sep 2024 12:38:42 +0000 (12:38 +0000)]
Bug 23486: Add creation to TrackLasPatronActivity triggers

Some libraries would like to update the last seen when a patron is created to avoid NULL
values and ensure new users are marked as 'active'

To test:
1 - Apply patch
2 - Create a new patron, confirm their lastseen date is null
    SELECT lastseen FROM borrowers WHERE cardnumber={their cardnumber}
3 - Update preference 'TrackLastPatronActivity' to include 'Patron creation'
4 - Create a second patron, confirm their lastseen is set
5 - Update preference 'TrackLastPatronActivity' to include 'Checking out an item'
6 - Checkout an item to the second patron
7 - Confirm their lastseen is not updated (We only update once per day)

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>
5 weeks agoBug 37221: (QA follow-up) Fix spelling/punctuation in system preference descriptions
Katrin Fischer [Mon, 11 Nov 2024 12:58:02 +0000 (12:58 +0000)]
Bug 37221: (QA follow-up) Fix spelling/punctuation in system preference descriptions

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37221: DBRev 24.06.00.059
Katrin Fischer [Mon, 11 Nov 2024 12:55:12 +0000 (12:55 +0000)]
Bug 37221: DBRev 24.06.00.059

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37221: Add preference to turn off OPAC Overdrive features
Owen Leonard [Wed, 10 Jul 2024 16:19:45 +0000 (16:19 +0000)]
Bug 37221: Add preference to turn off OPAC Overdrive features

This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33348: Tests
Aleisha Amohia [Thu, 16 Nov 2023 21:38:35 +0000 (21:38 +0000)]
Bug 33348: Tests

prove t/Koha/SearchEngine/Elasticsearch/Search.t

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33348: (follow-up) Fix if no 008 defined
Aleisha Amohia [Mon, 1 May 2023 22:38:57 +0000 (22:38 +0000)]
Bug 33348: (follow-up) Fix if no 008 defined

And copy fix across to Zebra search as well.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33348: Show authority heading use with Elasticsearch
Aleisha Amohia [Tue, 28 Mar 2023 02:10:59 +0000 (02:10 +0000)]
Bug 33348: Show authority heading use with Elasticsearch

This patch ensures the ShowHeadingUse system preference and feature works as expected when using Elasticsearch as the searchengine.

To test, follow the test plan at Bug 29990 Comment 9. Ensure the SearchEngine system preference is set to Elasticsearch.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (QA follow-up) Fix column description
Katrin Fischer [Mon, 11 Nov 2024 12:49:13 +0000 (12:49 +0000)]
Bug 28633: (QA follow-up) Fix column description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: DBIC schema update
Katrin Fischer [Mon, 11 Nov 2024 12:31:33 +0000 (12:31 +0000)]
Bug 28633: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: DBRev 24.06.00.058
Katrin Fischer [Mon, 11 Nov 2024 11:05:46 +0000 (11:05 +0000)]
Bug 28633: DBRev 24.06.00.058

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (QA follow-up) Fix test plans
Martin Renvoize [Mon, 4 Nov 2024 15:37:02 +0000 (15:37 +0000)]
Bug 28633: (QA follow-up) Fix test plans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (QA follow-up) Tidy
Martin Renvoize [Mon, 4 Nov 2024 15:27:02 +0000 (15:27 +0000)]
Bug 28633: (QA follow-up) Tidy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (follow-up) Add note about disabling/hiding preferred name to sysprefs
Nick Clemens [Thu, 31 Oct 2024 16:19:44 +0000 (16:19 +0000)]
Bug 28633: (follow-up) Add note about disabling/hiding preferred name to sysprefs

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: Add preferred name field to patrons
Nick Clemens [Mon, 3 Jan 2022 15:24:01 +0000 (15:24 +0000)]
Bug 28633: Add preferred name field to patrons

This patch adds a new field 'preferred_name' to the patron record.

On storage (creation or update) the preferred_name is set to the firstname if no
value is passed. Patron modifications will set the preferred name to the firstname if
the preferred_name field is hidden

With this patchset preferred_name will always be set - either to the firstname, or a specified value.

PatronAutoComplete/ysearch is updated to use 'preferred_name'

To test:
 1 - Apply patches
 2 - Update database and restart all, clear browser cache
 3 - Load a patron in staff module
 4 - Confirm you see and can add a preferred name
 5 - Confirm the preferred name and first name now displays on patron details
 6 - Remove first name from patron record and confirm it no longer shows
 7 - Edit sysprefs BorrowerMandatoryFields and BorrowerUnwantedFields to confirm you can make
     new field required or hidden
 8 - Sign in as patron to opac
 9 - Confirm preferred name shows
10 - Edit account on opac and confirm field is present
11 - Verify DefaultPatronSearchFields contains 'preferredname' if your pref had firstname
12 - Perform checkout and patron search using preferred_name, confirm patron is found
13 - Enable PatronAutoComplete system preference
14 - Type patron's surname into Checkout or patron search but don't hit enter
15 - Confirm patron is displayed with 'preferred_name' in the preview
16 - Set 'preferred_name' in all 'Unwanted' preferences
17 - Confirm editing a patron in staff interface sets both fields when firstname updated
18 - Confirm a patron modification sets both fields when firstname updated
19 - Create a patron / perform self registration and confirm both fields set when preferred_name is hidden
20 - Remove preferred_name from Unwanted prefs and confirm preferred_name is set to firstname if nothing passed

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: DB update
Nick Clemens [Mon, 3 Jan 2022 15:21:52 +0000 (15:21 +0000)]
Bug 28633: DB update

This adds the field to necessary tables and updates API and columns def
and sets preferred name to firstname

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37238: Remove the global search
Jonathan Druart [Thu, 31 Oct 2024 09:14:20 +0000 (10:14 +0100)]
Bug 37238: Remove the global search

It does not work, we should not display the input.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37238: Add exception for itemsearch
Jonathan Druart [Thu, 31 Oct 2024 08:41:39 +0000 (09:41 +0100)]
Bug 37238: Add exception for itemsearch

Item search has its own way to share the link, we should not deal with
the state (and the work from bug 33484) on this page.
It will certainly need to be adjusted to work like the other tables, but
it's something for later.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>