koha.git
15 months agoBug 32272: Restore last and previous borrowers on moredetail
Jonathan Druart [Mon, 21 Nov 2022 09:20:22 +0000 (10:20 +0100)]
Bug 32272: Restore last and previous borrowers on moredetail

GetItemsInfo added a card0, card1 and card2 info with the cardnumbers of
the last 3 borrowers.
But 31315 forgot to adjust the code when it has been moved to using
Koha::Items

Test plan:
Check an item in and out to several patrons
Go to the moredetail page (items) and confirm that the "last borrowers"
info is displayed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32505: Restore patron search by formatted dob
Jonathan Druart [Mon, 2 Jan 2023 16:12:40 +0000 (17:12 +0100)]
Bug 32505: Restore patron search by formatted dob

Prior to the rewrite of the patron searches (bug 30063 and friends) it
was possible to search for a patron using their date of birth, formatted
following the dateformat syspref.

Now it only works if the date is iso formatted.

This patch is providing a fix to restore the behaviour, but does not
make it consistent. Only searching patrons by date of birth is fixed
here, when we actually want to fix the problem for the REST API DT
wrapper instead.

Test plan:
Search for patrons given their date of birth. You need to select "date
of birth" in the "Search field" dropdown, or set it in
DefaultPatronSearchFields.

Note that the column filtering is still not working, but I guess it was
the case already in older versions. Ideally we will need to have a
"datatype" attribute passed to the the 'th' and retrieved from
datatables.js to add this same trick and build the query appropriately.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32535: Exclude flags from BorrowerUnwantedField system preference
Katrin Fischer [Wed, 28 Dec 2022 20:36:33 +0000 (20:36 +0000)]
Bug 32535: Exclude flags from BorrowerUnwantedField system preference

The system preference BorrowerUnwantedField includes a checkbox
for "System permissions (flags)." Checking it has no apparent effect;
one is still able to edit patron permissions with the box checked.
This patch excludes the field from the selectable fields.

To test:
* Search for the BorrowerUnwantedField system prefernce
* Verify that you can check/uncheck System permissions (flags)
* Verify it doesn't have any effect, as permissions are not set
  from the patron edit form, but separately
* Apply patch
* Verify you no longer can check/uncheck the field in the
  system preference

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 31492: Set CSRF token in circulation.pl
Lucas Gass [Fri, 13 Jan 2023 19:01:55 +0000 (19:01 +0000)]
Bug 31492: Set CSRF token in circulation.pl

To test:
* Turn on patronimages system preferences
* Go to any patron account
* Hover over the 'dummy image' for the Add button
* Browse and select an image for upload
* Saving results in the following error:

The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.

Apply patch and try again. You shouldn't need to try twice, it should work on the first attempt now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32597: Fix table display of OPAC article requests
Lucas Gass [Mon, 9 Jan 2023 18:12:33 +0000 (18:12 +0000)]
Bug 32597: Fix table display of OPAC article requests

To test:
1. Enable ArticleRequests
2. Make some requests (two or more) on the OPAC and go to the user
   summary.
3. The table rows display horizontally.
4. Apply patch
5. Try step 2 again, the table should display correctly.

Note: I made some whitespace changes to make the markup look correct.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 22042: Block all return actions when BlockReturnOfWithdrawn items is set to block
Nick Clemens [Fri, 8 Apr 2022 18:52:09 +0000 (18:52 +0000)]
Bug 22042: Block all return actions when BlockReturnOfWithdrawn items is set to block

Currently this syspref only bokcs the literal 'return' from a patron, i.e. the checkin

It still processes transfers, refunds lost items, updates NotForLoan status etc.

We should block all of these things

To test:
1 - Set BlockReturnOfWithdrawn to block
2 - Set an item as lost and withdrawn
3 - Check it in
4 - Item is found
5 - Apply patch
6 - Repeat 1-3
7 - Checkin is blocked, item still lost

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32465: Add 'queue' to koha-worker help documentation
Nick Clemens [Wed, 14 Dec 2022 15:44:28 +0000 (15:44 +0000)]
Bug 32465: Add 'queue' to koha-worker help documentation

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 14784: (follow-up) Unit tests
Shi Yao Wang [Thu, 14 Jul 2022 14:41:27 +0000 (10:41 -0400)]
Bug 14784: (follow-up) Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 14784: Fix checkin message for restricted patrons
Shi Yao Wang [Mon, 13 Jun 2022 18:05:53 +0000 (14:05 -0400)]
Bug 14784: Fix checkin message for restricted patrons

Test plan:
Before

1) Select a user with active indefinite or definite restrictions (manual restriction works)
2) Make sure finedays=0 for the user category. See [1]
3) Checkout and return an item (not overdue)
   A previous restriction reminder will appear
4) Checkout and return an overdue item (change the date at checkout)
   No previous restriction reminder will appear

After applying patch:
Same steps, but a reminder should appear for step 4)

[1] The "finedays" setting is called "Suspension in days" in the web interface, if you're searching for it like I did...

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 31950: Amend page-section width and alignment
Jacob O'Mara [Thu, 15 Dec 2022 19:04:51 +0000 (19:04 +0000)]
Bug 31950: Amend page-section width and alignment

Test Plan:
Navigate to Admin -> Libraries and click on a Library
Observe that the page-section is too wide and not aligned
Apply Patch
Observe that page-section is now the correct width

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32582: Fix error in .mailmap
Katrin Fischer [Fri, 6 Jan 2023 21:28:14 +0000 (22:28 +0100)]
Bug 32582: Fix error in .mailmap

The .mailmap had the addresses in the wrong
sequence. The .83 address is actually the correct
one.

How this works is easiest to see in git:
* Apply one of my patches, like bug 31962
* Do a git log
* You'll see the email address without .83 as author
* Apply this patch
* You should see the correct email now in both,
  matching the one in the patch file on bugzilla

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32628: Add 'page-section' to various serials pages
Owen Leonard [Fri, 13 Jan 2023 14:07:41 +0000 (14:07 +0000)]
Bug 32628: Add 'page-section' to various serials pages

This patch adds a "page-section" container div around the main section
of serials pages which lack it.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

To test you must have at least one subscription in your system. Apply
the patch and view the following pages to confirm that the main content
is contained in a white box:

- Subscription batch edit:
  - Go to Serials -> Search subscriptions -> Results
  - Check the box next to one or more search results and click "Edit
    selected serials."
- Subscription frequencies:
  - Serials -> Manage frequencies
- View subscription alerts:
  - Log in to the OPAC and search for a subscription.
    - On the subscription detail page click the "Subscribe to to email
      notification on new issues."
  - In the staff interface, locate that subscription and view its
    details.
    - Click the "subscribers" link under "Patron notification."

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32616: Add 'page-section' to various acquisitions pages
Owen Leonard [Thu, 12 Jan 2023 12:51:44 +0000 (12:51 +0000)]
Bug 32616: Add 'page-section' to various acquisitions pages

This patch adds a "page-section" container div around the main section
of acquisitions page which lack it.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

To test, apply the patch and view the following pages to confirm that
the main content is contained in a white box:

- Acquisitions -> Vendor -> Basket -> Create EDIFACT order
- Acquisitions -> EDIFACT messages
- Acquisitions -> Orders search -> Results
- Acquisitions -> Late orders
- Acquisitions -> Vendor -> Add to basket -> From a subscription
- Acquisitions -> Vendor -> Add to basket -> From a suggestion
- Acquisitions -> All available funds -> Ordered
- Acquisitions -> All available funds -> Spent
- Acquisitions -> Vendor -> Add to basket -> From an external source ->
  Results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32632: Add 'page-section' to some tools pages
Owen Leonard [Fri, 13 Jan 2023 15:34:42 +0000 (15:34 +0000)]
Bug 32632: Add 'page-section' to some tools pages

This patch adds a "page-section" container div around the main section
of some tools pages which lack it.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

Apply the patch and view the following pages to confirm that the main
content is contained in a white box:

 - From the cataloging home page: Item modifications by age. If
   necessary, add at least one rule to see the table listing all rules.
 - Go to Tools -> Batch extend due dates, and submit values which will
   return one or more results, keeping the "Preview results" checkbox
   checked. Confirm that the page previewing the results looks
   correct.
 - Go to Tools -> Quote editor. If necessary, add at least one quote in
   order to see the table of quotes.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32622: Fix Auth.t on D10
Jonathan Druart [Fri, 13 Jan 2023 11:15:15 +0000 (12:15 +0100)]
Bug 32622: Fix Auth.t on D10

It's caused by a version mismatch of Test::MockModule with D10,
which does not have this commit: https://github.com/geofffranks/test-mockmodule/commit/fef9e742e45e2437e3449eea9970d70555d44bff

We should remove the chaining here.

Test plan:
Confirm that Auth.t still pass, and is fixed on D10

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
15 months agoBug 32596: Filter jobs by enqueued on, not started on
Nick Clemens [Mon, 9 Jan 2023 14:09:29 +0000 (14:09 +0000)]
Bug 32596: Filter jobs by enqueued on, not started on

To test:
1 - Do a bunch of stuff in the staff interface the will generate background jobs
2 - Wait a bit to make sure all the jobs are done
3 - Visit Admin->Jobs
4 - Note there is nothing shown
5 - uncheck 'Current jobs only' and 'Only include jobs started in the last hour'
6 - Note that nothing is shown, but header says '(filtered from X jobs)'
7 - Apply patch
8 - Reload table
9 - Confirm you can see the finished jobs now

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32400: (follow-up) Add page-section to table of moved orders
Katrin Fischer [Fri, 6 Jan 2023 23:46:20 +0000 (00:46 +0100)]
Bug 32400: (follow-up) Add page-section to table of moved orders

To test:
* Make sure you have at least one open order, basket closed
* Go to Administration > budgets
* Clone the budget
* Close the budget
* Choose your new budget and save
* Confirm 'can't undo later...' question
* Verify the table of moved orders has the white background
  from the added page-section

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32400: Add page-section to aqbudgetperiods table
Lucas Gass [Wed, 4 Jan 2023 18:39:48 +0000 (18:39 +0000)]
Bug 32400: Add page-section to aqbudgetperiods table

To test:
1. Apply patch
2. Go to Administration -> Budgets
3. Close a budget
4. Make sure the page-section looks right.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32491: Split patron search terms on comma - autocomplete
Jonathan Druart [Fri, 6 Jan 2023 09:09:45 +0000 (10:09 +0100)]
Bug 32491: Split patron search terms on comma - autocomplete

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32491: Split patron search terms on comma
Jonathan Druart [Thu, 5 Jan 2023 08:23:45 +0000 (09:23 +0100)]
Bug 32491: Split patron search terms on comma

Previous behaviour allowed search 'surname, firstname'. We should remove
the comma from the search terms.

Test plan:
On the main patron search, search for "surname, firstname" and confirm
that with this patch applied the search returns the expected results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32528: Make safe_to_delete exit earlier on error conditions
Tomas Cohen Arazi [Mon, 26 Dec 2022 18:43:16 +0000 (15:43 -0300)]
Bug 32528: Make safe_to_delete exit earlier on error conditions

This patch makes the `Koha::Item->safe_to_delete` method return right
after one of the checked conditions is met. This way we avoid further DB
queries and processing.

No behavior change is expected

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests STILL pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 32528: Change return logic

Back to 1 return statement
Prevent the Koha::Result::Boolean instanciation duplication

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32481: Limit prefetch size for background jobs worker
David Cook [Thu, 22 Dec 2022 22:17:04 +0000 (22:17 +0000)]
Bug 32481: Limit prefetch size for background jobs worker

This patch adds a prefetch size of 1 to the background jobs worker,
so that it fetches 1 message at a time. Without this change,
the RabbitMQ connection timeout when too many messages for slow tasks
are fetched at the same time.

To test:
0. Apply patch
1. Run background worker
2. Rapidly enqueue multiple jobs that in total will take longer
than 30 minutes to process

Bug 32481: Use correct prefetch syntax for RabbitMQ

According to https://www.rabbitmq.com/stomp.html the header to
use for managing the prefetch is "prefetch-count".

You can verify the number of delivered and unacknowledged messages
on a channel on a connection by running "rabbitmqctl list_channels"
on the RabbitMQ host. This will tell you how many messages have been
delivered and are awaiting acknowledgement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32349: Remove find-nonutf8 tests
Jonathan Druart [Wed, 4 Jan 2023 14:33:41 +0000 (15:33 +0100)]
Bug 32349: Remove find-nonutf8 tests

We don't run it and it does not seem very useful. Let's remove it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32349: Remove TEST_QA
Jonathan Druart [Fri, 25 Nov 2022 08:07:34 +0000 (09:07 +0100)]
Bug 32349: Remove TEST_QA

There is an env var that we are passing from koha-testing-docker, TEST_QA.
It's used in Koha from a single test file, t/00-testcritic.t.
If not set, no test is run.

Do we really need this? libtest-perl-critic-perl is packaged and automatically installed.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32208: Adjust Auth.pm for relogin without perms
Marcel de Rooy [Tue, 15 Nov 2022 13:55:18 +0000 (13:55 +0000)]
Bug 32208: Adjust Auth.pm for relogin without perms

If a second login on top of a current session fails on
permissions, we should not grant access without context.

Test plan:
[1] Run t/db../Auth.t, it should pass now.
[2] Test interface with/without this patch:
    Pick two users: A has perms, B has not.
    Put two staff login forms in two tabs.
    Login as A in tab1. Login as B in tab2.
    Without this patch, B gets in and crashes.
    With this patch, B does not get in ('no perms').
    Bonus: Go to opac if on same domain. You are still
    logged in as B.

NOTE: I added a FIXME here, since you could argue about filling
the session info or otoh deleting the session. We present an
authorization failure; people may not realize that they are
still logged in (see test plan - bonus).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32208: Extend Auth.t
Marcel de Rooy [Tue, 15 Nov 2022 13:53:17 +0000 (13:53 +0000)]
Bug 32208: Extend Auth.t

Test plan:
Without follow-up patch, Auth.t should fail:
    not ok 5 - No permission response
    not ok 6 - checkauth returned failure

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 31908: Add selenium tests
Jonathan Druart [Fri, 11 Nov 2022 12:08:53 +0000 (13:08 +0100)]
Bug 31908: Add selenium tests

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 31908: Resolve second login with another userid
Marcel de Rooy [Tue, 8 Nov 2022 13:40:17 +0000 (13:40 +0000)]
Bug 31908: Resolve second login with another userid

Somewhere the line undef $userid got removed.
We need it to resolve the second login situation.

Test plan:
Login in staff with user missing privileges.
On the login form login again with another staff user.
Note that you do no longer crash.

Run t/db../Auth.t
Run t/db../Koha/Auth/TwoFactorAuth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 31908: Add a test to show issue
Marcel de Rooy [Mon, 14 Nov 2022 11:07:09 +0000 (11:07 +0000)]
Bug 31908: Add a test to show issue

Test plan:
Without next patch, run Auth.t.
Should fail now before next patch resolves problem:
    not ok 2 - Login of patron2 approved
    ok 3 - Did not return previous session ID
    not ok 4 - New session ID not empty

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 31908: Replace an exit by a safe_exit in Auth.pm L1314
Marcel de Rooy [Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)]
Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314

No change in user experience. But since we can mock safe_exit,
we can enhance test results.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32422: Compiled CSS
Tomas Cohen Arazi [Fri, 6 Jan 2023 17:25:26 +0000 (14:25 -0300)]
Bug 32422: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
15 months agoBug 32319: Compiled CSS
Tomas Cohen Arazi [Fri, 6 Jan 2023 17:24:26 +0000 (14:24 -0300)]
Bug 32319: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31935: (follow-up) Make form look better
Lucas Gass [Thu, 8 Dec 2022 21:13:00 +0000 (21:13 +0000)]
Bug 31935: (follow-up) Make form look better

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>
16 months agoBug 31935: Fix misaligned form when adding serial subscription
Lucas Gass [Mon, 24 Oct 2022 22:53:24 +0000 (22:53 +0000)]
Bug 31935: Fix misaligned form when adding serial subscription

This patch attempts to fix the misaligned form on subscription-add.tt by removing some of the wrapping <p> tags and adding labels where appropriate.

To test:
1. Add a serial subscription and notice the misaligned form on step 1.
2. Apply patch
3. Look again and confirm that the form looks better.
4. Read through everything and make sure the form still makes sense.
5. Make sure the form still works properly.

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>
16 months agoBug 32531: Restore behaviour of 'include archived' filter
Frédéric Demians [Sat, 24 Dec 2022 08:20:09 +0000 (09:20 +0100)]
Bug 32531: Restore behaviour of 'include archived' filter

In Suggestions management, there is a sidebar menu to organize and
filter suggestions. In the "Suggestion information" filter section,
there is a checkbox "Include archived". When this box us unchecked, the
archived suggestions are not displayed. When this box is checked, all
suggestions are displayed, archived, and not archived. This is not the
case anymore, only archived suggestions are displayed, supposedly since
patch for bug 23991.

TO TEST:

1. On a Koha installation remove all suggestions (in the table).
2. Create two suggestions. Archive one of them.
3. Check/Uncheck filter 'Include Archived'. Confirm that when the box is
   checked, you don't see anymore the unarchived suggestion.
4. Apply the patch.
5. Repeat 3, and confirm that the filter operates properly.

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>
16 months agoBug 32529: Make Koha::Item->safe_to_delete consider 'P' holds as found
Tomas Cohen Arazi [Mon, 26 Dec 2022 18:27:02 +0000 (15:27 -0300)]
Bug 32529: Make Koha::Item->safe_to_delete consider 'P' holds as found

Currently, the Koha::Item->safe_to_delete method checks (among other things) if there are existing waiting or in-transit holds.

It seems that 'In processing' should block item deletion as well.

This patch implements that.

To test:
1. Apply up to the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Boo! Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32529: Regression tests
Tomas Cohen Arazi [Mon, 26 Dec 2022 18:26:22 +0000 (15:26 -0300)]
Bug 32529: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32529: Add Koha::Holds->filter_by_found
Tomas Cohen Arazi [Mon, 26 Dec 2022 16:02:25 +0000 (13:02 -0300)]
Bug 32529: Add Koha::Holds->filter_by_found

This patch adds a method for filtering Koha::Holds resultsets by the
status belonging to Koha's concept of 'found'.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Deal with biblio course reserve
Jonathan Druart [Wed, 4 Jan 2023 10:28:32 +0000 (11:28 +0100)]
Bug 32445: Deal with biblio course reserve

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: (follow-up) Fix availability display on opac-course-details
Jonathan Druart [Wed, 4 Jan 2023 08:09:06 +0000 (09:09 +0100)]
Bug 32445: (follow-up) Fix availability display on opac-course-details

This is reverting a change made by
  commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9
  Bug 19532: Recalls on OPAC

Is it correct? I let a comment on bug 19532 comment 928 to ask for
clarification.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: include item-status-schema-org.inc
Jonathan Druart [Tue, 3 Jan 2023 10:55:25 +0000 (11:55 +0100)]
Bug 32445: include item-status-schema-org.inc

Can be discussed, but it will prevent to fetch several times the same
related objects

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Remove non-Koha::Item support from item-status.inc
Jonathan Druart [Tue, 3 Jan 2023 10:43:28 +0000 (11:43 +0100)]
Bug 32445: Remove non-Koha::Item support from item-status.inc

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Fix notforloan display
Jonathan Druart [Tue, 3 Jan 2023 10:29:34 +0000 (11:29 +0100)]
Bug 32445: Fix notforloan display

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Fix availability display on opac-basket
Jonathan Druart [Tue, 3 Jan 2023 10:19:32 +0000 (11:19 +0100)]
Bug 32445: Fix availability display on opac-basket

Also fix holding branch

Will display an empty span if no location, big deal?

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Fix availability display on opac-course-details
Jonathan Druart [Tue, 3 Jan 2023 10:02:37 +0000 (11:02 +0100)]
Bug 32445: Fix availability display on opac-course-details

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32445: Fix display of 'not for loan' items in staff
Fridolin Somers [Mon, 12 Dec 2022 19:46:18 +0000 (09:46 -1000)]
Bug 32445: Fix display of 'not for loan' items in staff

test plan :
1) Edit any item, item type should be for loan, so not set to reference.
2) Set Not for loan status to "not for loan".
3) Go to the staff detail page:
=> Without patch it displays as: Not for loan (Not For Loan) Available
=> With patch it displays as: Not for loan (Not For Loan)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32173: Add list count to shelves.tt
Lucas Gass [Thu, 10 Nov 2022 21:14:09 +0000 (21:14 +0000)]
Bug 32173: Add list count to shelves.tt

To test:
1. Build a list and look at it in the staff client.
2. No indication of how many items are in the list.
3. Apply patch and look again
4. You should see "This list contains x titles"

Signed-off-by: Barbara Johnson <barbara.johnson@swbell.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32319: Give header search submit button more padding
Owen Leonard [Tue, 22 Nov 2022 11:50:32 +0000 (11:50 +0000)]
Bug 32319: Give header search submit button more padding

This patch tweaks the appearance of the header search submit button so
that it has a little more spacing, making it an easier click target.

The patch also gives the button a slightly different hover state in
order to make it clearer that it's a button.

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

View various pages in the staff interface to confirm that the header
search bar looks good and works correctly at various screen sizes.

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>
16 months agoBug 32095: Remove bullets from inventory tool status
Matt Blenkinsop [Wed, 30 Nov 2022 11:17:21 +0000 (11:17 +0000)]
Bug 32095: Remove bullets from inventory tool status

The new design included bullet points in a list where the elements were aligned to the right. The bullets have now been removed using "list-style: none;" to make the styling much cleaner.

Test plan:
1) Navigate to Cataloging > Inventory
2) Observe that in the "Optional filters for inventory list or comparing barcodes" section there are bullet points in the listed items
3) Apply patch
4) Navigate to the same window and observe that the bullet points are now missing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32255: Resolve "Cannot use file upload in batch record modification"
Géraud Frappier [Thu, 17 Nov 2022 21:11:11 +0000 (16:11 -0500)]
Bug 32255: Resolve "Cannot use file upload in batch record modification"

When using the batch record modification tool with a file of biblionumbers, nothing happens. When we click 'Continue' the file is somehow removed before continuing.

To test:
1. Get a file of biblionumbers (if you already have a file, proceed to step 2)
   1.1. Go to Reports
   1.2. Click on 'Create from SQL'
   1.3. Enter a report name (e.g. biblionumbers)
   1.4. Enter the following SQL query

SELECT biblionumber FROM biblio LIMIT 100

   1.5. Click 'Save report'
   1.6. Click 'Run report'
   1.7. Click 'Download' > 'Tab separated text'

2. Create a MARC modification template (if you already have a MARC modification template, proceed to step 3)
   2.1. Go to Cataloging > MARC modification template
   2.2. Click 'New template'
   2.3. Enter a template name (e.g. Add note)
   2.4. Click 'Submit'
   2.5. Click 'New action'
   2.6. Choose
        - Add new
        - Field 500 a
        - with value Note
   2.7. Click 'Add action'

3. Batch modify records
   3.1. Go to Cataloging > Batch record modification
   3.2. In the 'Upload a file tab', choose the biblionumber file
   --> Note that the name of the file appears next to the Choose button
   3.3. In 'Template', select the MARC modification template
   3.4. Click 'Continue'
   --> The name of the file disappears next to the Choose button and goes back to 'No file chosen'
   --> Message 'No records were modified

4. Apply path
   4.1. Procede step 3.
   4.2. See that we can see the list now

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 23032: Show MARC21 880 for 264 on detail pages
David Cook [Thu, 20 Oct 2022 05:26:48 +0000 (05:26 +0000)]
Bug 23032: Show MARC21 880 for 264 on detail pages

This patch adds the 880 display for 264 (in addition to 260) on the
detail pages.

To test:
0) Apply patch
1) Create/edit a record
2) Create 264 $6 880-01 $a Xianggang : $b Tushuguan, $c 2022
3) Create 880 $6 264-01 $a é¦™æ¸¯ : $b å›¾ä¹¦é¦†, $c 2022
4) View record and see "Publication details" appear with the 880
script on the detail page on both the staff interface and OPAC

Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32456: Preserve date accessioned if a date is not explicitly passed
Nick Clemens [Tue, 13 Dec 2022 14:24:13 +0000 (14:24 +0000)]
Bug 32456: Preserve date accessioned if a date is not explicitly passed

To test:
 1 - Edit an item record to have a blank date accessioned
 2 - Save the record as marcxml from the detail page
 3 - Edit the item to have an accession date
 4 - Stage and import the file - matching in KohaBiblio and replacing items
 5 - Import the file
 6 - Confirm the date accessioned is cleared
 7 - Apply patch
 8 - Provide an accession date for the item
 9 - Stage and import the file again
10 - Confirm the date remained
11 - Edit the item to remove the date
12 - Confirm you can manually blank the field

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32456: Unit tests
Nick Clemens [Fri, 16 Dec 2022 15:46:48 +0000 (15:46 +0000)]
Bug 32456: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32348: Add library public in columns settings
Fridolin Somers [Fri, 25 Nov 2022 07:57:40 +0000 (21:57 -1000)]
Bug 32348: Add library public in columns settings

Bug 27360 added public info on libraries table.
This should be added to columns settings.
Currently the column "STMP server" can not be managed in settings.

Test plan :
Play with columns settings of table Administration > Libraries

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>
16 months agoBug 32475: Replace "System prefs" with "System preferences" on log viewer tool
Kyle Hall [Thu, 15 Dec 2022 14:11:23 +0000 (09:11 -0500)]
Bug 32475: Replace "System prefs" with "System preferences" on log viewer tool

Basically, the phrase "System prefs" used on the log viewer page (viewlog.pl) is slang and we should use the correct terminology that we use everywhere else.

Test Plan:
1) Apply this patch
2) Browes to Tools > Log viewer
3) Note under Modules, is shows "System preferences" now instead of
   "System prefs"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 30694: Set decreaseloanholds undef when deleting circulation rule
Emmi Takkinen [Tue, 15 Nov 2022 07:31:13 +0000 (09:31 +0200)]
Bug 30694: Set decreaseloanholds undef when deleting circulation rule

When one tries to delete rule with field "Decreased loan period
for high holds" filled, delete fails without errors. This happens
because rule isn't set in code section handling the delete in
smart-rules.pl.

To test:
1. Create a new circulation rule and fill all fields.
2. Try to delete the rule.
=> Rule isn't deleted, all fields except "Decreased loan period
for high holds" are now empty or have value "Unlimited".
3. Modify the rule and set field "Decreased loan period for high
holds" empty.
4. Delete the rule.
=> Rule is deleted successfully.
5. Create a new rule, fill all fields expect field "Decreased loan
period for high holds".
6. Delete the rule.
=> Rule is deleted successfully.
7. Apply this patch.
8. Again create a new rule with field "Decreased loan period for high holds" filled.
9. Try to delete the rule.
=> Rule is deleted successfully.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31233: Amend 'fine grace period' as it's also used for suspensions
Katrin Fischer [Sat, 19 Nov 2022 20:57:55 +0000 (20:57 +0000)]
Bug 31233: Amend 'fine grace period' as it's also used for suspensions

The grace period setting in circulation rules is not only used
for fines, but also for suspensions. So the label 'Fine grace period'
is a little misleading.

This patch updates it to "Fine/suspension grace period".

To test:
* Go to Administration > Circulation rules
* Verify the description is "Fine grace period" in the big table
* Apply patch
* Verify the description now changed to "Fine/suspension grace period"

https://bugs.koha-community.org/show_bug.cgi?id=32261
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>
16 months agoBug 32468: Remove unecessary fetch titles JS functions
Jonathan Druart [Thu, 15 Dec 2022 07:19:57 +0000 (08:19 +0100)]
Bug 32468: Remove unecessary fetch titles JS functions

Those JS functions are no longer in use and can be removed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32468: Use fetchLocalTitleCount to know if local titles exist
Jonathan Druart [Thu, 15 Dec 2022 07:17:16 +0000 (08:17 +0100)]
Bug 32468: Use fetchLocalTitleCount to know if local titles exist

We don't need to fetch 20 titles to know if there is at least one. We
should call fetchLocalTitleCount.

Note that this should be implemented for all 'List' views.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32468: ERM - Populate dropdown list with all entries
Jonathan Druart [Thu, 15 Dec 2022 06:58:36 +0000 (07:58 +0100)]
Bug 32468: ERM - Populate dropdown list with all entries

The REST API routes is configured to return the 20 first results if
_per_page is not provided. Here we want to display all the
vendors/agreements/licenses/packages in the dropdown lists.

Ideally we should implement an infinite scroll to not load all the data
at once (https://vue-select.org/guide/infinite-scroll.html)

Test plan:
Create more than 20 vendors and confirm that, with this patch, all the
vendors are display in the dropdown list displayed on the add agreement
form
Same for agreements, licenses and local packages

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32378: Correction to allow_staff form field label
Andrew Auld [Wed, 30 Nov 2022 11:37:40 +0000 (11:37 +0000)]
Bug 32378: Correction to allow_staff form field label

The forms for attributes were mis-copied. This corrects that mistake.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32330: DBRev 22.12.00.001
Tomas Cohen Arazi [Mon, 19 Dec 2022 13:17:26 +0000 (10:17 -0300)]
Bug 32330: DBRev 22.12.00.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32330: Add indexes to table background_jobs
Fridolin Somers [Wed, 23 Nov 2022 06:49:02 +0000 (20:49 -1000)]
Bug 32330: Add indexes to table background_jobs

Table background_jobs should have indexes to optimize queries.

Query on borrowernumber :
mainpage.pl:    my $already_ran_jobs = Koha::BackgroundJobs->search(
mainpage.pl-        { borrowernumber => $logged_in_user->borrowernumber } )->count ? 1 : 0;

Query on status and queue :
misc/background_jobs_worker.pl:        my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues });

Test plan :
Run updatedatabase and play with background jobs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue
Tomas Cohen Arazi [Fri, 16 Dec 2022 12:00:45 +0000 (09:00 -0300)]
Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32470: (Bug 14783 follow-up) Fix mysql error in db_rev for 22.06.000.064
Michael Hafen [Wed, 14 Dec 2022 18:45:47 +0000 (11:45 -0700)]
Bug 32470: (Bug 14783 follow-up) Fix mysql error in db_rev for 22.06.000.064

Fix MySQL error:
ERROR 1093 (HY000): You can't specify target table 'systempreferences' for
 update in FROM clause

introduced by db_rev 064 for bug 14783.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32399: Remove FK constraints while changing columns
Marcel de Rooy [Mon, 5 Dec 2022 09:18:04 +0000 (09:18 +0000)]
Bug 32399: Remove FK constraints while changing columns

Some users have reported that the dbrev of bug 30483 fails. This might
depend on bad data, SQL server version, etc.
We now remove the constraints temporarily.

Test plan:
Reset your version in order to pass this dbrev again. So below
22.06.00.041.
* update systempreferences set value='22.0600040' where variable = 'Version';
Run updatedatabase.

Bonus: Create an issues record with invalid itemnumber (set FK check
off when doing so). Verify that dbrev fails and installer stops.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 20596: (QA follow-up) perltidy
Fridolin Somers [Thu, 15 Dec 2022 06:31:53 +0000 (20:31 -1000)]
Bug 20596: (QA follow-up) perltidy

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 20596: Add unit test for multiple values in authority search
David Cook [Wed, 14 Dec 2022 05:17:02 +0000 (05:17 +0000)]
Bug 20596: Add unit test for multiple values in authority search

This patch adds a unit test which returns 2 authority records
via an implicit OR when searching for strings from two different
authority records.

Test plan:
1. prove t/db_dependent/Search.t

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 20596: Join authority queries together with OR
David Cook [Wed, 14 Dec 2022 04:58:41 +0000 (04:58 +0000)]
Bug 20596: Join authority queries together with OR

This patch joins authority queries together with OR like Elasticsearch.

To the best of the author's knowledge, this code only gets triggered
when using record matching rules, but there may be other situations
where it's used.

Authority search in cataloguing plugins use a different path, and
authority search in authority home doesn't allow multiple queries,
so they'll never trigger this OR joining of queries.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Create a record matching rule with the following:
Matching rule code: NID
Description: NormdatenID
Match threshold: 100
Record type: Authority record
Search index: Any
Score: 101
Tag: 035
Subfields: a
Offset: 0
Length: 0
Normalization rule: None

Click "Remove this match check"

2. Stage gnd.xml (from BZ 20596 attachments)
- Choose "MARCXML" for "Format"
- Choose "Authority" for "Record type"
- Choose "NID" for "Record matching rule"
- Click "Stage for import"
3. Note the job gets to "100% Finished"
(Before this patch, it would say "0% Failed")

4. View the batch
5. Import the record
6. Repeat steps 2-4 and note that the record matching rule
worked

7. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl
8. Search for "e"
9. Note that the search works

10. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
11. Click tab 6
12. Click on the tag editor next to "a Personal Name"
13. Type "e" into each box and click "Search"
14. Note that the search works

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32247: Exit holds queue builder if there are no holds on the biblio
Nick Clemens [Thu, 17 Nov 2022 13:38:58 +0000 (13:38 +0000)]
Bug 32247: Exit holds queue builder if there are no holds on the biblio

update_queue_for_biblio currently
1 - gets the holds on a bib
2 - gets the items available to fill any holds
3 - combines these to build the queue, exiting if there are no holds or items

If there are no holds at step 1, we don't need to do step 2 or 3
This patch simply deletes the queue for this biblio, then exits if there are no holds

To test:
prove -v t/db_dependent/Reserves.t t/db_dependent/Koha/Item.t t/db_dependent/Koha/Hold.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteItem.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t t/db_dependent/HoldsQueue.t t/db_dependent/Circulation_holdsqueue.t t/db_dependent/Biblio_holdsqueue.t t/db_dependent/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers
Katrin Fischer [Wed, 16 Nov 2022 22:47:35 +0000 (22:47 +0000)]
Bug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers

In another bug we added spans to ease translations in the PROCESS
block for server types. This PROCESS is used in several places,
but only creates a problem when used in the title.

The patch removes the spans using the remove TT filter avoiding
having to change the PROCESS and causing a string change.

To test:
* Go to administration > Z39.50/SRU servers
* Add a new Z39.50 and a SRU server or look at the form
* The page title in the browser tab will show the span
* Same for editing an existing Z39.50 or SRU server
* Apply the patch
* Verify the page titles are now correct

Hint: you can see the full page title when hovering on the tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Hammat Wele <hammat@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32368: Add page-section to report results
Martin Renvoize [Tue, 29 Nov 2022 16:26:51 +0000 (16:26 +0000)]
Bug 32368: Add page-section to report results

This patch adds the page-section container to the results page after
running a report

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32300: Add page-section to cataloguing plugins (cat)
Owen Leonard [Tue, 29 Nov 2022 16:56:02 +0000 (16:56 +0000)]
Bug 32300: Add page-section to cataloguing plugins (cat)

This patch adds a "page-section" container div around the main section
of cataloging plugins which lack it. The patch also adds a "btn
btn-primary" buttons.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

These changes are simple enough that checking the diff is probably
enough, but if you want to test a plugin in action, you go to
Administration -> MARC bibliographic framework.

 - Choose Actions -> MARC structure on the framework you want to modify
 - Choose Actions -> Edit subfields on the tag you want to modify
 - Select the tab for the subfield you want to change.
   - In the "Other options" section near the bottom, use the "Plugin"
     dropdown to select the plugin you want to associate with that
     subfield.
 - In the basic MARC editor the subfield you updated should now have an
   icon next to it for triggering the plugin. Clicking it should trigger
   a popup window which shows the updated template.

For plugins with "authorities" in the name, configure the Authorities
structure under Administration -> Authority types.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32200: Add page-section to checkout notes page
Katrin Fischer [Thu, 17 Nov 2022 21:51:59 +0000 (21:51 +0000)]
Bug 32200: Add page-section to checkout notes page

To test:
* Turn on AllowCheckoutNotes system preference
* Check out an item
* Go to the OPAC and add a checkout note to your checkout
* In the staff interface, look at: Circulation > Checkout notes
* Verify the page section is missing from the notes table
* Apply patch
* Verify the table now looks better!

Signed-off-by: David <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32457: Fix CGI vulnerability in addorder.pl
Marcel de Rooy [Tue, 13 Dec 2022 14:31:10 +0000 (14:31 +0000)]
Bug 32457: Fix CGI vulnerability in addorder.pl

Test plan:
Go to acqui/addorder.pl.
Create two items.
Check if results still match your expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32115: Add ID to check-out default help message dialog to allow customization
Mona Panchaud [Sat, 5 Nov 2022 18:25:43 +0000 (19:25 +0100)]
Bug 32115: Add ID to check-out default help message dialog to allow customization

This adds a div with the id attribute selfcheckdefaulthelpmessage to
the first paragraph of the web based self check help page.

To test:
* Enable WebBasedSelfCheck
* Go to: /cgi-bin/koha/sco/sco-main.pl in the OPAC
* Log in and open help
* Verify by looking at the source code, that the first paragraph
  starting with "If this is your first time..." now has an id.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32394: Add tests
Jonathan Druart [Wed, 14 Dec 2022 08:01:33 +0000 (09:01 +0100)]
Bug 32394: Add tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32394: Restore long tasks queue
Jonathan Druart [Fri, 2 Dec 2022 13:43:27 +0000 (14:43 +0100)]
Bug 32394: Restore long tasks queue

We are sending "queue" as parameter, but "job_queue" is retrieved in
Koha::BackgroundJob->enqueue...

Test plan:
Read code and confirm the above.
More fun for test plan will be found on bug 32393

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32394: Regression tests
Tomas Cohen Arazi [Wed, 14 Dec 2022 17:30:18 +0000 (14:30 -0300)]
Bug 32394: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31166: Digest option is not selectable for phone when PhoneNotification is enabled
Kyle Hall [Fri, 15 Jul 2022 18:10:37 +0000 (14:10 -0400)]
Bug 31166: Digest option is not selectable for phone when PhoneNotification is enabled

Digests are not available via Talking Tech, but the artificial limit should not be in place for the non-TT phone notices. If only phone is selected, digest remains disabled.

Test Plan:
1) Apply this patch
2) Enable TalkingTechPhoneNotification
3) Verify behavior hasn't changed
4) Disable TalkingTechPhoneNotification, Enable PhoneNotification
5) Note disgest option is now selectable if only phone is selected

Signed-off-by: Evelyn Hartline <evelyn@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31166: (QA follow-up) Remove debugging lines

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31166: (QA follow-up) Implement on OPAC side

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Squashed by RM

16 months agoBug 32134: Show the bundle size when checked out
Julian Maurice [Tue, 8 Nov 2022 14:19:20 +0000 (15:19 +0100)]
Bug 32134: Show the bundle size when checked out

When checking out a bundle, it can be useful to know the number of items
in this bundle, so that librarians can quickly check if items are
missing.

Test plan:
1. Create a bundle (see bug 28854 comment 458)
2. Check out the bundle.
3. Verify that you have the bundle size in the message below the barcode
   input ("Checked out: [...]. Bundle of X items. Due on [...]")
4. Checkout an item that is not a bundle.
5. Verify that the bundle message does not appear

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32323: Correct focus state of some DataTables controls
Owen Leonard [Tue, 22 Nov 2022 17:10:23 +0000 (17:10 +0000)]
Bug 32323: Correct focus state of some DataTables controls

This patch makes changes to the style of some DataTable controls in
order to make hover, active, and focus states more consistent.

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

View a page that has a DataTable showing controls like "Columns,"
"Export," and "Configure." For example: Saved reports, Libraries,
Overdues.

 - Click the DataTables search form to put cursor focus there.
 - Use the tab key to move through the next buttons.
 - The style should now be more consistent with the appearance of other
   similar buttons in the staff client.
 - Test with and without text in the search filter.
 - Test pages which don't have the full set of controls, e.g. the
   table of of a patron's checkouts.

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>
16 months agoBug 32194: Capitalize "No" values for the patron categories "Can be guarantee" column
David Nind [Mon, 14 Nov 2022 21:14:40 +0000 (21:14 +0000)]
Bug 32194: Capitalize "No" values for the patron categories "Can be guarantee" column

This fixes the display of the patron categories "Can be guarantee"
column so that "No" values have a capital "N".

Test plan:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Note that for the "Can be guarantee" column, it shows "Yes" values
   with a capital "Y" and "no" values with a lowercase "n".
3. Apply the patch.
4. Refresh the page.
5. Note that any "No" values now have a capital "N".
6. Sign off D:

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>
16 months agoBug 32320: Remove text-shadow from header menu links
Owen Leonard [Tue, 22 Nov 2022 12:10:20 +0000 (12:10 +0000)]
Bug 32320: Remove text-shadow from header menu links

This patch unsets the text-shadow style on links in the header menu.
This makes the links look a little crisper. The style is inherited from
Bootstrap's defaults and is incorrect for our design.

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

View any page in the staff interface to confirm that header menu links
look correct.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32302: (follow-up) Hide ISBN label when list sent from the staff interface
David Nind [Wed, 30 Nov 2022 23:48:25 +0000 (23:48 +0000)]
Bug 32302: (follow-up) Hide ISBN label when list sent from the staff interface

This makes the same change to the staff interface. Lists sent
from the staff interface hide the ISBN label in the email message
when there are no ISBNs for a record.

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>
16 months agoBug 32302: Hide "ISBN" label when no ISBN data when sending list
David Cook [Wed, 30 Nov 2022 22:52:55 +0000 (09:52 +1100)]
Bug 32302: Hide "ISBN" label when no ISBN data when sending list

There is a logic mistake in the opac-sendshelf.tt template where
we test if the "ISBN" key exists in the "BIBLIO_RESULT" hash when
we should really be testing if the arrayref returned by "ISBN" is
empty or not, since that "ISBN" key always exists and contains at least
an empty arrayref.

Test plan:
1. Apply patch and restart your Koha Starman
2. Create a public list containing records with 020 MARC fields and
records without 020 MARC fields
3. View the list in the OPAC
4. Click "Send list" and email it to yourself
5. Note that only records with 020 MARC fields with show "ISBN:"
in the email output

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>
16 months agoBug 32417: Allow NULL in biblionumber in $order->store
Marcel de Rooy [Wed, 7 Dec 2022 13:27:02 +0000 (13:27 +0000)]
Bug 32417: Allow NULL in biblionumber in $order->store

If we are cancelling an order and call DelBiblio, we should
clear the biblionumber but not be crashing on it in ->store.

The absence of the clear prevented the crash. One bug sometimes
solves another one.

Test plan:
Create basket, order line.
Delete order with biblio record.
Verify result and logfile.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32417: Add unit test
Marcel de Rooy [Wed, 7 Dec 2022 13:51:14 +0000 (13:51 +0000)]
Bug 32417: Add unit test

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t
This test should fail without the follow-up and pass with it.
* not ok 53 - No croak on missing biblionumber when cancelling an order

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31160: Required fields in patron api
Matt Blenkinsop [Thu, 24 Nov 2022 15:37:51 +0000 (15:37 +0000)]
Bug 31160: Required fields in patron api

The Patron API PUT request required the fields "surname","address","city","library_id","category_id". Meanwhile the CSV import page for patrons only requires "surname","library_id","category_id". The fields for "address" and "city" have been removed from the "required" section of the api>v1>swagger>definitions>patron.yaml file to match the CSV import page.

Test Plan:
1) Send a PUT request to http://localhost:8081/api/v1/patrons/19 with an empty body
2) Error message should ask for 5 missing fields as listed above
3) Apply patch
4) Restart Apache server using "restart_all" in your ktd shell
5) Resubmit your request
6) Error message should now only request "surname","library_id","category_id"

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>
16 months agoBug 32355: Add css class url to URL syspref
Didier Gautheron [Mon, 28 Nov 2022 07:29:47 +0000 (08:29 +0100)]
Bug 32355: Add css class url to URL syspref

Add missing css class to URL syspref.

To Test:
1 - open admin/preferences.pl
2 - Search for URL
3 - casServerUrl, UsageStatsLibraryUrl, KohaManualBaseURL,
    PrivacyPolicyURL, LibrisURL input field size are small.
4 - Apply patch
5 - all URL fields have the same bigger size.

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>
16 months agoBug 32389: Fix Syndetics link on staff results page
Lucas Gass [Thu, 1 Dec 2022 17:40:30 +0000 (17:40 +0000)]
Bug 32389: Fix Syndetics link on staff results page

To test:
1. Have SyndeticsCoverImages on and Syndetics setup.
2. Do a search that will return some results with Syndetics images
3. Click on the image link and you will get a 404
4. Apply patch
5. Link works!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32422: Hardcoded paths in _common.scss precent using external node_modules
Tomas Cohen Arazi [Wed, 7 Dec 2022 19:16:58 +0000 (16:16 -0300)]
Bug 32422: Hardcoded paths in _common.scss precent using external node_modules

This patch makes:

- gulpfile.js add the parent dir's node_modules to the sass include path
- removes hardcoded paths from _common.scss

To test:
1. Have the latest KTD image (this is not KTD specific, but easier to
   test)
2. Make sure you don't have any node_modules/ dir in your koha clone
3. Run:
   $ kshell
  k$ yarn build --view opac
=> FAIL: You get:
kohadev-koha@kohadevbox:/kohadevbox/koha$ yarn build --view opac
yarn run v1.22.19
$ gulp build --view opac
[18:27:38] Using gulpfile /kohadevbox/koha/gulpfile.js
[18:27:38] Starting 'build'...
Error in plugin 'sass'
Message:
    koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss
Error: File to import not found or unreadable: ../../../../../node_modules/bootstrap/scss/functions.
        on line 37 of koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss
        from line 1 of koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
>> @import "../../../../../node_modules/bootstrap/scss/functions";

   ^

4. Apply this patch
5. Repeat 3
=> SUCCESS: It builds!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
16 months agoBug 32257: Fix capitalization - Patron Attribute
Katrin Fischer [Wed, 7 Dec 2022 20:14:36 +0000 (20:14 +0000)]
Bug 32257: Fix capitalization - Patron Attribute

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32257: Label for patron attributes misaligned
Matt Blenkinsop [Wed, 23 Nov 2022 17:12:59 +0000 (17:12 +0000)]
Bug 32257: Label for patron attributes misaligned

Label has now been realigned to match the format of the fields above. When clicking to add a new field, the delete button was also misaligned. This has now been reformatted to sit next to the "New" button

Test Plan:
1) Navigate to Tools > Batch patron modification
2) Add either card or borrower numbers to bring up the edit patrons fields
3) "Patron attributes:" is on the far right and above the select box. When adding a new field there is a big gap between the Add and  Delete buttons
4) Apply patch and navigate to same area
5) Observe that the Patron attributes option is aligned to match the fields above and the gap between the buttons has been removed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 28975: (QA follow-up) Fix indentation, simplify if statement
Kyle Hall [Fri, 2 Dec 2022 14:18:08 +0000 (09:18 -0500)]
Bug 28975: (QA follow-up) Fix indentation, simplify if statement

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 28975: Holds queue lists can show holds from all libraries even with IndependentB...
The Minh Luong [Tue, 25 Jan 2022 17:20:38 +0000 (12:20 -0500)]
Bug 28975: Holds queue lists can show holds from all libraries even with IndependentBranches

When using IndependentBranches, usually all branches are removed from the drop-down menus. But in the Holds Queue page, there is the possibility to choose "All branches". From there, you can see holds from all libraries.

To recreate :
1) Activate IndependentBranches, IndependentBranchesPatronModifications and IndependentBranchesTransfers
2) Create a staff user with limited permissions (NOT a superlibrarian), including holds permissions. Here are mine as an example
  - circulate (all)
  - catalogue
  - borrowers
    - delete_borrowers
    - edit_borrowers
  - reserveforothers (all)
  - reports (all)
3) Create (or make sure you already have) a patron in another branch (we'll call them patron X)
4) Place a hold for patron X on an available item from their own library
5) Run misc/cronjobs/holds/build_holds_queue.pl
6) Go to Circulation > Holds queue and make sure you can see the hold
7) Log in as your limited staff patron
8) Go to Circulation > Holds queue
9) In the drop-down menu, choose "All" and click Submit
-- Notice you see the hold of the patron from another branch under Patron
column: "A patron from library <library name>"
11) Apply the patch.
12) Notice that the "All" option is no longer available for the limited patron. Limited patrons can't see holds from other libraries anymore.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32291: (bug 16735 follow-up) Remove ref to library category in branches.tt
Jonathan Druart [Wed, 23 Nov 2022 09:08:26 +0000 (10:08 +0100)]
Bug 32291: (bug 16735 follow-up) Remove ref to library category in branches.tt

On bug 16735 we rewrite the library groups system. Those references in
branches.tt were part of the previous code, and they can be removed.

Test plan:
Confirm the above and that those code errors are never sent to the
template.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31984: TaxRate preference - add note about vendor updates
David Nind [Mon, 28 Nov 2022 12:28:34 +0000 (12:28 +0000)]
Bug 31984: TaxRate preference - add note about vendor updates

If a value for the TaxRates system preference is changed or
removed, vendors retain the original value recorded in their
tax rate field.

The vendor tax rate is used to calculate prices for orders
added to a basket. Where the tax rate doesn't match with the
system preference, a warning message is displayed on the order
form "Tax rate not defined in system preference TaxRates!".

This patch adds a note to the system preference description
about updating vendor tax rate information where required.

Test plan:
1. Check the values recorded for the TaxRates system preference.
2. For a vendor (Acquisitions > search for a vendor > Edit vendor),
   check the value recorded in the tax rate field.
3. Note that the tax rate field is populated from a dropdown list
   using values from the TaxRates system preference.
4. Change the TaxRates system preferemce to remove a tax
   rate. For example, change 0|0.12|0.1965 to 0|0.12.
5. Refresh the vendor page.
6. Note that the vendor tax rate remains as the original value
   until you edit the vendor.
7. Apply the patch.
8. Review the description for the TaxRates system preference and
   make sure the new note about updating vendor tax rates where
   required makes sense.
9. Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31675: Remove packages from debian/control that are no longer used
Kyle M Hall [Tue, 21 Sep 2021 11:08:44 +0000 (07:08 -0400)]
Bug 31675: Remove packages from debian/control that are no longer used

As far as I can tell, we are no longer using CGI::Session::Serialize::YAML or YAML::Syck, but they are still marked dependencies for the Debian package.

Signed-off-by: Danyon Sewell <danyonsewell@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32354: Accept session_state param given by OAuth IdP
Aleisha Amohia [Sun, 27 Nov 2022 21:24:59 +0000 (21:24 +0000)]
Bug 32354: Accept session_state param given by OAuth IdP

This patch ensures Koha doesn't throw an error if the IdP hands back a
session_state parameter.

To test:

1) Set up an identity provider
2) On the IdP's configuration, make it hand back a session_state
3) Confirm authentication using OIDC works with and without the
session_state

Sponsored-by: Plant & Food Research
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>