]> git.koha-community.org Git - koha.git/log
koha.git
15 months agoBug 32341: (follow-up) Alternate button style
Owen Leonard [Mon, 9 Jan 2023 18:53:27 +0000 (18:53 +0000)]
Bug 32341: (follow-up) Alternate button style

This patch applies a different button style and does a couple of clean
up tasks: Removing the redundant sorting-related CSS and moving the
responsive button CSS to _common.scss where other DataTable-related
styles are found.

I think this different button style is more consistent with the OPAC's
design. It also eliminates untranslatable strings from the CSS.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f277e625ee928246531189afcc511df64a703d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9ae29591862b1956da02d8d77ea1ba376c923e05)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (Fix) Changing the placement of the button
Hammat Wele [Thu, 22 Dec 2022 21:54:37 +0000 (21:54 +0000)]
Bug 32341: (Fix) Changing the placement of the button

This attachment correct the placement of the responsive button. It is now in its own column at the last column and the '+' and '-' are remplaced by 'Expand' and 'Unexpand' to make it more clear.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68c3ad5fac8241956ef46475a44db2a19759f620)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 135ac49bd465b80f6daf13ea23a6b9d80bc4f89f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: Some OPAC tables are not displayed well in mobile mode
Hammat Wele [Mon, 12 Dec 2022 22:58:28 +0000 (22:58 +0000)]
Bug 32341: Some OPAC tables are not displayed well in mobile mode

Some OPAC tables are not displayed well in mobile mode, it is absolutely necessary to scroll to the right to read the content properly

This patch fix this problem by making the tables responsive

To test:
      1- Go to the OPAC
      2- Open mobile mode
      3- Go to a bibliographic record detail page in the OPAC (opac-detail.pl?biblionumber=X)
      4- Check the Holdings table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> we see very narrow columns
            --> unreadable text
      5- Go to to the page 'Summary' (opac-user.pl)
      6- Check the 'Checked out' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      7- Check the 'Overdue' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      8- Go to the page 'Charges' (opac-account.pl)
      9- Click on 'Show all transactions'
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      10- Go to the page 'Search history' (opac-search-history.pl)
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      11- Apply the patch
      12- Execute 'yarn build --view opac'
      13- Clean your cache or open your navigator on private mode (to load updated css files)
      14- Perform previous step (1-10)
      15- Confirm that the tables are now displayed correctly and is now responsive.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb2e0c2efd52f7553cd0035e79c74e6f15a7a21d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e3de75585d9f325a4a05b5ddc3dbbad8c2dfb777)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Adjust perltidy
Jonathan Druart [Tue, 2 May 2023 12:37:01 +0000 (14:37 +0200)]
Bug 30002: Adjust perltidy

Remove the following 3 options that are not available in perltidy
v20190601 that is the version shipped with bullseye
--add-terminal-newline
--valign-exclusion-list
--extended-continuation-indentation

Extend max line length
--maximum-line-length=120

Prevent perltidy to format lists (see bug 30002 comment 10)
--break-at-old-comma-breakpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d46a959a696eb88bc99279ee38838d4bf6291b47)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 761051893eb0f0ad6fca5822503e5ef874f15958)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Remove unused xt/perltidyrc
Julian Maurice [Fri, 31 Mar 2023 10:26:20 +0000 (12:26 +0200)]
Bug 30002: Remove unused xt/perltidyrc

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aae185cf5d533761b7aa7f280dacdd186d261691)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b895e63fb3dd952b38dfb04fc5c7ae6c5c47b466)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Add .perltidyrc
Julian Maurice [Fri, 31 Mar 2023 10:25:24 +0000 (12:25 +0200)]
Bug 30002: Add .perltidyrc

The options set in this file try to match the current code style without
deviating too much from perltidy's defaults.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfe6767f60c5231fe244d66b067265631ed5a384)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 808fced6f6e802843b2c372215c5da5439d797e2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl
Jonathan Druart [Thu, 8 Jun 2023 08:14:33 +0000 (10:14 +0200)]
Bug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl

We are retrieving normalized_upc from the MARC XML in the controller (opac-readingrec.pl)
for all issues to display, but this is only used if BakerTaylor or Syndetics are enabled.

Test plan:
Have some checkouts and confirm that the checkout history is displayed
the same before and after this patch.
You should also test BakerTaylor or Syndetics and see if they are
working correctly, but I have no idea how to test them!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c4e016f4dfdcce272524dfff5abffe01a276d25e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0db7678c7bcc8ac5ee494f3cde939180d7215000)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33900: Fix handling of due_digest
Pedro Amorim [Mon, 5 Jun 2023 15:38:58 +0000 (15:38 +0000)]
Bug 33900: Fix handling of due_digest

Test plan, on k-t-d
1) Go to 'my account'
2) On 'Patron messaging preferences', click 'Edit'
3) On the 'Item due' row, check the 'Email' and 'Digests only' checkboxes and save
4) On the top search bar, press 'Check out' and enter '42' (koha user cardnumber)
5) On the checkout input bar, enter a barcode e.g. 39999000001372 and press checkout
6) Run the following query to force the due_date to be equal to 'todays' date:
NOTE: change the YYYY-MM-DD below to whatever day it is you're running this test plan

UPDATE issues SET date_due = '2023-06-05 23:59:00' where issue_id = 1;

7) Run the cronjob:
./koha/misc/cronjobs/advance_notices.pl -c --digest-per-branch

8) Notice it hangs, it's stuck on an infinite loop on the 2nd while cycle after if ()
9) Cancel the cronjob script, apply patch
10) Run the cronjob script again (step 7), notice it finishes
11) Access patron's notices:
/cgi-bin/koha/members/notices.pl?borrowernumber=51

Check that the 'Item due reminder' notice is there.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fac7bb247a5a8430152f97727f2cbdd8b4b54e19)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7bb9bad4ef5ed493908e0e6a9da9a9ac5f733035)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33941: Fix wrong URL name in EBSCOPackagesList
Matt Blenkinsop [Wed, 7 Jun 2023 16:07:02 +0000 (16:07 +0000)]
Bug 33941: Fix wrong URL name in EBSCOPackagesList

This patch fixes a URL pointing to the wrong route which stops filtering from working in the table.

Note: To test you will need some EBSCO credentials

Test plan:
1) In ERM, go to EBSCO > Packages and search for a package
2) It should fail with a warning in the console saying that a required param "package_id" is missing
3) Apply patch
4) Repeat step 1
5) It should now successfully fetch packages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab5dc834009b846e3850ca8eb34c3fdb43f855a1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b8f272404e0c245ce691918405b6c7bd9642f50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (QA follow-up) Fix tests
Nick Clemens [Tue, 9 May 2023 11:49:48 +0000 (11:49 +0000)]
Bug 32894: (QA follow-up) Fix tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4d613494abef955c41479b2e0269481e73b99176)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bf5ccb47fd54065ed5039cb4ce0c3b9877c565fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Make ->sharee looks like others
Jonathan Druart [Tue, 9 May 2023 09:02:30 +0000 (11:02 +0200)]
Bug 32894: Make ->sharee looks like others

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e84ef47018e5682764b64073c43b6f95f37c5b31)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b20f2fb4f574e9e21cc6b7bb847988d2e08687b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (follow-up) Koha::Item->last_returned_by
Jonathan Druart [Tue, 9 May 2023 09:00:48 +0000 (11:00 +0200)]
Bug 32894: (follow-up) Koha::Item->last_returned_by

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ad94cf3e06836da81cfef272f65ae9d9fe9cf3e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0e0d1f134db7e464bff6cc109324976dab4a99f4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (QA follow-up) Fix typo
Martin Renvoize [Fri, 21 Apr 2023 10:24:04 +0000 (11:24 +0100)]
Bug 32894: (QA follow-up) Fix typo

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 70d7bb57d88a8ed6d26d85eacdea8c0cd6550ad7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fd610892142c0ada0189a63c4442f18845ff2934)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Remove incorrect caching from bundle_items
Martin Renvoize [Fri, 21 Apr 2023 10:18:35 +0000 (11:18 +0100)]
Bug 32894: Remove incorrect caching from bundle_items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8e2d841a2950f3cd6008f296e67c362ebfe4b954)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 946484de015c635684235746b9c71575e21cc18f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Fix test
Jonathan Druart [Tue, 28 Feb 2023 16:14:52 +0000 (17:14 +0100)]
Bug 32894: Fix test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45d882de53058ebf49f9683e53bdc3751cd22e99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 278769067c700b444711af8eb1bc11ea3fb8616d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Biblio->biblioitem
Jonathan Druart [Tue, 28 Feb 2023 15:40:00 +0000 (16:40 +0100)]
Bug 32894: Koha::Biblio->biblioitem

Can we do better here?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 994132a60a2e4a12eb88cc8b9d1a89f28450a7bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e91d18fcdde2d7c69ad9f2a8453dd5cdc736e6b4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Item->last_returned_by
Jonathan Druart [Tue, 28 Feb 2023 15:13:56 +0000 (16:13 +0100)]
Bug 32894: Koha::Item->last_returned_by

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3545292513453b2383c406e96c3d51a3a2f5e6c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 143c0e59c821bd08f1014bc5c61f320f28a520b3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Remove wrong caching from Koha:: methods - simple
Jonathan Druart [Tue, 28 Feb 2023 15:11:38 +0000 (16:11 +0100)]
Bug 32894: Remove wrong caching from Koha:: methods - simple

In some of our Koha:: objects we have methods that cache their result and return it in subsequent calls. However there is no invalidation of the cache if the object is modified.

For instance, in Koha/ArticleRequest.pm

sub biblio {
    my ($self) = @_;

    $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() );

    return $self->{_biblio};
}

This pattern exists in several places.

It can lead to confusion and incorrect results, such as:

use Koha::ArticleRequests;
my $ar = Koha::ArticleRequest->new({
    borrowernumber => 42,
    biblionumber => 42,
})->store;
say $ar->biblio->biblionumber;               # Display 42, correct
$ar->set({ biblionumber => 24 })->store;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->discard_changes;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->delete;

We should remove those caching and rely on DBIC/DBMS caching mechanism instead.

This patch is adjusting the trivial occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68216c541bfd9b5baf5e3fe97c0a99d193dfccce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3347e6682477acd503c591d24670cd66cccaf38f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Fix 2FA registration when library name has non-latin characters
Jonathan Druart [Tue, 6 Jun 2023 08:42:20 +0000 (10:42 +0200)]
Bug 33904: Fix 2FA registration when library name has non-latin characters

If the library name contains non-latin characters, the 2FA registration
process will fail with a JS alert coming from a 500 server-side.

The problem is that Auth::GoogleAuth is expecting an already UTF8 encoded string.
We should set the encoding correctly to make Auth::GoogleAuth deal with
the URL escaping internally correctly, then decode on our own (in the
REST API controller)

Test plan:
* Modify your logged in library name and add some non-latin characters
(eg. "my ❤ library")
* Turn on TwoFactorAuthentication
* Go to your account > More > Manage 2FA
* Click the enable button
=> Notice that you see the QR code and that both "issuer" and "key id"
entries display the library name correctly.
* Test the whole 2FA process, confirm that the library name is correctly
displayed on the app you are using.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit deeb5ebdbd59956f5f6cf1bfa989ef41c9af9720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6678645740787c2e57874eabe4363edd98769d6f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Add tests
Jonathan Druart [Tue, 6 Jun 2023 08:40:03 +0000 (10:40 +0200)]
Bug 33904: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfed7f235d2e079743a74bb2791db2d4ebd63b1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80dec321bdfc9be130a95e55fc58298d56b55945)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33888: (bug 22375 follow-up) Add missing USE KohaDates
Jonathan Druart [Wed, 7 Jun 2023 08:33:40 +0000 (10:33 +0200)]
Bug 33888: (bug 22375 follow-up) Add missing USE KohaDates

Bug 22375 added use of KohaDates without the USE statement.

Test plan:
Make sure you have overdues and go to circ/branchoverdues.pl
Without this patch you get a 500
  Template process failed: undef error - : filter not found at /kohadevbox/koha/C4/Templates.pm line 127
With this patch applied you can see the overdue list

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 7eafb103b584dcc41b863c3920ee8ab4e94b2c06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5f24345b676c81a6e04a9d4eab818fdce7be1655)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34206: Fix display of vendor options in agreements and licenses forms
John Doe [Wed, 5 Jul 2023 15:56:46 +0000 (15:56 +0000)]
Bug 34206: Fix display of vendor options in agreements and licenses forms

Test plan:
1) Go to ERM licenses /cgi-bin/koha/erm/licenses
2) Click 'New license' and click the 'vendor' dropdown
3) Notice how it doesn't bring up any options
4) Apply patch and repeat test plan. Notice how now the vendor options show.
5) Repeat test plan for agreements

The test plan should be done using the 22.11.x branch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoUpdate release notes for 22.11.07 release v22.11.07
Pedro Amorim [Fri, 23 Jun 2023 15:18:57 +0000 (15:18 +0000)]
Update release notes for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoIncrement version for 22.11.07 release
Pedro Amorim [Fri, 23 Jun 2023 14:52:40 +0000 (14:52 +0000)]
Increment version for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoFix translations for Koha 22.11.07
Pedro Amorim [Fri, 23 Jun 2023 14:46:30 +0000 (14:46 +0000)]
Fix translations for Koha 22.11.07

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoTranslation updates for Koha 22.11.07
Koha translators [Fri, 23 Jun 2023 12:48:20 +0000 (09:48 -0300)]
Translation updates for Koha 22.11.07

(cherry picked from commit 8e30f83f9e21611071cbe291a66bd316081c31d5)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Katrin Fischer [Fri, 16 Jun 2023 13:36:37 +0000 (13:36 +0000)]
Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved

Under certain circumstances the "Keep current" option on receive allows
to receive order lines where the fund is otherwise not accessible to the user.
In 22.11 the wrong value is used for the option, so that instead of the fund id
the budget id is used, this can lead to an error 500 if there is no fund with
this id or to a wrong fund being saved.

To test:

1) Create budget and fund
* With the sample data
* Create a new budget "July 2023"
* Create a new fund "Books" under it
* Limit access to Owner and make yourself the owner

2) Create order
* Create a basket
* Create an order line with this access limited fund
* Close the basket

3) Create a staff user with limited permissions
* Edit or create another patron
* Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund)
* Edit username and password

4) Receive, recreating the error
* Log in as the second user in a separate browser
* Receive shipment
* Create invoice
* Receive
* You should see the fund under the "Keep current" heading selected
* Add quantity received, save
* Fund has changed to Fund_1_2 => data loss :(

5) Receive, verify fix
* Create another order line with your privileged user and the "Books" fund
* Repeat 4)
* After receiving the fund should now remain unchanged

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoBug 33416: Fix Searchbar_spec.ts
Tomas Cohen Arazi [Wed, 19 Apr 2023 12:19:29 +0000 (09:19 -0300)]
Bug 33416: Fix Searchbar_spec.ts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a39823dbcf63101519413f3a47f4ffa39758155)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 5eec29d2dabfb7a08ed092032f8222f527cc5041)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33416: Fix Agreements.ts
Jonathan Druart [Wed, 5 Apr 2023 08:29:01 +0000 (10:29 +0200)]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 216702802567adf67b0768beb6b43ad6b2c62bd8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e1fbe67683ab873c0832f2b8fe8cc168be85e05d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33902: Move modal inside HTML body
Lucas Gass [Mon, 5 Jun 2023 23:00:43 +0000 (23:00 +0000)]
Bug 33902: Move modal inside HTML body

To test:
-Go Administration > Libraries and add a URL for a branch.
-Also add some OPAC info: ( via HTML Customizations )
-Now find a record belonging to that branch and bring up the OPAC detail page.
-In the holdings table there should be a link under the 'Current library' column.
-Clicking it should bring up a modal.
-Make sure the modal pops up correctly, can be dismissed, and the 'Visit web site' link works.

Nothing about the appearance or behavior of the page should change.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e1be2791b807948c85ae48e471594a7c68709e84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33934: Add more detail to 'No encryption_key in koha-conf.xml'
Jonathan Druart [Wed, 7 Jun 2023 07:30:15 +0000 (09:30 +0200)]
Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml'

If encryption_key is not set in $KOHA_CONF we are raising an exception.

This key was only needed for a couple of feature, but now we are using Koha::Encryption from the update DB process, and so the upgrade fails with no more info than 'No encryption_key in koha-conf.xml'.

We need to provide more detail in this error.

Additionally we reject "__ENCRYPTION_KEY__", in case people will simple
copy/paste that

Test plan:
Apply the patch
Edit $KOHA_CONf, remove the encryption_key entry (or blank)
restart_all
Go to the about page and enable 2FA
=> warning on the about page, and 500 server-side are displaying more
info about how to generate the missing entry
Edit $KOHA_CONF and set the value to __ENCRYPTION_KEY__
restart_all
=> Same messages
Edit $KOHA_CONF and set a correct value
restart_all
=> No error, everything is working correctly

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 d7288411f00e3afd2a0284193ce7742545d88266)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33935: (bug 26403 follow-up) Remove occurrences to deleted files
Jonathan Druart [Wed, 7 Jun 2023 09:16:15 +0000 (11:16 +0200)]
Bug 33935: (bug 26403 follow-up) Remove occurrences to deleted files

account_credit_types.sql and account_debit_types.sql have been moved to yml files but there are still references to them in C4::Installer.

If you select the files during the installer process it will explode with

Test plan:
DROP database koha_kohadev
CREATE database koha_kohadev
restart_all
then install Koha using the UI
Select all the sample data files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 633cb15a632cded54ccbd7e385a281ceed3d68cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33524: Use template wrapper for tabs: Authority editor
Owen Leonard [Fri, 26 May 2023 13:45:56 +0000 (13:45 +0000)]
Bug 33524: Use template wrapper for tabs: Authority editor

This patch updates the authority editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

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

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/authorities/authorities.pl?authtypecode=PERSO_NAME#tab5XX_panel"
  The correct tab should be selected upon page load.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff22a2006b0eb04950acd83439b2d7bc15890389)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Use selectrow_array
Jonathan Druart [Tue, 16 May 2023 14:36:26 +0000 (16:36 +0200)]
Bug 32060: Use selectrow_array

Trivial ergonomic patch, use selectrow_array, no need to prepare the
query

+ perltidy the sub

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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afe24bce2372a748c1960c8e383232f348278a0e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Improve performance of columns_to_str
David Gustafsson [Tue, 1 Nov 2022 14:30:01 +0000 (15:30 +0100)]
Bug 32060: Improve performance of columns_to_str

To test:
1) Ensure the following tests pass
  t/db_dependent/Koha/Item.t
  t/db_dependent/Koha/Bibio.t
2) Go to a biblio (preferably as serial) with many items and
   click "New" -> "New item" and note down the response time.
3) Apply the patch
4) Ensure tests in 1) still pass
5) Repeat step 2), the response time should be substantially
   improved

Sponsored-by: Gothenburg University Library
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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 850f6f403ba07d6c963a11f52d774b7a94df4802)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBIC schema
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:52:52 +0000 (13:52 -0300)]
Bug 21983: DBIC schema

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6a7d96e1ef0aeb930304de07f686998d0562b6d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Fix resource_id param for EHoldingsLocalResourcesShow
Jonathan Druart [Fri, 9 Jun 2023 07:37:39 +0000 (09:37 +0200)]
Bug 32932: Fix resource_id param for EHoldingsLocalResourcesShow

Caught by cypress tests  "ReferenceError: resource_id is not defined" in "Show title".

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a6d369fe687c945cc80748377b19fcdb9c22163)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Update router to use object references - agreements
Matt Blenkinsop [Tue, 21 Mar 2023 19:14:45 +0000 (16:14 -0300)]
Bug 32932: Update router to use object references - agreements

This patch updates the Vue files for ERM to use router object links rather than urls - this will make it much simpler to maintain the router if urls need to be updated. This first patch only updates the files in the agreements section of ERM as a first step to introduce the topic for discussion.

Test plan:
1) Apply patch
2) Navigate to the Agreements section of ERM and click on different navigation links/buttons
3) The links/buttons should all work as normal
4) Review the code to see that the component files now refer back to the router using objects rather than url strings

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a53351b4a0e2b32d589fea3f74b350f5100a2e72)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: (follow-up) fix t/db_dependent/Koha/Item.t
Fridolin Somers [Thu, 15 Dec 2022 09:08:40 +0000 (23:08 -1000)]
Bug 32464: (follow-up) fix t/db_dependent/Koha/Item.t

Remove useless unit tests with mss arg

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 911702014310c704974dc38ff27a5a23e15ca5a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: Koha::Item->as_marc_field obsolete option mss
Fridolin Somers [Tue, 13 Dec 2022 21:24:54 +0000 (11:24 -1000)]
Bug 32464: Koha::Item->as_marc_field obsolete option mss

Since Bug 28445 the method Koha::Item->as_marc_field has the option mss not anymore.

This patch removes this in Koha::Filter::MARC::EmbedItems.

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8dfecfb17627881407e5cf9262545d2c6a77d62f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33892: Use template wrapper for tabs: OPAC authority detail
Owen Leonard [Mon, 5 Jun 2023 13:06:39 +0000 (13:06 +0000)]
Bug 33892: Use template wrapper for tabs: OPAC authority detail

This patch updates the OPAC authority detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate an authority record in the OPAC
which has notes fields.

When viewing the details for that record the notes should appear in a
single "Notes" tab.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afd30b8f4d11c36c86f26a8d5849c7990297f265)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBRev 22.11.00.005
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:26:52 +0000 (15:26 -0300)]
Bug 21983: DBRev 22.11.00.005

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa3218855316923f10da873528dd300b58ed0e3a)

16 months agoBug 21983: (QA follow-up) Skip deleted_biblio_id from the API object
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:24:36 +0000 (15:24 -0300)]
Bug 21983: (QA follow-up) Skip deleted_biblio_id from the API object

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88249d602cdc0f0c642edb61bed848cfac471c19)

16 months agoBug 21983: Make DelBiblio update linked ILL requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:54:40 +0000 (13:54 -0300)]
Bug 21983: Make DelBiblio update linked ILL requests

This patch makes DelBiblio update the biblio linked ILL requests so the
value in biblio_id is moved to the deleted_biblio_id.

The change is covered by tests.

To test:
1. Apply this patchset
2. Run:
   $ ktd --shell
  k$ updatedatabase
  k$ qa --run-tests
=> SUCCESS: Tests pass! All green/good
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0cf01b8a220c5ecfd102effeec00179226df397)

16 months agoBug 21983: Add Koha::Biblio->ill_requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:53:18 +0000 (13:53 -0300)]
Bug 21983: Add Koha::Biblio->ill_requests

This patch adds a new method, used for retrieving the linked ill
requests for a biblio.

To test:
1. Apply this patch and run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9759b3b0e1b9f4812f994012c109d99f9a9aa89)

16 months agoBug 21983: DB update
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:50:00 +0000 (13:50 -0300)]
Bug 21983: DB update

This patch:
- Adds a illrequests.deleted_biblio_id column
- Adjusts existing db_rev so people upgrading have the biblio_id value
  moved to the also created column, before attempting to add the FK
  constraint on the biblios table.
- Adds a new db_rev for those who unfortunately already updated, it
  should be idempotent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1346c20257038e523be0405e9d84fe762d502db)

16 months agoBug 33786: ILL requests table id
Pedro Amorim [Tue, 30 May 2023 09:20:20 +0000 (09:20 +0000)]
Bug 33786: ILL requests table id

Make sure requests table is unique when visiting patron ILL
history so the table state is not shared unintentionally

Reproduce:
1) Have a borrower with >20 ILL requests in their history
2) Visit cgi-bin/koha/members/ill-requests.pl?borrowernumber=<borrowernumber>
3) On the table, click page 2
4) Visit a different borrower with <20 ILL requests
5) Verify that no requests are shown, this is because the table is using page 2 from step 3)
6) Go back to original borrower, click table page 1
7) Now go back to 2nd borrower, verify is now showing page 1 correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d2df9876d389f4ac939d5fec27b877bbe00cf45)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33813: Masthead lists button requires an aria-label
Matt Blenkinsop [Tue, 23 May 2023 16:24:30 +0000 (16:24 +0000)]
Bug 33813: Masthead lists button requires an aria-label

This patch adds an aria-label to the Lists button in the masthead. It is currently not descriptive enough and doesn't identify what is displayed when clicking the button.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7129b772b559c50311bccfa3b9f0402ec1ce1100)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33873: Improve check for inexistant biblio object
Pedro Amorim [Wed, 31 May 2023 14:10:35 +0000 (14:10 +0000)]
Bug 33873: Improve check for inexistant biblio object

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0630b79e4a740dac0992114d40442af0be5b57ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33882: Add spans in dateofbirth column on member.tt
Lucas Gass [Thu, 1 Jun 2023 20:03:53 +0000 (20:03 +0000)]
Bug 33882: Add spans in dateofbirth column on member.tt

To test:
1 Apply patch
2 Do a patron search that will return multiple patrons.
3 Look at the date of birth column and notice the text is now wrapped in a class called 'dateofbirth'
4. Notice that the age hint is wrapped in a class called 'agehint'.
5. Add '.agehint { display: none }' to intranetusercss.
6. Now notice the date of birth still displays but no age information.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5cb185b71be95cc312686701ce8bd719a4b30b13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33883: "Make sure to copy your API secret" message overlaps text
Owen Leonard [Fri, 2 Jun 2023 14:00:34 +0000 (14:00 +0000)]
Bug 33883: "Make sure to copy your API secret" message overlaps text

This patch updates the markup on the patron API keys page so that it
uses standard classes for dialogs and page sections.

To test you must have RESTOAuth2ClientCredentials enabled.

- Apply the patch and locate a patron record.
- From their checkout or detail page, choose More -> Manage API keys
- Click "Generate a new client id/secret pair"
- Enter a description and click Save.
- You should see a message in a standard message-style dialog, "Make
  sure to copy your API secret now. You won’t be able to see it again!"
- The API key information should be displayed in a .page-section div.
- The table of existing keys should be displayed in a .page-section div.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c652ce764b8e17dde8ce2f06099560c05e88374)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33891: Use template wrapper for tabs: OPAC advanced search
Owen Leonard [Wed, 31 May 2023 17:51:46 +0000 (17:51 +0000)]
Bug 33891: Use template wrapper for tabs: OPAC advanced search

This patch adds the tab WRAPPER markup to the OPAC, adapted for the
Bootstrap version used by the OPAC (4.5.0). The advanced search page is
updated to use the wrapper construction.

Unrelated markup fix: an empty size attribute is removed from an
<input>.

To test, apply the patch and view the the advanced search page in the
OPAC. The tabs for item type, shelving location, and collection should
all look correct and work correctly.

In the staff interface, go to Administration -> System preferences ->
OpacAdvancedSearchTypes and try various configurations, confirming each
time that the OPAC page adjustes correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b754eb5b5a616fa54e721ac71c8049f0f00a52e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33803: Remove comment about tab width
Jonathan Druart [Tue, 23 May 2023 08:58:55 +0000 (10:58 +0200)]
Bug 33803: Remove comment about tab width

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37cb3391d23587bff0719e2171ac3164c2bd4bc4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33525: Use template wrapper for tabs: Basic MARC editor
Owen Leonard [Tue, 23 May 2023 16:45:10 +0000 (16:45 +0000)]
Bug 33525: Use template wrapper for tabs: Basic MARC editor

This patch updates the basic MARC editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

To test, apply the patch and go to Cataloging -> New record.

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/cataloguing/addbiblio.pl#tab5XX_panel" The correct
  tab should be selected upon page load.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 437cadafd8a545132a1db2518623a1eb0360ad09)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: DBRev 22.06.00.004
Tomas Cohen Arazi [Mon, 5 Jun 2023 18:22:15 +0000 (15:22 -0300)]
Bug 33697: DBRev 22.06.00.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d196b9b6199d43b05393802dc5aa8cc1e34453e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: Remove RecordedBooks (rbdigital) integration
Jonathan Druart [Tue, 16 May 2023 08:18:13 +0000 (10:18 +0200)]
Bug 33697: Remove RecordedBooks (rbdigital) integration

RecordedBooks search API integration is now obsolete following
rbdigital's incorporation into OverDrive. Associated code should be
removed.

https://company.overdrive.com/2020/06/23/overdrive-to-acquire-rbdigital-from-rbmedia/

Test plan:
use git grep extensively and confirm that this patch removes all
occurrences of this feature.

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 8b9355088ad6e5238921ef554af44ffeb7677364)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33fdf290bbf58ce26756b2218bfccce10049870c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33779: Terminology: biblio record
Owen Leonard [Thu, 25 May 2023 13:48:34 +0000 (13:48 +0000)]
Bug 33779: Terminology: biblio record

This patch corrects a string in the staff interface's ILL requests
template. "This item cannot be issued as it has no biblio record
associated with it" is updated to read "This item cannot be checked out
as it has no bibliographic record associated with it."

I don't know how to trigger the error message in the interface, but the
change is simple enough that it could be verified by examining the
patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 05af370ec1ad367e30bd5b9c879d7b16e6a26846)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: (follow-up) Set debit type for mocked fines
Nick Clemens [Thu, 1 Jun 2023 18:20:14 +0000 (18:20 +0000)]
Bug 33411: (follow-up) Set debit type for mocked fines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56715cbb28b5412c83fe3bed993be4ab0451750a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Nick Clemens [Fri, 7 Apr 2023 18:50:25 +0000 (18:50 +0000)]
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees

To test:
 1 - Find an adult patron in Koha
 2 - Add two guarantees
 3 - Add $1 fine to parent, $5 fine to each guarantee
 4 - Set no issues charge guarantees to 9
 5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
 6 - Note the 64 message starts with Y's that mean patron is blocked
 7 - Repeat with each child barcode
 8 - They are blocked?
 9 - Apply patch, restart all (restart_all will restart SIP)
10 - Try again
11 - Parent blocked, children should not be

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 afec5139ff095a92c6ffb626e1a1a773328ac398)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Unit test update
Nick Clemens [Fri, 7 Apr 2023 18:49:41 +0000 (18:49 +0000)]
Bug 33411: Unit test update

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 638d79036c642eb349711764fb2486021606fee4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: (QA follow-up) Remove pending deletion from results array
Marcel de Rooy [Fri, 2 Jun 2023 08:17:45 +0000 (08:17 +0000)]
Bug 33247: (QA follow-up) Remove pending deletion from results array

Both Elastic and Zebra search_auth_compat return a hash key
authid for a result.

Test plan:
Remove an authority that should be in your results list.
Note that it is no longer marked as pending, but just not displayed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f0574dd912a97f588d4e8523319f721093bdb42)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: Flag the authority pending deletion in the result list
Jonathan Druart [Thu, 11 May 2023 11:48:50 +0000 (13:48 +0200)]
Bug 33247: Flag the authority pending deletion in the result list

When an authority is removed from the result list it is not removed from
the search engine yet.
This patch suggests to add a note in the summary column to tell the user
that the deletion is pending.

Test plan:
1 - Go to authorities home and perform a search;
2 - Delete any authority;
3 - After the confirmation, the page is refreshed but still contains the
deleted authority, with a red note explaining that the deletion is
pending.

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 61de402012ff05ee0eadfe571c6354afc858669f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33748: Fix UI issue when importing records from a staged MARC file
Lucas Gass [Thu, 25 May 2023 22:04:08 +0000 (22:04 +0000)]
Bug 33748: Fix UI issue when importing records from a staged MARC file

This patch attempts to fix a UI issue on addorderiso2709.tt. It removes the <td> which contains the actoin buttons MARC, Card, and Add Order and adds them to the title line. This is so there is more space for the fieldsets.

1. Apply patch
2. Set  MarcItemFieldsToOrder like this:

    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 975$8
    notforloan: 975$7
    quantity: 975$q
    price: 975$g
    replacementprice: 975$v
    uri: 975$u

3. Stage a MARC file where the bibs have items attached
4. From acquisitions create a new basket and add 'From a staged file'.
5. Add the staged files to a basket.
6. Make sure the display looks correct.
7. Expand the data by clicking on the checkbox on the left hand side, or by clicking 'Select all'.
8. Make sure the display looks correct.
9. Tab over to 'Item informtion' and make sure that display looks correct.
10. Shrink the screen size down to less that 992px, ensuring the display remains correct.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 06ba1ce7bfffd2f18da0d8a03edf0afb103220ae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'
Owen Leonard [Tue, 30 May 2023 10:51:16 +0000 (10:51 +0000)]
Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'

This patch updates instances in the code and templates where the term
"Authentication providers" is used, replacing it with the preferred
"Identity provider."

Most of the instances of this change are in module or API documentation,
but you can see a couple of the changes in the interface:

- Administration -> Identity providers:
  - The sidebar menu should show "Identity providers" instead of
    "Authentication providers."
- Patrons -> Patron details -> More -> Set permissions
  - Under " Manage Koha system settings (Administration panel)" you
    should see "Manage identity providers (manage_identity_providers)"

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d634c1971fba572959fbef6ca9392767e3506a62)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33875: Fix missing closing tag a in API key management page
Fridolin Somers [Wed, 31 May 2023 20:58:45 +0000 (10:58 -1000)]
Bug 33875: Fix missing closing tag a in API key management page

In API key management page, anchor closing tag is missing in message "No keys defined for the current patron".

This patch fixes that.
Also changes display with link on a new line.
Translatable text is on purpose surrounded by span or div.

Test plan :
1) Enable system preference  RESTOAuth2ClientCredentials
2) Go to a patron page
3) Click More > Manage API Keys
4) Look at page source HTML code
=> Check code is OK

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88920fe564ab0157a71cf7fedf79693d42959cce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33865: (bug 27421 follow-up) Remove leftover
Jonathan Druart [Thu, 1 Jun 2023 06:29:53 +0000 (08:29 +0200)]
Bug 33865: (bug 27421 follow-up) Remove leftover

Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.

Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"

Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.

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 ff324be0c4b72241ec86da345b25e12166f51984)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33877: Add missing team members
Tomas Cohen Arazi [Thu, 1 Jun 2023 14:47:04 +0000 (11:47 -0300)]
Bug 33877: Add missing team members

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b55e3ceefde1595a1805d0fc5e1476b8f36babe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33877: Fix some entries in teams.yaml
Marcel de Rooy [Thu, 1 Jun 2023 08:27:35 +0000 (08:27 +0000)]
Bug 33877: Fix some entries in teams.yaml

Trivial edit.

Remove versions from the name of the packaging manager.
As also commented on BZ:
The script only expects to find a name here, not a version too.
See also maintainer role and how versions are handled there.
In this case I dont think it is really needed to still add that
distinction when we had two packaging managers in the past.

Test plan:
Look again at about.pl, Koha team, Koha development team.
Look at Mason James.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aef13eaf3fce66a7f6ea7a06ae3c1344533889a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update history.txt
Tomas Cohen Arazi [Wed, 31 May 2023 11:50:56 +0000 (08:50 -0300)]
23.05.00: Update history.txt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1539ef22bed84f46f6cebabd16b07f7cf71675b7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update contributors.yaml
Tomas Cohen Arazi [Wed, 31 May 2023 11:50:15 +0000 (08:50 -0300)]
23.05.00: Update contributors.yaml

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0da4eef6f6987a9b3c71b16a9deaf139cd4522b5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update .mailmap
Tomas Cohen Arazi [Wed, 31 May 2023 19:03:04 +0000 (16:03 -0300)]
23.05.00: Update .mailmap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a9b00907e0d270798aad5dcd0bfacf27dca5a6a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33761: (RMaint follow-up) Remove errant test from bug 31557 added by git)
Matt Blenkinsop [Fri, 9 Jun 2023 11:09:42 +0000 (11:09 +0000)]
Bug 33761: (RMaint follow-up) Remove errant test from bug 31557 added by git)

A test from bug 31557 was introduced by git when cherry-picking 33761. As bug 31557 was not backported, this caused t/db_dependent/HoldsQueue.t to fail.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 22440: (QA follow-up) Fix wrong check in db_rev
Tomas Cohen Arazi [Thu, 1 Jun 2023 14:35:15 +0000 (11:35 -0300)]
Bug 22440: (QA follow-up) Fix wrong check in db_rev

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1924bb31d6106037c1e8dec2ea4b39f86235960)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33838: Don't reset the renewal count
Kyle M Hall [Thu, 25 May 2023 16:57:24 +0000 (12:57 -0400)]
Bug 33838: Don't reset the renewal count

I cannot find any justification for this line existing.
MarkIssueReturned does not do this.

Resetting item's renewal count was introduced in bug 5877 with no explanation.

Test Plan:
1) Check out item 3999900000001 to a patron
2) Upload the KOC file attached to this bug report
3) Navigate the Pending Offline Circ actions, see your return is listed
4) Click the checkbox to select your return
5) Click Process once. Nothing appears to happen
6) In a new tab, pull up the bib for item 3999900000001, see that it has been checked in
7) Back on your Offline Circ tab, click Process a second time
8) Koha tells you the item is not checked out
9) Apply this patch, restart all the things!
10) Repeat steps 1-4, everything should now work!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: this line was introduced by bug 30275, by mistake. The
renewals_count attribute belongs to the `issues` table, and I agree it
shouldn't be set to 0 at all as it will (with no reason) make us loose
the value!
Tests pass with and without this change, so this isn't even tested.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9c565eff1357c2fdf900f006a17fa62fd4f2f9ee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33788: Limit the number of old issues rows returned
Nick Clemens [Fri, 26 May 2023 14:44:05 +0000 (14:44 +0000)]
Bug 33788: Limit the number of old issues rows returned

This patch updates the parameter from 'limit' to 'rows'

To test:
1 - Checkout an item to 5 different people
2 - View item details on items tab of record
3 - Note you see last borrower, and three previous borrowers
4 - Apply patch, restart all
5 - Refresh page
6 - You shoulw now only see last borrower and 2 previous borrowers

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec849f39366e82e8813ee3ca897f3bb97ab9e39)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33821: Allow direct input of dates on the OPAC
Lucas Gass [Wed, 24 May 2023 15:13:12 +0000 (15:13 +0000)]
Bug 33821: Allow direct input of dates on the OPAC

To test:
1. Apply patch
2. Go to OPAC self registration and try to manually enter the date for date of birth.
3. You can do so sucessfully

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bfd31debb52197e9ab1ad667d4782088647d67dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33854: Fix typo in ImportBatchProfiles controller
Tomas Cohen Arazi [Mon, 29 May 2023 13:59:53 +0000 (10:59 -0300)]
Bug 33854: Fix typo in ImportBatchProfiles controller

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c84f06ec625a6d11caeb01a27cf8f61ff7430140)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33829: Fix add patron to patron list if PatronAutoComplete is off
Jonathan Druart [Thu, 25 May 2023 13:07:25 +0000 (15:07 +0200)]
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

When adding patrons to a patron list we get a JS error about undefined
variables. We can easily fix this problem by defining them even if the
pref is not set.

We are enabling the auto complete even if PatronAutoComplete if off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 493819b92b8ecbe917b70cf564e7a0bdbbec9f89)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33823: Add spacing to action labels
Pedro Amorim [Wed, 24 May 2023 15:53:43 +0000 (15:53 +0000)]
Bug 33823: Add spacing to action labels

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a69551e32e50376b58852fec7e89deef3c07d55b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33815: Do not explode if logged in user modify their own userid
Jonathan Druart [Wed, 24 May 2023 07:29:30 +0000 (09:29 +0200)]
Bug 33815: Do not explode if logged in user modify their own userid

If the logged in librarian modifies their own userid they will get the
following error when submitting the form:
Can't call method "password_expired" on an undefined value at /kohadevbox/koha/C4/Auth.pm line 1780

We could handle this situation and flag the session as expired. Better
would be to deal with this specific user case and update the cookie (?)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5da81cde99983768f627417c6c267d51cc0d908d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33815: Regression tests
Tomas Cohen Arazi [Wed, 24 May 2023 14:52:50 +0000 (11:52 -0300)]
Bug 33815: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cd6c7833ea08c216c5b5531ee7cb2ab5f39aaa3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33834: Fix random failure on api/v1/ill_requests.t
Tomas Cohen Arazi [Thu, 25 May 2023 13:15:08 +0000 (10:15 -0300)]
Bug 33834: Fix random failure on api/v1/ill_requests.t

This patch makes the GET request results more deterministic so we avoid
random failures. It does so by adding a fixed value to each ILL request
and then sorting by it.

To test:
1. Run:
   $ DB_IMAGE=mysqli:8.0 ktd up -d
   # wait until it finished:
   $ ktd --logs
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/ill_requests.t
  (repeat a few times)
=> FAIL: It sometimes fails
3. Apply this patch
4. Repeat 2
=> SUCCESS: It doesn't fail
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a8903ae850ca268c730e19c1b575e3be942ee2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33362: Allow return claims to be resolved even if the issue has since been delete...
Kyle M Hall [Thu, 11 May 2023 14:43:39 +0000 (14:43 +0000)]
Bug 33362: Allow return claims to be resolved even if the issue has since been delete from the database

Test Plan:
1) Check out an item
2) Claim return on it, moving it to the old_issues table
3) Delete the old_issue via koha-mysql or Use cleanup_database.pl
4) Attempt to resolve the claim
5) Note the error
6) Apply this patch set
7) Restart all the things!
8) Attempt to resolve the claim
9) No errors!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 816bbbe77f47688ee79f6664e60cc72ce5d7dd4a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 26611: Make authority record matching use required match checks
Aleisha Amohia [Tue, 23 May 2023 03:32:59 +0000 (03:32 +0000)]
Bug 26611: Make authority record matching use required match checks

This patch fixes record matching for authorities to correctly apply required match checks.

To test:

1) Create a record matching rule:

Threshold: 100
Record type: Authority record

Match point 1
Search index: subject-topical
Score: 100
Tag: 150
Subfields: a

Match check 1
Both source and target record check fields:
Tag: 040
Subfields: a

This rule says we want to match on the topical term heading, then confirm the match with 040$a.

2) Create two topical term authority records

Authority 1:
150$a: Test
040$a: A

Authority 2:
150$a: Test
040$a: B

3) Export authority 2 and save

4) Go to Cataloging -> Stage records for import

5) Upload your downloaded authority 2 file. Change the record type to Authority. Choose your new record matching rule.

6) Stage for import.

7) Confirm that with the record matching rule applied, both authorities 1 and 2 show as possible matches, even though only authority 2 has a matching 040$a.

8) Apply the patch and restart services

9) Change the matching rule to "Do not look for matching records" and apply. This is to essentially refresh the page.

10) Change the matching rule to your new matching rule and apply. Confirm only the matching authority 2 shows and is selected.

Sponsored-by: Waikato Institute of Technology
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 33856898fd2f1cd757aeafe3c165300928f9da61)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33792: reserves_stats: Undo homebranch and holdingbranch preselect
Marcel de Rooy [Mon, 22 May 2023 12:35:02 +0000 (12:35 +0000)]
Bug 33792: reserves_stats: Undo homebranch and holdingbranch preselect

This preselect cuts off all next available holds that are in reserves,
as well as holds filled by checkout without confirm (see 33791).

Test plan:
Go to reporting. Click Hold statistics.
Verify that Holding library and Home library are not selected.
Test that you can still filter by one of those.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 e22b3f06668a181874de2049297e0390d2280cd0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33663: Pass 'suggestion' to the OPAC templates only
Jonathan Druart [Wed, 10 May 2023 08:54:39 +0000 (10:54 +0200)]
Bug 33663: Pass 'suggestion' to the OPAC templates only

We don't need it for the staff interface. The previous patch is removing
the only occurrence using it.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63bc731fd409e52b505c684fa5ba5f849128aa36)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33663: Don't hide Suggestions link in side navigation when suggestion preference...
Jonathan Druart [Wed, 10 May 2023 08:53:38 +0000 (10:53 +0200)]
Bug 33663: Don't hide Suggestions link in side navigation when suggestion preference is disabled

We don't want to depend on the pref for the staff interface.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b5c92035f429e23d3a899e920e04dccfc309492)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33762: Fix page-section in ILL
Pedro Amorim [Thu, 18 May 2023 11:36:46 +0000 (11:36 +0000)]
Bug 33762: Fix page-section in ILL

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75b6d4c1f1605578a4f1d1b7694d8595fea89c3d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33791: (QA follow-up) Stick to 'item_id' for the parameter name
Tomas Cohen Arazi [Mon, 22 May 2023 14:47:41 +0000 (11:47 -0300)]
Bug 33791: (QA follow-up) Stick to 'item_id' for the parameter name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d0195cef6cfdc6d3d2acf7ba06cdd0a5cfaddbb9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33791: Pass itemnumber to $hold->fill
Marcel de Rooy [Mon, 22 May 2023 11:14:25 +0000 (11:14 +0000)]
Bug 33791: Pass itemnumber to $hold->fill

Test plan:

Without this patch:
Place next available level on some book for patron A.
Checkout this book directly to patron A.
Check old_reserves table for this reserve; does not have itemnumber.

With this patch:
Do the same.
In old_reserves the itemnumber should be saved.
Run again t/db_dependent/Koha/Hold.t. Should pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd5c5eaa38f75297efde5a096d30ad65eff9a658)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33791: Add unit test
Marcel de Rooy [Mon, 22 May 2023 11:35:46 +0000 (11:35 +0000)]
Bug 33791: Add unit test

Test plan:
Run t/db_dependent/Koha/Hold.t
NOTE: This test should fail without following patch, but pass with it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 306439b4c6f4d90bc8d46e6f76aac2f5b9f11cd8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33787: Fix for regression caused by bug 32450
Martin Renvoize [Fri, 19 May 2023 16:05:10 +0000 (17:05 +0100)]
Bug 33787: Fix for regression caused by bug 32450

This patch fixes the regression cashed by bug 32450 where we
accidentally introduced the option to archive system debit types.

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 7b315a31b45c98770a8f14636252a83a67a8e545)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 31585: Fix 'acquisition order' and 'acquisition claim'
Pedro Amorim [Thu, 18 May 2023 10:27:30 +0000 (10:27 +0000)]
Bug 31585: Fix 'acquisition order' and 'acquisition claim'

Added 'ACQUISITION CLAIM' and 'ACQUISITION ORDER' to the log viewer form.
Please test this well (making sure there are log entries of these types and they show properly upon searching for them)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cff39ab2ba8105d3f65c6c1eec5626f8f66c4e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33371: Add [Install] section to koha-common.service
Mason James [Thu, 1 Jun 2023 12:49:27 +0000 (00:49 +1200)]
Bug 33371: Add [Install] section to koha-common.service

to test:

 1/ install pkg, reboot, note service is not 'active'

 2/ add patch, build package

 3/ install pkg, reboot, note service is 'active' :)

  root@deb11:/etc# systemctl status koha-common
  * koha-common.service - Start required services for each Koha instance
     Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<<
     Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago
      Tasks: 0 (limit: 2244)
     Memory: 0B
        CPU: 0
     CGroup: /system.slice/koha-common.service
  Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance...

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc72184de5d000f1fdc667f6a576a4ce584f450e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33371: Add 'koha-common.service' systemd service
Mason James [Thu, 30 Mar 2023 14:32:10 +0000 (03:32 +1300)]
Bug 33371: Add 'koha-common.service' systemd service

to test

- install current package
- note following $message on install
 'Failed to enable unit: Unit /run/systemd/generator.late/koha-common.service is transient or generated.'

- apply patch, build package, install new package
- note $message is gone! :)

- test koha-common.service
   # systemctl start  koha-common
   # systemctl status koha-common | grep running
     Active: active (running) since Sun 2023-04-02 00:27:31 NZDT <<<

   # systemctl stop  koha-common

   # systemctl status koha-common | grep dead
     Active: inactive (dead) since Sun 2023-04-02 00:25:34 NZDT <<<

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d1d18cd2a145df7fd1e0f8a690da0b3a03ec38c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33767: Fix incorrect heading in page-numbers.inc
Matt Blenkinsop [Thu, 18 May 2023 13:55:02 +0000 (13:55 +0000)]
Bug 33767: Fix incorrect heading in page-numbers.inc

This patch replaces an h6 with a span to avoid a jump from h2 to h6.

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 e9fe95b8f4b71765cb240151cc63da3f30ceee2f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33675: Add CSRF protection to OAuth/OIDC authentication
Tomas Cohen Arazi [Wed, 10 May 2023 13:45:23 +0000 (10:45 -0300)]
Bug 33675: Add CSRF protection to OAuth/OIDC authentication

This patch makes the OAuth/OIDC client pass a `state` parameter with a
CSRF protection token, to be validated back when the flow returns to
Koha.

Ideally, the Mojolicious::Plugin::OAuth2 library should deal with this
implicitly, probably making use of JWT. But as of now, this is the best
way to implement it.

To test:
1. Have a working SSO solution (ktd --sso)
2. Click to login using SSO
=> SUCCESS: Notice a 'state' parameter on the URL, looks like a random
thing
3. When you login, no error is reported

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d191f21e5760994575c6954dba88544f06afe4e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33777: Fix Auth_with_shibboleth.t
Marcel de Rooy [Fri, 19 May 2023 06:20:19 +0000 (06:20 +0000)]
Bug 33777: Fix Auth_with_shibboleth.t

We need to 'mock' the new pref EmailFieldPrecedence

Test plan:
Run t/Auth_with_shibboleth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f436bc639c9a1eeb1e14eeb38f3ffabc7bdd32f9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33708: Allow anonymous access to OAuth endpoints
David Cook [Wed, 10 May 2023 02:43:44 +0000 (02:43 +0000)]
Bug 33708: Allow anonymous access to OAuth endpoints

Users needs anonymous access to OAuth endpoints so that they can
login, and then use authenticated access for other endpoints.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05190ed1d99e3cca7cbd766a9f41e106f25d26a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33708: Provide non-public endpoint for OAuth/OIDC for staff interface
David Cook [Wed, 10 May 2023 01:35:56 +0000 (01:35 +0000)]
Bug 33708: Provide non-public endpoint for OAuth/OIDC for staff interface

This change fixes the definition for the non-public endpoint for the OAuth/OIDC
implementation.

It also uses the non-public endpoint for the staff interface UI.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aae996e6bf1a981c1ab5700021593dac777f63ba)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>