Commit graph

49381 commits

Author SHA1 Message Date
ea31cb1511 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 6cd6c7833e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:34 +00:00
4f28cd3227 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 1a8903ae85)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:33 +00:00
5052f9cec0 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 816bbbe77f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:33 +00:00
Aleisha Amohia
11bce8210a 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 33856898fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:33 +00:00
fbb08f3fdc 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 e22b3f0666)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:32 +00:00
4757f8b191 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 63bc731fd4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:31 +00:00
aa595cff7a 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 9b5c92035f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:31 +00:00
167b83783d 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 75b6d4c1f1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:15:30 +00:00
0993144755 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 d0195cef6c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:09:06 +00:00
e1b927bee7 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 bd5c5eaa38)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:09:06 +00:00
fba7d4e5f7 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 306439b4c6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:09:05 +00:00
293f49ed8b 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 7b315a31b4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:09:05 +00:00
5f851fe99c 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 6cff39ab2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 17:09:05 +00:00
d466b4ec8c 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 bc72184de5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:59:56 +00:00
3affb8cd33 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 4d1d18cd2a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:59:56 +00:00
367442593c 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 e9fe95b8f4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:58:14 +00:00
45f21c492e 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 5d191f21e5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:58:14 +00:00
9bd219768e 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 f436bc639c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:58:13 +00:00
d4d69ade8c 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 05190ed1d9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:21 +00:00
12c4eb1e02 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 aae996e6bf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:21 +00:00
9450ffe660 Bug 33708: Make staff interface login not require public API (OAuth/OIDC)
This patch makes the URL for staff login not point to the `/public`
namespace. The behavior is not changed for the protocol, but as
`/public` requires several settings to be available, it effectively
requires to enable the OPAC, the public API, etc. This patch
diferentiates both to solve the problem.

I've tested following the Wiki instructions to set keycloak [1] using
the *--sso* switch for `ktd` as well [2].

It is important to set the following URLs as allowed redirect in order
to replicate the issue and verify the fix:

http://localhost:8080/api/v1/public/oauth/login/test/opac
http://localhost:8081/api/v1/oauth/login/test/staff

To test:
1. Login into the staff interface using the SSO link:
=> FAIL: Results in a 'Bad redirect URL' error
2. Apply this patch and repeat 1
=> SUCCESS: You get a permission denied error or you just login,
depending on your setup.

[1] https://wiki.koha-community.org/wiki/Testing_SSO
[2] ktd --sso up -d

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dd512db60b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:20 +00:00
Phil Ringnalda
202f376c42 Bug 33138: Don't copy tag 147 to authority MARC frameworks
We shouldn't be including tag 147 in every authority MARC framework we
install, since like all 1xx authority tags there should only be
one per record. It only belongs in a NAME_EVENT framework, which we
don't install.

Test plan:

1. Apply patch, kd && ku or however you like to restart
2. Administration - Authority types - Actions button for Default
   - MARC structure
3. In the search box below the text "Select an authority framework"
   enter 147 and click OK
4. Once you see that it exists in Default, switch the dropdown to
   each of the other frameworks and verify it doesn't appear in
   any.

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 409891ed50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:20 +00:00
681215be89 Bug 32959: Don't store results of autobarcode in item editor templates
Test Plan:
1) Enable autobarcode
2) Create a new item template, leave the barcode field blank
3) Apply that item template
4) Note the template prefills the barcode field
5) Delete that item template
6) Apply this patch
7) Restart all the things!
8) Repeat steps 2-4
9) Note the barcode field remains empty!

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 47b2b4f15a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:19 +00:00
e4d1c72cf8 Bug 29993: Show Syndetics covers when using shelfbrowser controls
1. Have items that include itemcallnumber.
2. Enable OPACShelfBrowser.
3. Enable SyndeticsCoverImages and SyndeticsEnabled.
4. Go the an OPAC detail page and open the shelf browser.
5. Use the Next/Previous buttons.
6. Notice that no Syndetics images populate after using Next/Previous buttons.
7. Apply patch and try again, cover images for Syndetics should be generating.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 219ad1d5d3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:19 +00:00
Emmi Takkinen
fff6588231 Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl
If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5f8c52657)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:19 +00:00
6b676c0ebc Bug 33713: Make batch operations from report results open in new tab
To test:
1. Have some reports that can do the following batch operations:
    -Batch patron mod
    -Batch item deletion
    -Batch add to list
    -Batch item mod
    -Batch record delection
    -Batch record mod

2. Run the report ann click 'Batch operations with X visible records', make sure each batch op opens in a new tab.

These two simple reports should allow you to test each of the batch cases:

select * from items limit 1
select * from borrowers limit 1

Signed-off-by: Andrew  Fuerste-Henry <andrewfh@dubcolib.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 a40bd8d05d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:18 +00:00
Katrin Fischer
90c1fe386e Bug 33721: Fix display of shipping cost/fund on invoice summary page
When viewing an invoice, the elements in the 'Fund' line were out of order:
'Fund:' label, followed by 'Show inactive:' label, then the fund drop-down and then the show inactive checkbox.

The order should be:
'Fund:' label, fund drop-down, 'Show inactive:' label, show inactive checkbox.

This copies the markup that is used when you click on "Receive shipment".
It also changes 'Fund' to 'Shipping fund' to bring the forms even more in line.

To recreate:
1. In acquisitions, create an order and close the basket
2. Click 'Receive shipment' and receive the order
3. Click 'Finish receiving'
   --> The Fund line in invoice.tt is out of order
4. Apply patch
5. Verify the order is now fixed

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d56b959fea)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:43:04 +00:00
214605aff9 Bug 33421: Fix filtering suggestions by status
If the display is by status and a specific status is selected in the
filter, the filter won't have any effects.

Test plan:
Create several suggestions, with different status, for different
libraries.
Use the "display by status" view and filter on a given status
=> Result must be relevant

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec0ebda77d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:43:04 +00:00
Thibaud Guillot
75112a7e88 Bug 33686: Correction of existing terms related to 'Script of title'
According to https://cdn.ifla.org/wp-content/uploads/U_B_100_update2022_online_final.pdf

Signed-off-by: David Nind <david@davidnind.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 e40bc40c6f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:43:04 +00:00
Thibaud Guillot
d8fc61ad65 Bug 33686: Update plugin unimarc_field_100.pl with 2022 values
According to https://cdn.ifla.org/wp-content/uploads/U_B_100_update2022_online_final.pdf

Signed-off-by: David Nind <david@davidnind.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 cd7ddd6325)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:43:03 +00:00
d322e76606 Bug 33761: Alter query to remove items with active transfers from available list
Current code removes all items without an active transfer, and any with completed transfers.

This patch moves the conditionals for transfers into the join, then adds a new
condition to remove items with active transfers.

To test:
1 - Apply unit test patch only
2 - prove -v t/db_dependent/HoldsQueue.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/HoldsQueue.t
6 - Success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d95312328d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:34:45 +00:00
90579d3c61 Bug 33761: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 67e9356dea)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:34:44 +00:00
24c094b47c Bug 33624: Hide the "list" tab if authority is selected
The "Select a list of records" should only be available for biblio
records. But if the page is accessed using the back button of the
browser it will be displayed for authorities as well.

Test plan:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected
=> Without this patch you see the tab "Select a list of records"
=> With this patch applied it's hidden when the page is loaded

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 c87b1bba1b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:31:44 +00:00
e50edcb1a0 Bug 33735: Misspelling in SMS provier
Correct spelling error: "provier" -> "provider"

This change is a one-character edit, I think visual inspection of the
patch is sufficient testing.

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 4ad0e757d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:31:44 +00:00
97aa23c7f3 Bug 33489: (QA follow-up) Add missing index prefix in DBRev
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c69b7c69ca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:28:07 +00:00
b05ad7fcfb Bug 33553: Remove unecessary GetCategories calls in templates
This patch removes unnecessary references to
AuthorisedValues.GetCategories:

SET AuthorisedValuesCategories = AuthorisedValues.GetCategories

The AuthorisedValuesCategories variable is not used.

To test, apply the patch and go to Tools -> Patron clubs.

- If necessary, create a club template with "Allow public enrollment"
  enabled.
- Create a new club. The club creation process should work correctly.
- Open a patron account for checkout and confirm that you can enroll the
  patron in the new club via the "Clubs" tab.
- Log in to the OPAC and confirm that you can successfully enroll
  yourself in the new club via the "Clubs" tab on your patron summary
  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 878b0d0e0f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:01:11 +00:00
386cdb6c57 Bug 33599: Use template wrapper for breadcrumbs: Various
This patch updates various templates so that they use the new WRAPPER
for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- ILL requests
  - New ill request
  - Manage ill request
- Bibliographic record ->
  - Place hold
  - Place multiple holds
- Tools ->
  - Comments awaiting moderation
  - Approved comments
- Suggestions
  - New suggestion
  - View suggestion
  - Edit suggestion
- Lists
  - Public Lists
  - Private lists
  - New list
  - Edit list
  - Transfer list
  - View list contents

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50f387876e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:00:25 +00:00
2e55b07092 Bug 32914: (follow-up) Improve handling of list tab visibility
This patch makes minor changes to the way this page handles switching
between authority and bibliographic record batch operation in order to
ensure that the list tab is correctly shown or hidden and that the list
tab selection isn't transmitted when an authority batch is submitted.

This patch also changes the labels on the "record type" fields to fix
the incorrect use of the abbreviated "biblios" in favor of
"Bibliographic."

To test, apply the patch and go to Cataloging -> Batch record
modification

- With the "Bibliographic records" selected, click the "Select a list
  of records" tab."
- Select the "Authority records" radio button.
- The "Select a list of records" tab should disappear, and the "Upload a
  file" tab should now be selected."
- Select the "Bibliographic records radio button.
- The "Select a list of records" tab should reappear, and the "Upload a
  file" tab should be selected.
- Test all combinations of form submissions to confirm that each works
  correctly:
  - Bibliographic records by upload, list, and biblionumber entry
  - Authory records by upload and authority record number entry

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit baa3f81b8d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:00:05 +00:00
428ac3bb90 Bug 32914: Use template wrapper for batch record deletion and modification templates
This patch updates the batch record modification and batch record
deletion templates to replace tab markup with the use of WRAPPERs.

This patch adds a "clearfix" snippet of CSS to _mixins.scss copied from
Bootstrap. Applied to the active tab pane, this helps in situations
where Bootstrap tabs follow a floated element.

The patch also wraps tab label strings in <span> to ensure they can be
translated.

Unrelated: The patch removes an extra </option> from the batch record
modification template.

To test you should have at least one list and at least one MARC
modification template defined.

- Apply the patch and go to Cataloging -> Batch record modification
- You should see three tabs, "Upload a file," "Select a list of
  records," and "Enter a list of record numbers."
- The tabs should look correct and work correctly.
- Checking the "Authorities" radio button should hide the lists tab.
- Test that submissions from each form work correctly.

- Go to Cataloging -> Batch record deletion and perform the same tests.

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c2eb1da53)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:00:05 +00:00
52649e7514 Bug 33158: (follow-up) Fix for QA test failure
The page seems to work fine without these changes but the QA test script
is happier with "USE raw" and html_helpers.inc added.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b1a5e34a7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
87f5bbe77b Bug 33158: Use template wrapper for authorized values and item types administration tabs
This patch updates the authorized values and item types administration
templates so that they use the new WRAPPER directive to build tabbed
navigation.

Seeing that the markup in itemtypes.tt and authorised_values.tt is
indential when it comes to icon selection, I have moved that section of
the template into an include file and updated both templates to use it.

The patch also makes minor SCSS changes, so to test you must rebuild the
staff interface CSS.

To test, apply the patch and go to Administration -> Item types.

- Edit an item type.
- On the edit page you should see tabs under "Choose an icon."
- Confirm that the tabs look correct and work correctly.
- If you did not previously have any icon selected, the "None" tab
  should be active.
- If you had an icon selected, that icon set's tab should be active.
- Confirm that if you specify a remote image
  (e.g.https://via.placeholder.com/50/FF0000/FFFFFF.png) the tab is
  correctly shown after you save and re-edit.
- Confirm that changing icons works correctly and that the selected
  icon's tab is always active when you return to the edit view.

Perform the same tests in Administration -> Authorized values.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49c64f3d27)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
Aleisha Amohia
1f831624e8 Bug 33220: Fix recalls to pull to not show in transit or allocated items
This patch fixes the Recalls to pull circulation report so that it does
not show items that are already allocated to another recall.

This requires the UseRecalls system preference to be enabled and recalls
circulation and fines rules to be configured.

To test:
1. Cancel any recalls on Item A/Biblio A.
2. Check out Item A to Patron A. Item A should be the only item on Biblio A (pick a record with only one item, or create a record with one item).
2. Log into the OPAC as Patron B.
3. Place a recall on Item A for Patron B. Change the pickup library so
it isn't your default library.
4. Log into the OPAC as Patron C.
5. Place a recall on Item A for Patron C. Item A should now be checked out to Patron A, with two recalls on it for Patrons B and C.
6. Log back into the staff interface.
7. Check in Item A. Confirm the recall and transfer for Patron B.
8. Go to Circulation -> Recalls to pull. Notice the recall for Patron C shows here, even though the one item that could fill this recall has already been allocated to Patron B and is in transit
9. Apply the patch and restart services
10. Refresh the Recalls to pull page
11. Confirm the recall no longer shows on the Recalls to pull page -->
SUCCESS
12. Go to Biblio A and add a second item - Item B
13. Go back to Recalls to pull and refresh the page
14. Confirm the recall for Patron C now shows and can be filled by Item
B

Sponsored-by: Auckland University of Technology
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b439354026)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
3c9cb0ffd3 Bug 33340: Correct formatting of English 1-page order PDF when it covers multiple pages
If a basket group contains many ordered items then this patchset will
ensure:
 - The page number at the bottom of the first page is not obscured
 - The table of ordered items does not start half way down the second
 page

Test plan:

1) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
2) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to English 1-page layout option.
3) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
4) Create a basket for this vendor. Add many orders to this basket, for
example 25 items (this is to make the Order PDF cover multiple pages).
5) Close the basket and add it to a basket group of the same name.
6) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
7) Click the button to Export as PDF.
8) View the exported PDF. Confirm the PDF is multiple pages long. If it
is not then re-open the basketgroup and add more orders to the basket
and repeat steps 5, 6, 7 and 8
9) If the PDF is multiple pages long then confirm:
- The page numbers at the bottom of the first page are not obscured by
the order table.
- That the order table starts near the top of the second page, and not
half way down.
10) Reopen the basketgroup. Edit the details and remove the delivery
place text. Re-close the basketgroup.
10) Repeat steps 7 and 8.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e7dfa2fba)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
61c4f25542 Bug 33297: DBRev 22.11.06.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9633c0a7de)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
9811b13bc7 Bug 33297: (follow-up) DBRev check wrong preference exists
Better db upgrade messages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fdd8ca72e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
f45c85e8e0 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 72d88cab9e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
247f2e23de 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 c5bf76b19e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
0fd4f63a30 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 09c0c2c876)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 12:18:10 +00:00
2e1d7d0365 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 f1b75d49bb)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 10:16:07 +00:00
8318a0ed4e 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 b28d329d8a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-06-07 10:16:07 +00:00