]> git.koha-community.org Git - koha.git/log
koha.git
9 months agoBug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options
Owen Leonard [Wed, 6 Dec 2023 17:25:39 +0000 (17:25 +0000)]
Bug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options

This patch adds a missing option to the CollapseFieldsPatronAddForm
system preference so that the "Non-patron guarantor" section can be
collapsed by default.

To test, apply the patch and go to Administration -> System preferences.

- Search for CollapseFieldsPatronAddForm.
- In the dropdown of options you should see an entry for "Non-patron
  guarantor."
- Click "Select all" and save your changes.
- Go to Patrons -> New patron and choose a patron category which can
  have a guarantor (for example J - Juvenile)
- The patron entry page should load with all sections collapsed,
  including the Non-patron guarantor section.
- Uncheck  all options in the CollapseFieldsPatronAddForm
  preference and return to the patron entry form. All sections should
  now appear.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35641: Reduce DB lookups when sending a list of barcodes to inventory
Nick Clemens [Fri, 22 Dec 2023 13:35:06 +0000 (13:35 +0000)]
Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory

This patch does three things:
1 - Removes a specific query for withdrawn status of each item scanned - we can use the withdrawn field
2 - Removes a specific query for checkouts on each item scanned - we can use the onloan field
    a - additionally we don't need to fetch the checkout as we check it in to the homebranch,
    this is likely incorrect - we should use the current branch, but I preserve behavior for now
3 - Fetches the items ahead of time and builds a hash based on barcode, reduces DB lookups, may raise memory usage

To test:
1 - Checkout some items
2 - Withdraw some items
3 - Generate a lsit of barcodes including some checked out items and some withdrawn items
4 - Enter that list of barcodes into inventory tool
5 - Note your results
6 - Apply patch
7 - Issue the items again
8 - Repeat inventory
9 - Confirm results are the same as before patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35676: Fix DidYouMean when not configured
Jonathan Druart [Fri, 12 Jan 2024 12:46:50 +0000 (13:46 +0100)]
Bug 35676: Fix DidYouMean when not configured

When DidYouMean is not configured, there is the following message
displayed:
  "Not what you expected? Check for suggestions"
suggestions is a link to svc/suggestion which does not return content if
the feature is displayed
 90 unless ( @plugins ) {
 91     print $query->header;
 92     exit;
 93 }

We should not see this text, it is supposed to be replaced when the ft
is enabled.

However
  commit 79bf4485c1b2ae8059e2ee15ea1e67bba9961c34
  Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4
made this change:
-                    [% IF ( DidYouMean ) %]
+                    [% #IF ( DidYouMean ) %]
                         <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring | uri %]">suggestions</a></div>
-                    [% END %]
+                    [% #END %]

Which is obviously wrong.

Test plan:
Do not have the ft configured and launch a search (OPAC) that will not
return any results.
=> Without this patch there is the message
=> With this patch applied it is no longer displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35772: Remove double escaping
Jonathan Druart [Thu, 11 Jan 2024 11:20:55 +0000 (11:20 +0000)]
Bug 35772: Remove double escaping

Patch as proposed by Jonathan in a comment on bug 29002

If a patron has HTML character in surname or firstname, Select2 will escapeHtml twice.

To test:
* Edit a patron, set firstname: <span>test</span>
* Place booking, search for test
* It shows correctly in the result, but when you select it you will see "&lt;", etc.
* Apply patch
* Verify the display is now corrected.

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>
9 months agoBug 25691: (follow-up) Update control file with wiki link
Katrin Fischer [Sat, 6 Jan 2024 19:29:06 +0000 (19:29 +0000)]
Bug 25691: (follow-up) Update control file with wiki link

This is in case it's needed anyway (see comment on previous patch)

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>
9 months agoBug 25691: Replace link to non-existing README with wiki link
Katrin Fischer [Sat, 6 Jan 2024 19:24:33 +0000 (19:24 +0000)]
Bug 25691: Replace link to non-existing README with wiki link

This doesn't update the occurrence in the control file
as it says in control.in:

To test:
* Verify all occurrences of the README file have been updated. Exceptions:
  * control (see above)
  * changelog

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>
9 months agoBug 35438: Remove skip_intermediate_commit parameter
Kyle M Hall [Fri, 1 Dec 2023 11:53:21 +0000 (06:53 -0500)]
Bug 35438: Remove skip_intermediate_commit parameter

It no longer does anything.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35438: Transact each record import separately
Kyle M Hall [Thu, 30 Nov 2023 17:10:41 +0000 (12:10 -0500)]
Bug 35438: Transact each record import separately

When importing a staged file we commit every 50 records
For an authority import we are also merging, which can affect many more biblios, and these all end up in the transaction.
This can cause tables locks and issues across Koha

Test Plan:
1) Apply this patch
2) prove t/db_dependent/ImportBatch.t

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>
9 months agoBug 35277: (QA follow-up) POD corrections
Marcel de Rooy [Fri, 12 Jan 2024 10:02:33 +0000 (10:02 +0000)]
Bug 35277: (QA follow-up) POD corrections

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35277: (QA follow-up) Fix POD
Kyle M Hall [Fri, 1 Dec 2023 11:17:39 +0000 (06:17 -0500)]
Bug 35277: (QA follow-up) Fix POD

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35277: (follow-up) Remove debugging module
Nick Clemens [Fri, 10 Nov 2023 11:42:01 +0000 (11:42 +0000)]
Bug 35277: (follow-up) Remove debugging module

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35277: Unit tests
Nick Clemens [Tue, 7 Nov 2023 16:55:44 +0000 (16:55 +0000)]
Bug 35277: Unit tests

prove -v t/db_dependent/Koha/BackgroundJob/PseudonymizeStatistic.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35277: Pseudonymize in a background job
Nick Clemens [Tue, 7 Nov 2023 13:45:01 +0000 (13:45 +0000)]
Bug 35277: Pseudonymize in a background job

This patch adds a new background job for pseduonymization

To test:
 1 - Download the benchmarking script
 2 - Ensure your koha has bcrypt_settings in koha-conf.xml
     See bug 28911
 3 - perl perf_check_pseudo.pl
 4 - Note the slowdown after pseudonymization enabled
 5 - Apply patches, restart all
 6 - perl perf_check_pseudo.pl
 7 - Note improvement
 8 - Enable pseudonymization in sytem preferences
 9 - Perform some checkouts and returns
10 - Verify the background jobs complete successfully
11 - Verify the pseudonymized_transactions table is updated correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 32477: Fix hiding all columns in item batch mod tools
Emmi Takkinen [Fri, 22 Dec 2023 11:05:37 +0000 (13:05 +0200)]
Bug 32477: Fix hiding all columns in item batch mod tools

If one hides all columns in batch item modification tool
and then reloads the page or launches tool again, "Holds"
column isn't displayed and "Itemtype" column is. Also
"Itemtype" columns checkbox remains checked. This happens
because "Itemtype" columns id is out of scope of list of column
numbers set in cookies. This patch adds 3 to number of columns
in variable "allColums" to take account all 3 columns we don't
want to hide.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. Use "Hide all columns" checkbox to hide all columns.
3. Confirm all columns expect checkbox, "Title" and "Holds"
columns are hidden correctly.
4. Reload the page.
=> Note that "Holds" column is now hidden and "Itemtype"
column is displayed. Also "Itemtype" checkbox is checked.
5. Apply this patch.
6. Repeat steps 1 to 4.
=> "Holds" column should now be displayed and "Itemtype"
hidden. None of the checkbox should be checked.

Sponsored-by: Koha-Suomi Oy
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>
9 months agoBug 32477: Launch function hideColumns after changing datatables settings
Emmi Takkinen [Thu, 23 Nov 2023 11:15:57 +0000 (13:15 +0200)]
Bug 32477: Launch function hideColumns after changing datatables settings

Hiding columns in batch item modification breaks if page is
loaded again. If one hides e.g. column "Collection" and then loads
the page column "Holds" disappears. Also behaviour of checbox
changes for "Collection" column. This happens because we launch
function "hideColumns" before changing datatables settings and
"hidden" column with class "sorting_1" is still present.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. In modification page, hide column "Collection". Confirm
correct column is hidden.
3. Reload the page or modify items again.
=> Note that column "Holds" is now hidden and checking checkbox
for column "Collection" behaves incorrectly (unchecked checkbox
shows column, checked hides it)
4. Apply this patch.
5. Repeat steps 1, 2 and 3.
=> Confirm correct column is now hidden when page is loaded again
and checkbox works correctly.

Sponsored-by: Koha-Suomi Oy
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>
9 months agoBug 35702: Fetch biblios at once and loop
Nick Clemens [Thu, 4 Jan 2024 14:07:11 +0000 (14:07 +0000)]
Bug 35702: Fetch biblios at once and loop

Test plan:
prove -v t/db_dependent/Authority/Merge.t

Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace $biblio->id with $biblio->biblionumber

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35702: Use framework code from biblio object
Nick Clemens [Thu, 4 Jan 2024 14:03:45 +0000 (14:03 +0000)]
Bug 35702: Use framework code from biblio object

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>
9 months agoBug 35086: (follow-up) Use 5000 as example in conf file
Nick Clemens [Fri, 5 Jan 2024 13:03:36 +0000 (13:03 +0000)]
Bug 35086: (follow-up) Use 5000 as example in conf file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35086: Tidy tests
Nick Clemens [Thu, 4 Jan 2024 12:55:03 +0000 (12:55 +0000)]
Bug 35086: Tidy tests

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>
9 months agoBug 35086: Also split chunks when indexing from background job
Nick Clemens [Wed, 3 Jan 2024 18:54:25 +0000 (18:54 +0000)]
Bug 35086: Also split chunks when indexing from background job

The es background indexer is designed to combine background jobs when started based on the 'batch_size' option.

While this is helpful for combining individual updates, it can be problematic when there are several large batch modifications, or when worker has stopped and is restarted.

This patch uses the same logic as in the indexer to split the chunks that are sent directly for indexing.

To test:
1 - Follow test plan on previous patch
2 - Confirm items are correctly indexed and jobs marked

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>
9 months agoBug 35086: Add chunk_size option to elasticsearch configuration
Nick Clemens [Fri, 22 Dec 2023 20:11:34 +0000 (20:11 +0000)]
Bug 35086: Add chunk_size option to elasticsearch configuration

Whne performing batch operations we can send a large numebr of records for reindexing at once.
Currently this can create requetss that are too large for Elasticsearch to process. We need
to break these requests into chunks/

This patch adds a chunk_size configuration to the elasticsearch stanza in koha-conf.xml

If blank we default to 5000.

To test:
0 - Have Koha using Elasticsearch
1 - Create and download a report of all barcodes:
    SELECT barcode FROM items
2 - Batch modify these items
3 - Note a single ESindexing job is created
4 - Create and download a report of all authority ids:
    SELECT auth_header.authid FROM auth_header
5 - Setup a marc modification template, and batch modify all the authorities
6 - Again note a single ES backgorund job is created
7 - Apply patch
8 - Repeat the modifications above - you still get a single job
9 - Edit koha-conf.xml and add <chunk_size>250</chunk_size> to elasticsearch stanza
10 - Repeat modifications - you now get several background ES jobs
11 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t

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>
9 months agoBug 34999: Add unit test
Marcel de Rooy [Thu, 11 Jan 2024 10:09:57 +0000 (10:09 +0000)]
Bug 34999: Add unit test

Test plan:
Run t/db_dependent/api/v1/auth.t
[Bonus] Run prove t/db_dependent/api/v1

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 34999: Throw exception for public routes if OPACMaintenance is enabled
Marcel de Rooy [Fri, 24 Nov 2023 10:50:54 +0000 (10:50 +0000)]
Bug 34999: Throw exception for public routes if OPACMaintenance is enabled

Test plan:
[1] Try public endpoint like /api/v1/public/biblios/X/items.
    * Replace X by an existing biblionumber.
    You should receive a 200.
[2] Enable OPACMaintenance. Set to Show.
[3] Try same endpoint. You should get a 503 with a json error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35756: Correctly serialize patron's data in patron search popup/modal
Jonathan Druart [Wed, 10 Jan 2024 08:36:43 +0000 (09:36 +0100)]
Bug 35756: Correctly serialize patron's data in patron search popup/modal

We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35475: Improve concatenated string and fix error in JS file
Katrin Fischer [Sat, 23 Dec 2023 16:19:45 +0000 (16:19 +0000)]
Bug 35475: Improve concatenated string and fix error in JS file

Fixes 2 problems noted in comment#2 and comment#3 on the bug
report.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35475: Makes strings in booking JS file translatable
Katrin Fischer [Sun, 10 Dec 2023 16:56:29 +0000 (16:56 +0000)]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Distinguish different RMaint and Topic Expert roles
Martin Renvoize [Wed, 10 Jan 2024 13:46:58 +0000 (13:46 +0000)]
Bug 35504: Distinguish different RMaint and Topic Expert roles

This patch further splits up release maintanence and topic expert roles
so that they display with further, more accurate, detail in the
development team section.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Split list of ERM Topic experts
Martin Renvoize [Wed, 10 Jan 2024 13:48:53 +0000 (13:48 +0000)]
Bug 35504: Split list of ERM Topic experts

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Add full maintainers list into development branch
Martin Renvoize [Wed, 10 Jan 2024 11:39:15 +0000 (11:39 +0000)]
Bug 35504: Add full maintainers list into development branch

On a stable branch the current maintainer of your running version is
listed at the top of the current maintanence team.. however when you're
on a development branch the RM is responsible for your branch and the
maintainers were missing from display.

This patch adds the maintainers list back to the bottom of the current
maintanence team section, just for the development branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Change 'Jenkins' to 'Continuous integration'
Martin Renvoize [Wed, 10 Jan 2024 11:38:14 +0000 (11:38 +0000)]
Bug 35504: Change 'Jenkins' to 'Continuous integration'

We were naming these roles differently between the 'current team' and
'past roles' display.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Corrections to wiki team
Martin Renvoize [Wed, 10 Jan 2024 11:37:51 +0000 (11:37 +0000)]
Bug 35504: Corrections to wiki team

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Add ktd maintainer
Martin Renvoize [Tue, 12 Dec 2023 12:04:56 +0000 (12:04 +0000)]
Bug 35504: Add ktd maintainer

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Corrections to team
Martin Renvoize [Tue, 12 Dec 2023 11:48:47 +0000 (11:48 +0000)]
Bug 35504: Corrections to team

Correction of 'advocate' to 'advocates' to ensure they appear in the
team.

Addition of 'website' and 'wiki' handling to ensure they also appear
in the team.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: Typo fix
Pedro Amorim [Tue, 12 Dec 2023 11:10:47 +0000 (11:10 +0000)]
Bug 35504: Typo fix

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35504: New cycle, new team :)
Martin Renvoize [Wed, 6 Dec 2023 16:03:55 +0000 (16:03 +0000)]
Bug 35504: New cycle, new team :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage
Jonathan Druart [Wed, 3 Jan 2024 13:52:25 +0000 (14:52 +0100)]
Bug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage

issue_manage inserted into the DB but issues_manage is tested in the
controller script.

Test plan:
  git grep issues_manage
should no longer return any results

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 33639: Make add item to item group work from additem.pl
Lucas Gass [Tue, 2 Jan 2024 17:49:45 +0000 (17:49 +0000)]
Bug 33639: Make add item to item group work from additem.pl

To test:

1, Create one or more item groups for a bib if needed
2. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
3. On the Normal tab, see that the item has not been added to the item group you selected.
4. APPLY PATCH, restart_all
5. Try 1-3 again but this time the item should succesffuly be added to the item group.
6. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
7. Name the new item group.
8. Make sure it is correctly added to the item group.

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>
9 months agoBug 35265: Remove drag and drop in Elasticsearch mappings
Fridolin Somers [Mon, 6 Nov 2023 06:53:43 +0000 (20:53 -1000)]
Bug 35265: Remove drag and drop in Elasticsearch mappings

Bug 18827 says ordering search fields in Elasticsearch mappings is useless.

This patch removes it.
Drag and drop is kept for facets.

Test plan :
1) Enable Elasticsearch
2) Go to Administration > Search engine configuration (Elasticsearch)
3) Go to tab 'Bibliographic records'
4) Check there is no Javscript error
5) Check you can't drag and drop lines anymore

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Barbara Petritsch <barbara.petritsch@wienmuseum.at>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 25835: Include overdues with fines in overdues_report permission
Andrew Fuerste Henry [Wed, 29 Nov 2023 18:02:52 +0000 (18:02 +0000)]
Bug 25835: Include overdues with fines in overdues_report permission

To test:
1 - have a user with circulate_remaining_permissions but not
    overdues_report
2 - confirm user can see and run Overdues with Fines
3 - apply patch
4 - confirm user can no longer see links to Overdues with Fines or load
    the page directly by entering the url
5 - confirm a user with overdues_report or greate permission can see and
    use the tool

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>
9 months agoBug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:41:39 +0000 (14:41 +0000)]
Bug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious

This patch addresses the fact some of our code still relies on those CGI-era ENV variables.
In particular, C4::Laguages::getlanguage expects it to calculate the most suitable language.

As this is reported as required, I provide a fix.

I did a `git grep HTTP_` on the codebase, and the only other occurences are:

* C4::Output (HTTP_X_REQUESTED_WITH)
* C4::Context (HTTP_USER_AGENT, HTTP_X_FORWARDED_FOR)
* C4::Auth_with_shibboleth (using HTTP_ variables for matchpoints)
* Some handling on the 'Koha as a Mojo app' code
* Some .pl script not relevant to this report

I decided to limit this patch to the requested header which seems harmless. I leave the
other cases.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ qa -c 1
=> FAIL: Tests fail!
3. Apply this patch
4. Run:
  k$ qa -c 2
=> SUCCESS: Tests pass! All green!
5. Sign off :-D

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>
9 months agoBug 32551: Regression tests
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:40:11 +0000 (14:40 +0000)]
Bug 32551: Regression tests

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>
9 months agoBug 35567: Prevent translation of Host-item in "Show analytics" link
Kevin Carnes [Thu, 14 Dec 2023 09:47:40 +0000 (10:47 +0100)]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35686: (follow-up) Correct page heading
Owen Leonard [Mon, 8 Jan 2024 13:36:20 +0000 (13:36 +0000)]
Bug 35686: (follow-up) Correct page heading

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Removed space before colon from "Update report :"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35686: Case missing from installer step 3 template title
Owen Leonard [Wed, 3 Jan 2024 13:08:12 +0000 (13:08 +0000)]
Bug 35686: Case missing from installer step 3 template title

This patch adds a missing case to the display of the title on step 3 of
the web installer. This resulted in an empty first part of the title:
" > Web installer > Koha"

To test, apply the patch and reset the database version from the command
line in Koha Testing Docker:

> koha-mysql kohadev
> UPDATE systempreferences SET value = '23.1200002 WHERE variable = 'version';
> quit
> Restart all

- Go to the staff interface. You should be taken to the web installer.
- Log in to the web installer and proceed through until you get to the
  "Updating database structure" page.
- Confirm that the page title is correct.

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>
9 months agoBug 35517: Choose correct default header search tab according to permissions
Owen Leonard [Thu, 7 Dec 2023 18:17:55 +0000 (18:17 +0000)]
Bug 35517: Choose correct default header search tab according to permissions

This patch adds some additional template logic to the header search form
for the staff interface home page so that users with different
permissions will see the correct tab in the header search form.

To test, apply the patch and view the staff interface home page using a
user with different permissions:

- 'catalogue' and 'circulate'
  - Header should show circulation search
- 'catalogue' and 'borrowers'
  - Header should show patron search
- 'catalogue' only
  - Header should show catalog search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35602: Fix typo AutoMemberNum
Katrin Fischer [Sat, 6 Jan 2024 19:40:25 +0000 (19:40 +0000)]
Bug 35602: Fix typo AutoMemberNum

The correct spelling is autoMemberNum.

To test:
* Enable autoMemberNum system preference
* Set cardnumber to mandatory in BorrowerMandatoryField
* Add a new patron account
* Verify correct spelling in hint below cardnumber input field

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>
9 months agoBug 35395: Update DefaultPatronSearchMethod system preference description
Katrin Fischer [Sat, 6 Jan 2024 20:27:51 +0000 (20:27 +0000)]
Bug 35395: Update DefaultPatronSearchMethod system preference description

This updates the system preference description of DefaultPatronSearchMethod
so that it's clear that the preference applies to all patron
searches, including patron module search and auto-completes.

To test:
* Search for DefaultPatronSearchMethod system preference in administration
* Verify the setting is reflected in the filters of the patron search
* Apply patch
* Verify that the description now is now improved.

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>
9 months agoBug 35650: (QA follow-up) Add spans to errors for user restrictions
Katrin Fischer [Thu, 11 Jan 2024 12:59:12 +0000 (12:59 +0000)]
Bug 35650: (QA follow-up) Add spans to errors for user restrictions

This will ease translation.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35650: (follow-up) Other cases found
Tomas Cohen Arazi [Tue, 26 Dec 2023 14:47:37 +0000 (11:47 -0300)]
Bug 35650: (follow-up) Other cases found

while editing files for the main patch, I noticed some tiny cases.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
9 months agoBug 35650: Standardize on 'Check the logs for details.'
Tomas Cohen Arazi [Tue, 26 Dec 2023 13:53:07 +0000 (10:53 -0300)]
Bug 35650: Standardize on 'Check the logs for details.'

This patch makes the 'Check the logs..' messages more consistent across
the codebase.

To test:
1. Run:
   $ git grep -e 'Check the logs\"' -e 'Check the logs<' -e 'Check the logs\.'
=> FAIL: Several forms show up
2. Apply this patch
3. Repeat 1
=> SUCCESS: Empty result.
4. Run:
   $ git grep -e 'Check the logs for details\.'
=> SUCCESS: Consisten results show
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
9 months agoBug 35713: Remove outdated debian/docs/LEEME.Debian file
Katrin Fischer [Sat, 6 Jan 2024 18:21:43 +0000 (18:21 +0000)]
Bug 35713: Remove outdated debian/docs/LEEME.Debian file

This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.

To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
  Example: git grep LEEME

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>
9 months agoBug 35757: (QA follow-up) Tidy
Nick Clemens [Wed, 10 Jan 2024 18:09:31 +0000 (18:09 +0000)]
Bug 35757: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35757: Fix unit tests for external counter registry API
Matt Blenkinsop [Wed, 10 Jan 2024 10:14:40 +0000 (10:14 +0000)]
Bug 35757: Fix unit tests for external counter registry API

This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition.

Test plan:
prove t/db_dependent/api/v1/erm_counter_registries.t
prove t/db_dependent/api/v1/erm_sushi_services.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35757: Add new fields to api definitions
Matt Blenkinsop [Wed, 10 Jan 2024 10:13:26 +0000 (10:13 +0000)]
Bug 35757: Add new fields to api definitions

The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35584: (follow-up) Remove duplicate license entry
Owen Leonard [Mon, 8 Jan 2024 17:01:04 +0000 (17:01 +0000)]
Bug 35584: (follow-up) Remove duplicate license entry

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35584: (QA follow-up):
Pedro Amorim [Fri, 22 Dec 2023 12:33:00 +0000 (12:33 +0000)]
Bug 35584: (QA follow-up):

Typo fix: GreBox -> Greybox
Capitalization fix: JavaScript case
Order to match header fix: jsTree jQuery -> jQuery jsTree
Capitalization fix: treetable -> Treetable capitalization

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35584: (follow-up) Add license information and fix sort order
David Nind [Wed, 20 Dec 2023 20:15:01 +0000 (20:15 +0000)]
Bug 35584: (follow-up) Add license information and fix sort order

Add license information and links. Put in alphabetical order.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35584: Add missing licenses to about page
Owen Leonard [Wed, 20 Dec 2023 13:04:02 +0000 (13:04 +0000)]
Bug 35584: Add missing licenses to about page

This patch adds license information to the about page which was missing
for several JavaScript libraries. The patch also makes a minor change to
CSS to improve alignment of content in the licenses tab.

One library, vis-timeline-graph2d.min.js, lacked the correct version
information in the source. This information has been added.

To test, apply the patch and rebuild the staff interface CSS.

- Go to the about page and open the "Licenses" tab.
- Confirm that the information looks correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35293: Unit test
Nick Clemens [Wed, 3 Jan 2024 19:46:15 +0000 (19:46 +0000)]
Bug 35293: Unit test

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>
9 months agoBug 35293: (follow-up) Handle all rules as well
Nick Clemens [Thu, 4 Jan 2024 19:03:11 +0000 (19:03 +0000)]
Bug 35293: (follow-up) Handle all rules as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35293: Re-implement bug 30407 functionality
Alex Buckley [Sun, 12 Nov 2023 21:26:42 +0000 (21:26 +0000)]
Bug 35293: Re-implement bug 30407 functionality

To test:
1. Set a book items notforloan status as -1 and set the AllowNotForLoanOverride system preference to 'Allow'
2. Add the following lines to UpdateNotForLoanStatusOnCheckin (the
formatting and indentation is important to keep):

BK:
 -1: ONLYMESSAGE

3. Check a book item out for patron.
4. Check book item in.
=> Description of notforloan status should be displayed under 'Check in message'.
=> Confirm notforloan status HAS changed.

5. Apply patch and update database if needed
6. Set book items notforloan status as -1 (or create new one)
7. Check book item out for patron.
8. Check book item in.
=> Description of notforloan status should be displayed under 'Check in
message'.
=> Confirm notforloan status HAS NOT changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35293: Add ONLYMESSAGE back into UpdateNotForLoanStatusOnCheckin syspref description
Alex Buckley [Sun, 12 Nov 2023 21:23:32 +0000 (21:23 +0000)]
Bug 35293: Add ONLYMESSAGE back into UpdateNotForLoanStatusOnCheckin syspref description

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35598: Fix selenium/authentication_2fa.t random failure
Jonathan Druart [Tue, 19 Dec 2023 09:28:30 +0000 (10:28 +0100)]
Bug 35598: Fix selenium/authentication_2fa.t random failure

Jenkins is failing with
koha_1       | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
koha_1       |  /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
koha_1       |  (eval 582):1 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 584):2 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 556):17 in Selenium::Remote::Driver::_execute_command
koha_1       |  /usr/share/perl5/Selenium/Remote/WebElement.pm:125 in Selenium::Remote::WebElement::_execute_command
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:276 in Selenium::Remote::WebElement::send_keys
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
koha_1       |  /usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:294 in Test::More::subtest
koha_1       |
selenium_1   | 1702911648831 Marionette INFO Stopped listening on port 41385
selenium_1   | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
selenium_1   | 15:00:49.452 INFO [ActiveSessions$1.onStop] - Removing session c3461b22-7a80-4b56-b177-653a53cc2651 (org.openqa.selenium.firefox.GeckoDriverService)
koha_1       |     # Looks like you planned 7 tests but ran 3.
koha_1       |
koha_1       | #   Failed test 'Enforce 2FA setup on first login'
koha_1       | #   at t/db_dependent/selenium/authentication_2fa.t line 294.
koha_1       | Error while executing command: element not interactable: Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

The error is: "Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard"

A guess is that the input is either 1. outside of the viewport, or 2. not
displayed yet.

1. We are hidding #registration-form then show it when we retrieved the
   info (after POST /api/v1/auth/two-factor/registration)
2. Couldn't there be a race condition?
In auth.tt
284                     success: function (data) {
292                         $("#registration-form").show();
And in the selenium test:
$s->wait_for_ajax; # There is an ajax request to populate the qr_code and the secret
Not sure this wait_for_ajax is waiting for the end of success, I don't
think so.

This patch is supposed to fix both theories.

Test plan:
0. Do not apply the patch
1. Edit auth.tt and sleep 1 second before showing the form:
290                         const sleep = ms => new Promise(r => setTimeout(r, ms));
291                         await sleep(1000);
292                         $("#registration-form").show();

You will also need to replace the following line (284):
  success: function (data) {
with
  success: async function (data) {

2. prove t/db_dependent/selenium/authentication_2fa.t
=> "is not reachable by keyboard" error!

3. Apply the patch, keep the sleep

4. prove t/db_dependent/selenium/authentication_2fa.t
=> Tests are passing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied a bit to clear complaints
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35070: Fix get_enabled_plugins when database is not created yet
Julian Maurice [Fri, 5 Jan 2024 08:04:33 +0000 (09:04 +0100)]
Bug 35070: Fix get_enabled_plugins when database is not created yet

Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call
which is called by C4::Templates->new, which is used in the web
installer when the database is not created yet

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35587: (QA follow-up): QA script tidy
Pedro Amorim [Tue, 2 Jan 2024 11:15:39 +0000 (11:15 +0000)]
Bug 35587: (QA follow-up): QA script tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems...
Aleisha Amohia [Wed, 20 Dec 2023 02:37:48 +0000 (02:37 +0000)]
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled

This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained.

To test:

1. Go to Koha Administration -> Global system preferences
2. Set the BlockReturnOfLostItems system preference to Block
3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster)
4. Take note of your logged in library
5. Search for an item where the home library is NOT the same as your logged in library
6. Edit this item and give it a lost status
7. Check in the item
8. Notice the item is returned and a transfer is automatically triggered
9. If you go to the item record page, the lost status has been remove

10. Apply the patch and restart services

11. Edit the item again and give it a lost status. This will also cancel the transfer
12. Check in the item
13. Confirm the transfer is NOT triggered and the lost status is retained as expected.
14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block")
15. Check in the item
16. Confirm the transfer is triggered and lost status is removed

17. Confirm tests pass

prove t/db_dependent/Circulation/Returns.t
prove t/db_dependent/Circulation/Branch.t

Sponsored-by: Pymble Ladies' College
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35696: Fix regression caused by bug 33167
Martin Renvoize [Thu, 4 Jan 2024 16:25:35 +0000 (16:25 +0000)]
Bug 35696: Fix regression caused by bug 33167

A case was missed when switching from item.transfer.field to just
transfer.field.

This meant that the daterequested date wasn't getting filled properly in
the UI.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35629: Remove redundant code
Pedro Amorim [Thu, 21 Dec 2023 16:12:22 +0000 (16:12 +0000)]
Bug 35629: Remove redundant code

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 34900: (follow-up) Add version information to more entries
Owen Leonard [Tue, 19 Dec 2023 19:07:41 +0000 (19:07 +0000)]
Bug 34900: (follow-up) Add version information to more entries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 34900: (follow-up) List alphabetically and tidy ups
David Nind [Sun, 3 Dec 2023 19:18:42 +0000 (19:18 +0000)]
Bug 34900: (follow-up) List alphabetically and tidy ups

Listed in alphabetical order (except for Koha, which is listed
at the start).

Tidy ups and consistency changes:
- end of each entry: remove full stops
- separator between software and license: use a colon
- headings for software/library name: use sentence case
  unless a noun, abbreviation, or the actual software name
- http and https: use https where site uses it
- URLs: update where required
- license names: use consistent full names with title case

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>
9 months agoBug 34900: (follow-up) Correct last entry
Owen Leonard [Fri, 1 Dec 2023 13:05:58 +0000 (13:05 +0000)]
Bug 34900: (follow-up) Correct last entry

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>
9 months agoBug 34900: Simplify text of about page license information
Owen Leonard [Thu, 26 Oct 2023 10:35:12 +0000 (10:35 +0000)]
Bug 34900: Simplify text of about page license information

This patch simplifies the language describing third-party libraries and
their licenses so that translation are not so complicated.

The patch also removes information about some assets which are no longer
part of Koha.

The license information now lists only the library name, version (if
possible) and license.

To test, apply the patch and go to the about page in the staff
interface. Open the "Licenses" tab and check the content.

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>
9 months agoBug 35477: Show a warning when non-existent items are added to the waiting list
Jonathan Druart [Tue, 5 Dec 2023 13:19:37 +0000 (14:19 +0100)]
Bug 35477: Show a warning when non-existent items are added to the waiting list

Only messages "X new items added" or "No items added" were displayed.
With this patch we will display:
A warning with "No items added"
A warning with "X new items added. Y items not found." when some items
have not been added
A messages "X new items added" when everything went well

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35070: (QA follow-up) Fix missing TT filter
Katrin Fischer [Thu, 4 Jan 2024 15:35:46 +0000 (15:35 +0000)]
Bug 35070: (QA follow-up) Fix missing TT filter

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35070: Add test verifying plugins cannot override core templates
Julian Maurice [Mon, 18 Dec 2023 07:36:12 +0000 (08:36 +0100)]
Bug 35070: Add test verifying plugins cannot override core templates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35070: Tidy
Tomas Cohen Arazi [Fri, 15 Dec 2023 19:58:00 +0000 (16:58 -0300)]
Bug 35070: Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35070: Add plugin hook template_include_paths
Julian Maurice [Wed, 18 Oct 2023 14:24:52 +0000 (16:24 +0200)]
Bug 35070: Add plugin hook template_include_paths

It allows to add paths to Template::Toolkit's INCLUDE_PATH option

http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Test plan:
1. Install the modified kitchen sink plugin:

    git clone --branch template-include-paths \
    https://github.com/jajm/dev-koha-plugin-kitchen-sink.git

2. Run misc/devel/install_plugins.pl
3. Restart memcached and koha
4. Go to Administration -> Manage Plugins
5. Run the KitchenSink plugin's tool
6. Click on "Schedule greeting"
7. Go to Administration -> Manage jobs
8. If you don't see any jobs, uncheck "Current jobs only"
9. You should see a job of type "Unknown job type
   'plugin_kitchensink_greeter". Click on the "View" button
10. Under the Report section you should see "This is the report block"
11. Under the Detailed messages section you should see "This is the
    detail block"
12. Open the browser console, you should see a message "This is the js
    block"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35698: (bug 32162 follow-up) fix bug number in db rev
Jonathan Druart [Thu, 4 Jan 2024 08:54:00 +0000 (09:54 +0100)]
Bug 35698: (bug 32162 follow-up) fix bug number in db rev

Should be 32162, not 31162.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
9 months agoBug 35658: Fix misaligned collectionFormat in patron_holds.yaml
Tomas Cohen Arazi [Thu, 28 Dec 2023 13:16:33 +0000 (10:16 -0300)]
Bug 35658: Fix misaligned collectionFormat in patron_holds.yaml

This patch fixes a silly typo.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35618: Remove deprecated parameter "type" from showelastic.pl page
Michał Kula [Wed, 20 Dec 2023 15:00:00 +0000 (16:00 +0100)]
Bug 35618: Remove deprecated parameter "type" from showelastic.pl page

This is a follow-up to Bug 33353. Types are gone in ES8 and deprecated
in ES7. Support for ES6 is already dropped in Koha master.

The parameter has to be removed, otherwise an exception is thrown with
ES8 (which is listed as officially supported by Koha now).

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>
10 months agoBug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Julian Maurice [Fri, 22 Dec 2023 13:18:12 +0000 (14:18 +0100)]
Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35588: Scope authorised value desc lookup according to field/subfield
David Cook [Mon, 18 Dec 2023 00:35:53 +0000 (00:35 +0000)]
Bug 35588: Scope authorised value desc lookup according to field/subfield

This patch ensures that the authorised value descriptions looked up
are for the correct field/subfield designated in the CSV profile.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following
for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|
111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|
505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995

3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;

5. Go to that list in the staff interface
6. Download that list using your CSV profile

7. Apply the patch
8. koha-plack --reload kohadev

9. Download that list using your CSV profile
10. Note that the output is a little slower, but still quick enough.
11. Note that the output is a bit different. For records like "Gairm",
the output will end in "1" instead of "Yes". This is correct, because
this subfield isn't an authorised value!!!

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>
10 months agoBug 35579: Add unit test
David Cook [Mon, 18 Dec 2023 00:11:32 +0000 (00:11 +0000)]
Bug 35579: Add unit test

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>
10 months agoBug 35579: Cache authorised value lookup by MARC field
David Cook [Fri, 15 Dec 2023 06:02:17 +0000 (06:02 +0000)]
Bug 35579: Cache authorised value lookup by MARC field

This patch adds a "get_descriptions_by_marc_field" method
which caches AuthorisedValue descriptions when searched by
MARC field, which is used when exporting MARC to CSV.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995|952|952$c
3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;
5. Go to that list in the staff interface
6. Download that list using your CSV profile
7. Apply the patch
8. koha-plack --reload kohadev
9. Download that list using your CSV profile
10. Note that the output is the same, but that the output completes much more quickly after applying the patch

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>
10 months agoBug 31694: Add missing TT filters
Julian Maurice [Thu, 21 Dec 2023 14:22:42 +0000 (15:22 +0100)]
Bug 31694: Add missing TT filters

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31694: (follow-up) Use values for operations to avoid translation issues
Kevin Carnes [Thu, 13 Apr 2023 13:20:02 +0000 (15:20 +0200)]
Bug 31694: (follow-up) Use values for operations to avoid translation issues

    To test:
    * Try adding a preset rule that has an operation with different translations
      for the column and the pull down (e.g. Outrepasser for fr-CA)
    * Without the patch it appears as Custom (e.g. Personnalisé)
    * With the patch it appears correctly (e.g. Outrepasser)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31694: (follow-up) Fix preset display issue
Shi Yao Wang [Fri, 2 Dec 2022 21:06:35 +0000 (16:06 -0500)]
Bug 31694: (follow-up) Fix preset display issue

Preset column should now display the right preset.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31694: (follow-up) Further improve translatability
Katrin Fischer [Mon, 24 Oct 2022 22:40:28 +0000 (22:40 +0000)]
Bug 31694: (follow-up) Further improve translatability

To test:
* Add rules fo different modules and with different settings
* Verify the saved module description for a saved rule matches the pull down
* Verify the saved filter matches the pull downs (especially for source and patron category)

Also:
* Renames 'User category' to 'Patron category'
* Remove some values from translations, that shouldn't be translated, like value attributs for options.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31694: MARC overlay rules presets don't change anything if presets are translated
Caroline Cyr La Rose [Wed, 5 Oct 2022 19:48:46 +0000 (15:48 -0400)]
Bug 31694: MARC overlay rules presets don't change anything if presets are translated

This patch corrects option value names in MARC overlay rules to prevent
them from being translated.

To test:
1. Install a new language
1.1. In a terminal, run the following commands
gulp po:update
cd misc/translator
./translate install xx-XX
1.2. Go to Administration > Global system preferences
1.3. Search for language
1.4. In the language syspref check the box for the language you just installed
1.5. Save
2. In the staff interface in English, go to Administration > Record
overlay rules
3. In the column 'Preset' try the various options, note that the
'Added', 'Appended', 'Removed', and 'Deleted' settings change depending
on the chosen preset
4. Change the interface language
5. Redo step 3, notice that if the preset name is translated, the other
settings don't change
6. Apply patch
7. Redo step 3, the presets should now change the settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 28012: (QA follow-up) Use form validation for numbering patterns
Katrin Fischer [Wed, 27 Dec 2023 17:52:55 +0000 (17:52 +0000)]
Bug 28012: (QA follow-up) Use form validation for numbering patterns

Activates standard validation and error messages. Converts from
pattern check to digits class for "display order" field.

To test:
* Compare error message when leaving required fields empty
* Compare error message when entering wrong/false data in display order

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 28012: (QA follow-up) Add numeric imput mode to display order field
Nick Clemens [Fri, 22 Dec 2023 15:24:04 +0000 (15:24 +0000)]
Bug 28012: (QA follow-up) Add numeric imput mode to display order field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 28012: Creating numbering pattern: mark mandatory fields required
Joonas Kylmälä [Sat, 3 Sep 2022 11:08:50 +0000 (14:08 +0300)]
Bug 28012: Creating numbering pattern: mark mandatory fields required

If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

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>
10 months agoBug 28012: Use definedness test instead of bool when checking whether to null fields
Joonas Kylmälä [Sat, 3 Sep 2022 10:37:31 +0000 (13:37 +0300)]
Bug 28012: Use definedness test instead of bool when checking whether to null fields

Saving a new numbering pattern didn't work without having to fill all
the fields, even those that are not mandatory.

To test:
 1) Go to /cgi-bin/koha/serials/subscription-numberpatterns.pl
    and try creating a new pattern, notice that only Name and
    Description are mandatory after applying this patch
 2) Make sure editing existing numbering patterns still works

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>
10 months agoBug 31297: DBIC schema
Katrin Fischer [Wed, 27 Dec 2023 17:06:13 +0000 (17:06 +0000)]
Bug 31297: DBIC schema

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31297: DBRev 23.12.00.002
Katrin Fischer [Wed, 27 Dec 2023 17:00:04 +0000 (17:00 +0000)]
Bug 31297: DBRev 23.12.00.002

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 31297: Allow null value for description in subscription_numberpatterns
Nick Clemens [Fri, 22 Dec 2023 14:52:04 +0000 (14:52 +0000)]
Bug 31297: Allow null value for description in subscription_numberpatterns

To test:
1 - Go to Serials
2 - Add a enw subscription
3 - Select Vendor and record, click next
4 - Select Numbring pattern: Number, or any to populate forms
4 - Click 'show advanced pattern'
5 - 'Modify pattern'
6 - Add a new name
7 - 'Save as new pattern'
8 - Nothin happens
9 - Check logs:
    C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /kohadevbox/koha/serials/create-numberpattern.pl line 58
10 - Apply patch
11 - Update database
12 - Restart all
13 - Click save again
14 - Success!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removed wrong 'out' from atomic update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35557: Remove references to unused PREF_LocalCoverImages
Julian Maurice [Fri, 22 Dec 2023 09:29:59 +0000 (10:29 +0100)]
Bug 35557: Remove references to unused PREF_LocalCoverImages

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35557: Remove LoadResultsCovers
Jonathan Druart [Wed, 13 Dec 2023 09:32:12 +0000 (10:32 +0100)]
Bug 35557: Remove LoadResultsCovers

The JS function LoadResultsCovers is not used from the Staff interface.

It is supposed to load the local cover images in JS but actually we are embedding the thumbnail in the img tag.

Test plan:
Confirm that LoadResultsCovers was called but had no effect.
Note that the selector ^local-thumbnail only exists in shelfbrowser.inc

but results.js is only used from results.tt (not shelfbrowser.inc)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35547: Show public "staff only" lists in addbybiblionumber.pl
Kyle M Hall [Tue, 12 Dec 2023 15:27:07 +0000 (10:27 -0500)]
Bug 35547: Show public "staff only" lists in addbybiblionumber.pl

When adding an item to a list from catalogue/detail.pl, we can see the
latest 10  public lists. If all those lists are set as "staff only" for
"Allow changes to contents from" they will not show up in the
addbybiblionumber.pl popup. This is because the query in the popup does
not look for "staff only" lists while the "Add to list" button does.

Test plan:
1) Create 11 "staff only" lists as staff member A
2) Log in as staff member B
3) Find a record, click the "Add to list" button, note you can see lists
   2 through 11 here
4) In the pulldown, choose the "More lists" option
5) Note those lists are not visible in the "Choose list" pulldown under
   "Select an existing list"
6) Apply this patch
7) Restart all the things!
8) Click the "More lists" option again
9) Those lists should now be in the pulldown!

Signed-off-by: sabrina <kiehl@mpis.mpg.de>
Signed-off-by: Mikko Liimatainen <mikko.liimatainen@turku.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
10 months agoBug 35619: Fix validation error alignment in change password form
Owen Leonard [Wed, 20 Dec 2023 16:50:40 +0000 (16:50 +0000)]
Bug 35619: Fix validation error alignment in change password form

Bug 31829 made a change to the change password form in the staff
interface to accommodate a gap in the CSS following the staff interface
redesign. This gap has been fixed, so we don't need a double class on
the fieldset.

With this change, the "hint" div can also be put back into place.

To test, apply the patch and locate a patron record in the staff
interface.

 - Click the "Change password" button on the patron detail page.
 - Confirm that the form layout looks correct.
 - Enter mismatched passwords in the "New password" and "Confirm new
   password" fields and click "Save"
   - The validation error message should be aligned to the right of the
     input field.

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>