koha.git
13 months agoBug 33297: (follow-up) DBRev for existing databases
Fridolin Somers [Wed, 22 Mar 2023 08:30:21 +0000 (22:30 -1000)]
Bug 33297: (follow-up) DBRev for existing databases

Test plan :
1.1) Start from a Koha 22.05
1.2) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'RetainPatronSearchTerms' renamed 'RetainPatronsSearchTerms'
2.1) Start from a Koha 22.05
2.2) Upgrade to 22.11
2.3) Via interface change system preference 'RetainPatronsSearchTerms' and save
2.4) Upgrade to master
=> Check the upgrade says :
   Wrong system preference 'RetainPatronSearchTerms' deleted

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 72d88cab9e4538addd0d7e82b78b17fd2815578c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33297: Fix typo system preference RetainPatronSearchTerms in DB revs 220600044.pl
Fridolin Somers [Wed, 22 Mar 2023 08:04:09 +0000 (22:04 -1000)]
Bug 33297: Fix typo system preference RetainPatronSearchTerms in DB revs 220600044.pl

Bug 26247 added system preference RetainPatronsSearchTerms.
There is a typo in DB revs 220600044.pl : RetainPatronSearchTerms instead of RetainPatronsSearchTerms.

Test plan :
Upgrade from 22.05 to 22.11 and check there is a system preference named 'RetainPatronsSearchTerms'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c5bf76b19eb0e0264c13f08dc7abe14f02feb41c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories...
Jonathan Druart [Tue, 16 May 2023 10:52:22 +0000 (12:52 +0200)]
Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 09c0c2c87669854bdf0735d1e1b73d220d6ecb87)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33719: Silence warnings on ContentWarningField in Search.t
Marcel de Rooy [Thu, 11 May 2023 09:19:41 +0000 (09:19 +0000)]
Bug 33719: Silence warnings on ContentWarningField in Search.t

Test plan:
Run t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f1b75d49bbd1d2820844c2ddbdae16f478e34766)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33707: News vs Quote of the day styling on staff interface main page
Owen Leonard [Wed, 10 May 2023 11:54:33 +0000 (11:54 +0000)]
Bug 33707: News vs Quote of the day styling on staff interface main page

This patch makes minor adjustments to the global and staff home page CSS
so that the display of news and quote-of-the-day are more consistent.

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

- If necessary, add at least one news item (Tools -> News -> New entry)
  and at least one quote (Tools -> Quote editor -> New quote).
- View the staff interface home page to confirm that the style of the
  news area and the quotes is consistent.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b28d329d8a403f120757c06818906b3940098b99)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33718: Fix the mock of Koha::Config->get in mock_config
Marcel de Rooy [Thu, 11 May 2023 12:52:23 +0000 (12:52 +0000)]
Bug 33718: Fix the mock of Koha::Config->get in mock_config

It should not mock calls for other sections than 'config' in
koha-conf.xml.

Test plan:
Without this patch:
[1] Enable AutoLinkBiblios, CatalogModuleRelink and LinkerRelink.
This will trigger a SearchAuthorities call when creating a sample biblio.
Note: SearchAuthorities calls Zconn and gets back information from
a wrong part of koha-conf.xml.
[2] Run t/db_dependent/Koha/Pseudonymization.t
You should see something like:
  {UNKNOWN}: Can't use string ("authorities") as a HASH ref while "strict refs" in use at /usr/share/koha/C4/Context.pm line 587. at /usr/share/koha/C4/Biblio.pm line 302

With this patch:
[3] Run t/db_dependent/Koha/Pseudonymization.t. Should pass now.
[4] git grep -l mock_config | xargs -i{} prove {}
    Exclude Mocks.pm.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 50d3c3c0a8328d6cd5529bcaa1444ab93ab1fb7e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33595: (bug 26628 follow-up) Fix authorization for tools-home.pl
Jonathan Druart [Thu, 11 May 2023 10:05:04 +0000 (12:05 +0200)]
Bug 33595: (bug 26628 follow-up) Fix authorization for tools-home.pl

If you log into the OPAC as a user with no flags, you can see a restricted view of
/cgi-bin/koha/tools/tools-home.pl instead of seeing the login screen.

Test plan:
Use a patron with catalogue permission only
Login and access the tools home page
=> redirected to the login screen

Add a club sub permission
Login and access the tools home page
=> You see the tools home page with the clubs link

Add a tool sub permission, remove club
Login and access the tools home page
=> You see the tools home page with the relevant link

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 45d99e7a0b5769dcfb763884cf2bbc3302dcf111)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable
Jonathan Druart [Wed, 10 May 2023 04:32:55 +0000 (06:32 +0200)]
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable

The 'configure' button is displayed for any tables, even those that
cannot be configured.

This is a regression caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component

It's adding a default value for table_settings, but then later we are
testing if table_settings is true:
699     let table_settings = params.table_settings || {};
...
798     if ( table_settings && CAN_user_parameters_manage_column_config ) {

This patch is reverting the default value, so the test will be
corrected.

Test plan:
1. Go to Tools > Quote editor
2. Click "Configure"
=> Without this patch you are brought to the column settings page, but the quote editor table is not there
=> With this patch the button is not present
3. Go to the cities page (admin/cities.pl)
4. Click "Configure"
=> You are brought to the column settings page

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 8eeaa1f714b211d6769b80b2b3096cd417271de4)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32648: Clear cache in Filter_MARC_ViewPolicy.t
Jonathan Druart [Mon, 15 May 2023 15:16:20 +0000 (17:16 +0200)]
Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t

Search.t is failing if run after Filter_MARC_ViewPolicy.t because of a
missing flush

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 434a73b0e6f57b06370e56ccdc7999a6d7d951db)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 21330: DBRev 22.11.06.002
Tomas Cohen Arazi [Mon, 15 May 2023 21:11:08 +0000 (18:11 -0300)]
Bug 21330: DBRev 22.11.06.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88989f44a37d54479ea990a3d957370fd903cb4c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 21330: (QA follow-up) Add 'empty' option to system preference description
Katrin Fischer [Sun, 9 Apr 2023 13:09:07 +0000 (13:09 +0000)]
Bug 21330: (QA follow-up) Add 'empty' option to system preference description

This adds another list item to match the preference description
for the results page:

* Empty. No XSLT will be applied (default)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bdc848039bb0da0f4a4f11a623fcfba4a0cb2338)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 21330: (follow-up) Fix new preference text and place
Fridolin Somers [Wed, 29 Mar 2023 07:56:51 +0000 (21:56 -1000)]
Bug 21330: (follow-up) Fix new preference text and place

Atomic updated fixed : intranet => OPAC
Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay

New preference moved to opac.pref

Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edd6d7d066167d632573d177285f659711113a9c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 21330: (follow-up) Update system preference description
David Nind [Sun, 11 Sep 2022 18:16:25 +0000 (18:16 +0000)]
Bug 21330: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3ea17782cb5ec1ed6f341f4db10dfdfffc58735)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 21330: Allow XSLT for authority detail view in OPAC
jeremy breuillard [Mon, 7 Feb 2022 11:00:00 +0000 (12:00 +0100)]
Bug 21330: Allow XSLT for authority detail view in OPAC

This patch adds a syspref that allow to customize the authority detail
view in OPAC with XSLT.

Test plan:
1. Make sure to have at least one or more authorities
2. OPAC: Home > Authority search(Submit) > Authority search results
3. Click details on a result and notice the view
4. Apply patch
5. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacDetailsDisplay"
6. Write the path where your file is. You can try with the XSLT for
   biblio for instance:
   .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl
7. Save changes
8. Repeat 2-3 and notice the display

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 287b55f33b71db640e1feb4a8769ce62e736ed3d)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32775: (QA follow-up) remove useless empty line
Fridolin Somers [Sat, 18 Mar 2023 02:58:49 +0000 (16:58 -1000)]
Bug 32775: (QA follow-up) remove useless empty line

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2928c1cf634c97041ea3b1268dcc27a550feb2ca)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32775: (QA follow-up) Fix tab and indenting issues
Martin Renvoize [Thu, 2 Feb 2023 12:44:44 +0000 (12:44 +0000)]
Bug 32775: (QA follow-up) Fix tab and indenting issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27dc268af3853a9c4ea646d3f67625d248cb318f)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32775: Correctly display language order in sysprefs when you have multiple langua...
Alex Buckley [Wed, 1 Feb 2023 01:51:34 +0000 (14:51 +1300)]
Bug 32775: Correctly display language order in sysprefs when you have multiple languages in a group

Test plan:
1. Apply first patch
2. Install en-NZ and another language - e.g. mi-NZ - so you have three
languages showing in your sysprefs en-NZ (selected), en (unselected) and
mi-NZ (selected)
3. Tick en-NZ and mi-NZ in language and OPACLanguages sysprefs. Order
en-NZ above mi-NZ and save
4. Refresh the syspref page and confirm mi-NZ is displaying above en-NZ,
even though you ordered en-NZ first
5. Refresh the syspref page multiple times and observe the order of the
languages changes
6. Apply this (second) patch
7. Restart plack
8. Refresh syspref page several times confirming that en-NZ is always
ordered first - as expected.

Sponsored-by: Kinder library, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 36462c0c08637ad2c19652f8945cae804d13885a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32775: Do not order language directories based on when they were created
Alex Buckley [Wed, 1 Feb 2023 01:41:22 +0000 (14:41 +1300)]
Bug 32775: Do not order language directories based on when they were created

Sponsored-by: Kinder library, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 565e150d1c272d0987878ae4de49eb6580d97c80)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 32775: (follow-up) Unit tests
Alex Buckley [Mon, 13 Feb 2023 01:39:51 +0000 (01:39 +0000)]
Bug 32775: (follow-up) Unit tests

Test plan:
1. Apply this patch and restart services
2. Run t/db_dependent/Languages.t
3. Notice tests 16 and 17 sometimes fail
4. Apply all the other patches and restart services
5. Run t/db_dependent/Languages.t
6. Notice all tests consistently pass

Sponsored-by: Kinder library, New Zealand
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 283cb0fd13a2a63470e5575d8bf62a089f79f289)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33463: Remove sort for 'Actions' on the plugins table
Jonathan Druart [Thu, 11 May 2023 10:27:31 +0000 (12:27 +0200)]
Bug 33463: Remove sort for 'Actions' on the plugins table

Test plan:
Go go the plugin admin page
upload a plugin
Notice that the "Actions" column is not longuer sortable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9848074b3cfcfa0ce0d580c36c6cf2074b7bc042)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 30649: DBRev 22.11.06.001
Tomas Cohen Arazi [Mon, 15 May 2023 18:43:31 +0000 (15:43 -0300)]
Bug 30649: DBRev 22.11.06.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d86786401a6baaa8492ff657e3539b16278eb7d7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 30649: DBIC schema
Tomas Cohen Arazi [Mon, 15 May 2023 18:36:24 +0000 (15:36 -0300)]
Bug 30649: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b0ae1fa76cc6e97d87eab79fabff40fbeed1ede9)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 30649: Vendor EDI account passwords should be encrypted in the database
Kyle Hall [Tue, 18 Oct 2022 13:26:45 +0000 (09:26 -0400)]
Bug 30649: Vendor EDI account passwords should be encrypted in the database

We are storing edi vendor acccount passwords in clear text in the
database. Now that Koha has the Koha::Encryption module, we should
use that to encrypt passwords for all existing and new EDI accounts.

Test Plan:
1) Apply this patch
2) Create one or more EDI vendor accounts
3) Run a report to view the account passwords, note they are in clear
   text
4) Run updatedatabase.pl
5) Re-run the report, account passwords should be encrypted now
6) Edit a vendor EDI account, note you can still view and update the
   password for an account

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40b1b61cbf384a2ac101eb12119e3d28a3e45315)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
13 months agoBug 33717: Typo in search_for_data_inconsistencies.pl
Caroline Cyr La Rose [Wed, 10 May 2023 18:52:58 +0000 (14:52 -0400)]
Bug 33717: Typo in search_for_data_inconsistencies.pl

This patch corrects a typo in the output of
search_for_data_inconsistencies.pl when a bibliographic record has no
title.

The patch also replaces biblio to bibliographic record in the same
sentence for terminology consistency.

To test:
- Have a bibliographic record without a title
- Run misc/maintenance/search_for_data_inconsistencies.pl
- Read output, make sure the sentence is correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27a086b91e2a23a764ca8210b9ac2b8c4ec3457e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit ed32f9812d7ddebc862360662772505cffbb1aa8)

13 months agoRevert "Bug 33167: Cleanup staff detail page"
Matt Blenkinsop [Tue, 30 May 2023 10:06:19 +0000 (10:06 +0000)]
Revert "Bug 33167: Cleanup staff detail page"

This reverts commit ff69e5b3aa3e3f4e68172df0da71188f67b44aab.

13 months agoRevert "Bug 33167: Fix TT comment for better translatability"
Matt Blenkinsop [Tue, 30 May 2023 10:06:02 +0000 (10:06 +0000)]
Revert "Bug 33167: Fix TT comment for better translatability"

This reverts commit 78f14f02ed173b0df62a604c8a34a11e5867e7e2.

13 months agoBug 32878: (follow-up) Exclude non_priority holds
Martin Renvoize [Wed, 15 Mar 2023 15:24:32 +0000 (15:24 +0000)]
Bug 32878: (follow-up) Exclude non_priority holds

This patch filters out non_priorty holds in the on_reserve condition.

Test plan
1) Run t/db_dependant/Holds.t
2) Note it fails without this patch
3) Apply patch
4) Re-run the above test, note it now passes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 042cba5db1ee7752304e2e03c9a7b239ffe88735)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32878: (QA follow-up) Correct unit test
Nick Clemens [Thu, 16 Feb 2023 16:11:23 +0000 (16:11 +0000)]
Bug 32878: (QA follow-up) Correct unit test

After the patch we fail on renewing a not for loan item with an item
level hold.

I don't find justification for why this should be renewable, so I just
change the test expectation

This needs another QA eye

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>
(cherry picked from commit 12939c7583d4091dda639e630bb9080d008af2f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32878: Make it impossible to renew the item if it has active item level hold
Petro Vashchuk [Fri, 3 Feb 2023 14:22:30 +0000 (16:22 +0200)]
Bug 32878: Make it impossible to renew the item if it has active item level hold

introduced in:
73c3c5d2f10751c23156372300239d42e5957c66
Bug 31112: (QA follow-up) Reduce database queries

started from:
8ba1a9a5345310c54d9225049d470544b56eeb11
Bug 31112: Remove unnecessary if-clause

Currently, you can renew the item even if someone already made an item level
hold on that item. This patch changes that, making it not possible to do so.

To reproduce:
1. Checkout an item, and make another item level hold on that specific item.
2. Renew it using the "Renew" checkbox, it should get renewed without any problems.
3. Apply the patch.
4. Checkbox should be gone and replaced with "On Hold" link that leads to the hold that doesn't allow you to renew the item again.
5. "Renew all" button should not work either.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
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>
(cherry picked from commit 32c15887d89af6663d83b231af480ff36af15921)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32878: (QA follow-up) Unit test
Nick Clemens [Thu, 16 Feb 2023 15:26:07 +0000 (15:26 +0000)]
Bug 32878: (QA follow-up) Unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a11621673212b0f6861eef20aa1483b99e78392f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoUpdate release notes for 22.11.06 release v22.11.06
Martin Renvoize [Tue, 23 May 2023 08:17:35 +0000 (09:17 +0100)]
Update release notes for 22.11.06 release

Signedeoff-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoIncrement version for 22.11.06 release
Martin Renvoize [Tue, 23 May 2023 08:13:24 +0000 (09:13 +0100)]
Increment version for 22.11.06 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoFix translations for Koha 22.11.06
Martin Renvoize [Mon, 22 May 2023 16:22:15 +0000 (17:22 +0100)]
Fix translations for Koha 22.11.06

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoTranslation updates for Koha 22.11.06
Koha translators [Mon, 22 May 2023 15:23:54 +0000 (12:23 -0300)]
Translation updates for Koha 22.11.06

(cherry picked from commit 89d60edfb255d1358fd29956dead7dbcc2a557c3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33702: (QA follow-up) Do not crash on borrowernumber
Marcel de Rooy [Fri, 12 May 2023 06:56:07 +0000 (06:56 +0000)]
Bug 33702: (QA follow-up) Do not crash on borrowernumber

Resolve:
Can't call method "borrowernumber" on an undefined value at /usr/share/koha/opac/opac-illrequests.pl line 66

Test plan:
Put an unexisting illrequest_id in the URL parameter.
You should see a 404, not a crash.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33702: Prevent ILL requests to be modified by somebody else
Jonathan Druart [Wed, 10 May 2023 05:37:57 +0000 (07:37 +0200)]
Bug 33702: Prevent ILL requests to be modified by somebody else

Same as previous patch, but for 'update' and 'cancreq'.
We remove the redirect, but here we only want to focus on the security
fix.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Confirmed. Without this patch a patron can modify and cancel any ILL
request in the OPAC. With this patch the patron is redirected to the
404 page if modification or cancellation is attempted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33702: Patrons should only see their own ILLs in the OPAC
Magnus Enger [Tue, 9 May 2023 13:37:51 +0000 (15:37 +0200)]
Bug 33702: Patrons should only see their own ILLs in the OPAC

To reproduce:
- Enable the ILL module
- Install the FreeForm backend as described here:
  https://wiki.koha-community.org/wiki/ILL_backends
- Go to the ILL module and add two different ILL requests by
  clicking on "New ILL request" and entering the necessary details.
- Make sure you connect the two requests to two *different* patrons
  in the field marked "Card number, username or surname"
- Make the two titles different, and make a not of which title is
  connected to which patron
- Log in as one of the two patrons who now have an ILL request each,
  in the OPAC
- Go to the "Interlibrary loan requests" tab
- Click on "View" for the request connected to this patron. The URL
  will look like something like this:
  http://<opac>/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=2
- Now change the number at the end to correspond to the the ILL request
  connected to the *other* patron
- Verify you can see the details of an ILL request conncted to another
  patron than the patron you are logged in as

To test:
- Apply the patch
- Restart all the things if you are testing with ktd
- Reload the detail view of the ILL request that belongs to the patron
  you are not logged in as
- Verify you are redirect to the 404 page and can not see the details
  of the request that belongs to the patron you are not logged in as

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33488: DBRev 22.11.05.012
Tomas Cohen Arazi [Fri, 12 May 2023 20:48:32 +0000 (17:48 -0300)]
Bug 33488: DBRev 22.11.05.012

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17cd6180cb724631aea105557924d8c81226869c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33488: (QA follow-up) Fix index name
Tomas Cohen Arazi [Fri, 12 May 2023 20:45:16 +0000 (17:45 -0300)]
Bug 33488: (QA follow-up) Fix index name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 828a571067baa90d226a83bf46d74ea07ebe4e35)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33488: Add fromBranch index to branch_transfer_limits
Nick Clemens [Tue, 11 Apr 2023 17:46:09 +0000 (17:46 +0000)]
Bug 33488: Add fromBranch index to branch_transfer_limits

To test:
1 - Enable UseBranchTransferLimits by item type
2 - Set some limits for book
3 - Place a hold, verify that pikcup dropdown reflects the limits before and after patch

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2b33e4c56b603c610cb9473faff3ebe0b50c889)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32357: DBRev 22.11.05.011
Tomas Cohen Arazi [Fri, 12 May 2023 20:35:50 +0000 (17:35 -0300)]
Bug 32357: DBRev 22.11.05.011

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8ff7196c26d3bcc4534e071c3b1021fba383036f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32357: DBIC schema
Tomas Cohen Arazi [Fri, 12 May 2023 20:35:14 +0000 (17:35 -0300)]
Bug 32357: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec5d6fef2912bbc6f21a44a6152de1c13490ffa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32357: Set borrower_message_preferences.days_in_advance default to NULL
Lari Taskula [Mon, 28 Nov 2022 22:01:37 +0000 (22:01 +0000)]
Bug 32357: Set borrower_message_preferences.days_in_advance default to NULL

To test:
1. prove t/db_dependent/cronjobs/advance_notices_digest.t
2. prove t/db_dependent/Letters/TemplateToolkit.t
3. prove t/db_dependent/Koha/CurbsidePickups.t
4. prove t/db_dependent/Koha/Patrons.t
5. prove t/db_dependent/Patron/Messaging.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6871dc7b35f5336503c1c605022ca2d8610af64d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33489: DBRev 22.11.05.010
Tomas Cohen Arazi [Fri, 12 May 2023 20:19:55 +0000 (17:19 -0300)]
Bug 33489: DBRev 22.11.05.010

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a84d741026bfca8f88ff9789edfb3807f731ddb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33489: Add indices to default patron search fields
Nick Clemens [Tue, 11 Apr 2023 17:33:55 +0000 (17:33 +0000)]
Bug 33489: Add indices to default patron search fields

This patch adds indices to the borrowers table to match the default
search fields for patrons.

To test:
1 - Apply patch
2 - Update database
3 - Ensure patron searching works as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1faf3bcf2a59f8e6a48a2b101d78d35843bf41dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33580: Bring back ability to mark item as seen via SIP2 item information request
Kyle M Hall [Fri, 21 Apr 2023 11:09:34 +0000 (07:09 -0400)]
Bug 33580: Bring back ability to mark item as seen via SIP2 item information request

Prior to Koha 22.05, the SIP2 item information message had a side affect of updating the datelastseen field for items. This bug has been fixed, but was being utilized by inventory tools that used SIP2. We should bring back this affect and formalize it as an optional SIP2 config account setting.

Test Plan:
1) Apply this patch set
2) prove t/db_dependent/SIP/Message.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fbd4d3a9fe41738f2108ecd885fdab2123448bd2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33557: DBRev 22.11.05.009
Tomas Cohen Arazi [Wed, 10 May 2023 18:22:04 +0000 (15:22 -0300)]
Bug 33557: DBRev 22.11.05.009

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e791b3b6a634796afd89c2a378506e0c96c754ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33557: Add LinkerConsiderThesaurus system preference
Nick Clemens [Tue, 18 Apr 2023 13:13:12 +0000 (13:13 +0000)]
Bug 33557: Add LinkerConsiderThesaurus system preference

Bug 30280 added the ability to use multiple thesauri for authorities in Koha.
This is a large change, and many libraries use authorities in a ess strict manner.
This patch simply adds a preference, disabled by default, to enable this new feature

To test:
1 - Find or create a record with a 650 heading, second indicator 0 (LOC)
2 - Ensure this links to an authority in your system
3 - Disable AutoCreateAuthorities, enable CatalogModuleRelink
4 - Edit the heading to second indicator 2
5 - Save, the heading does not link
6 - Apply patch, updatedatabase, restart all
7 - Edit and save record again
8 - Heading should now link to the LOC authority, despite different second indicator value for source

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf7389d6014eb0bb9a9bfcffe875940177f26a01)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 28328: DBRev 22.11.05.008
Tomas Cohen Arazi [Wed, 10 May 2023 17:49:37 +0000 (14:49 -0300)]
Bug 28328: DBRev 22.11.05.008

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a487bb847a34b82ab3f24a19e9c036fd749cd626)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 28328: Adjust tests
Jonathan Druart [Wed, 3 May 2023 13:42:15 +0000 (15:42 +0200)]
Bug 28328: Adjust tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e933cbc1184d4eb67953bd01859f1c31275604f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 28328: DBIC schema changes
Jonathan Druart [Wed, 3 May 2023 13:41:51 +0000 (15:41 +0200)]
Bug 28328: DBIC schema changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb3505c7e8212633c0e37975f2d2ab3f17b37c3c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 28328: Extend biblioitems.lccn to longtext
Jonathan Druart [Wed, 3 May 2023 13:33:11 +0000 (15:33 +0200)]
Bug 28328: Extend biblioitems.lccn to longtext

Same sa issn and isbn, we want lccn to allow longer values.

Test plan:
Run the updatedatabase script to modify the DB structure
restart_all
Edit a bibliographic record and enter a long (more than 25 chars) lccn
Save

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a537e57909a71d99f035030c4ab095aa71bedf2b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33064: Update cypress tests
Matt Blenkinsop [Tue, 18 Apr 2023 13:18:34 +0000 (13:18 +0000)]
Bug 33064: Update cypress tests

This patch amends Searchbar_spec.ts to account for the new licenses option

Test plan:
1) Run yarn cypress open
2) Select the Searchbar_spec.ts test
3) The test should pass

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b3d848b2ea99059ac2c08f1661d338a2f20b672)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33064: Add a licenses option to the searchbar
Matt Blenkinsop [Tue, 18 Apr 2023 13:15:42 +0000 (13:15 +0000)]
Bug 33064: Add a licenses option to the searchbar

This patch adds a licenses option to the top searchbar

Test plan:
1) Apply patch
2) run yarn build
3) Navigate to the ERM module
4) Observe that the top search bar should have an option for licenses
5) Click on licenses in the left hand menu, the search bar should update to show licenses as the active search option

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b17fbf849c74a693a0fa7fb05e6cba7b248043d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33355: Add missing counter number to related users in agreements and licenses...
Pedro Amorim [Wed, 29 Mar 2023 08:33:30 +0000 (08:33 +0000)]
Bug 33355: Add missing counter number to related users in agreements and licenses to be in line with other related content

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab3ce787a1b32ec4e692c074749bd71e19cafda0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33355: Update forms markup to be in line with interface patterns
Pedro Amorim [Wed, 29 Mar 2023 08:27:51 +0000 (08:27 +0000)]
Bug 33355: Update forms markup to be in line with interface patterns

https://wiki.koha-community.org/wiki/Interface_patterns

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 715a3ec6359197a813cd62cddc190c7b989fa21d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33355: Fix is_perpetual radio buttons in AgreementsFormAdd
Pedro Amorim [Tue, 28 Mar 2023 14:23:04 +0000 (14:23 +0000)]
Bug 33355: Fix is_perpetual radio buttons in AgreementsFormAdd

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 43ff73c01dc07846e35681a9c206a238c3dde98e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Add test
Pedro Amorim [Fri, 21 Apr 2023 12:53:15 +0000 (12:53 +0000)]
Bug 33490: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80d73b87c45ddcfbb75c38a6e51506330da9ece7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Fix ambiguous query error
Pedro Amorim [Fri, 21 Apr 2023 11:48:55 +0000 (11:48 +0000)]
Bug 33490: Fix ambiguous query error

Doing actual testing with some agreements with expired periods, this was returning a 500 error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a94026741c771df0ecb1f36bdba0d24c2e43f6f9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Rollback computed
Pedro Amorim [Fri, 21 Apr 2023 11:42:05 +0000 (11:42 +0000)]
Bug 33490: Rollback computed

Use a watch instead

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e52f8625531b65a291bde2bf940da1c8b6c91bd9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Use computed values
Jonathan Druart [Fri, 14 Apr 2023 10:05:44 +0000 (12:05 +0200)]
Bug 33490: Use computed values

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3576f67d92f80400b4163bd00e795577254f1ad)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Improve max date handling
Jonathan Druart [Fri, 14 Apr 2023 09:09:33 +0000 (11:09 +0200)]
Bug 33490: Improve max date handling

It fixes:
1. /agreements?by_expired=true do no longer explode
2. Fill date with today's date when we setup the component and when we
hit "filter"

However there are a couple of things totally wrong:
1. We should not need is_fp_disabled, we could be able to use
  :disabled="!filters.by_expired"
in the template, but it does not work
2. We should not need to deal with filters.max_expiration_date the "old
JS way", but should use a Vue computed value instead. I've failed at
that

I think those 2 problems have the same root, the way we deal with
filters in data() is wrong, and we may be loosing the ref at some point.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3286c4b0b82ef976f75fb3892d609d71ac7b74d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Make url consistent
Martin Renvoize [Thu, 13 Apr 2023 17:12:13 +0000 (18:12 +0100)]
Bug 33490: Make url consistent

This ensures we populate the max_expiration_date param on the browser
url for consistency with selected dates.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9cb6b823e1e54008a79deb38bdd36c7f2105328)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Prevent 400 on agreements?by_expired=true
Jonathan Druart [Wed, 12 Apr 2023 10:20:43 +0000 (12:20 +0200)]
Bug 33490: Prevent 400 on agreements?by_expired=true

We need to update the filter THEN update the current route

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 90ed8a26c5bdf7c67cfeeb517e08f3ed1b0624a7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33490: Unit tests
Martin Renvoize [Thu, 13 Apr 2023 13:38:58 +0000 (14:38 +0100)]
Bug 33490: Unit tests

This patch adds cypress tests for the filter by expired functionality in
the ERM Agreements page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f68b350ba24acbcd94179b6f005949a2f1f908f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33623: Move ULSearchParams into http-client.js
Pedro Amorim [Fri, 28 Apr 2023 10:23:35 +0000 (10:23 +0000)]
Bug 33623: Move ULSearchParams into http-client.js

Remove unused getAll methods in erm-api-client.js
Make use of new getAll query in AgreementRelationships

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b7feb64619e9b78cfc1f4f739790d7d264e4af2f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33623: Encode URL params for getAll
Jonathan Druart [Thu, 27 Apr 2023 06:43:26 +0000 (08:43 +0200)]
Bug 33623: Encode URL params for getAll

We must encode properly URL parameters when building the REST API routes

Can be tested easily using
const client = APIClient.erm
client.licenses.getAll({ "me.name:%ff%" })

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ec95963f6079fa9ab27bec070518527953f885e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Fix template literal
Pedro Amorim [Wed, 12 Apr 2023 16:30:39 +0000 (16:30 +0000)]
Bug 33408: Fix template literal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3296cf37f462ee25c855d3f5d59dbd7fbb422121)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Move providers into syspref array
Pedro Amorim [Wed, 12 Apr 2023 09:42:29 +0000 (09:42 +0000)]
Bug 33408: Move providers into syspref array

ERMProviders is a sys pref, place it in sysprefs

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 741ccb6e44304a32acceb3e68d2fd25c27c6b37f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Add storeToRefs to ERMStore
Pedro Amorim [Wed, 12 Apr 2023 08:36:18 +0000 (08:36 +0000)]
Bug 33408: Add storeToRefs to ERMStore

It makes it so that any changes to the local property
is also reflected in the store and other components are
made aware of the new value. No need to explicitly
change both local property and store property values.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1610a1d1633e7c398096e86a98239fd9171b5ea7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Store sysprefs in a new ERM store
Jonathan Druart [Fri, 7 Apr 2023 08:40:08 +0000 (10:40 +0200)]
Bug 33408: Store sysprefs in a new ERM store

We need the sysprefs' values to be shared between the components

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a94178217b73b46a6051c7551b0711966e88e045)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: We need only one this.loaded call
Jonathan Druart [Wed, 5 Apr 2023 12:27:03 +0000 (14:27 +0200)]
Bug 33408: We need only one this.loaded call

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b01094030ac145144eab384a6bba015d1916dfe9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Remove obsolete tests and template sys pref code
Pedro Amorim [Wed, 5 Apr 2023 11:43:52 +0000 (11:43 +0000)]
Bug 33408: Remove obsolete tests and template sys pref code

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f01c16ba1cf277a709c0a79aeea0f4b99c12353)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Prevent access to erm module by URL if sys pref is disabled
Pedro Amorim [Wed, 5 Apr 2023 11:45:45 +0000 (11:45 +0000)]
Bug 33408: Prevent access to erm module by URL if sys pref is disabled

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0efb53b3a2e4c9619d3b89af53c67397bad14b0f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Extend defaultCommandTimeout for cypress
Jonathan Druart [Wed, 5 Apr 2023 08:03:21 +0000 (10:03 +0200)]
Bug 33408: Extend defaultCommandTimeout for cypress

Sometimes the initial page load takes more than 4 seconds.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c482119a4e6d12063e63b726d40c9ddcef0b787f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Mock ERM sysprefs from cypress tests
Jonathan Druart [Tue, 4 Apr 2023 15:02:12 +0000 (17:02 +0200)]
Bug 33408: Mock ERM sysprefs from cypress tests

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2579b95db9d0477060c91610e54b44d96cc8ea20)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33408: Fetch sysprefs from svc/config/systempreferences
Jonathan Druart [Tue, 4 Apr 2023 13:51:51 +0000 (15:51 +0200)]
Bug 33408: Fetch sysprefs from svc/config/systempreferences

It will be easier to mock/set them from cypress tests.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9be7dab4a1ce4cc13de012c58023a363b21fbcb9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33335: (QA follow-up) Polishing and comments
Marcel de Rooy [Fri, 12 May 2023 08:33:32 +0000 (08:33 +0000)]
Bug 33335: (QA follow-up) Polishing and comments

Just send the codes and descriptions only to client.
Adding a few comments to the reduce construction.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 020bc275b05ac74bacf52325ac2933d56e78ce32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33335: Use To.json to serialize
Jonathan Druart [Tue, 2 May 2023 14:26:45 +0000 (16:26 +0200)]
Bug 33335: Use To.json to serialize

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 706cd01ba264ded1f0b237c74f90e511acf2de81)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33335: Fix JavaScript error on the MARC overlay rules page
Marius Mandrescu [Tue, 28 Mar 2023 16:04:49 +0000 (12:04 -0400)]
Bug 33335: Fix JavaScript error on the MARC overlay rules page

The "MARC overlay rules" page doesn't display or work correctly
if a patron category code contains a "-".

This happens because of the JavaScript function in
"marc-overlay-rules.tt" line 469. This causes an error
"Uncaught SyntaxError: missing : after property id".

Test plan:
1. Go to Administration > Patron categories.
2. Make sure you don't have a patron category code that contains
   a "-".
3. Go to Administration > Record overlay rules.
4. The table should display correctly, and you can add, edit
   and delete rules.
5. Return to Patron categories.
6. Add a new patron category with a "-" in the patron category code.
7. Return to Record overlay rules page:
   => The page doesn't display and load correctly (see the attached
      image) - the normal DataTables header and footer aren't
      displayed, and you can't add, edit or delete overlay rules.
  => If you turn on web developer tools, an error is displayed in the
     console: "Uncaught SyntaxError: missing : after property id".
8. Apply the patch.
9. Repeat the step 7, the Record overlay rules page should now
   display correctly and you should be able to add, edit and
   delete rules.
10. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 351e380a1468562fe579e53d85389ccc9a53418e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32129: (QA follow-up) Avoid duplicate calculation
Tomas Cohen Arazi [Fri, 12 May 2023 18:47:02 +0000 (15:47 -0300)]
Bug 32129: (QA follow-up) Avoid duplicate calculation

This patch stores the output from ->check_recall() (a Koha::Recall
object or undef) and reuses afterwards, on a ternaty operator.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62f176d0799a3cf6422eb404646cbb17678f4c2a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32129: Use patron category when checking if item can fill recall
Aleisha Amohia [Tue, 8 Nov 2022 19:58:22 +0000 (19:58 +0000)]
Bug 32129: Use patron category when checking if item can fill recall

This patch uses the patron category of the patron who requested the most
relevant recall to check for more specific circulation rules relating to
recalls. This ensures that patrons who are allowed to place recalls are
able to fill their recalls, especially when recalls are not generally
available for all patron categories.

To test:
1) Go to Administration -> System preferences and enable UseRecalls
2) Go to Administration -> Circulation and fines rules and set a general
All/All rule and a Category A/Itemtype A rule. All values can be set
however you like except for these recalls rules:

All/All rule:
Recalls allowed: 0
Recalls per record: 0
On shelf recalls allowed: if any unavailable

Category A/Itemtype A rule:
Recalls allowed: 5
Recalls per record: 5
On shelf recalls allowed: if any unavailable

3) Find an item of Itemtype A. Check it out to Patron A (any category).
4) Log into the OPAC as Patron B (of Category A). Find the item and
place a recall on the item.
5) Back in the staff interface, check in the item. This should trigger
the recalls process so you can allocate the item to Patron B's recall,
however the pop-up box to confirm the recall does not show. This is the
bug.

6) Apply the patch and restart services

7) Check in the item again. Confirm the pop-up box to confirm the recall
shows and you are able to allocate the item to Patron B's recall.
8) Confirm tests pass t/db_dependent/Koha/Item.t

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cf8c901f55efa586a3c8b01cbbe4780c0fb028b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33710: Ignore how-to related files
Jonathan Druart [Wed, 10 May 2023 10:03:09 +0000 (12:03 +0200)]
Bug 33710: Ignore how-to related files

Related to https://gitlab.com/koha-community/koha-testing-docker/-/issues/378

If we merge it we will want to hide how-to.pl and how-to.ptt

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2da8744efa0a9306dc44c4b8c7e9aed5c6209ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 30687: Allow pickup location to be forced when override is allowed
Nick Clemens [Fri, 23 Dec 2022 15:04:26 +0000 (15:04 +0000)]
Bug 30687: Allow pickup location to be forced when override is allowed

This is Julian's patch with some extra cleanup to reduce repeated code

If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.

This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.

Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
   pickup library match" is "item's home library"
6. Try to place a hold on biblio B
   You should not be able to place a hold because there is no valid
   pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
   You should now see all valid pickup locations in a dropdown list
   (with an exclamation mark in front of each option) with none selected
   by default
9. Verify you can place a title-level hold and an item-level hold

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab93008da7eb61b697e4586c679b88c2eebaacd0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32993: Holds priority changed incorrectly with dropdown selector
Kyle M Hall [Fri, 28 Apr 2023 18:30:19 +0000 (14:30 -0400)]
Bug 32993: Holds priority changed incorrectly with dropdown selector

Test Plan:
1) Find record with at least 3 holds.
2) Change first holds priority as 2, Priority is changed to 3.
3) Try to change priority back to 1, Priority is changed to 2.
4) Apply this patch
5) Reload the page
2) Change first holds priority as 2, Priority is changed to 2.
3) Try to change priority back to 1, Priority is changed to 1.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d9e4cf41515234d8d61c369aab3c3e49be1ac3d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33320: Add spacing in Patron modification requests
Jonathan Druart [Thu, 11 May 2023 10:51:46 +0000 (12:51 +0200)]
Bug 33320: Add spacing in Patron modification requests

* Go to the OPAC, log into your account
* Make changes to your personal details and save
* Go to the staff interface and use the link on the start page to
  moderate the change request
* At the top of the list you'll see something like:

Without this patch:
  Ignore|Patron details
With this patch:
  Ignore | Patron details

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>
(cherry picked from commit 26b706f4fa3f03772206f41412827980e403c5d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33167: Fix TT comment for better translatability
Katrin Fischer [Sat, 22 Apr 2023 10:16:59 +0000 (10:16 +0000)]
Bug 33167: Fix TT comment for better translatability

We just figured out that multi-line TT comments show up
weirdly in translations and fixed it on bug 33332. So
this just follows the newly established pattern.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d94235dc419069509ba54458d92d64eae0e49d5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33167: Cleanup staff detail page
Nick Clemens [Thu, 9 Mar 2023 20:37:28 +0000 (20:37 +0000)]
Bug 33167: Cleanup staff detail page

This patch begins reduing some of the extra things we are doing in
detail.pl that could easily be handled in the templates - fetching
authorised values and branches etc

It also removes a loop to find items that should be hidden, and instead
uses a searh parameter

The template changes either use item object rather than passed
variables, or utilize plugins to fetch authorised valued

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d650f8c2a6c5ee594a1c03fcab41c34a1cbce5fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32766: (QA follow-up) Remove stray p from USE statements
Katrin Fischer [Mon, 8 May 2023 21:36:28 +0000 (21:36 +0000)]
Bug 32766: (QA follow-up) Remove stray p from USE statements

+q[% SET footerjs = 1 %]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aded9437922c2aea3c1e8abb237bccbaa0fbe8f1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32766: (follow-up) Fix translation function
Thibaud Guillot [Tue, 31 Jan 2023 14:27:09 +0000 (15:27 +0100)]
Bug 32766: (follow-up) Fix translation function

The previous syntax causes a warning during the execution of the translation script

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f46b3e8f477a0ba28be29d0ba3581298a7e29dea)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32766: Update some labels for better understanding and translation
Thibaud Guillot [Tue, 31 Jan 2023 10:44:09 +0000 (11:44 +0100)]
Bug 32766: Update some labels for better understanding and translation

examples: 'crayon'->'carchoal' or 'camaiu'->'cameo'
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1ac15616e34df96a610a58b0715f9fcf0a28d811)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32995: Pass user agent string for OverDrive fulfillment
Nick Clemens [Fri, 17 Feb 2023 13:01:02 +0000 (13:01 +0000)]
Bug 32995: Pass user agent string for OverDrive fulfillment

This patch simply adds the string Koha/VERSION to the fulfillment
request

TO test:
1 - Have OverDrive credentials for testing
2 - Enable all the overdrive options in system preferences
3 - Sign in to opac with an overdrive user and verify you can checkout
  and download titles
4 - Sign off

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not tested with OverDrive, but change looks harmless enough.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d27a3419cce0da8c90d3f57d54d6cf669001f210)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33699: Typo in identity_provider_domains.tt (presedence)
Owen Leonard [Wed, 10 May 2023 13:19:38 +0000 (13:19 +0000)]
Bug 33699: Typo in identity_provider_domains.tt (presedence)

This patch corrects the typo "presedence" with "precedence."

The patch also corrects some grammar:

"so if the 'library.com' domain will take presedence over
'*library.com'"

...changed to...

"so 'library.com' domain will take presedence over '*library.com'"

I also changed the <div>s inside that block of help text to <p> in order
to improve legibility.

To test, apply the patch and go to Administration -> Identity providers
-> Manage domains (on an existing provider) -> Edit, and click the
"More" button under the "Domain" field.

Confirm that the text is correct.

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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56f6b6b6fcf5e425d47aa13da09f3f921e0c3253)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33677: Remove verbose option from koha-worker man
Jonathan Druart [Wed, 10 May 2023 09:04:13 +0000 (11:04 +0200)]
Bug 33677: Remove verbose option from koha-worker man

Signed-off-by: Magnus Enger <magnus@libriotech.no>
No more mention of verbose.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1bd49fcab8c03ee43aba12cae8661f9488c9bf8d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33642: Fix 'No log found.' in viewlog
Jonathan Druart [Wed, 10 May 2023 08:41:30 +0000 (10:41 +0200)]
Bug 33642: Fix 'No log found.' in viewlog

It should ease translatability and remove an extra space.

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>
(cherry picked from commit 3ca450dbc97f12f895830e17562a2e118996a439)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33445: (follow-up) Allow all search fields to be passed through and returned...
Nick Clemens [Mon, 1 May 2023 18:38:30 +0000 (18:38 +0000)]
Bug 33445: (follow-up) Allow all search fields to be passed through and returned when trying another search

It seems the form didn't populate all fields form data passed in. This patch
corrects that

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9446baecf938f7ecc267cc4c216f1c411810a7bf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33445: (follow-up) Pass form values through when clicking 'Try another search'
Nick Clemens [Mon, 1 May 2023 18:31:30 +0000 (18:31 +0000)]
Bug 33445: (follow-up) Pass form values through when clicking 'Try another search'

We didn't include anything except the authid id in the try again form, this
patch extends to cover all the fields

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42b402a2bdcb5a920092c2d8e75c97cada0115d0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33445: Pass through form info if present and use record values otherwise
Nick Clemens [Fri, 28 Apr 2023 12:39:58 +0000 (12:39 +0000)]
Bug 33445: Pass through form info if present and use record values otherwise

This patch updates the form to pass through values formthe form when searching, and
to use record values if nothing is passed in.

TO test:
 1 - Without the patch, edit a personal name authority record
 2 - Replace 100 subfield a (200 subfield a for UNIMARC) with your own name
 3 - Click "Replace record via Z39.50/SRU search"
 4 - Note that prefilled search field contains the original value, not your name.
 5 - Replace the Author (personal) field with your name in the search form
 6 - choose a search target, and click Search.
 7 - Note that the results of the search are for the original value, not your name
 8 - From the details page of a record, click 'Edit -> Replace record via Z3950'
 9 - Note form is prefilled
10 - Change value as in 5 and search
11 - Note original term was searched
12 - Apply patch, restart all
13 - Repeat searches as before
14 - Confirm that form is prefilled with record or the updated value
15 - Confirm your entered search terms are always searched

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44e868f464af037410766f97f4036b26e92177a9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33655: z39.50 search no longer shows search in progress
Owen Leonard [Wed, 10 May 2023 10:42:13 +0000 (10:42 +0000)]
Bug 33655: z39.50 search no longer shows search in progress

This patch adds an id to z39.50 search interface submit buttons so that
the JavaScript event for changing the cursor can be linked to that
instead of the obsolete class.

The patch also adds code copied from Bug 33233 in order to make the
"waiting" cursor revert to the default if the user uses the back button
to return to the search form.

To test, apply the patch and go to Cataloging -> New from Z39.50

- Fill in a search term and click the submit button
- Your cursor should change to a "waiting" cursor while the search is
  performed, before you're redirected to the results.
- From the results page, clicking the back button (or right-clicking the
  page and choosing "Back") should return you to the search form and
  your cursor should be a standard pointer.

Perform the same test from:

- Acquisitions -> Vendor -> Basket -> Add to basket -> From an external
  source
- Authorities -> New from Z39.50/SRU

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d6f0723ce74996a881dfbdf58066b9a15c09bb3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32937: Make Zebra ignore the copyright symbol in searches
Katrin Fischer [Sun, 16 Apr 2023 11:57:19 +0000 (11:57 +0000)]
Bug 32937: Make Zebra ignore the copyright symbol in searches

It's common to catalog the year with the copyright symbol attached
to it. This creates some issues with search that we can fix by
adding the © to the list of characters Zebra ignores in search.

To test:
* Search for any existing publication year with ©, example: ©1951
* Verify your record is not found
* Add the copyright symbol to a record, verify it's now found with ©,
  but not without
* Apply patch
* On ktd:
  * sudo cp -i /kohadevbox/koha/etc/zebradb/etc/word-phrase-utf.chr  /etc/koha/zebradb/etc/word-phrase-utf.chr
  * sudo koha-zebra --restart kohadev
  * sudo koha-mysql kohadev
  * DELETE FROM biblio WHERE biblionumber = 369;
  * The reindex woudl fail for me with this broken record present.
  * sudo koha-rebuild-zebra -f kohadev
* Repeat searches, the records should be found when searching
  with and without ©.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c39d4ea0b26cfb2448902546115efef1cfe2ca6e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>