]> git.koha-community.org Git - koha.git/log
koha.git
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 months agoBug 33774: Loading club table in every tab in patron details
Owen Leonard [Fri, 19 May 2023 11:30:28 +0000 (11:30 +0000)]
Bug 33774: Loading club table in every tab in patron details

This patch corrects a minor regression in template markup caused by Bug
33774. The Bootstrap tab attributes were lost (presumably in a merge)
causing the whole tab structure to break.

To test, you should have at least one club defined.

Apply the patch and view the patron details page. Each tab should load
its contents correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33785: Some UI fixes to the orderreceive.tt modal
Lucas Gass [Fri, 19 May 2023 15:28:22 +0000 (15:28 +0000)]
Bug 33785: Some UI fixes to the orderreceive.tt modal

To test:
1. Apply patch
2. Follow the steps in Bug 8179 to generate the modal on orderreceive.tt
3. Check that the following issues have been corrected:
    -The select2 dropdown for #bookfund is splitting onto multiple lines in the modal.
    -The modal header has a green line extending through it.
    -At smaller screen sizes the modal close button ( upper right corner of modal ) drops down below the h4. It should stay on the same line as the h4.
    -The modal is not centered on the screen.
    -The toogle inactive/active checkbox can become it's own list element.
    -The #current-fund can become a hint

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 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>
17 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>
17 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>
17 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>
17 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>
17 months agoBug 8179: (follow-up) Restore funds dropdown and checkbox
Tomas Cohen Arazi [Wed, 17 May 2023 15:32:34 +0000 (12:32 -0300)]
Bug 8179: (follow-up) Restore funds dropdown and checkbox

This patch reintroduces the dropdown that got lost in some refactoring
of the patchset. It also introduces a couple minor fixes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33771: Fix markup errors in orderreceive.tt
Lucas Gass [Thu, 18 May 2023 16:10:02 +0000 (16:10 +0000)]
Bug 33771: Fix markup errors in orderreceive.tt

This patch fixed the following on orderreceive.tt:

-One of the <th> is closed with a </td>
-The #jobpanel element div is not properly closed
-Style tags are in the HTML body and they should be in the HTML head
-The #modal-order-main needs a class of 'row', this has been added.

Apply the pacth and follow the steps in 8179 until you get to the orderreceive.tt. There should be no visual changes but the markup has been corrected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: (QA follow-up) Make sure tests get the right EmailFieldPrimary value mocked
Tomas Cohen Arazi [Thu, 18 May 2023 15:11:37 +0000 (12:11 -0300)]
Bug 29046: (QA follow-up) Make sure tests get the right EmailFieldPrimary value mocked

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33769: Terminology: 'Warning: Item {barcode} is reserved'
Owen Leonard [Thu, 18 May 2023 14:40:45 +0000 (14:40 +0000)]
Bug 33769: Terminology: 'Warning: Item {barcode} is reserved'

This patch corrects an instance of the term "reserved" and replaces it
with "on hold."

The string is shown when the user tries to add an item which is on
hold to a bundle.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: DBRev 22.12.00.048
Tomas Cohen Arazi [Thu, 18 May 2023 15:03:26 +0000 (12:03 -0300)]
Bug 29046: DBRev 22.12.00.048

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: Fix and amend system preference description
Katrin Fischer [Sun, 23 Apr 2023 11:38:12 +0000 (11:38 +0000)]
Bug 29046: Fix and amend system preference description

The first line would not show in the system preference editor
due to missing quotes.

Also added information on the option names, link to the schema
and an example.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: Reword system preference.
Martin Renvoize [Thu, 20 Apr 2023 13:23:39 +0000 (14:23 +0100)]
Bug 29046: Reword system preference.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: Unit tests
Martin Renvoize [Thu, 20 Apr 2023 13:18:20 +0000 (14:18 +0100)]
Bug 29046: Unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: Change link in EmailFieldPrecedence and add link in EmailFieldPrimary
Caroline Cyr La Rose [Mon, 13 Mar 2023 20:01:30 +0000 (16:01 -0400)]
Bug 29046: Change link in EmailFieldPrecedence and add link in EmailFieldPrimary

This patch modifies the link in EmailFieldPrecedence to reflect the new
name of EmailFieldPrimary. It also adds a note in the latter to set the
'first valid' order in the former.

To test:
1. Go to Administration > Global system preferences
2. Search for EmailFieldPrecedence
3. Click on the link in the description
   --> It should lead to EmailFieldPrimary
4. Read the note in EmailFieldPrimary, make sure the grammar and
   spelling are correct.
5. Click the link to EmailFieldPrecedence
   --> It should lead to EmailFieldPrecedence

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>
17 months agoBug 29046: Use EmailFieldPrecedence in first_valid_email_address
Martin Renvoize [Fri, 10 Mar 2023 10:47:51 +0000 (10:47 +0000)]
Bug 29046: Use EmailFieldPrecedence in first_valid_email_address

This patch update the Koha::Patron->first_valid_email_address method to
use the newly defined EmailFieldPrecedence preference.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 29046: Add 'EmailFieldPrecedence' preference
Martin Renvoize [Fri, 10 Mar 2023 10:46:51 +0000 (10:46 +0000)]
Bug 29046: Add 'EmailFieldPrecedence' preference

This patch adds a new EmailFieldPrecidence systempreference to allow
users to set the precicence in which patron email fields should be used
for communications.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33203: Add letter_code to the letter dropdown text
Lucas Gass [Fri, 10 Mar 2023 21:56:57 +0000 (21:56 +0000)]
Bug 33203: Add letter_code to the letter dropdown text

To test:
1. Add a new notice in the Circulation module with a letter code of 'ABC'. Give the new notice a name of 'Overdue notice'.
2. Now to go Overdue notice/status triggers and look at the dropdown, notice 2 choices that both read 'Overdue notice'.
3. Apply patch and try again.
4. The new notice should now read "Overdue notice (ABC)" and should be easy to distinguish from the original.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 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>
17 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>
17 months agoBug 33708: Make staff interface login not require public API (OAuth/OIDC)
Tomas Cohen Arazi [Tue, 9 May 2023 21:03:50 +0000 (18:03 -0300)]
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>
17 months agoBug 23773: Send membership expiry notices by sms too
Julian Maurice [Thu, 21 Jul 2022 09:39:07 +0000 (11:39 +0200)]
Bug 23773: Send membership expiry notices by sms too

Test plan:
1. Verify in "About" page that SMS::Send is installed.
   If not, install it.
2. Set system preferences:
   - SMSSendDriver = 'Test'
   - MembershipExpiryDaysNotice = 30
3. In "Notices and Slips" tool, edit the 'MEMBERSHIP_EXPIRY' letter and
   verify that both email and sms parts are filled. Use a different
   title and body for the sms part
4. Create a new borrower with an email address and an SMS number. Set
   their expiry date to a date next week
5. Run misc/cronjobs/membership_expiry.pl --confirm
6. Verify in the patron "Notices" tab that two notices are pending, one
   for email, one for sms

Sponsored-by: Médiathèque de Montauban
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33138: Don't copy tag 147 to authority MARC frameworks
Phil Ringnalda [Sun, 5 Mar 2023 03:26:22 +0000 (19:26 -0800)]
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>
17 months agoBug 32959: Don't store results of autobarcode in item editor templates
Kyle Hall [Tue, 14 Feb 2023 13:51:13 +0000 (08:51 -0500)]
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>
17 months agoBug 29993: Show Syndetics covers when using shelfbrowser controls
Lucas Gass [Mon, 17 Apr 2023 17:41:02 +0000 (17:41 +0000)]
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>
17 months agoBug 33246: Add some space between icon and text when there is only one result
Katrin Fischer [Sun, 14 May 2023 11:37:57 +0000 (11:37 +0000)]
Bug 33246: Add some space between icon and text when there is only one result

When there is only one result line, the text "Checked out" would
show directly after the icon at the end of the title. This makes sure
there will always be a little space between 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>
17 months agoBug 33246: Show the onloan status on the BarcodeFallbackSearch result
Jonathan Druart [Thu, 11 May 2023 12:03:25 +0000 (14:03 +0200)]
Bug 33246: Show the onloan status on the BarcodeFallbackSearch result

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>
17 months agoBug 33010: Do not filter checkins with logged in patrons branch in printslip.pl
Emmi Takkinen [Mon, 20 Feb 2023 08:26:29 +0000 (10:26 +0200)]
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>
17 months agoBug 33713: Make batch operations from report results open in new tab
Lucas Gass [Fri, 12 May 2023 18:06:57 +0000 (18:06 +0000)]
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>
17 months agoBug 33594: Only sort on title main heading
Nick Clemens [Fri, 5 May 2023 12:51:19 +0000 (12:51 +0000)]
Bug 33594: Only sort on title main heading

This patch simply remvoes sort from all elements that are not strictly
the main title

Note:
If multiple fields are set as sort, they are collapsed into a single entry in
the {field}__sort field in the ES index. The order will be determined by the order in
the marc record

To test:
1 - Apply patch
2 - perl misc/search_tools/rebuild_elasticsearch -r -v
3 - Search the catalog
4 - Sort by title
5 - Confirm records are correct
6 - Add a 240 (before the 245) with subfield a 'AAAAA'
7 - Confirm sorting is not affected
8 - View record details, click 'Elasticsearch record: Show'
9 - Find 'title__sort' and confirm it looks correct (does not include AAAAA)

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>
17 months agoBug 33594: Update mappings and comment
Nick Clemens [Thu, 4 May 2023 11:34:25 +0000 (11:34 +0000)]
Bug 33594: Update mappings and comment

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33721: Fix display of shipping cost/fund on invoice summary page
Katrin Fischer [Sun, 14 May 2023 11:19:07 +0000 (11:19 +0000)]
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>
17 months agoBug 33421: Fix filtering suggestions by status
Jonathan Druart [Wed, 10 May 2023 10:19:13 +0000 (12:19 +0200)]
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>
17 months agoBug 33686: Correction of existing terms related to 'Script of title'
Thibaud Guillot [Wed, 10 May 2023 08:13:57 +0000 (10:13 +0200)]
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>
17 months agoBug 33686: Update plugin unimarc_field_100.pl with 2022 values
Thibaud Guillot [Wed, 10 May 2023 07:32:44 +0000 (09:32 +0200)]
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>
17 months agoBug 33314: Fix link into staff catalog and link text
Katrin Fischer [Sun, 23 Apr 2023 20:51:04 +0000 (20:51 +0000)]
Bug 33314: Fix link into staff catalog and link text

Both fixes concern the TICKET_NOTIFY message.

* biblio-title.inc builds a link with the intention
  of using it inside the Koha GUI. Therefore the baseURL part
  is missing. But we can use it for display and wrap it into
  a link.
* Changes second link from reading 'page' to 'concern management
  page'. Accessiblity guidelines teach us that you should not link
  general terms, but always be specific.

To test:
1. Make sure staffClientBaseURL is filled correctly
2. Enable CatalogConcerns
3. Enter an email address in CatalogerEmails
4. Go to a bibliographic record in the staff interface or in the OPAC
5. Click New > New catalog concern
6. Fill out the form and click Submit
7. Check the message_queue table for the message
8. Verify the first link is not working (incomplete) and the second is 'page'
9. Apply patch, drop db, create db and run web installer
10. Repeat setup and testing
11. Both links should now be updated and working

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>
17 months agoBug 33313: Fix catalog links in TICKET_NOTIFY
Katrin Fischer [Sun, 23 Apr 2023 11:57:46 +0000 (11:57 +0000)]
Bug 33313: Fix catalog links in TICKET_NOTIFY

This fixes the system preference name from IntranetBaseURL to
staffClientBaseURL.

As this feature has just been pushed I chose to fix the
database updates that will be run when installing 23.05.

To test:
* Verify the wrong link in TICKET_NOTIFY
* Drop database, create database, run web installer
* Verify the link is now correct in the notice

Bonus: Test update from 22.11 to 23.05 and verify the
notices are correct there as well.

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>
17 months agoBug 33761: Alter query to remove items with active transfers from available list
Nick Clemens [Thu, 18 May 2023 11:09:18 +0000 (11:09 +0000)]
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>
17 months agoBug 33761: Unit test
Nick Clemens [Mon, 15 Aug 2022 13:34:02 +0000 (13:34 +0000)]
Bug 33761: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 8179: Add vendor id on breadcrumb link
Tomas Cohen Arazi [Wed, 17 May 2023 17:43:07 +0000 (14:43 -0300)]
Bug 8179: Add vendor id on breadcrumb link

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 11844: Only display 'Additional fields' section if they are defined
Tomas Cohen Arazi [Wed, 17 May 2023 17:33:48 +0000 (14:33 -0300)]
Bug 11844: Only display 'Additional fields' section if they are defined

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33624: Hide the "list" tab if authority is selected
Jonathan Druart [Thu, 11 May 2023 12:35:23 +0000 (14:35 +0200)]
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>
17 months agoBug 33735: Misspelling in SMS provier
Owen Leonard [Mon, 15 May 2023 17:38:50 +0000 (17:38 +0000)]
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>
17 months agoBug 33489: (QA follow-up) Add missing index prefix in DBRev
Tomas Cohen Arazi [Wed, 17 May 2023 12:59:44 +0000 (09:59 -0300)]
Bug 33489: (QA follow-up) Add missing index prefix in DBRev

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: DBRev 22.12.00.047
Tomas Cohen Arazi [Wed, 17 May 2023 12:44:12 +0000 (09:44 -0300)]
Bug 32450: DBRev 22.12.00.047

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Fix SIP/Transaction.t
Marcel de Rooy [Wed, 19 Apr 2023 12:21:55 +0000 (12:21 +0000)]
Bug 32450: (QA follow-up) Fix SIP/Transaction.t

You forgot this one, Matt. Comment29 :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Change wording in debit types table
Matt Blenkinsop [Wed, 19 Apr 2023 10:29:38 +0000 (10:29 +0000)]
Bug 32450: (QA follow-up) Change wording in debit types table

This patch changes confusing wording in the debit types table. Column heading No issues charge has been changed to Blocks checkouts? and the column data is now simply Yes/No rather than Included/Not included

Test plan:
1) Apply patch
2) Navigate to debit types in administration
3) The column in the table should exist as described above

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Fix failing tests
Matt Blenkinsop [Wed, 19 Apr 2023 10:27:59 +0000 (10:27 +0000)]
Bug 32450: (QA follow-up) Fix failing tests

This patch fixes the failing tests in t/db_dependent/SIP/Patron.t

Test plan:
Run prove -v t/db_dependent/SIP/Patron.t and all tests should pass

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Update UsageStats for removed prefs
Marcel de Rooy [Fri, 14 Apr 2023 09:46:00 +0000 (09:46 +0000)]
Bug 32450: (QA follow-up) Update UsageStats for removed prefs

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Polishing atomic update
Marcel de Rooy [Fri, 14 Apr 2023 09:32:35 +0000 (09:32 +0000)]
Bug 32450: (QA follow-up) Polishing atomic update

Database comment.
Variable names.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: (QA follow-up) Fix QA test errors
Matt Blenkinsop [Wed, 1 Mar 2023 14:55:38 +0000 (14:55 +0000)]
Bug 32450: (QA follow-up) Fix QA test errors

Exec flag added to atomic update file, trailing whitespaces removed
Unit tests patched to remove duplicate variable names

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: Add boolean to DBIC schema
Matt Blenkinsop [Tue, 10 Jan 2023 16:32:40 +0000 (16:32 +0000)]
Bug 32450: Add boolean to DBIC schema

Adding boolean flag to DBIC schema. Test plan as per previous commits

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: Unit tests updated
Matt Blenkinsop [Tue, 10 Jan 2023 16:01:57 +0000 (16:01 +0000)]
Bug 32450: Unit tests updated

Unit tests for the non_issues_charges function have been updated to remove the system preferences and test based on the new database flags

Test plan:
1) Apply all patches
2) In the kshell, run prove -v t/db_dependent/Accounts.t
3) All tests should pass

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: Noissuescharge debit type exclusions
Matt Blenkinsop [Fri, 6 Jan 2023 13:51:00 +0000 (13:51 +0000)]
Bug 32450: Noissuescharge debit type exclusions

Currently the debit types to be excluded from the noissuescharge syspref are
hardcoded in non_issues_charges which gives no flexibility for selecting which
debit types should be included. This patch amends the subroutine to use a
database flag to identify which debit types should be included. It also adds a
column to the table in the Debit Types area of System Preferences which shows
which debit types are included. The ability to edit all debit types has been
added rather than just the non-system ones and the flag to include/exclude the
debit type from noissuescharge can be changed by clicking that edit button.

Test plan:
1) Choose a patron and add some fines to this patron that have different debit_types
2) Navigate to system preferences and observe that currently you can only amend
   the noissuescharge included debit types using three preferences:
   ManInvInNoissuesCharge, RentalsInNoissuesCharge, HoldsInNoissuesCharge
3) Apply both commits attached to this bug
4) Navigate as above and observe that these three system preferences are now gone
5) Navigate to Debit Types in System Preferences, the table should have a column
   called No issues charge that shows whether a debit_type is Included or Not
   included
6) Click the edit button and there should be a checkbox for Included in
   noissuescharge
7) Change some of the debit_types using this option and observe that the patron
   you added fines to will either be blocked from checkouts or able to checkout
   depending on which debit_types you include and the value of these fines.

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: DBIC Schema
Martin Renvoize [Tue, 10 Jan 2023 14:49:50 +0000 (14:49 +0000)]
Bug 32450: DBIC Schema

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32450: Update db to add noissuescharge flag and remove sysprefs
Matt Blenkinsop [Fri, 6 Jan 2023 13:52:32 +0000 (13:52 +0000)]
Bug 32450: Update db to add noissuescharge flag and remove sysprefs

This commit updates the database to add a new flag to show which debit_types are
included in noissuescharge. It also deletes the current sysprefs that are
hardcoded for this as these are now redundant.

Test plan:
1) Choose a patron and add some fines to this patron that have different debit_types
2) Navigate to system preferences and observe that currently you can only amend the
   noissuescharge included debit types using three preferences: ManInvInNoissuesCharge,
   RentalsInNoissuesCharge, HoldsInNoissuesCharge
3) Apply both commits attached to this bug
4) Navigate as above and observe that these three system preferences are now gone
5) Navigate to Debit Types in System Preferences, the table should have a column
   called No issues charge that shows whether a debit_type is Included or Not included
6) Click the edit button and there should be a checkbox for Included in noissuescharge
7) Change some of the debit_types using this option and observe that the patron you
   added fines to will either be blocked from checkouts or able to checkout depending
   on which debit_types you include and the value of these fines.

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33625: Tidy remaining cypress test files
Jonathan Druart [Wed, 17 May 2023 12:24:00 +0000 (14:24 +0200)]
Bug 33625: Tidy remaining cypress test files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33625: Adjust test to deal with cypress tests
Jonathan Druart [Wed, 17 May 2023 12:23:13 +0000 (14:23 +0200)]
Bug 33625: Adjust test to deal with cypress tests

Cypress test files were ignored.
This patch also deals with files in git index only.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33541: Add document type to list of suggestions when ordering
Katrin Fischer [Sun, 16 Apr 2023 14:01:10 +0000 (14:01 +0000)]
Bug 33541: Add document type to list of suggestions when ordering

This adds the document type (suggestions.itemtype) to the list
of accepted suggestions when creating an order from a suggestion.

To test:
* Add some suggestions and make sure to pick different document types.
* Accept those suggestions in the staff interface.
* Go to acquisitions
* Create a basket
* Add an 'order from a suggestion'
* Verify that the list shows the 'document type' nicely and correctly
* Order one, all good? sign off.

Signed-off-by: Juliet <jheltibridle@rcplib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Removed IS_OPAC param from AuthorisedValues.GetByCode

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33607: Handle default framework
Jonathan Druart [Tue, 9 May 2023 10:04:33 +0000 (12:04 +0200)]
Bug 33607: Handle default framework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33607: Add framework display to staff details page
Nick Clemens [Tue, 25 Apr 2023 14:14:19 +0000 (14:14 +0000)]
Bug 33607: Add framework display to staff details page

This patch adds a Frameworks pluing to allow fetching the framework text
and displays this on the intranet details page

To test:
1 - Apply patch
2 - View a record details page in staff
3 - Confirm you see the framework name
4 - prove -v t/db_dependent/Template/Plugin/Frameworks.t

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>
17 months agoBug 33550: (QA follow-up) Switch from double to single quotes in text
Katrin Fischer [Tue, 9 May 2023 21:06:44 +0000 (21:06 +0000)]
Bug 33550: (QA follow-up) Switch from double to single quotes in text

As we use single quotes in general and also in breadcrumbs and page
title on this specific page, we shoudl also use them for the main
content:

Are you sure you want to delete 'T'?

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33500
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33550: Remove question mark in breadcrumb
Caroline Cyr La Rose [Thu, 27 Apr 2023 19:19:21 +0000 (15:19 -0400)]
Bug 33550: Remove question mark in breadcrumb

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33500
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33550: Remove period in patron restriction type description
Caroline Cyr La Rose [Thu, 27 Apr 2023 19:15:18 +0000 (15:15 -0400)]
Bug 33550: Remove period in patron restriction type description

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33500
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33550: (follow-up) Rename Patron restrictions administration page to Patron restr...
Caroline Cyr La Rose [Tue, 25 Apr 2023 21:46:56 +0000 (17:46 -0400)]
Bug 33550: (follow-up) Rename Patron restrictions administration page to Patron restriction types)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33500
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33550: Rename Patron restrictions administration page to Patron restriction types
Caroline Cyr La Rose [Mon, 17 Apr 2023 20:58:06 +0000 (16:58 -0400)]
Bug 33550: Rename Patron restrictions administration page to Patron restriction types

This patch renames 'Patron restriction' to 'Patron restriction type' in the context of custom restriction type administration.

To test:
0. Apply patch
1. Enable PatronRestrictionTypes
2. Go to Administration
3. Check the name, spelling/grammar of the following elements
   * Section name
   * Section caption
4. Click 'Patron restriction types'
5. Check the name, spelling/grammar of the following elements
   * Title of the page (in the browser tab)
   * Breadcrumb
   * Left hand side menu
   * 'New' button
   * Page heading
6. Click 'New restriction type'
7. Check the name, spelling/grammar of the following elements
   * Title of the page (in the browser tab)
   * Breadcrumb
   * Page heading
8. Fill out the form and click 'Save' to create a new restriction type
   * Dialog message ('Restriction type added')
9. Click 'New restriction type'
10. Enter the same code as last time
    * Warning ('Restriction type code is already in use')
11. Click 'Cancel'
12. Click 'Edit' next to one of the types
13. Check the name, spelling/grammar of the following elements
    * Title of the page (in the browser tab)
    * Breadcrumb
    * Page heading
14. Without changing anything, click 'Save'
    * Warning ('Restriction type label is already in use')
15. Change the label and click 'Save'
    * Dialog message ('Restriction type updated')
16. Click 'Delete' next to one of the types
17. Check the name, spelling/grammar of the following elements
    * Title of the page (in the browser tab)
    * Breadcrumb
    * Page heading
    * Delete button
18. Click 'Delete this restriction type'
    * Dialog message ('Restriction type deleted')

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33500
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33223: Fix sendshelf
Martin Renvoize [Wed, 10 May 2023 17:02:35 +0000 (18:02 +0100)]
Bug 33223: Fix sendshelf

Two new occurences of first_valid crept in, this patch corrects those to
also use notice_

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33223: Replace 'first_valid' with 'notice' for email addresses
Martin Renvoize [Tue, 14 Mar 2023 15:07:46 +0000 (15:07 +0000)]
Bug 33223: Replace 'first_valid' with 'notice' for email addresses

This patch replaces the uses of first_valid_email_address with
notice_email_address in waiting_holds, transferstoreceive, clubs and
sendbasket so that we take EmailFieldPrimary into account for these
notices too.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33553: Remove unecessary GetCategories calls in templates
Owen Leonard [Mon, 15 May 2023 11:43:04 +0000 (11:43 +0000)]
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>
17 months agoBug 33599: Use template wrapper for breadcrumbs: Various
Owen Leonard [Mon, 24 Apr 2023 11:25:21 +0000 (11:25 +0000)]
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>
17 months agoBug 32914: (follow-up) Improve handling of list tab visibility
Owen Leonard [Tue, 25 Apr 2023 15:07:29 +0000 (15:07 +0000)]
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>
17 months agoBug 32914: Use template wrapper for batch record deletion and modification templates
Owen Leonard [Wed, 8 Feb 2023 17:46:16 +0000 (17:46 +0000)]
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>
17 months agoBug 33158: (follow-up) Fix for QA test failure
Owen Leonard [Tue, 9 May 2023 16:41:18 +0000 (16:41 +0000)]
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>
17 months agoBug 33158: Use template wrapper for authorized values and item types administration...
Owen Leonard [Mon, 6 Mar 2023 18:54:22 +0000 (18:54 +0000)]
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>
17 months agoBug 33220: Fix recalls to pull to not show in transit or allocated items
Aleisha Amohia [Tue, 14 Mar 2023 04:19:31 +0000 (04:19 +0000)]
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>
17 months agoBug 33340: Correct formatting of English 1-page order PDF when it covers multiple...
Alex Buckley [Mon, 27 Mar 2023 03:17:16 +0000 (03:17 +0000)]
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>
17 months agoBug 30358: DBRev 22.12.00.046
Tomas Cohen Arazi [Tue, 16 May 2023 17:42:09 +0000 (14:42 -0300)]
Bug 30358: DBRev 22.12.00.046

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 30358: Strip leading/trailing whitespace characters from input fields when catalo...
Aleisha Amohia [Fri, 25 Mar 2022 03:12:31 +0000 (03:12 +0000)]
Bug 30358: Strip leading/trailing whitespace characters from input fields when cataloguing

This enhancement adds a system preference StripWhitespaceChars which,
when enabled, will strip leading and trailing whitespace characters from
all fields when cataloguing both bibliographic records and authority
records. Whitespace characters that will be stripped are:
- spaces
- newlines
- carriage returns
- tabs

To test:
1. Apply patch and install database updates
2. Go to Administration, system preferences, find the new
StripWhitespaceChars preference. It should be "Don't strip" by default.
Change it to "Strip".
3. Search for a biblio record and edit it. Put some leading or trailing
whitespace characters in input fields and textarea fields and save.
4. Confirm these characters are removed when you save the record.
5. Repeat steps 3 and 4 for authority records.
6. Confirm tests pass t/db_dependent/Biblio/ModBiblioMarc.t

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Also strip inner newlines

This patch amends the StripWhitespaceChars system preference to also
strip inner newlines (line breaks and carriage returns) when enabled.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Inner newlines should be replaced with a space

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Fixing tests and including for inner newlines

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Clarify syspref wording about fields affected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Consider field has multiple subfields of same key

To test:

1) Click the clone subfield button to make multiple subfields with the
same key, i.e. 500$a$a$a
2) Save the record and confirm that the fields contain the correct data
after whitespaces are stripped.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Put multiple subfields fix on auth side

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) stripWhitespaceChars subroutine and tests

To test:

Confirm test plan above still works as expected and tests pass in
t/Koha_MetadataRecord.t

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Fixing ModBiblioMarc.t tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Do not strip whitespace from control fields

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30358: (follow-up) Simplify regex

The regex does the following:
1. Replace newlines and carriage returns with a space
2. Replace leading and trailing whitespace with nothing (strip)

Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33297: DBRev 22.12.00.045
Tomas Cohen Arazi [Tue, 16 May 2023 17:23:35 +0000 (14:23 -0300)]
Bug 33297: DBRev 22.12.00.045

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33297: (follow-up) DBRev check wrong preference exists
Fridolin Somers [Thu, 23 Mar 2023 07:09:35 +0000 (21:09 -1000)]
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>
17 months agoBug 33297: (follow-up) DBRev for existing databases
Fridolin Somers [Wed, 22 Mar 2023 08:30:21 +0000 (22:30 -1000)]
Bug 33297: (follow-up) DBRev for existing databases

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

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33365: (QA follow-up) Add check on item-level_itypes
Katrin Fischer [Sat, 22 Apr 2023 13:43:29 +0000 (13:43 +0000)]
Bug 33365: (QA follow-up) Add check on item-level_itypes

With biblio level itemtypes you won't have any on the
item type level, so I feel like it will make sense
to hide the column here like we do in other spots.

To test:
* pref at specific item = itemtype column shows
* pref at biblio level = no itemtype column

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33365: Add item type column to cn_browser results
Lucas Gass [Wed, 29 Mar 2023 22:58:34 +0000 (22:58 +0000)]
Bug 33365: Add item type column to cn_browser results

To test:
1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on.
2. Pick or create an item in that framework, edit that item.
3. TO the right of the 952$o notice the "...". Click that start the call number browser.
4. Notice there is no column for item type.
5. Apply patch, restart_all
6. Notice there is now a column for item type.

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>
17 months agoBug 33190: Add search history button to advance search form if EnableSearchHistory...
Adam Styles [Tue, 14 Mar 2023 01:27:32 +0000 (01:27 +0000)]
Bug 33190: Add search history button to advance search form if EnableSearchHistory keep

Add 'search history' button to advanced search button groups if 'EnableSearchHistory' sys pref is set to 'keep' via added code block to advsearch.tt

To test:
1) Login to Koha dev box instance
2) Select 'Advanced search module' '/cgi-bin/koha/catalogue/search.pl' 'Search history' icon will not be visible in tools groups in form.
3) Select 'koha administration' module '/cgi-bin/koha/admin/admin-home.pl'
4) Enter 'EnableSearchHistory' string into top search field
5) Change ' EnableSearchHistory' value to 'keep'
6) Press 'Save all Searching preferences' to save pref changes
7) Navigate back to Koha landing home '/cgi-bin/koha/mainpage.pl'
8) Select 'Advanced search module' '/cgi-bin/koha/catalogue/search.pl'
9) 'Search history' icon will now be visible in tools groups in form
10) SIGN OFF

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 33098: Revert suggestion status when orders are cancelled
Aleisha Amohia [Wed, 1 Mar 2023 01:02:01 +0000 (01:02 +0000)]
Bug 33098: Revert suggestion status when orders are cancelled

This enhancement will revert the status of a suggestion from ORDERED to
ACCEPTED when an order made from a suggestion is cancelled.

To test:
1. Log into the OPAC and go to purchase suggestions
2. Add a new purchase suggestion
3. Log into the staff interface. The suggestion will show on the home
page
4. Select the suggestion and mark it as Accepted
5. Go to Acquisitions. Find or create a basket
6. Add an order to the basket from a suggestion
7. You'll be redirected to the suggestions page. Click the order button
next to your suggestion
8. Fill out the order details as normal and confirm the order.
9. In a new tab, go to the suggestions management page and confirm the
suggestion now shows as ORDERED.
10. In the other tab with your basket, cancel the order you just made
from the suggestion.
11. Refresh the suggestions management tab. Confirm the suggestion now
shows as ACCEPTED.
12. Confirm tests pass t/db_dependent/Koha/Acquisition/Order.t

Sponsored-by: Waikato Institute of Technology
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32970: (follow-up) Move include to specific job file
Nick Clemens [Thu, 30 Mar 2023 07:54:51 +0000 (07:54 +0000)]
Bug 32970: (follow-up) Move include to specific job file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 32970: Use KohaTable for display of batch item modification results
Nick Clemens [Wed, 15 Feb 2023 15:30:04 +0000 (15:30 +0000)]
Bug 32970: Use KohaTable for display of batch item modification results

This patch updates the code to use KohaTables to provide export of the
batch modification results.

Additionally, searching is added, and the first two columns are made
searchable

To test:
1 - Perform a match item modification on several items
2 - View the results of the background job
3 - Apply patch
4 - Reload page
5 - Note you now have additional controls including 'search' and
  'export'
6 - Test searching and exporting
7 - Confirm all work as expected

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 11844: DBRev 22.12.00.044
Tomas Cohen Arazi [Tue, 16 May 2023 12:17:27 +0000 (09:17 -0300)]
Bug 11844: DBRev 22.12.00.044

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
17 months agoBug 11844: (follow-up) Fix tests
Katrin Fischer [Mon, 15 May 2023 20:54:41 +0000 (20:54 +0000)]
Bug 11844: (follow-up) Fix tests

Moves the test from 999 which already exists in record to 998
as the feature only matches on the first field.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 11844: DBIC schema
Tomas Cohen Arazi [Mon, 15 May 2023 17:37:16 +0000 (14:37 -0300)]
Bug 11844: DBIC schema

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 months agoBug 11844: Add tests
Julian Maurice [Wed, 29 Mar 2023 08:47:24 +0000 (10:47 +0200)]
Bug 11844: Add tests

Tests added for:

- Koha::AdditionalField
- TransferOrder
- marcfield_mode

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>