]> git.koha-community.org Git - koha.git/log
koha.git
5 months agoBug 36924: Remove "I don't know what to say" warnings
Jonathan Druart [Wed, 22 May 2024 12:05:45 +0000 (14:05 +0200)]
Bug 36924: Remove "I don't know what to say" warnings

Those are a pain really

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: (follow-up) Default preference to enabled
Nick Clemens [Thu, 23 May 2024 15:14:51 +0000 (15:14 +0000)]
Bug 36665: (follow-up) Default preference to enabled

While this is a new preference, this was the standard behavior for a long time. I think we should
default to enabled to restore previous behavior.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36943: 24.05.00 - Update .mailmap
Martin Renvoize [Thu, 23 May 2024 10:47:05 +0000 (11:47 +0100)]
Bug 36943: 24.05.00 - Update .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: (follow-up) Rephrase system preference description
Katrin Fischer [Wed, 22 May 2024 14:14:32 +0000 (14:14 +0000)]
Bug 36665: (follow-up) Rephrase system preference description

... and replace some branches with libraries.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: DBRev 23.12.00.060
Katrin Fischer [Wed, 22 May 2024 13:58:35 +0000 (13:58 +0000)]
Bug 36665: DBRev 23.12.00.060

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: (follow-up) Allow choosing a branch with no IP when using AutoLocation
Nick Clemens [Wed, 22 May 2024 13:08:43 +0000 (13:08 +0000)]
Bug 36665: (follow-up) Allow choosing a branch with no IP when using AutoLocation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: (follow-up) Wrap code block in type ne 'opac' conditional
Nick Clemens [Tue, 21 May 2024 11:19:14 +0000 (11:19 +0000)]
Bug 36665: (follow-up) Wrap code block in type ne 'opac' conditional

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36665: Add option to set the staff user's logged in branch based on their current ip
Nick Clemens [Fri, 17 May 2024 11:59:21 +0000 (11:59 +0000)]
Bug 36665: Add option to set the staff user's logged in branch based on their current ip

This patch adds a new system preference StaffLoginBranchBasedOnIP which restores the behaviour before bug 35918
of using the current IP to determine the user's logged in branchcode

To test:
 1 - Get your current ip
 2 - Set that IP for a library in the administration section
 3 - Find a user account assigned to a different library that can login to staff side
 4 - Login to staff as that user, select 'My library'
 5 - You are logged in to the user's branch
 6 - Apply patch, restart all
 7 - Log out and back in, selecting 'My library'
 8 - You are logged in to the user's branch
 9 - Enable new system preference StaffLoginBranchBasedOnIP
 9 - Log out and back in, selecting a different branch, noting the new warning below the library selection
10 - You are logged in to the branch with the matching IP
11 - Log out and back in, selecting 'My library'
10 - You are logged in to the branch with the matching IP
11 - Change your logged in branch
12 - Verify the selection sticks and you can perform staff actions in the chosen branch
13 - Change the IP of the library to one that doesn't match yours
14 - Verify you can log out and log back in and that selected branch is respected when your IP doesn't match library IP

Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
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 months agoBug 36858: Remove warnings
Jonathan Druart [Wed, 22 May 2024 07:24:06 +0000 (09:24 +0200)]
Bug 36858: Remove warnings

Argument "" isn't numeric in int

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36858: Check page parameter for virtual shelves
Marcel de Rooy [Tue, 21 May 2024 14:20:18 +0000 (14:20 +0000)]
Bug 36858: Check page parameter for virtual shelves

Test plan:
Try passing page=x now and verify different behavior (no 500).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36899: Account for item groups
Lucas Gass [Mon, 20 May 2024 22:05:43 +0000 (22:05 +0000)]
Bug 36899: Account for item groups

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36899: (follow-up) Prevent disabling when clicking twice
Lucas Gass [Mon, 20 May 2024 16:23:24 +0000 (16:23 +0000)]
Bug 36899: (follow-up) Prevent disabling when clicking twice

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 months agoBug 36899: Make entire fieldset clickable
Lucas Gass [Mon, 20 May 2024 15:55:11 +0000 (15:55 +0000)]
Bug 36899: Make entire fieldset clickable

To test:
1. APPLY PATCH
2. Regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
3. Follow the test plan from bug 36864
4. Now the entire disabled fieldset should be clickable.
5. When the disabled fieldset is clicked from anywhere with it the fieldset should become enabled. The other one should then be disabled.

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 months agoBug 36914: Remove DBIC warning in shelves.pl
Jonathan Druart [Wed, 22 May 2024 07:35:55 +0000 (09:35 +0200)]
Bug 36914: Remove DBIC warning in shelves.pl

Same fix as Bug 28561: Remove DBIC warning in opac-shelves
But for staff

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35929: Remove extra parenthesis
Jonathan Druart [Wed, 22 May 2024 07:52:04 +0000 (09:52 +0200)]
Bug 35929: Remove extra parenthesis

and make it more readable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35929: Don't record a change for empty fields submitted in patron form
Nick Clemens [Wed, 1 May 2024 18:19:42 +0000 (18:19 +0000)]
Bug 35929: Don't record a change for empty fields submitted in patron form

This is reminiscent of bug 36159 - when a field is submitted as empty, and null in the DB
we need to reject this as a change. I tried to copy the logic from that bug, as well as
deleting submitted changes for hidden fields (from html manipulation)

This should be tested extensively. One note: If you submit a valid change request, then submit a second with no change the second will be ignored, but the first will remain. i.e. if you change your name from 'Nick' to 'Nack' - then realize your typo you cannot submit a new request to change it back untl the initial request is cleared

To test:
1 - Play with PatronSelfModificationBorrowerUnwantedField and PatronSelfModificationMandatory field to have some fields set
2 - Add a patron attribute, or several, that are editable in the OPAC
3 - Try submitting a form with no changes, note a modification requets is submitted
4 - Approve the request
5 - Apply patch, restart all
6 - Try submitted a blank request, you are notified there were no changes
7 - Try to force an unwanted field via html modification
8 - No changes reported
9 - Confirm attributes changes are successful
10 - After a successful request, try submitting a blank request
11 - Note no changes are recorded, but the initial request is still active

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36845: Do not loop over the content attribute
Jonathan Druart [Mon, 20 May 2024 11:34:24 +0000 (13:34 +0200)]
Bug 36845: Do not loop over the content attribute

We skip it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36845: Exclude meta tag from the translations
Jonathan Druart [Tue, 14 May 2024 07:29:02 +0000 (09:29 +0200)]
Bug 36845: Exclude meta tag from the translations

This bug originaly wants to get rid of "noindex" coming from this meta
tag:
  <meta name="robots" content="noindex">

But actually we have other strings from the meta tags that should not be
translated.

Test plan:
0. Do not apply this patch
1. cd misc/translator/po && gulp po:update --lang es-ES (or any other
   lang)
2. git commit -a -m"wip"
3. Apply this patch
4. Repeat 1 and git diff to show the diff
Notice that strings that should not be translated are removed from the
po files (actually commented)

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36819: DBRev 23.12.00.059
Katrin Fischer [Wed, 22 May 2024 13:44:03 +0000 (13:44 +0000)]
Bug 36819: DBRev 23.12.00.059

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36819: (QA follow-up) Improve update output
Martin Renvoize [Tue, 21 May 2024 15:17:36 +0000 (16:17 +0100)]
Bug 36819: (QA follow-up) Improve update output

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36819: (follow-up) Updatedatabase to correct wrong value
Caroline Cyr La Rose [Tue, 21 May 2024 13:37:38 +0000 (09:37 -0400)]
Bug 36819: (follow-up) Updatedatabase to correct wrong value

This patch adds an update to correct the value of scale_width to
0.800000 IF it is 0.080000. It should not change the value if it
is anything else than 0.080000.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36883: Fix club enrollment in the OPAC
Jonathan Druart [Fri, 17 May 2024 07:17:04 +0000 (09:17 +0200)]
Bug 36883: Fix club enrollment in the OPAC

The CSRF tokens were missing in the POST requests.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36892: Fix label for 'is_standing' input
Thibaud Guillot [Fri, 17 May 2024 09:13:21 +0000 (11:13 +0200)]
Bug 36892: Fix label for 'is_standing' input

Test plan:

1) Go to acqui/histsearch.pl and look for "search_children_too" with
   dev tools console.
2) On 'is_standing' input, the same label is used
3) Apply this patch and reload it
4) Now it's correct

Sponsored by: BibLibre

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36856: Fix MARC subfield name in new order from existing bibliographic record
Fridolin Somers [Tue, 14 May 2024 09:41:57 +0000 (11:41 +0200)]
Bug 36856: Fix MARC subfield name in new order from existing bibliographic record

In form of the bibliographic details when adding an order 'From an existing record' in a basket, the marc subfield name is not shown.
The template calls [% field.lib | html %] but this comes from Koha::UI::Form::Builder::Biblio generate_subfield_form() which gives 'marc_lib'.

Test plan:
1) Be sure to have an ACQ biblio framework
2) Enable system preference UseACQFrameworkForBiblioRecords
3) Go to an acquisition basket
4) Add a term in 'From an existing record' and submit
5) On first result click on 'Add order'
6) Look at 'Catalog details'
=> Without patch you only see subfield tag and letter : (123a)
=> With patch you also see subfield name : Name (123a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36528: Correct JS assets included in self checkout slip template
Owen Leonard [Fri, 5 Apr 2024 16:05:56 +0000 (16:05 +0000)]
Bug 36528: Correct JS assets included in self checkout slip template

The self checkout's slip print template includes some assets which it
doesn't need (enquire.js) and lacks other that it does (i18n-related
files). This patch correct the problem.

The patch also wraps some code in global.js with a check that the
relevant library has been loaded so that we don't get errors when the
asset isn't included.

To test, apply the patch and clear your browser cache.

- With WebBasedSelfCheck enabled, log in to the self checkout module and
  check some items out.
- Click "Finish" and then "Print receipt..."
- Check the browser console on the receipt page. There should be no
  errors.
- Log in to the OPAC and click the "Messaging" tab on the patron summary
  page.
- Test that the "Digests only" table heading icon shows a tooltip.
- Test that enquire.js is still loading correctly by performing a
  catalog search and narrowing your browser. When the window is narrow
  enough, the facets sidebar should collapse into a "Refine your search"
  button.

Note that the "js_in_body" qa warning is a false positive.

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>
5 months agoBug 36834: (Bug 29697 follow-up) Koha explodes when trying to open in Labeled MARC...
Janusz Kaczmarek [Sat, 11 May 2024 08:41:04 +0000 (08:41 +0000)]
Bug 36834: (Bug 29697 follow-up) Koha explodes when trying to open in Labeled MARC view a bibliographic record with an invalid biblionumber

After changes made in catalogue/labeledMARCdetail.pl with the bug 29697
when trying to open the Labeled MARC view with
biblionumber=<invalid_number> (e.g. a deleted biblionumber) Koha explodes
with a message << Can't call method "metadata" on an undefined value at
/kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59 >>

Test plan:
==========
1. Activate the viewLabeledMARC syspref.
2. Try to open a biblio record in Labeled MARC view, giving as a biblionumber
   (in URL) a non-existing biblionumber, e.g. in ktd, with standard ktd
   test data:
   http://your_ktd:8081/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=1234567
   Koha should explode with the message:
   Can't call method "metadata" on an undefined value at
   /kohadevbox/koha/catalogue/labeledMARCdetail.pl line 59
3. Apply the patch; restart_all.
4. Repeat p. 2.  You should get a regular page with the info "The record you
   requested does not exist (1234567)".

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36060: (follow-up) Remember selections when refreshing the table
Lucas Gass [Tue, 14 May 2024 18:18:05 +0000 (18:18 +0000)]
Bug 36060: (follow-up) Remember selections when refreshing the table

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36060: Simplify logic to enable/disable CheckinChecked/RenewChecked buttons
Lucas Gass [Fri, 9 Feb 2024 18:14:50 +0000 (18:14 +0000)]
Bug 36060: Simplify logic to enable/disable CheckinChecked/RenewChecked buttons

This patch attempts to simplify for disabling/enabling the 'Check in selected items' and 'Renewal selected items' buttons.

To test:
1. APPLY patch, clear browser's cache
2. Have more than 1 checkout issued to a borrower.
3. Load the checkout table on circ/circulation.pl
4. Notice that there is now 'Renew selected items' and 'Checkin
   selected items' button.
5. Play around with each making sure that they work as excepted when
   checkouts are checked in either the 'Check in' or 'Renew' columns.
6. Uncheck everything in the 'Renew column', the 'Renew selected items'
   button should be disabled.
7. Uncheck everything in the 'Checkin column', the 'Checkin selected
   items' button should be disabled.
8. Try unchecking some of these to make sure the Renew/Checkin button is
   properly disabled when no related checkboxes are checked.
9. Try using the select all/none options at the top of both the 'Renew'
   and 'Checkin' columns. Make sure the 'Renew selected items' and
   'Checkin selected items' become properly disabled/enabled.
10. Make sure the 'Renew all' button still works properly.

11. Have two checkouts. Click one for Renew and one for Checkin. Click on Check in selected items.
12. When the table reloads the 'renew' selections should be retained
13. Have two checkouts. Click one for Renew and one for Checkin. Click on Renew selected items.
14. When the table reloads the 'check in' selections should be retained

15. Have overdues
16. Go to a patron account and load the issue table
17. The items that are overdue are checked for renewal by default
16. The 'Renew selected items' button show be enabled.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 28869: (RM follow-up) Add missing field in api definition
Martin Renvoize [Fri, 17 May 2024 13:39:05 +0000 (14:39 +0100)]
Bug 28869: (RM follow-up) Add missing field in api definition

We missed adding the new field to the api definition for
authorised_value_category.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 months agoBug 36872: Untranslatable strings in request.tt
Owen Leonard [Thu, 16 May 2024 12:52:04 +0000 (12:52 +0000)]
Bug 36872: Untranslatable strings in request.tt

There are errors in the JavaScript in the holds template in the staff
client which results in strings not being translatable. This patch
corrects the errors.

To test, apply the patch and run through the process of placing a hold
on multiple items in the staff interface.

- At the hold confirmation step, try to submit the form without
  selecting pickup locations for one or more titles.
- You should get an alert, "Please make sure all selected titles have a
  pickup location set".
- Uncheck the checkboxes next to each title you're placing a hold on.
- Submit the form. You should get an error: "Please select at least one
  title".

- Test the translation process with a language, e.g. fr-FR:
- In KTD, run: gulp po:update --lang fr-FR
- Check fr-FR-staff-prog.po for the line referring to
  koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:1499
- You should see the string "Please make sure all selected titles have a
  pickup location set".

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36739: Correct CSRF change to budget deletions
Owen Leonard [Wed, 1 May 2024 11:04:41 +0000 (11:04 +0000)]
Bug 36739: Correct CSRF change to budget deletions

This is another instance of the deletion confirmation step getting
mistakenly auto-updated as if it were the deletion step. The
'delete_confirm' doesn't need the 'cud-' prefix, only the
'delete_confirmed' step.

To test, apply the patch and restart services.

- Test the process of deleting a budget.
- On the confirmation step you should see the name of the budget you're
  about to delete.
- After confirming, the deletion should complete correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36876: Correct <span>s around translatable strings in table settings
Owen Leonard [Thu, 16 May 2024 12:03:11 +0000 (12:03 +0000)]
Bug 36876: Correct <span>s around translatable strings in table settings

This patch corrects the way translatable strings are handled in the
table settings template. The switch to Bootstrap WRAPPERs for the
accordion widget included several errors.

To test, apply the patch and go to Administration -> Table settings.

- Confirm that the sections expand and collapse correctly.
- Test the translation process with a language, e.g. fr-FR:
  - In KTD, run: gulp po:update --lang fr-FR
  - Check fr-FR-staff-prog.po for the line referring to
    koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt:298
  - It should show the whole string "Interlibrary loans"

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl
Jan Kissig [Thu, 16 May 2024 12:37:16 +0000 (14:37 +0200)]
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl

    Additionally removes fixme comments

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36877: Fix Patron card creator errors on editing layout, profile or template
Jan Kissig [Thu, 16 May 2024 09:23:31 +0000 (11:23 +0200)]
Bug 36877: Fix Patron card creator errors on editing layout, profile or template

This patch fixes the unexpected behaviour when clicking on edit layout,
edit profile or edit template in Patron card creator tool.

Test plans:

1.  edit layout:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) WARNING: An unsupported operation was attempted on layout 20.
     Please have your system administrator check the error log for
     details.

apply patch
  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) Edit patron card layout form 20 shows up

2. edit template and profile:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=template or
     http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=profile
  b) click edit on an item in the table
  c) notice that the forms are empty

apply patch and redo steps a) and b) to load the edit form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33237: (QA follow-up) Remove hardcoded kohadevbox path
Marcel de Rooy [Fri, 17 May 2024 06:33:25 +0000 (06:33 +0000)]
Bug 33237: (QA follow-up) Remove hardcoded kohadevbox path

Test plan:
Run Letters.t (outside kohadevbox :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36529: manage_additional_fields permission for more than acquisitions and serials
Caroline Cyr La Rose [Fri, 12 Apr 2024 09:53:25 +0000 (05:53 -0400)]
Bug 36529: manage_additional_fields permission for more than acquisitions and serials

This patch renames the manage_additional_fields permission to remove
the specificity of acquisitions orders and serial subscriptions.
Since each additional field requires a corresponding permission, I
wrote each of them next to it. It makes it very long, but right now
there isn't really a way to link permissions other than the permission
description.

To test:
1. Apply patch
2. Go to a patron account
3. Click More > Set permissions
4. Go to the Administration panel permissions and open the
   sub-permissions
5. Check that the manage_additional_fields permission description
   makes sense, check grammar and spelling, try the various
   combinations

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36096: Add ability to set default sort and length to waitingreserves tables
Lucas Gass [Wed, 14 Feb 2024 16:55:33 +0000 (16:55 +0000)]
Bug 36096: Add ability to set default sort and length to waitingreserves tables

To test:
1. APPLY patch and restart services.
2. Have waiting holds, waiting holds past the expiration date, and
   waiting holds with cancellation requests.
3. Go to Administration -> Table settings and find each of the tables. (
   holdscr | holdso | holdst )
4. Each table should now include a 'Default display length:' and
   'Default sort order:'
5. Play with those Table settings, ensuring they behave correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36610: Some improvements to OPAC print CSS
Owen Leonard [Wed, 17 Apr 2024 12:55:04 +0000 (12:55 +0000)]
Bug 36610: Some improvements to OPAC print CSS

This patch makes a few CSS and markup changes to improve the print view.

The markup changes use Bootstrap's ".d-print-none" class to hide
specific elements without creating an ID or class specifically for those
elements.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

- Log in to the OPAC
- Test the following user pages by viewing the print preview:
  - Summary
  - Holds history
  - Messaging
  - Lists
  - Suggestions
- The "Personal details" tab hasn't been improved for printing but it's
  a good page to view to confirm that the "Back to top" arrow is now
  hidden in the print view.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35285: (QA follow-up) Tidy
Nick Clemens [Tue, 14 May 2024 18:02:49 +0000 (18:02 +0000)]
Bug 35285: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35285: Unit tests
Martin Renvoize [Mon, 13 Nov 2023 16:46:17 +0000 (16:46 +0000)]
Bug 35285: Unit tests

This patch adds unit tests for the new 'is_html' function introduced in
Koha::Notice::Message and update the tests to include the new plaintext
handling of html_content.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35285: Remove switch in notices.tt
Martin Renvoize [Wed, 8 Nov 2023 10:43:09 +0000 (10:43 +0000)]
Bug 35285: Remove switch in notices.tt

We now wrap appropriately for non-html formatted messages as
part of the html_content method. This means we can remove the
case from members/notices.tt and rely on html_content doing
the right thing for notice previews.

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>
5 months agoBug 35285: Add non-html template support to html_content wrapping
Martin Renvoize [Wed, 8 Nov 2023 09:59:30 +0000 (09:59 +0000)]
Bug 35285: Add non-html template support to html_content wrapping

This patch adds support for messages generated using non-html formatted
notice templates to the html_content method of Koha::Notice::Message.

We continue to wrap content for html generated messages with the
appropriate headers, css and title.

For non-html generated content we wrap in the <div style="white-space:
pre-wrap"> block to maintain text formatting as defined in the original
plaintext template.

Test
Follow the test plan for bug 30287, nothing should outwardly change.

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>
5 months agoBug 24424: Advanced editor - interface hangs as "Loading" when given an invalid bib...
Janusz Kaczmarek [Tue, 14 May 2024 11:08:19 +0000 (11:08 +0000)]
Bug 24424: Advanced editor - interface hangs as "Loading" when given an invalid bib number

The Advanced Editor hangs with "Loading, please wait" message when given an
invalid bib number, e.g. /cgi-bin/koha/cataloguing/editor.pl#catalog/55555

This is because in the bug 16424, when changes had been made to
koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js
(Bug 16424: Add framework support to advanced MARC editor),
the .fail callback method of the outer .get (in the KohaBackend.GetRecord
function called from cateditor-ui.inc) had been (perhaps by mistake?) removed.
So, in case of failure, the situation is not handled properly.

The proposal is to restore the outer .fail.  As a result, the
openRecord( 'new/', editor, finishCb ); will be called (a standard way
of resolving failed openRecord action (cf. the bottom of cateditor-ui.inc).

Test plan:
==========
0. Be sure your browser does not cache JavaScript for this test.
1. Enable EnableAdvancedCatalogingEditor in the system preferences.
2. Try to open in the advanced editor an unexisting record, e.g.
   http://your_ktd:8081/cgi-bin/koha/cataloguing/editor.pl#catalog/55555
   Koha should hang with a message "Loading, please wait".
3. Apply the patch, restart_all.
4. In a new browser window, repeat p. 2 (remember not to cache JS).
5. The editor should open with a new empty record.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36785: Typo unreconized and bilbio in tags code
Marcel de Rooy [Mon, 6 May 2024 09:12:36 +0000 (09:12 +0000)]
Bug 36785: Typo unreconized and bilbio in tags code

Test plan:
Look at the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36785: Do not pass biblionumber to get_approval_rows
Marcel de Rooy [Mon, 6 May 2024 09:04:26 +0000 (09:04 +0000)]
Bug 36785: Do not pass biblionumber to get_approval_rows

Resolve:
[WARN] get_approval_rows received unreconized argument key 'biblionumber'. at /usr/share/koha/opac/opac-tags.pl line 336.

Test plan:
Visit opac-tags.pl?biblionumber=SOME_NUMBER
With this patch, you should no longer find a warning in the logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36793: Fix case of $var in Context->delete_preference
Marcel de Rooy [Mon, 6 May 2024 12:28:45 +0000 (12:28 +0000)]
Bug 36793: Fix case of $var in Context->delete_preference

This only applies to 'local' preferences.

Test plan (first without this patch):
Add a local pref. Delete it. Ask value on commandline with:
* perl -MC4::Context -e"print C4::Context->preference('YOUR_PREF')"
* Did you replace YOUR_PREF :)

Now repeat with this patch. And verify fix (no value now).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36793: Unit test
Marcel de Rooy [Mon, 6 May 2024 12:28:45 +0000 (12:28 +0000)]
Bug 36793: Unit test

This only applies to 'local' preferences.

Test plan:
Run sysprefs.t with/without second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36619: Restore 'Columns' visibility on the patron search when placing a hold
Jonathan Druart [Wed, 17 Apr 2024 10:18:11 +0000 (12:18 +0200)]
Bug 36619: Restore 'Columns' visibility on the patron search when placing a hold

Test plan:
Go to /cgi-bin/koha/reserve/request.pl?biblionumber=117
Search for "d"
Notice that with this patch applied the "Columns" button is back and
that the "Configure" is working correctly

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36864: Add a font awesome icon to indicate enabled
Lucas Gass [Tue, 14 May 2024 21:47:14 +0000 (21:47 +0000)]
Bug 36864: Add a font awesome icon to indicate enabled

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36864: Add classes/CSS/fix markup on request.tt
Lucas Gass [Tue, 14 May 2024 21:06:52 +0000 (21:06 +0000)]
Bug 36864: Add classes/CSS/fix markup on request.tt

To test:
1. APPLY PATCH
2. Regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
3. Place a hold
4. On reserve/request.pl the 'Hold a specific item' fieldset should be
   disabled by default.
5. While disabled try clicking on the Allowed pickup locations
   dropdowns, you should not be able to.
6. In the 'Hold next available item', while enabled, you should be able
   to interact with the dropdowns.
7. Use the radio buttons to enable the 'Hold a specific item' fieldset.
   You should now be able to interact with the dropdowns.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35961: (follow-up) Pass along the borrowernumber
Lucas Gass [Mon, 13 May 2024 22:15:02 +0000 (22:15 +0000)]
Bug 35961: (follow-up) Pass along the borrowernumber

To test:
1. APPLY PATCH
2. Turn on  OpacCatalogConcerns
3. Find a record and go to the OPAC detail page.
4. Click "Report a concern" in the right navigation menu
5. Make sure it works
6. Repeat the proces from MARC view and ISBD view pages

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>
5 months agoBug 35961: Add missing includes
Martin Renvoize [Mon, 13 May 2024 13:43:53 +0000 (14:43 +0100)]
Bug 35961: Add missing includes

This patch adds the missing includes for the 'Catalog concerns' modal on
opac-MARCdetail and opac-ISBDdetail views.

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>
5 months agoBug 36620: (QA follow-up) Tidy controller
Martin Renvoize [Wed, 15 May 2024 08:44:01 +0000 (09:44 +0100)]
Bug 36620: (QA follow-up) Tidy controller

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36620: (QA follow-up) Add missing filters
Martin Renvoize [Wed, 15 May 2024 08:40:24 +0000 (09:40 +0100)]
Bug 36620: (QA follow-up) Add missing filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36620: Broken order management for suggestions with quantity
Janusz Kaczmarek [Wed, 17 Apr 2024 11:17:22 +0000 (11:17 +0000)]
Bug 36620: Broken order management for suggestions with quantity

Test plan
=========
Scenario A (the bug)
--------------------
1. In OPAC, create a purchase suggestion with defined quantity
   ("Copies" in staff interface).
2. Accept the suggestion.
2. Have a budget, fund, vendor etc. to use the Acquisitions module.
   Ensure that AcqCreateItem syspref is set to 'placing an order'.
3. Create a new basket and add to basket an order line from accepted
   suggestion.  Note the initial Quantity set to the quantity entered
   in suggestion.  Note increasing this number while you add items
   to the order with the 'Add item' button. Save the order, close the
   basket.
4. Start receiving shipments for this order (create invoice etc.).
   Receive items you created by 'Add item' until there is nothing more
   to receive.  Note the number of unreecived items in the order (eqal
   to the initial quantity from the suggestion) that cannot be regulary
   received (with the items table on the left).  This is the *bug*.
   [This is due to the ambiguity of $data->{quantity} in the neworderempty.pl
   -- it normally comes from the order: GetOrder, but in the case of a yet
   empty order created from a suggestion, it comes from the suggestions table:
   GetSuggestion].
5. Apply the patch, restart plack etc.
6. Repeat step 2 and 3. While adding items in order note that you start
   from quantity 0, and that the suggested quantity is shown in brackets.
7. Continue with p. 4.  You should be able to receive the order in the
   regular way (with the items created).

Scenario B (bonus)
------------------
Repeat the above with AcqCreateItem syspref is set to 'receiving the order',
or 'cataloging the record'.  These cases do not create a bug as it does
the case with 'placing an order'.  Note however, after applying the patch,
the initial quantity in the order is set to 0 and there is the bonus infomation
about the suggested number of items (from the suggestion).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35836: (follow-up) optimize the script when searching for guarantors
Hammat Wele [Thu, 16 May 2024 12:57:53 +0000 (12:57 +0000)]
Bug 35836: (follow-up) optimize the script when searching for guarantors

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35836: change | by , for the print
Matthias Le Gac [Mon, 18 Mar 2024 18:05:15 +0000 (14:05 -0400)]
Bug 35836: change | by , for the print

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35836: search_for_data_inconsistencies.pl - Search for loops in dependencies
Matthias Le Gac [Thu, 22 Feb 2024 19:26:24 +0000 (14:26 -0500)]
Bug 35836: search_for_data_inconsistencies.pl - Search for loops in dependencies

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36819: Default layout data prints squished barcodes
Caroline Cyr La Rose [Wed, 8 May 2024 21:01:08 +0000 (17:01 -0400)]
Bug 36819: Default layout data prints squished barcodes

This patch changes the default layout data for the barcode
width.

To test:
**On a fresh db**
1. Go to Cataloging > Label creator
2. Click New > Label batch
3. Enter the following barcodes in the text field (or enter your own)

39999000010114
39999000010138
39999000010152
39999000011333
39999000002331
39999000002355

4. Click Add items
5. Click Export full batch
6. Choose the following
   - Template: Avery 5160 | 1 x 2-5/8
   - Layout: Label test
7. Click Export
8. Click Download as PDF
9. Open the PDF
   --> Note the squished barcodes
10. Apply patch and reset_all
11. Redo steps 1 to 9
    --> Note the barcodes now look OK

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>
5 months agoBug 36414: OPAC - Skip csrf_token
Pedro Amorim [Mon, 25 Mar 2024 10:26:10 +0000 (10:26 +0000)]
Bug 36414: OPAC - Skip csrf_token

Skip csrf_token field if it already exists and
is coming from a previous workflow stage form
submission, as it's already included at the
start of the form.

The test plan requires EDS credentials in order to be followed.
I'm available to help others through this test plan if required.
Otherwise, I believe the code is simple enough to understand
and follow what it's fixing without testing.

Test plan:
1) Install an ILL availabililty plugin, e.g.:
https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds
3) Configure the plugin and add EDS credentials
4) Enable ILLCheckAvailability sys pref
5) Enable ILLModuleDisclaimerByType by copying the example YAML block in the sys pref description
6) Create a new ILL request of type 'Book' and add a DOI
7) You should now be on the availabililty stage, click 'Continue adding your request'
8) You should now be on the type disclaimer stage, click 'Create'
9) Notice 'Wrong CSRF token' error.
This happens because the type disclaimer stage is adding its own CSRF token in addition
to the CSRF token coming from the previous availabililty stage
10) Apply patch. Repeat. No error -> Request is created as expected.
11) Do the same test plan on both Staff UI and OPAC

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36414: Staff UI - Skip csrf_token
Pedro Amorim [Mon, 25 Mar 2024 10:23:37 +0000 (10:23 +0000)]
Bug 36414: Staff UI - Skip csrf_token

Skip csrf_token field if it already exists and
is coming from a previous workflow stage form
submission, as it's already included at the
start of the form.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 28869: DBIC schema update
Katrin Fischer [Fri, 17 May 2024 07:34:00 +0000 (07:34 +0000)]
Bug 28869: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 28869: DBRev 23.12.00.058
Katrin Fischer [Fri, 17 May 2024 07:32:16 +0000 (07:32 +0000)]
Bug 28869: DBRev 23.12.00.058

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 28869: (follow-up) Switch to cud-edit_category for CSRF
Marcel de Rooy [Wed, 27 Mar 2024 13:18:21 +0000 (13:18 +0000)]
Bug 28869: (follow-up) Switch to cud-edit_category for CSRF

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 28869: Unit tests
Marcel de Rooy [Tue, 30 Jan 2024 13:53:05 +0000 (13:53 +0000)]
Bug 28869: Unit tests

Test plan:
Run t/db_dependent/AuthorisedValues.t

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>
5 months agoBug 28869: (follow-up) Add html restriction for tinyint
Marcel de Rooy [Mon, 5 Feb 2024 09:34:49 +0000 (09:34 +0000)]
Bug 28869: (follow-up) Add html restriction for tinyint

Several item fields are signed tinyints, connected to
authorised value categories like NOT_LOAN etc. They only
accept -128 up to 127.

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>
5 months agoBug 28869: Implement authorised_value_categories.is_integer_only
Marcel de Rooy [Mon, 29 Jan 2024 10:31:23 +0000 (10:31 +0000)]
Bug 28869: Implement authorised_value_categories.is_integer_only

Test plan:
Add category with/without integer restriction.
Test adding/editing values.

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>
5 months agoBug 28869: Database revision
Marcel de Rooy [Tue, 30 Jan 2024 14:08:09 +0000 (14:08 +0000)]
Bug 28869: Database revision

Test plan:
Run updatedatabase.pl

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>
5 months agoBug 36844: (QA follow-up) Fix preselected options on set-library.pl
Nick Clemens [Wed, 15 May 2024 11:51:54 +0000 (11:51 +0000)]
Bug 36844: (QA follow-up) Fix preselected options on set-library.pl

I found that when switching from a branch with a default register to one without, the default register for
the last branch was remaining selected (though disabled)

When opening the page if no desk was set (choose 'My library' on initial login) the branch was default to 'No desk' rather than defaulting to the first desk of the current branch

Remove a debugging line as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36844: (QA follow-up) fix forgotten 'for' attr change
Victor Grousset/tuxayo [Tue, 14 May 2024 01:50:48 +0000 (03:50 +0200)]
Bug 36844: (QA follow-up) fix forgotten 'for' attr change

It didn't match the <select> id.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36844: Set library, desk, and cash register menu follow-ups
Owen Leonard [Mon, 13 May 2024 16:53:39 +0000 (16:53 +0000)]
Bug 36844: Set library, desk, and cash register menu follow-ups

This patch ties up a couple of loose ends which should have been
included in Bug 36582. The patch includes fixes for the staff interface
login page and the cash register statistics page.

To test you should have multiple libraries, desks, and cash registers
defined. You may need to enable the UseCirculationDesks and
UseCashRegisters system preferences.

- Apply the patch and log out of the staff interface.
- On the login form, test that changing your selected library correctly
  affects the desk and cash register dropdowns: Only desks and registers
  for your selected library should appear.
- Log in and confirm that your selections were submitted correctly.

- Go to Reports, and under "Statistics wizards" choose "Cash register."
- Confirm that changes to the "Transaction library" correctly change the
  available options in the "Cash register" dropdown, including the "All"
  option.

Sponsored-By: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
5 months agoBug 36859: Pass the op value 'cud-checkout' for the batch checkout form
Kyle M Hall [Tue, 14 May 2024 15:10:32 +0000 (11:10 -0400)]
Bug 36859: Pass the op value 'cud-checkout' for the batch checkout form

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36623: (follow-up) Fix cypress test
Matt Blenkinsop [Wed, 15 May 2024 10:41:53 +0000 (10:41 +0000)]
Bug 36623: (follow-up) Fix cypress test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36149: Add userenv middleware to app.psgi
Julian Maurice [Tue, 9 Apr 2024 12:45:39 +0000 (14:45 +0200)]
Bug 36149: Add userenv middleware to app.psgi

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36149: (follow-up) POD and tidy
Nick Clemens [Fri, 29 Mar 2024 18:09:30 +0000 (18:09 +0000)]
Bug 36149: (follow-up) POD and tidy

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36149: Unset userenv from middleware
Jonathan Druart [Fri, 8 Mar 2024 15:06:11 +0000 (16:06 +0100)]
Bug 36149: Unset userenv from middleware

The userenv (logged in user's info) are stored in
$C4::Context->context->{activeuser}, which persists in plack worker's
memory.
It's really bad in theory as we are not cleaning it before or after the
HTTP request, but only when set_userenv is called (what we are doing
commonly in C4::Auth::get_template_and_user).
If C4::Context->userenv is called before set_userenv we should get undef,
not the userenv from the previous request!
In practice this should not be a problem, but well... who really knows?

This patch suggests to have a middleware to deal with removing the
userenv at the beginning of each request (maybe it should be after, right? - FIXME).

To test:
1 - Edit /etc/koha/sites/kohadev/koha-conf.xml to set <plack_workers>1</plack_workers>
2 - Edit about.pl  and add a line after: CGI->new:
    warn Data::Dumper::Dumper( C4::Cointext->userenv() );
3 - tail -f /var/log/koha/kohadev/*.log
4 - View about.pl in staff interface, should get a "somethign's wrong" warning
5 - Reload, you get current user info
6 - Open an incognito tab, sign in as a different user and click some stuff
7 - Reload about.pl in other window
8 - You get the opac user info
9 - Apply patch
10 - Edit /etc/koha/sites/kohadev/plack.psgi and add the middleware after "RealIP":
     enable "+Koha::Middleware::UserEnv";
11 - Restart all
12 - Reload about.pl - you get a "Something's wrong" warning
13 - Click things in opac on incognito window
14 - Reload about.pl  - only "Something's wrong" - you no longer see any user info

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 19613: Use the 'note' profile
Jonathan Druart [Wed, 20 Mar 2024 07:35:29 +0000 (08:35 +0100)]
Bug 19613: Use the 'note' profile

WNC amended patch: tidied

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 19613: Scrub borrowers fields: borrowernotes opacnote
Jonathan Druart [Fri, 15 Mar 2024 10:37:43 +0000 (11:37 +0100)]
Bug 19613: Scrub borrowers fields: borrowernotes opacnote

To prevent XSS

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36532: Protect opac-dismiss-message.pl from malicious usages
Jonathan Druart [Fri, 5 Apr 2024 06:58:06 +0000 (08:58 +0200)]
Bug 36532: Protect opac-dismiss-message.pl from malicious usages

Really bad design, NEVER retrieve the logged in user from the CGI
param!

See comment 1 for more info

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36382: (QA follow-up) Don't escape quotes in escapeHtml
Kyle M Hall [Fri, 29 Mar 2024 11:07:54 +0000 (07:07 -0400)]
Bug 36382: (QA follow-up) Don't escape quotes in escapeHtml

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36382: XSS in showLastPatron dropdown
Kyle M Hall [Thu, 21 Mar 2024 13:30:26 +0000 (09:30 -0400)]
Bug 36382: XSS in showLastPatron dropdown

1) Set borrower surname to:
    <script>alert("here comes trouble");</script>
2) Save, nothing happens
3) Enable showLastPatron
4) Reload patron
5) Note the alert popup
6) Apply this patch
7) Reload patron
8) No alert!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 months agoBug 36772: OPAC Self checkout accepts wrong or partial barcodes
Jan Kissig [Fri, 3 May 2024 12:11:58 +0000 (14:11 +0200)]
Bug 36772: OPAC Self checkout accepts wrong or partial barcodes

    When using the opac trusted checkout feature it is possible to enter non existant or partial barcodes to check out items.

    Testplan:
    a) set  System preference OpacTrustedCheckout  to Allow
    b) go to http://localhost:8080/ and login with koha / koha
    c) click Self Checkout in navigation bar
    d) enter barcode 1234
    e) result: Item '39999000011234' was checked out

    apply patch and reload the page

    a) now enter barcode 1234
    b) result: Item '1234' not found
    c) enter 39999000011234
    d) result: Item '39999000011234' was checked out

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36825: Hide "Protected" field via BorrowerUnwantedField syspref
Emmi Takkinen [Fri, 10 May 2024 05:31:42 +0000 (08:31 +0300)]
Bug 36825: Hide "Protected" field via BorrowerUnwantedField syspref

Setting field "Protected" as hidden in patron entry/modification
form via BorrowerUnwantedField syspref doesn't work. Form is
missing condition "UNLESS noprotected".

To test:
1. From BorrowerUnwantedField, check field "Protected" as hidden.
2. Either attempt to create a new patron or modify existing one.
=> Note that "Protected" is still displayed in the form.
3. Apply this patch.
4. Navigate back to create/modify patron form.
=> Note that "Protected" is no longer displayed.
5. Uncheck field "Protected" from BorrowerUnwantedField.
=> Field should now be displayed in create/modify form.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36837: (follow-up) UNIMARC case
Tomas Cohen Arazi [Mon, 13 May 2024 15:06:02 +0000 (12:06 -0300)]
Bug 36837: (follow-up) UNIMARC case

I checked the UNIMARC authResults counterpart file. And it only
contained a single case of generated elements like the previous patch.

To test:
1. On latest main
   $ ktd --shell
  k$ cd misc/translator/po
  k$ git fetch
  k$ git reset --hard origin/main
  k$ cd /kohadevbox/koha
  k$ gulp po:update --lang es-ES
  k$ cd misc/translator/po
  k$ git add -u ; git commit -mWIP --no-verify
2. Apply this patches
3. Run:
  k$ cd /kohadevbox/koha
  k$ gulp po:update --lang es-ES
  k$ cd misc/translator/po
  k$ git diff
=> SUCCESS: Notice CSS class names are not translated anymore

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36837: Simplify XSLT and aid translatability
Tomas Cohen Arazi [Mon, 13 May 2024 13:58:48 +0000 (10:58 -0300)]
Bug 36837: Simplify XSLT and aid translatability

This patch makes the XSLT contain HTML tags instead of building them
from scratch with static attribute values. This made it awkward for
translators as CSS classes ended up being extracted for translation
purposes. Plus, there's no need to spend CPU cycles on static content
generation.

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 months agoBug 33099: Add missing MARC21 Match authority mappings so "Search all headings" searc...
Janusz Kaczmarek [Tue, 18 Apr 2023 19:42:24 +0000 (21:42 +0200)]
Bug 33099: Add missing MARC21 Match authority mappings so "Search all headings" search works

The main entry form of corporate names (110), uniform titles (130), topical
terms (150), geographical names (151), and genre/form (155) are not indexed
with 'Match' search field in Elasticsearch standard mapping.  As a result,
the respective records are not present on the result list when performing
an 'All headings' search for the authority records with the main heading form
(MARC 21).

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In Authorities, make an 'All headings' search for a main entry
   form from the corporate names, uniform titles, topical terms,
   geographical names, or genre/form
   --> e.g., in ktd: UK Archiving.  You will get no results.
2. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -a kohadev
3. Repeat the test. You should see 'UK Archiving' on the result list.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not...
Kyle M Hall [Wed, 20 Mar 2024 19:32:50 +0000 (15:32 -0400)]
Bug 36378: Cannot stay logged in if AutoLocation is enabled but branch ip is not set correctly

We can get into a scenario what a user cannot stay logged in for more than a single page load.
If AutoLocation is enabled with branch IP addresses being set to a space, you will be logged out with every page load.

Test Plan:
1) Set your branch ip to a space
2) Enable AutoLocation
3) Restart all the things!
4) Log out
5) Log in
6) Browse to another page
7) You are logged out
8) Apply patch
9) Repeat 1-6
10) You are not logged out!

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36708: Fix column index for processing No automatic renewal after
Lucas Gass [Mon, 29 Apr 2024 15:18:26 +0000 (15:18 +0000)]
Bug 36708: Fix column index for processing No automatic renewal after

To test:
1- Find or create a circulation rule with a 'Holds allowed (total)' limit of 3 (or another number) and no value in 'No automatic renewal after (hard limit)'
2- Select to edit the rule, and note that 'No automatic renewal after (hard limit)' box in the editing line is now populated with a date
3- Note also that 'Holds allowed (total)' is empty in your editing line
4- If you save your edits without clearing the new 'No automatic renewal after (hard limit)' date, it will save as part of the rule. Also, 'Holds allowed (total)' will save as Unlimited unless you re-add your numerical value.
5- APPLY PATCH
6- Try again, the values should save corrected and not erroneously fill the No automatic renewal after (hard limit) column.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35862: Fix patron_search_form selection
Jonathan Druart [Tue, 14 May 2024 12:47:33 +0000 (14:47 +0200)]
Bug 35862: Fix patron_search_form selection

We were no longer getting a match here and so ended up with 2 forms on
the budget page (where we have two modals for patron: owner and users).

Caught be selenium tests patrons_search.t :
Error while executing command: element not interactable: Element <a class="patron_name patron_preview" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=511"> could not be scrolled into view

It fixes the following UI issues:
When you open a modal, start a search, close the modal
open the other modal search: the results from the other modal were shown

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35862: Remove dup aside node
Jonathan Druart [Tue, 14 May 2024 12:46:29 +0000 (14:46 +0200)]
Bug 35862: Remove dup aside node

The aside element is now a parent of the form block, in
patron-search.inc (BLOCK patron_search_filters).

On members/members-home.pl there were 2 nested aside

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35362: Adjust other "Close window" clicks
Jonathan Druart [Tue, 14 May 2024 09:51:11 +0000 (11:51 +0200)]
Bug 35362: Adjust other "Close window" clicks

Previous patch "Bug 35362: (follow-up) Fix guaruntor preview modal close in test"
didn't adjust the other occurrences.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: Prevent random failure from api/v1/acquisitions_orders.t
Jonathan Druart [Tue, 14 May 2024 08:41:20 +0000 (10:41 +0200)]
Bug 36018: Prevent random failure from api/v1/acquisitions_orders.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: (follow-up) Fix unit tests
Matt Blenkinsop [Mon, 13 May 2024 14:21:05 +0000 (14:21 +0000)]
Bug 34788: (follow-up) Fix unit tests

prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: (follow-up) Fix failing tests
Nick Clemens [Mon, 13 May 2024 14:03:47 +0000 (14:03 +0000)]
Bug 30047: (follow-up) Fix failing tests

This patch updates the test files to correctly create authorities and/or correctly
mock the needed data for authorities.

the tests in t/db_dependent/Authority/Merge.t cover the case of 'Default' authorities
which don't have valid headings - so I had to add handling for blanking the heading field
when Default type is used.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36838: Add CSRF token to tags review AJAX requests
Owen Leonard [Mon, 13 May 2024 13:46:03 +0000 (13:46 +0000)]
Bug 36838: Add CSRF token to tags review AJAX requests

The JavaScript for approving or rejecting tags in the staff interface's
tag review interface lacked a CSRF token for the POSTed requests. This
patch adds the token for "approve" and "reject" operations.

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

- If necessary, enable tags in system preferences.
- Log in to the OPAC and submit multiple tags on various records.
- In the staff interface, go to Tools -> Tags.
- Test the process of approving and rejecting tags by clicking the
  buttons in each row of the table of tags.
- The browser console should show no errors, and the lists of approved
  and rejected tags should correctly show the tags you moderated.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 29948: Adjust sysprefs.sql
Jonathan Druart [Mon, 13 May 2024 13:59:57 +0000 (15:59 +0200)]
Bug 29948: Adjust sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36723: Add musical presentation to Elasticsearch index mappings
danyonsewell [Fri, 10 May 2024 02:40:45 +0000 (02:40 +0000)]
Bug 36723: Add musical presentation to Elasticsearch index mappings

Testing plan:

1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply the patch and restart everything (restart_all).
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Update the visibility for 254$a in the default framework so that it is visible in the Editor (OPAC, Staff interface should already be selected).
7. Add a new record using the default framework and put a term in 254$a, such as 'Full score'.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36472: Add search box at the top of the authorities editor page
Owen Leonard [Mon, 1 Apr 2024 13:04:06 +0000 (13:04 +0000)]
Bug 36472: Add search box at the top of the authorities editor page

This patch adds the authority search header include to the authorities
editor page.

To test, apply the patch and go to Authorities -> New authority.

There should now be a set of authority search forms at the top of the
page.

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34823: Do not show Item group dropdown if there are no item groups
Lucas Gass [Wed, 6 Mar 2024 18:41:04 +0000 (18:41 +0000)]
Bug 34823: Do not show Item group dropdown if there are no item groups

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Go to the OPAC and log in as a patron
3. Go to any record that doesn't have grouped items and try to place a hold
4. Click on "Show more options"
5. See "Request specific item group:" and dropdown
6. APPLY PATCH
7. Try again, this time if the record has no item groups you should not see the dropdown at all.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36440: (QA follow-up) Update op parameter
Emily Lamancusa [Fri, 10 May 2024 20:35:01 +0000 (16:35 -0400)]
Bug 36440: (QA follow-up) Update op parameter

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>