koha.git
7 weeks agoBug 36982: Collections facet does not get alphabetized based on collection descriptions
Lari Strand [Wed, 29 May 2024 10:53:22 +0000 (13:53 +0300)]
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37182: Make Koha::Statistic->new preserve 'datetime' if passed
Tomas Cohen Arazi [Tue, 25 Jun 2024 18:01:29 +0000 (15:01 -0300)]
Bug 37182: Make Koha::Statistic->new preserve 'datetime' if passed

This patch does what the title says. This behavior is tested on the
previous patch. Tests are also added for the background job (which
relies on Koha::Statistic->new and was the evidence of this
overwrite behavior).

To test:

1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Statistic.t \
           t/db_dependent/Koha/BackgroundJob/PseudonymizeStatistic.t
=> FAIL: Tests don't pass :-/
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37182: Regression tests
Tomas Cohen Arazi [Tue, 25 Jun 2024 13:16:56 +0000 (10:16 -0300)]
Bug 37182: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37163: Fix the redirect after deleting a tag from an authority framework to load...
Phil Ringnalda [Sat, 22 Jun 2024 00:43:22 +0000 (17:43 -0700)]
Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page

When you delete a tag from an authority framework, we intend to redirect you
right back to where you were, on the same page of tags, but because we pick
the wrong variable to set searchfield in the URL, we send you to the first
page instead.

Test plan:
1. Without the patch, Administration - Authority types - in the row for
   CHRON_TERM Actions menu, MARC Structure
2. In the Search for tag: input, type 092 and hit Enter
3. In the row for 092, Actions menu, Delete, in the page that loads click
   Yes, delete
4. In the page you are redirected to, note that you are at Tag 000, and the
   URL is ?searchfield=&authtypecode=CHRON_TERM
5. Apply patch, restart_all
6. Type 092 and hit Enter, Actions menu for the 093 row, Delete, Yes, delete
7. Note that now you have gone to the page where 093 used to be, because
   the URL is ?searchfield=092&authtypecode=CHRON_TERM and you can just
   keep deleting 09x tags one after another

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37162: Remove the [% IF ( delete_confirmed ) %] stuff in auth_tag_structure.tt
Phil Ringnalda [Sat, 22 Jun 2024 22:57:01 +0000 (15:57 -0700)]
Bug 37162: Remove the [% IF ( delete_confirmed ) %] stuff in auth_tag_structure.tt

Since auth_tag_structure.pl redirects after deleting when the op is
delete_confirmed (which is actually cud-delete_confirmed) rather than loading
the template, there's no reason to have dead code for IF ( delete_confirmed )
which is both never set, and is never called when anything like it is set.

Test plan:
1. With the patch applied, Administration - Authority types - Chronological
   Term row - Actions menu - MARC Structure
2. You've already verified that auth_tag_structure.tt isn't malformed, but for
   extra fun choose a tag, Actions menu - Delete - Yes, delete and verify that
   it was deleted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37161: After deleting a tag in a MARC framework, redirect back to the tag list...
Phil Ringnalda [Sat, 22 Jun 2024 22:35:31 +0000 (15:35 -0700)]
Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list rather than showing a 'Tag deleted' page first

Currently after you delete a tag from a MARC framework, Koha intends to show
you a page with the text "Tag deleted" and an OK button to click to go back to
where you were in the list of tags. But because that depends on the template
variable being set for the name of the op in the script, and the name of the
op is "cud-delete_confirmed" which isn't a legal TT variable name, nothing is
set to tell the template what to display, so it displays a mostly-blank page.

Far better to show, don't tell, and just redirect to the list of tags like
deleting a tag from an authority framework does.

Test plan:
1. Without the patch, Administration - MARC bibliographic frameworks -
   Binders row - Actions menu - MARC structure
2. Type 092 and press Enter in the Search for tag: input
3. 092 row - Actions menu - Delete - Yes, delete this tag
4. Stare blankly at the blank page with only a header
5. Apply patch, restart_all
6. Administration - MARC bibliographic frameworks - Kits row - Actions menu -
   MARC structure
7. Type 092 and press Enter in the Search for tag: input
8. 092 row - Actions menu - Delete - Yes, delete this tag
9. Enjoy the sight of the Kits framework showing a search for 092 that
   doesn't show one, because you just deleted it, and now you can delete
   the 096 tag next

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist
Phil Ringnalda [Fri, 17 May 2024 00:01:54 +0000 (17:01 -0700)]
Bug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist

Changing from GetMarcBiblio to Biblios->find plus metadata->record lost the
way that svc/bib used to return 404 when the bib number wasn't found. This
patch restores that by checking for undef after the Biblios->find step.

Test plan:
1. Load e.g. http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 which returns an
   XML bib record
2. Load http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 500 error
2. Appply patch, restart_all
4. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 and get the bib again
5. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 404

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>
7 weeks agoBug 25387: (follow-up) Slightly change wording of alert
Katrin Fischer [Thu, 27 Jun 2024 07:03:20 +0000 (07:03 +0000)]
Bug 25387: (follow-up) Slightly change wording of alert

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 25387: (QA follow-up) Tidy
Nick Clemens [Tue, 25 Jun 2024 21:12:39 +0000 (21:12 +0000)]
Bug 25387: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 25387: Warn when merging different authority types
Marion Durand [Wed, 6 Oct 2021 12:49:58 +0000 (14:49 +0200)]
Bug 25387: Warn when merging different authority types

Merging two different authorities types can result in the loss of some
field. This patch adds a warning when merging different type of
authorities and add more display of authorities types during merge.

To test:
1- Find two authorities you what to merge. Be sure that these
authorities have different type
2- Search for these authorities (be sure to have both results on the
results page)
3- For the first authority click on "Actions" then on "Merge", same for
the second one
4- Check that koha is asking you to choose a framework and that
authority types are not displayed
5- Choose a framework, then click on next
6- Check that the authority type is not displayed in the tabs and that
no warning appear
7- Apply the patch
8- Repeat step 1 to 3 again
9- Check that authority type is now displayed next to their ID
10- Repeate setp 5 again
11- Check that the authority types is now displayed in the tabs next to
their ID and that a warning appear

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>
7 weeks agoBug 33563: Add comments for Elasticsearch security config
David Cook [Wed, 22 May 2024 23:49:35 +0000 (23:49 +0000)]
Bug 33563: Add comments for Elasticsearch security config

This patch adds some commented Elasticsearch security configuration,
which shows how to use username/password with HTTPS.

Test plan:
0. Apply patch
1. cp debian/templates/koha-conf-site.xml.in /etc/koha/koha-conf-site.xml.in
2. koha-create --create-db test
3. vi /etc/koha/sites/test/koha-conf.xml
4. Note that the comments for userinfo and use_https are in the koha-conf.xml

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37165: Can't edit frequencies due to stray cud- in modify op
Phil Ringnalda [Sat, 22 Jun 2024 23:40:19 +0000 (16:40 -0700)]
Bug 37165: Can't edit frequencies due to stray cud- in modify op

The op modify in subscription-frequencies.pl isn't a cud- operation, it's
a GET of the editing form, so it shouldn't have been changed to cud-modify.

Test plan:
1. Don't apply the patch yet
2. Serials - Manage frequencies - for any frequency click Edit
2. Note that the editing form is empty
3. Apply patch, restart_all
4. Repeat step 2, note that now the editing form has the existing data
5. Change anything, Display order is nice, and save to verify that
   cud-savemod still works

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud...
Phil Ringnalda [Fri, 21 Jun 2024 19:20:05 +0000 (12:20 -0700)]
Bug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud-delete

Both deleting a basket in Aquisitions and deleting a suggestion in the OPAC
take care of the confirmation in a javascript modal, rather than having a
whole separate page for confirmation, so they should be using the op
cud-delete rather than either cud-delete_confirm (which shouldn't ever be
used) or delete_confirm (which they aren't doing, they already confirmed).

Test plan:
1. There's no wrong behavior to see, so apply patch and restart_all
2. Aquisitions - Vendor search for My Vendor - Click My Basket
3. Click Delete basket, in the popup again Delete basket
4. Click Show baskets for vendor My Vendor and verify the basket is gone
5. OPAC - Your account - Purchase suggestions
6. Create a suggestion, then click the checkbox for it, Delete selected,
   confirm
7. Verify the suggestion was deleted

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37152: Deleting patron categories doesn't warn about categories in use
Phil Ringnalda [Fri, 21 Jun 2024 19:05:11 +0000 (12:05 -0700)]
Bug 37152: Deleting patron categories doesn't warn about categories in use

You can't delete a patron category when it is in use, but because the
script which handles delete confirmation is expecting the wrong op,
cud-delete_confirm rather than delete_confirm, you don't get any warning,
just a failure to delete error message.

Test plan:
 1. Without the patch, Administration - Patron categories
 2. On the row for Staff, click Delete, Delete this category
 3. Note an error message telling you to check the logs for details
 4. Apply patch, restart_all
 5. With the patch, repeat steps 1-2, note that instead of a button for
    Delete this category you get a warning that it is in use
 6. In the list of categories, row for Board, click Delete, Delete this category
 7. Note that the (unused) Board category was deleted

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37152: Deleting framework tags expects a cud-delete-confirm op instead of delete...
Phil Ringnalda [Fri, 21 Jun 2024 18:53:25 +0000 (11:53 -0700)]
Bug 37152: Deleting framework tags expects a cud-delete-confirm op instead of delete-confirm

The scripts for managing biblio and authority framework tag editing are
expecting an op of cud-delete-confirm, but the op that is passed is the
correct thing, delete-confirm, because it's a GET of a page where the
confirmation will happen, not the later cud- operation. You can only see
that the expected op is wrong because the confirmation page doesn't get
the description of the tag.

Test plan:
 1. Without the patch, Administration - MARC bibliographic framework
 2. Default framework Actions menu, MARC structure
 3. In the row for 025, Actions menu, Delete
 4. Note that the page which loads shows "Tag: 025" and "Description:"
    without actually having a description
 5. Administration - Authority types
 6. Default authority type Actions menu, MARC structure
 7. In the row for 046, Actions menu, Delete
 8. Note that the page that loads shows "Tag: 046" without the tag description
 9. Apply patch, restart_all
10. With the patch, repeat steps 1-8, but this time note that you see the
    description of the tag, not just the number. For both, click Yes, delete,
    and verify that the tag is deleted.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37152: Can't delete an Acquisitions contract
Phil Ringnalda [Fri, 21 Jun 2024 18:38:10 +0000 (11:38 -0700)]
Bug 37152: Can't delete an Acquisitions contract

admin/aqcontract.pl expects the op cud-delete-confirm, but what's sent is
the op delete-confirm because it's just a GET of the page that will actually
do a cud op once it is confirmed.

Test plan:
1. Without the patch, Acquisitions - Vendor search for My Vendor
2. Left Sidebar menu - Contracts - Add a contract
3. Fill in Name, Start date, End date, Save
4. On the line for the contract, click Delete
5. Note that the page that loads has no button for "Yes, delete contract"
   (or for anything else)
6. Apply patch, restart_all
7. Acquisitions - Vendor search for My Vendor
8. Left Sidebar menu, Contracts, click Delete, then Yes, delete contract
9. Vendor search for My Vendor, Left Sidebar Contracts, verify the contract
   is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 33317: DBRev 24.06.00.009
Katrin Fischer [Tue, 25 Jun 2024 15:19:35 +0000 (15:19 +0000)]
Bug 33317: DBRev 24.06.00.009

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 33317: (follow-up) Improve system preference description
Lucas Gass [Tue, 25 Jun 2024 14:14:43 +0000 (14:14 +0000)]
Bug 33317: (follow-up) Improve system preference description

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 33317: (follow-up) Perltidy
Hammat Wele [Thu, 4 Jan 2024 13:28:10 +0000 (13:28 +0000)]
Bug 33317: (follow-up) Perltidy

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>
7 weeks agoBug 33317: Using checkoxes in OpacMetaRobots preference system to prevent incorrect...
Hammat Wele [Fri, 10 Nov 2023 19:48:21 +0000 (19:48 +0000)]
Bug 33317: Using checkoxes in OpacMetaRobots preference system to prevent incorrect data entry

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>
7 weeks agoBug 33317: Add system preference to set meta robots for the OPAC
Hammat Wele [Fri, 28 Apr 2023 22:21:12 +0000 (22:21 +0000)]
Bug 33317: Add system preference to set meta robots for the OPAC

Websites must have a robots meta tag to improve search engine crawling,
so we could tell search engines to not index OPAC pages for example.

To test:

1) Look at opac-main source and see that meta name=robots is missing.
2) Apply patch.
3) Run ./installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add some directives to
   OpacMetaRobots (ex: noindex,nofollow).
5) Look at opac-main source and confirm that meta name=robots now has
   content equal to the text set in the OpacMetaRobots system
   preference.
6) This should Prevent search engines from indexing Opac pages (if
   OpacMetaRobots is set to noindex)

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>
7 weeks agoBug 32313: Update issues to checkouts and copies to items
Katrin Fischer [Tue, 25 Jun 2024 15:14:58 +0000 (15:14 +0000)]
Bug 32313: Update issues to checkouts and copies to items

Update the description for totalissues to follow terminology
guidelines.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32313: Update guided reports column descriptions for items and biblioitems tables
David Nind [Sun, 19 May 2024 02:56:56 +0000 (02:56 +0000)]
Bug 32313: Update guided reports column descriptions for items and biblioitems tables

This adds missing column descriptions to the items and biblioitems
tables (used in guided reports for the Circulation, Catalog,
Acquisitions, and Serials modules).

It also updates some existing descriptions for consistency, removes
biblioitems columns that no longer exist, and sorts items and statistics
descriptions in the source file in alphabetical order.

Test plan:
1. Go to Reports > Guided reports > Create guided report.
2. Choose 'Catalog' for the module to report on, and then select
   'Next'.
3. Choose 'Tabular' for the type of report and select 'Next'.
4. Note that there are no descriptions for these column names
   (proposed column names shown in brackets):
   - items.itemnumber (Koha item number (autogenerated))
   - items.biblionumber (Biblio number (internal))
   - items.bookable (Bookable)
   - items.localuse (Total local uses)
   - biblioitems.ean (EAN)
   - biblioitems.collectiontitle (Series statement)
   - biblioitems.collectionissn (Series ISSN)
   - biblioitems.collectionvolume (Series volume)
   - biblioitems.editionstatement (Edition statement)
   - biblioitems.editionresponsibility (Edition responsibility)
   - biblioitems.cn_source (Source of classification or shelving scheme)
   - biblioitems.cn_class (Classification part)
   - biblioitems.cn_item (Item part)
   - biblioitems.cn_suffix (Call number suffix)
   - biblioitems.cn_sort (Koha normalized classification for sorting)
   - biblioitems.totalissues (Koha issues (borrowed), all copies)
5. Apply the patch.
6. Restart all the things (restart_all).
7. Reload the page.
8. Note that there are now descriptions for the columns in step 4.
9. Note that the descriptions for these columns are changed (for
   consistency with other tables, or clarification):
   - items.itype => Koha item type (previously Koha itemtype)
   - items.timestamp => Modification date (previously Timestamp)
   - biblioitems.timestamp => Modification date (previously Timestamp)
   - biblioitems.illus => Other physical details (previously
     Illustrations)
   - biblioitems.biblioitemnumber => Biblio item number (internal)
     (previously Biblioitem number)
   - biblioitems.biblionumber (and also acqorders.biblionumber and
     biblio.biblionumber) => Biblio number (internal)
     (previously Biblio number)
10. Sign off :D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36727: Add new issn-all Elasticsearch index for MARC21
Alex Buckley [Mon, 13 May 2024 18:13:07 +0000 (18:13 +0000)]
Bug 36727: Add new issn-all Elasticsearch index for MARC21

- This index searches 022ayz, 023ayz (MARC21) and 011ayz (UNIMARC).
- 011y and 011z have been removed from issn search field for UNIMARC.
- 022yz and 023yz have also been added to the identifier-standard search field

Test plan:
1. Start up KTD with Elasticsearch: ktd --es8 up

2. Add a new biblio record putting the value '0046-2254' into the incorrect ISSN subfield (022y /023y for MARC21, or 011z for UNIMARC)

3. Do a biblio search for '0046-2254' and confirm no results are returned

4. Apply this patch and restart all services (restart_all)

5. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)

6. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev

7. Alternative to steps 5 and 6: reset_all

8. Repeat the biblio search for '0046-2254' and confirm you get a result

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
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>
7 weeks agoBug 37003: (follow-up) Amend 22.11 RMaint
Martin Renvoize [Tue, 25 Jun 2024 13:14:46 +0000 (14:14 +0100)]
Bug 37003: (follow-up) Amend 22.11 RMaint

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37003: Add the 24.11 release team
Martin Renvoize [Thu, 6 Jun 2024 10:27:33 +0000 (11:27 +0100)]
Bug 37003: Add the 24.11 release team

This patch updates the teams.yaml to include the voted in 24.11
release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37078: Damaged status not showing in detail.pl
Phil Ringnalda [Sat, 22 Jun 2024 18:58:41 +0000 (11:58 -0700)]
Bug 37078: Damaged status not showing in detail.pl

The API returns the fact that an item is damaged in 'damaged_status' but the
code that builds the holdings table is looking for 'damaged' so it doesn't
find that an item is damaged.

Test plan:
1. Administration - Authorized values - DAMAGED row, click Add
2. Give it the Authorized value 2 and the Description Awful
3. On a record with more than one item, like Empress of the blues,
   edit one item to have Damaged status: Damaged and one to have
   Damaged status: Awful
4. On the bib detail view, note that the status column shows both
   as 'Available'
5. Apply patch, refresh
6. Note that now one shows as Damaged and one as Awful (verifying that
   the value is being read from the AV, not the fallback default which
   is also 'Damaged')

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 37059: Fix insert button in notices and slips
Brendan Lawlor [Mon, 24 Jun 2024 14:54:05 +0000 (14:54 +0000)]
Bug 37059: Fix insert button in notices and slips

This patch fixes the insert button in notices and slips. The container id needed to be appened with '_panel'

To Test:
1. Edit any notice or slip and try to use the insert button
2. Nothing happens
3. Apply patch and refresh the browser
4. Edit any notice or slip and use the insert button
5. Confirm the parameters are inserted into the tempalte as expected.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37091: Correct op parameter in systempreferences.pl
Emily Lamancusa [Fri, 14 Jun 2024 14:29:34 +0000 (10:29 -0400)]
Bug 37091: Correct op parameter in systempreferences.pl

To test:
1. Go to Administration > System Preferences > Local Use
2. Attempt to delete a local system preference
--> The confirmation page displays a blank name and value
3. Click "Yes, delete"
--> The system preference is still there
4. Apply patch, restart_all, and reload page
5. Attempt to delete the system preference again
--> The confirmation page displays correct information
6. Click "Yes, delete"
--> The system preference is deleted successfully

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37047: (QA follow-up) Fix translations
Martin Renvoize [Fri, 21 Jun 2024 13:07:07 +0000 (14:07 +0100)]
Bug 37047: (QA follow-up) Fix translations

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37047: (QA follow-up) Remove nesting of document ready function
Martin Renvoize [Wed, 19 Jun 2024 12:39:06 +0000 (13:39 +0100)]
Bug 37047: (QA follow-up) Remove nesting of document ready function

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37047: (QA follow-up) Move non-bookings code back
Martin Renvoize [Fri, 14 Jun 2024 15:13:26 +0000 (16:13 +0100)]
Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37047: Make use of DRY bookings-table.js in moremember.tt
Pedro Amorim [Wed, 12 Jun 2024 11:42:24 +0000 (11:42 +0000)]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

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>
8 weeks agoBug 37047: Move bookings table JS table to its own file
Pedro Amorim [Wed, 12 Jun 2024 11:39:56 +0000 (11:39 +0000)]
Bug 37047: Move bookings table JS table to its own file

For reusability

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>
8 weeks agoBug 37047: Make Patron Bookings table visible from Patrons Checkout page
Sam Lau [Tue, 11 Jun 2024 16:39:05 +0000 (16:39 +0000)]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

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>
8 weeks agoBug 36651: Add placeholder text to the search bar in the OPAC
Owen Leonard [Tue, 30 Apr 2024 17:56:13 +0000 (17:56 +0000)]
Bug 36651: Add placeholder text to the search bar in the OPAC

This patch adds placeholder text to the OPAC search bar, with JavaScript
to change the placeholder based on the user's search type selection.

To test, apply the patch and go to the OPAC.

- The search bar should by default have the placeholder "Search the
  catalog by keyword"
- Change the search type (Author, Title, etc). The placeholder text
  should change accordingly.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36476: Add holds priority column to members/summary-print.pl pending holds table
Lucas Gass [Mon, 1 Apr 2024 15:46:38 +0000 (15:46 +0000)]
Bug 36476: Add holds priority column to members/summary-print.pl pending holds table

To test:
APPLY PATCH and restart_all
1. Have a patron with and some holds and different priority.
2. Go to the patron account and click Print > Print summary
3. Notice the new holds priority column.

Note: Table settings don't work on these tables. See Bug 36475.
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 35153: DBRev 24.06.00.008
Katrin Fischer [Fri, 21 Jun 2024 12:46:56 +0000 (12:46 +0000)]
Bug 35153: DBRev 24.06.00.008

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 35153: Convert IntranetmainUserblock system preference to additional contents
Owen Leonard [Mon, 20 Nov 2023 13:51:22 +0000 (13:51 +0000)]
Bug 35153: Convert IntranetmainUserblock system preference to additional contents

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

To test you should have some content in the IntranetmainUserblock
system preference before applying the patch. Apply the patch and run
the database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from IntranetmainUserblock is now stored there.
- The HTML customization entry form should offer IntranetmainUserblock
  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.
- Edit the IntranetmainUserblock HTML customization and add unique
  content to the "fr-FR" tab.

- Go to the staff client home page. You should see the
  content you added to the IntranetmainUserblock HTML customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "IntranetmainUserblock." It should return no results.

Sponsored-By: Athens County Public Libraries
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>
8 weeks agoBug 34706: Fix capitalization - Cas to CAS
David Nind [Sat, 15 Jun 2024 10:10:36 +0000 (10:10 +0000)]
Bug 34706: Fix capitalization - Cas to CAS

CAS is an abbreviation and should use capital letters.

Test plan:
1. Enable the casAuthentication system preference.
2. Logout and view the login form.
3. Note that it says "Cas login".
4. Apply the patch.
5. Refresh the login page.
6. Note that it now says "CAS login".
7. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37036: Pass along the branches table for auto renewals
Lucas Gass [Wed, 5 Jun 2024 15:48:43 +0000 (15:48 +0000)]
Bug 37036: Pass along the branches table for auto renewals

To test:
1. Set up autorenewals bu adjusting circulation rules:
'Automatic renewal' -> 'Yes'
'No automatic renewal before' -> 5

2. Set 'AutoRenewalNotices' to 'according to patron messaging preferences'.
3. Set an  AUTO_RENEWALS and  AUTO_RENEWALS_DGST notice to include branch info. I am using this to test:

Branchcode: [% branch.branchcode %]
Branch name: [% branch.branchname %]
Branch address: [% branch.branchaddress1 %]
Branch address2: [% IF branch.branchaddress2 %][% branch.branchaddress2 %][% END %]
Branch city: [% branch.branchcity %], [% branch.branchstate %] [% branch.branchzip %]

4. Make sure your branch has the proper infro. filled out in Libraries administration.
5. Find a patron and adjust the messaging preferences so they receive automatic renewal notices. Also make sure the patron has an email.
5. Check out some items and make them due with the next 5 days.
6. Run the automatic_renewal cron job:

perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v

7. Notice no branch information displays.
8. APPLY PATCH
9. Checkout items from multiple issuing branches to a single patron.
10. Make sure the patron's messaging prefs are set to revieve NON-digestable notices.
11. Run the automatic renewal job, each notice should include the branch information from the issuing library.
12. Change the patron's messageing preferences to receieve digestable notices.
13. Run the job without the --digest-per-branch flag. You should get a single notice with the branch info. coming from the patron's home branch.
14. Run the job with the --digest-per-branch flag. You should get seperate digested notices with the branch info. coming from the issueing library branch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 30493: (QA follow-up) Fix for the only_my_library case as well
Emily Lamancusa [Fri, 14 Jun 2024 19:10:24 +0000 (15:10 -0400)]
Bug 30493: (QA follow-up) Fix for the only_my_library case as well

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 30493: Pending archived suggestions appear on intranet home page
Baptiste Wojtkowski [Thu, 13 Jun 2024 13:36:18 +0000 (15:36 +0200)]
Bug 30493: Pending archived suggestions appear on intranet home page

If suggestions are archived before their status is changed to something other than "Pending", they still appear on the intranet home page and the acquisitions home page as suggestions to be managed.

WITHOUT PATCH:
1. Go to Acquisitions > Suggestions
2. Click on New purchase suggestion
3. Fill in the form (title only is fine)
4. Click on Submit your suggestion
5. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
6. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion
7. Go to Suggestions
8. Click on the up arrow to the right of the Edit button and choose Archive
   --> There are no more pending suggestions
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion

The search function was fetching suggestions without considering the
"archived" field. I now pick only suggestion that are pending AND not
archived.

WITH PATCH:
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is no pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is no pending suggestion

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37014: Fix after-modal-POST to transmit "not_returned" message
Andrii Nugged [Mon, 3 Jun 2024 00:50:24 +0000 (03:50 +0300)]
Bug 37014: Fix after-modal-POST to transmit "not_returned" message

The bug report addresses an issue where the message "Item was not checked in" erroneously appears during the second POST after a manual or modal check-in process.

1. In circ/returns.pl:
   - Introduced a new hash `%rinot_returned` to track items not returned across pages.
   - Updated the logic to capture the "not returned" status from the query parameters.
   - Adjusted the input processing loop to include `not_returned` status.
   - Modified the section handling barcode check-ins to appropriately initialize and update the `not_returned` status.

2. returns.tt:
   - Added hidden input fields in the template to include `not_returned` status in the form submissions.

The changes ensure that the "not_returned" status is correctly tracked and displayed, preventing the erroneous message from appearing on subsequent POST requests.

1. Perform a manual check-in of an item, but make some warning modal appear: for ex., transfer: check-in the item in not home library.
2. Press OK on the modal. There will be a POST transition again to redraw the checked-in items list.
3. Verify that the "Item was not checked in" message appears erroneously near the item's row.
4. Apply the patch.
5. Repeat steps 1-3 and check that there will be no erroneous "Item was not checked in" message.

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36956: Allow all providers to be displayed in reports
Matt Blenkinsop [Tue, 28 May 2024 10:39:33 +0000 (10:39 +0000)]
Bug 36956: Allow all providers to be displayed in reports

This patch fixes an incorrect usage of the API which was only returning 20 results.

Test plan:
1) Go to ERM module and make sure you have more than 20 data providers stored in your database.
1) (Optional) Run the following command (k-t-d) to create 21 data providers:
  perl -MKoha::Database -e '
      my $schema = Koha::Database->schema;

      $schema->resultset("ErmUsageDataProvider")->create({
          name => "name ".$_
      }) for (1..21)
  '
2) Go to eUsage / reports and create new report (cgi-bin/koha/erm/eusage/reports)
3) Check that only the first 20 data providers are displayed in the drop down
4) Apply patch
5) yarn build or reset_all to rebuild the javascript
6) Repeat steps 1-3, all providers should now be displayed

PA amended patch: Updated commit message test plan

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36428: (QA follow-up) Add bookings_count class to patron details
Martin Renvoize [Thu, 20 Jun 2024 10:13:10 +0000 (11:13 +0100)]
Bug 36428: (QA follow-up) Add bookings_count class to patron details

Somewhere along the line we lost the 'bookings_count' class in the
bookings tab display on the patron details and circulation page.

This patch restores is and as such also restores the correct count
numbers on 'place booking' and 'cancel booking' actions on those pages.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36428: (QA follow-up) Remove filter_by_future
Martin Renvoize [Thu, 20 Jun 2024 10:05:07 +0000 (11:05 +0100)]
Bug 36428: (QA follow-up) Remove filter_by_future

I actually already started to remove this in another bug, but it makes
sense to do it here where we're introducing the 'active' filter.  I'm in
agreement that this should probably always have been an 'active' rather
than 'future' filtering.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36428: Add Bookings->filter_by_active and use it for display
Nick Clemens [Fri, 31 May 2024 11:13:23 +0000 (11:13 +0000)]
Bug 36428: Add Bookings->filter_by_active and use it for display

Currently the bookings tab on a biblio details and patron details use 'filter_by_future'
which lists upcoming bookings.

Libraries would like to see upcoming, and active bookings in these cases, and we should add a filter
for bookings that have not ended.

NOTE: This removes the only uses of filter_by_future, but I preserve this for Martin's decision as the creator
of the bookings module

To test:
 1 - Make an item bookable from the items tab on a record details
 2 - Return to details view and place a booking
 3 - Note sidebar says "Bookings (1)"
 4 - Make the booking current from the DB:
     UPDATE bookings SET start_date=NOW() WHERE biblio_id={biblionumber};
 5 - Reload the page
 6 - Note the count is now "Bookings (0)"
 7 - View the patron's details page - note "Bookings (0)" and none listed
 8 - Apply patch
 9 - Reload biblio details, note Bookings(1)
10 - Reload patron details, note Bookings(1) and booking is listed
11 - End the booking:
     UPDATE bookings SET end_date=NOW() WHERE biblio_id={biblionumber};
12 - Confirm booking no longer listed on biblio or patron details

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36984: Fix "Transit pending from..." message in bibliographic record detail page
Adolfo Rodríguez [Thu, 30 May 2024 10:07:21 +0000 (12:07 +0200)]
Bug 36984: Fix "Transit pending from..." message in bibliographic record detail page

Transfering a rotating collection will mark the items contained in the collection as "Transit pending..." and it will trigger a javascript error in the bibliographic record detail page that breaks the holdings table, leaving it caught in the "Processing..." message. This patch fixes that.

The javascript messages gives this error in the console tab:
Uncaught TypeError: Cannot read properties of undefined (reading 'str')

The error comes from using from_library_ insted of from_library in the file koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc

Test plan:
1 Create a rotating collection
2 Add at least an item to the collection
3 Transfer the rotating collection
4 Check the detail page of the bibliography record of any of the items that belong to that collection in the Intranet. Notice that the holdings table gets stuck "Processing..." and that there is a Javascript error
5 Apply patch, restart services
6 Repeat step 4. Now the holdings tab works as intended and the item from the collection shows up with the text "Transit pending from..." in the Status column
7 Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37069: OPAC authorities search is stateless
Nick Clemens [Tue, 11 Jun 2024 12:36:15 +0000 (12:36 +0000)]
Bug 37069: OPAC authorities search is stateless

This patch removes cud- from the search op and chanegs the form
submission to GET

To test:
1 - Search authorities on OPAC for 'a'
2 - Click page 2
3 - You get the search form
4 - Apply patch, restart all
5 - Repeat search, confirm it works
6 - Click page 2
7 - Confirm you get next results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37127: Authorized value select not working on authority forms
Phil Ringnalda [Wed, 19 Jun 2024 16:58:18 +0000 (09:58 -0700)]
Bug 37127: Authorized value select not working on authority forms

Linking an authority subfield to an authorized value just leaves a blank
in the form rather than creating a <select>, because there's a stray cud-
in the type returned from build_authorized_values_list.

Test plan:
 1. Without the patch, Administration - Authority types - Actions menu for
    Default - MARC Structure
 2. Actions menu for 040 - Subfields
 3. Edit subfields - Tab b - Authorized value - set to LANG - Save changes
 4. Authorities - New authority - Default
 5. In 040 tag, click CATALOGING SOURCE to expand the tag
 6. Note that subfield b has a blank space rather than a dropdown menu
 7. Apply patch, restart_all
 8. Authorities - New authority - Default
 9. In 040 tag, click CATALOGING SOURCE to expand the tag
10. Note that subfield b has a dropdown menu listing language names

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37129: Patron attributes linked to an authorized value don't show a select menu...
Phil Ringnalda [Wed, 19 Jun 2024 17:45:18 +0000 (10:45 -0700)]
Bug 37129: Patron attributes linked to an authorized value don't show a select menu in batch modification

Test plan:
1. In Administration - Patron attribute types verify you have the default
   SHOW_BCODE using the YES_NO authorized value
2. Tools - Batch patron modification, add a patron card number or
   borrowernumber and continue
3. For Patron attribute select Show barcode on the summary screen item
   listings, and note that you get a blank text input rather than a select
   menu with Yes and No choices
4. Apply patch, restart_all
5. Repeat step 2 and 3, but note that you now get a Yes/No select menu

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37089: cud-delete_confirm should not be cud
Emily Lamancusa [Fri, 14 Jun 2024 14:03:22 +0000 (10:03 -0400)]
Bug 37089: cud-delete_confirm should not be cud

Adjust aqbudgets.pl and currency.pl to check for the correct op value

To test:
Part 1 - Delete a fund
1. Go to Acquisitions > Funds
2. Try to delete a fund
   --> Confirmation page shows fund name as '' and fund amount as 0.00
3. Click "Yes, delete this fund"
   --> The fund is still there

Part 2 - Delete a currency
3. Go to Acquisitions > Currencies
4. Try to delete a currency
   --> Confirmation shows empty values for currency and rate
5. Click, "Yes, delete this currency"
   --> An error message appears and the currency is not deleted

6. Apply patch and restart_all
7. Repeat steps 1-5
   --> Confirmation pages display correct information, and deletions
       occur successfully

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>
8 weeks agoBug 37080: Cannot delete MARC bibliographic frameworks or authority types
Phil Ringnalda [Thu, 13 Jun 2024 02:25:14 +0000 (19:25 -0700)]
Bug 37080: Cannot delete MARC bibliographic frameworks or authority types

The scripts for managing both bib and authority frameworks are now expecting
an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a
page asking if you are sure. The scripts just need to expect the op they are
actually getting, delete_confirm.

Test plan:
 1. Administration - MARC bibliographic framework - New framework
 2. Give the framework any code and description and Submit
 3. Actions menu for your new framework - Delete
 4. Note the message says 'Confirm deletion of framework '' ()?" rather than
    having the code and description included.
 5. Click Yes, note that deleting failed
 6. Administration - Authority types - New authority type
 7. Give the authority type any type and description and Submit
 8. Actions menu for your authority type - Delete
 9. Note the message again says '' () rather than 'desc' (FOO)
10. Click yes, note that deleting failed
11. Finally! Apply patch, reset_all
12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than
    '' (), and that deleting works.

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>
8 weeks agoBug 37090: Correct op parameter in edi_accounts.pl
Emily Lamancusa [Fri, 14 Jun 2024 14:16:47 +0000 (10:16 -0400)]
Bug 37090: Correct op parameter in edi_accounts.pl

To test:
1. Go to Acquisitions > EDI Accounts
2. Create an EDI account if one is not already there
3. Try to delete the EDI account
--> Page refreshes and nothing happens
4. Apply patch, restart_all, and refresh the page
5. Try to delete the EDI account again
--> A confirmation page displays with correct information
6. Click "Yes, delete"
--> The EDI account is deleted

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37075: Message queue processor will fail to send any message unless letter_code...
Kyle M Hall [Wed, 12 Jun 2024 13:05:53 +0000 (09:05 -0400)]
Bug 37075: Message queue processor will fail to send any message unless letter_code is passed

For reasons unknown, GetOptions is inserting an empty string into the letter_code list. If you are running the script with a letter code filter, the empty string is added to the OR so it functions. If no letter_code is passed, the search requires the letter code to be an empty string, which will of course fail. Even more perplexing is that this does not happen for the type list which is essentially identical code.

Test Plan:
1) Generate some messages in the message queue
2) Run `process_message_queue.pl -v -c`
3) Note nothing happens
4) Apply this patch
5) Repeat step 2
6) Messages are sent!

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>
8 weeks agoBug 36875: (follow-up) Modify query in translated_content
Marcel de Rooy [Thu, 16 May 2024 09:25:34 +0000 (09:25 +0000)]
Bug 36875: (follow-up) Modify query in translated_content

This removes the MySQLism for FIELD(..).
In this case we just want to get the non-default records in
the front. So we can just test lang=default. And prevent inserting
$lang in the expression. And so prevent execution in ORDER BY.
No longer needing the ->quote call too.

Test plan:
Run Koha/AdditionalContents.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36875: Unit test
Marcel de Rooy [Thu, 16 May 2024 08:41:19 +0000 (08:41 +0000)]
Bug 36875: Unit test

Test plan:
Run Koha/AdditionalContents.t without next patch.
Should fail on the sleep execution.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36875: Staff counterpart
Marcel de Rooy [Thu, 16 May 2024 07:33:41 +0000 (07:33 +0000)]
Bug 36875: Staff counterpart

Same change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36875: Do not pass unsanitized language to $page->translated_content
Marcel de Rooy [Thu, 16 May 2024 07:19:30 +0000 (07:19 +0000)]
Bug 36875: Do not pass unsanitized language to $page->translated_content

Test plan:
Try to access opac-page.pl with a language not in OPACLanguages.
Verify that this 'language' was not passed to sql. Simplest perhaps
by debugging AdditionalContent.pm. Something like:
 sub translated_content {
     my ( $self, $lang ) = @_;
+warn "L137: $lang";
Now have a public additional_contents page and hit it:
    /cgi-bin/koha/opac-page.pl?page_id=5&language=badsql
Check your log and find:
[2024/05/16 07:25:53] [WARN] L137: en at [etc] line 137.
So badsql was caught.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug: 36818 Escape characters in file names uploaded
Chris Cormack [Wed, 8 May 2024 22:41:43 +0000 (22:41 +0000)]
Bug: 36818 Escape characters in file names uploaded

To test:
1/ create a file named something like 'execute`curl blog.bigballofwax.co.nz`.zip'
   Where the domain is one you can watch the logs from
2/ Upload this file as a cover image
3/ Check /var/lib/koha/sitename/tmp/koha_sitename/ and see unescaped filenames
4/ Choose process, check the logs of the webserver see the connection has been made
5/ Apply the patch
5/ Repeat 2 & 3 and see the filename is now escaped
6/ Choose process and check no errors but no no remote execution occurs
7/ Test uploading actual zip file and images still works

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36520: Sanitize input in opac-sendbasket.pl
Chris Cormack [Mon, 13 May 2024 02:26:13 +0000 (02:26 +0000)]
Bug 36520: Sanitize input in opac-sendbasket.pl

To test
1/ Add some items to your cart in the opac
2/ Choose send cart
3/ Open firefox developer tools and switch to the network tab
4/ Send cart
5/ In the network tab, find the post request and choose copy as curl
6/ Edit the curl command to add )+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))x)--+-  to the bib_list parameter
7/ Run the curl notice it takes a long time to respond, if you want to check run the curl without the above part added
8/ Apply the patch and restart plack
9/ Run the modified curl and notice no longer the slow down
10/ Test in browser and make sure the basket is still sent

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
8 weeks agoBug 36520: Prevent SQL injection in GetPreparedLetter
Jonathan Druart [Mon, 13 May 2024 12:47:28 +0000 (14:47 +0200)]
Bug 36520: Prevent SQL injection in GetPreparedLetter

Actually in _get_tt_params

The following query will delay the response

SELECT `me`.`biblionumber`, `me`.`frameworkcode`, `me`.`author`, `me`.`title`, `me`.`medium`, `me`.`subtitle`, `me`.`part_number`, `me`.`part_name`, `me`.`unititle`, `me`.`notes`, `me`.`serial`, `me`.`seriestitle`
, `me`.`copyrightdate`, `me`.`timestamp`, `me`.`datecreated`, `me`.`abstract`
  FROM `biblio` `me`
WHERE `biblionumber` = '1) AND (SELECT 1 FROM (SELECT(SLEEP(6)))x)-- -'
ORDER BY field( biblionumber, 1 ) AND (
    SELECT 1
      FROM
    SELECT SLEEP( 6 ) x
   ) -- - )

To test
1/ Add some items to your cart in the opac
2/ Choose send cart
3/ Open firefox developer tools and switch to the network tab
4/ Send cart
5/ In the network tab, find the post request and choose copy as curl
6/ Edit the curl command to add )+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))x)--+-  to the bib_list parameter
7/ Run the curl notice it takes a long time to respond, if you want to check run the curl without the above part added
8/ Apply the patch and restart plack
9/ Run the modified curl and notice no longer the slow down
10/ Test in browser and make sure the basket is still sent

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
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>
8 weeks agoBug 36520: Add tests
Jonathan Druart [Wed, 15 May 2024 09:25:47 +0000 (11:25 +0200)]
Bug 36520: Add tests

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>
8 weeks agoBug 36575: (QA follow-up) Shibboleth POD and checkpw_internal call
Marcel de Rooy [Tue, 30 Apr 2024 14:39:36 +0000 (14:39 +0000)]
Bug 36575: (QA follow-up) Shibboleth POD and checkpw_internal call

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: Adjust checkpw_internal to return patron
Nick Clemens [Wed, 24 Apr 2024 15:06:22 +0000 (15:06 +0000)]
Bug 36575: Adjust checkpw_internal to return patron

This patch refactors checkpw_internal to remove the SQL code, use patron ojbects, and return the
patron that correctly matches the userid/caerdnumber when auth is successful

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: (bug 34893 follow-up) Return patron when autocreating in Shibboleth
Nick Clemens [Wed, 24 Apr 2024 14:25:40 +0000 (14:25 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron when autocreating in Shibboleth

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: (bug 34893 follow-up) Return patron from LDAP
Nick Clemens [Wed, 24 Apr 2024 14:23:51 +0000 (14:23 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron from LDAP

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: (QA follow-up)
Martin Renvoize [Thu, 11 Apr 2024 10:18:30 +0000 (12:18 +0200)]
Bug 36575: (QA follow-up)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: Return correct patron when there is a shared userid / cardnumber
Nick Clemens [Thu, 11 Apr 2024 09:39:03 +0000 (09:39 +0000)]
Bug 36575: Return correct patron when there is a shared userid / cardnumber

This patch moves some patron fetching code in C4/Auth to use to patron returned from the validation
methods and only try to fetch the patron (to check if locked, update attempts, etc) if we didn't authenticate

To test:
1 - Set a user to have userid = BANANA password = Password1
2 - Set a user to have cardnumber = BANANA password = Password2
3 - Hit the patron authentication API:
    http://localhost:8080/api/v1/auth/password/validation
    with data:
    { "identifier": "BANANA", "password":"Password1" }
    and:
    { "identifier": "BANANA", "password":"Password2" }
4 - Note you receive the same response for both
5 - Apply patch, restart all
6 - Repeat the API and confirm you get the correct patron for the password submitted

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: Unit tests for checkpw_shib
Tomas Cohen Arazi [Thu, 30 May 2024 16:15:09 +0000 (16:15 +0000)]
Bug 36575: Unit tests for checkpw_shib

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36575: Unit tests for checkpw_ldap
Tomas Cohen Arazi [Thu, 30 May 2024 14:51:11 +0000 (14:51 +0000)]
Bug 36575: Unit tests for checkpw_ldap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36367: Fix test t/db_dependent/Auth.t
Julian Maurice [Thu, 18 Apr 2024 14:38:03 +0000 (16:38 +0200)]
Bug 36367: Fix test t/db_dependent/Auth.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Fix test t/Token.t
Julian Maurice [Thu, 18 Apr 2024 14:26:44 +0000 (16:26 +0200)]
Bug 36367: Fix test t/Token.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove call to non-existent subroutine new_userenv
Julian Maurice [Thu, 18 Apr 2024 14:20:53 +0000 (16:20 +0200)]
Bug 36367: Remove call to non-existent subroutine new_userenv

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Fix BackgroundJob.t
Jonathan Druart [Wed, 20 Mar 2024 08:12:54 +0000 (09:12 +0100)]
Bug 36367: Fix BackgroundJob.t

This test is useless it seems, it is not testing background jobs
behaviour.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove obsolete tests
Jonathan Druart [Wed, 20 Mar 2024 07:51:45 +0000 (08:51 +0100)]
Bug 36367: Remove obsolete tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Set to undef when unsetting
Jonathan Druart [Wed, 20 Mar 2024 07:51:06 +0000 (08:51 +0100)]
Bug 36367: Set to undef when unsetting

We usually test if C4::Context->userenv, so we need to undef when
unsetting, not {} (evaluated true)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove schema_stack
Jonathan Druart [Fri, 8 Mar 2024 13:33:29 +0000 (14:33 +0100)]
Bug 36367: Remove schema_stack

Same pattern in Koha::Database

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove dbh_stack
Jonathan Druart [Mon, 11 Mar 2024 14:12:09 +0000 (15:12 +0100)]
Bug 36367: Remove dbh_stack

Same pattern, remove dbh stack

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove context stack
Jonathan Druart [Mon, 11 Mar 2024 13:45:40 +0000 (14:45 +0100)]
Bug 36367: Remove context stack

We are not using it and it's confusing, let's remove the context stack.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove _new_userenv
Jonathan Druart [Mon, 11 Mar 2024 13:30:25 +0000 (14:30 +0100)]
Bug 36367: Remove _new_userenv

TODO - better review C4::Auth's changes. Are all the removal of
_new_userenv correct/enough?

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove flush_schema_cached
Jonathan Druart [Fri, 8 Mar 2024 13:29:33 +0000 (14:29 +0100)]
Bug 36367: Remove flush_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36367: Remove get_schema_cached
Jonathan Druart [Fri, 8 Mar 2024 13:29:09 +0000 (14:29 +0100)]
Bug 36367: Remove get_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36459: Do not duplicate duedatespec IDs
Lucas Gass [Wed, 12 Jun 2024 19:40:03 +0000 (19:40 +0000)]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 30623: (RM follow-up) Terminology: settings -> permissions
Martin Renvoize [Fri, 14 Jun 2024 10:13:08 +0000 (11:13 +0100)]
Bug 30623: (RM follow-up) Terminology: settings -> permissions

We're copying permissions not settings here, so it makes sense to make
that clear in the wording.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 35568: Supress exception
Kyle M Hall [Wed, 22 May 2024 11:05:08 +0000 (07:05 -0400)]
Bug 35568: Supress exception

2 months agoBug 36926: Move syspref PlaceHoldsOnOrdersFromSuggestions
Sam Lau [Tue, 4 Jun 2024 20:36:46 +0000 (20:36 +0000)]
Bug 36926: Move syspref PlaceHoldsOnOrdersFromSuggestions

This patch moves the 'PlaceHoldsOnOrdersFromSuggestions' system preferences
from the Acquisitions->Printing section to the Circulation->Holds Policy section.

To test:
1) Go to Admin->System Preferences and search for 'PlaceHoldsOnOrdersFromSuggestions'
2) Note that it is located in the Acquisitions prefs, under the Printing subheading
3) Apply patch
4) search for the preferences again
5) Note that it is now located in the Circulation preferences under the Holds Policy subheading

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36330: DBRev 24.06.00.007
Martin Renvoize [Thu, 13 Jun 2024 13:30:25 +0000 (14:30 +0100)]
Bug 36330: DBRev 24.06.00.007

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36330: Follow up, change comments in the DB
Magnus Enger [Thu, 6 Jun 2024 13:12:29 +0000 (15:12 +0200)]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.

Signed-off-by: David Nind <david@davidnind.com>
Removed unnecessary line of debug output. 2024-06-10 Magnus Enger

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36330: Change 'reseve' to 'reserve'
Alex Buckley [Thu, 21 Mar 2024 23:49:09 +0000 (23:49 +0000)]
Bug 36330: Change 'reseve' to 'reserve'

Test plan:
1. git grep 'reseve'. Notice there are instances of 'reseve'
2. Apply patch
3. Repeat step 1, there should be no instances of 'reseve'

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 35294: Fix typos in catalogue code comments
Brendan Lawlor [Thu, 6 Jun 2024 13:14:43 +0000 (13:14 +0000)]
Bug 35294: Fix typos in catalogue code comments

Test plan:
1. git grep -n -E 'barocode|preproccess' to find the files and line # of typos
2. Apply the patch
3. git grep -E 'barocode|proccess'
4. See no results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 25520: Fix the SMS number input hint on the OPAC messaging page
David Nind [Tue, 4 Jun 2024 01:57:37 +0000 (01:57 +0000)]
Bug 25520: Fix the SMS number input hint on the OPAC messaging page

This makes the hint when entering an SMS number on the OPAC messaging
settings page the same as the staff interface hint: "Please enter
numbers only. Prefix the number with + or 00 if including the country
code." For some countries using either +XX or 00XX are accepted,
for example: +49 or 0049.

Test plan:
1. Set the SMSSendDriver system preference to Email
2. View the current hint for entering an SMS number in the staff
   interface:
   2.1 Go to Patrons > + New patron > Patron.
   2.2 Scroll down to the 'Patron messaging preferences' section at the
       end of the page.
   2.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + or 00 if including the country code.".
3. View the current hint for entering an SMS number in the OPAC:
   3.1 Go to the OPAC > Your account (log in if required).
   3.2 Select the 'Messaging' tab/section.
   3.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + if including the country code.".
   3.4 The difference: "..or 00.." is missing.
4. Apply the patch.
5. Refresh the OPAC messaging page.
6. The hint text for the OPAC is now the same as the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36922: Patron attributes - update hint text for "Is a date"
David Nind [Fri, 31 May 2024 21:19:57 +0000 (21:19 +0000)]
Bug 36922: Patron attributes - update hint text for "Is a date"

The date field for patron attributes is now repeatable (enhancement made
in Koha 24.05 with bug 32610). This updates the hint text to reflect
the change.

Test plan:
1. Go to add a patron attribute (Administration > Patrons and
   circulation > Patron attribute types > + New patron attribute type )
2. Note that the hint for the "Is a date" field says "...Date attributes
   cannot be repeatable or linked to an authorised value category.".
3. Apply the patch.
4. Reload the page.
5. Note that the hint now says "...Date attributes are repeatable,
   but cannot be linked to an authorised value category."
6. Sign off D:

PA amended: 'are repeatable' -> 'can be repeatable'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36338: Update onboarding error message when creating the Koha administrator patron
David Nind [Thu, 16 May 2024 03:59:42 +0000 (03:59 +0000)]
Bug 36338: Update onboarding error message when creating the Koha administrator patron

Update the error message for the web installer onboarding
section when creating the Koha administrator patron (where
the card number or username already exists):
- Fix capitalization
- Use the same label in the error message as used in
  the form

Error message before: The patron has not been created!
Card number or Userid may already exist.

Error message after: The patron was not created! The
card number or username already exists.

Test plan:
1. Option 1:
   1.1 Review the diff for the patch and make sure that
       the updated text makes sense.
       . Previous text: The patron has not been created!
         Card number or Userid may already exist.
       . Updated text: The patron was not created! The
         card number or username already exists.
OR
2. Option 2:
   2.1 Access the database server:
       mysql -uroot -ppassword -hkoha-db-1
   2.2 Drop the koha_kohadev database:
       drop database koha_kohadev;
   2.3 Create the database: create database koha_kohadev;
   2.4 Add privileges (for a real installation this would
       be limited):
       grant all on koha_kohadev.* to koha_kohadev;
   2.5 Restart everything (there may be some errors listed):
       flush_memcached and then restart_all
   2.6 Access the web installer: go to 127.0.0.1:8081
   2.7 Use the database user name and password: get from
       /etc/koha/sites/kohadev/koha-conf.xml
       (default: koha_kohadev, password)
   2.8 Continue through the installation process until you
       reach 'Selecting default settings':
      . Make appropriate selections to use all the sample
        data options and settings
   2.9 For the 'Onboarding' step - Create Koha
       administrator patron:
       . Surname: Acevedo
       . First name: Henry
       . Card number: make up a number that doesn't exist in
         the sample date, for example: 741852963
       . Library: Centerville
       . Patron category: Staff
       . Username: 23529000035676 (this is an existing
         value already in the sample data)
       . Password: a valid password, for example:
         KohaCon2024
       . Confirm password: repeat password used
       . Submit
         ==> Error message before patch: The patron has not
             been created! Card number or Userid may
             already exist.
   2.10 Apply the patch.
   2.11 Repeat step 2.9
   2.12 The error message is now: The patron was not created!
        The card number or username already exists.

3. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36930: Item search gives irrelevant results when using 2+ added filter criteria
Janusz Kaczmarek [Wed, 22 May 2024 21:08:35 +0000 (21:08 +0000)]
Bug 36930: Item search gives irrelevant results when using 2+ added filter criteria

In the Item search the librarian is allowed, in the first step, to define
additional filters like Title, Author, Publisher, Publication date etc.
(in the third fieldset).  This works fine but only for one criterion.
If one adds two or more criteria, the filter does not apply at all.

Test plan
=========
1. Make an Item search with the Pulblisher filter. Put
   %University of California% as the value.
   You should get 5 rows (with standard ktd test data set), three
   from 1982, and two from 1988.
2. Edit search -> add the second criterion: AND Publication date is 1982.
   You would expect three rows but you get 900+ rows.
3. Apply the patch; restart_all.
4. Repeat p. 2. You should get the expected three rows.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36961: Fix typo in opacreadinghistory system preference description
David Nind [Tue, 28 May 2024 01:34:41 +0000 (01:34 +0000)]
Bug 36961: Fix typo in opacreadinghistory system preference description

Fix a spelling error in the opacreadinghistory system preference
description - 'itms' to 'items'.

Test plan:
1. In the staff interface view the description for the
   opacreadinghistory system preferences (Koha administration >
   System preferences > search for opacreadinghistory).
2. Note that it reads "Allow patrons to see what itms they have
   checked out in the past."
3. Apply the patch.
4. Refresh the page.
5. Note that 'itms' is now spelt correctly as 'items'.
6. Sign off.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 36940: Resolve two warnings on undefined branchip
Marcel de Rooy [Thu, 23 May 2024 08:47:50 +0000 (08:47 +0000)]
Bug 36940: Resolve two warnings on undefined branchip

If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 34573: (follow-up) Add better logic for add/update title and headers
Owen Leonard [Thu, 6 Jun 2024 12:54:18 +0000 (12:54 +0000)]
Bug 34573: (follow-up) Add better logic for add/update title and headers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 months agoBug 34573: (follow-up) Additional updates for modify vendor page
David Nind [Tue, 21 Nov 2023 23:11:02 +0000 (23:11 +0000)]
Bug 34573: (follow-up) Additional updates for modify vendor page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>