koha.git
22 months agoBug 31313: Fix availability - OPAC opac-detail
Jonathan Druart [Mon, 1 Aug 2022 06:59:53 +0000 (08:59 +0200)]
Bug 31313: Fix availability - OPAC opac-detail

Has to move some code to a method

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31313: Remove GetItemsInfo from opac-detail
Jonathan Druart [Fri, 3 Jun 2022 04:50:44 +0000 (06:50 +0200)]
Bug 31313: Remove GetItemsInfo from opac-detail

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with opac-detail

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31320: Remove GetItemsInfo from virtualshelves/sendshelf.pl
Jonathan Druart [Fri, 3 Jun 2022 06:33:00 +0000 (08:33 +0200)]
Bug 31320: Remove GetItemsInfo from virtualshelves/sendshelf.pl

And GetItemsLocationInfo from shelves.pl

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with virtualshelves/sendshelf.pl

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31317: Remove GetItemsInfo import from opac-tags
Jonathan Druart [Fri, 3 Jun 2022 06:23:55 +0000 (08:23 +0200)]
Bug 31317: Remove GetItemsInfo import from opac-tags

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with opac-tags

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31310: Remove GetItemsInfo from catalogue/imageviewer
Jonathan Druart [Thu, 2 Jun 2022 09:34:46 +0000 (11:34 +0200)]
Bug 31310: Remove GetItemsInfo from catalogue/imageviewer

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with catalogue/imageviewer

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31309: Remove GetItemsInfo from basket/sendbasket
Jonathan Druart [Thu, 2 Jun 2022 09:33:40 +0000 (11:33 +0200)]
Bug 31309: Remove GetItemsInfo from basket/sendbasket

Why are we display with $raw?
Why are we display the location code instead of the AV's lib?

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with basket/sendbasket

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31328: Call get_transfers from get_transfer
Jonathan Druart [Wed, 10 Aug 2022 13:33:13 +0000 (15:33 +0200)]
Bug 31328: Call get_transfers from get_transfer

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current
Tomas Cohen Arazi [Tue, 9 Aug 2022 11:40:45 +0000 (08:40 -0300)]
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current

This patch makes the get_transfer and get_transfers methods internally
use the new ->filter_by_current method.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31302: Fix spelling in sample_notices.yml
Alex Buckley [Tue, 9 Aug 2022 07:26:07 +0000 (07:26 +0000)]
Bug 31302: Fix spelling in sample_notices.yml

Test plan:
1. Apply patch
2. Confirm 'URL(s)', rather than urls(s), is in the line:
You can download the scanned materials via the following URL(s)

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31308: (QA follow-up) use count to see if no items present
Nick Clemens [Wed, 10 Aug 2022 11:53:13 +0000 (11:53 +0000)]
Bug 31308: (QA follow-up) use count to see if no items present

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31308: Remove GetItemsInfo from basket/basket
Jonathan Druart [Thu, 2 Jun 2022 09:31:38 +0000 (11:31 +0200)]
Bug 31308: Remove GetItemsInfo from basket/basket

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of
Koha::Items->search_ordered.

Here we are going to deal with basket/basket.pl

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31158: (bug 23991 follow-up) Fix suggestion search by dates
Jonathan Druart [Mon, 1 Aug 2022 06:14:27 +0000 (08:14 +0200)]
Bug 31158: (bug 23991 follow-up) Fix suggestion search by dates

Search suggestions by date is broken, we don't remove the '_from' CGI
params for the DBIC query
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'suggesteddate_from' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 394
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

Test plan:
Create some suggestions, search for them using date range (suggested
date, managed date and accepted date)

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>
22 months agoBug 31276: Report results are limited to 999,999 no matter the actual number of results
Kyle Hall [Mon, 1 Aug 2022 14:47:04 +0000 (10:47 -0400)]
Bug 31276: Report results are limited to 999,999 no matter the actual number of results

In Koha, any report that uses C4::Reports::Guided will be limited to 999,999 rows. This is causing problems for larger libraries where some reports may have over a million results.

Test Plan:
1) Create a report "SELECT * FROM borrowers" and run it, note the number
   of results
2) Apply this patch
3) Add the line `<report_results_limit>3</report_results_limit>`
   within the <config> block of your koha-conf.xml
4) Restart all the things!
5) Run the report, download the results as a CSV
6) Note your CSV only has 4 lines, the header and 3 patrons

Signed-off-by: Rachael Laritz <rachael.laritz@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31325: Fix koha-preferences get
Magnus Enger [Tue, 9 Aug 2022 06:49:54 +0000 (06:49 +0000)]
Bug 31325: Fix koha-preferences get

To reproduce:
$ perl koha/misc/admin/koha-preferences get MarcFlavour
This will output something like "HASH(0x55dd4d432840)".

To test:
Apply this patch and run the command again:
$ perl koha/misc/admin/koha-preferences get MarcFlavour
This should output something like "MARC21".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31281: Use correct reply-to email when sending overdue mails
Katrin Fischer [Sun, 7 Aug 2022 16:14:37 +0000 (16:14 +0000)]
Bug 31281: Use correct reply-to email when sending overdue mails

Overdue emails are either sent from the issuing or the home
library of an item. We never use the patron's home library,
so the reply-to address must explicitly be set in EnqueueLetter.

To test:
- Set up 2 branches (A and B) with different email addresses.
- Set up an SMTP server for each to use
- Set up an overdue notice trigger for the patron category you'll use
  First letter: 1 day delay, any notice
- Check out an item with home branch B to a patron from A
- Run the the script with:
  overdue_notices.pl -t --frombranch item-homebranch
  overdue_notices.pl -t --frombranch item-issuebranch
- Confirm for each setting that the correct email headers have been
  used. You can see the reply-to address and to-address in the
  message queue:
  SELECT * FROM message_queue;

Signed-off-by: Nason Bimbe <nason.bimbe@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31346: Fix broken Syndetics links on OPAC detail page
Lucas Gass [Thu, 11 Aug 2022 22:56:49 +0000 (22:56 +0000)]
Bug 31346: Fix broken Syndetics links on OPAC detail page

To test:
-Have some Syndetics credentials
-Turn on SyndeticsCoverImages
-Look at some and you'll notice that Syndetics cover images dont always load
-If you view the page source you'll see why. The links are built like this:
https://secure.syndetics.com/index.aspx?isbn=/LC.GIF&amp;amp;client=bedf&amp;type=xw10&amp;upc=843501038123&amp;oclc=1311289389

-Apply patch
-Cover images should load properly.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31331: Add data-order attribute for better sorting of dates
Lucas Gass [Tue, 9 Aug 2022 14:31:05 +0000 (14:31 +0000)]
Bug 31331: Add data-order attribute for better sorting of dates

To test:
1. I used the following suggestiondates:

MariaDB [koha_kohadev]> select suggesteddate from suggestions;
+---------------+
| suggesteddate |
+---------------+
| 2022-01-03    |
| 2022-08-09    |
| 2022-02-22    |
| 2021-01-21    |
+---------------+

2. Set the dateformat system preference to 'mm/dd/yyyy'.
3. Try sorting the suggestion table by date, ascending and descending,
   it is not right.
4. Apply patch
5. Try sorting by date again, ascending and descending, it should now
   sort correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31245: Do not try to report results if task not started
Tomas Cohen Arazi [Tue, 26 Jul 2022 13:12:05 +0000 (10:12 -0300)]
Bug 31245: Do not try to report results if task not started

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Andrew <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31245: Do not call report for job detail view if job not started
Jonathan Druart [Wed, 27 Jul 2022 08:35:08 +0000 (10:35 +0200)]
Bug 31245: Do not call report for job detail view if job not started

We should not generate the report if the job hasn't started yet

Test plan:
Stop the koha-worker processes, modify a new item using the batch mod
tool, then see the detail page of the job

Without this patch an error is generated:
Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175

Signed-off-by: Andrew <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 24857: No words
Tomas Cohen Arazi [Tue, 9 Aug 2022 17:00:40 +0000 (14:00 -0300)]
Bug 24857: No words

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 24857: (QA follow-up) Add spec description
Tomas Cohen Arazi [Tue, 9 Aug 2022 16:56:05 +0000 (13:56 -0300)]
Bug 24857: (QA follow-up) Add spec description

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: (QA follow-up) Add spec description
Tomas Cohen Arazi [Tue, 9 Aug 2022 16:48:52 +0000 (13:48 -0300)]
Bug 28787: (QA follow-up) Add spec description

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: DBRev 22.06.00.035
Tomas Cohen Arazi [Tue, 9 Aug 2022 16:42:21 +0000 (13:42 -0300)]
Bug 28787: DBRev 22.06.00.035

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: (QA follow-up) Remove unused variable
Kyle M Hall [Fri, 5 Aug 2022 12:31:26 +0000 (12:31 +0000)]
Bug 28787: (QA follow-up) Remove unused variable

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Fix misleading tests in two_factor_auth.t
Jonathan Druart [Tue, 26 Jul 2022 09:43:36 +0000 (11:43 +0200)]
Bug 28787: Fix misleading tests in two_factor_auth.t

We were having a "Patron is not authenticated yet" comment, but it was not correct,
we set 'number' and 'id' in session, and waiting-for-2FA was not set => the patron is fully authenticated.
The test returned 401 because we fully authenticated user cannot request
an otp token when not waiting for the second auth step.

This situation is already covered (last test of the subtest).

Test plan:
  prove t/db_dependent/api/v1/two_factor_auth.t
must return green

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: (follow-up) Typo and additional test
Marcel de Rooy [Fri, 8 Jul 2022 09:38:55 +0000 (09:38 +0000)]
Bug 28787: (follow-up) Typo and additional test

Adding a test for a 403 status when lowering authorization.
The Auth mock for check_cookie_auth is not needed here.
Reading back the session after flush either.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Comment selenium test that will fail if no SMTP server is defined
Jonathan Druart [Fri, 8 Jul 2022 07:08:40 +0000 (09:08 +0200)]
Bug 28787: Comment selenium test that will fail if no SMTP server is defined

This is a deadlock I think. Any ideas how we could continue to test that
in any conditions?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Mock send_or_die
Jonathan Druart [Fri, 8 Jul 2022 07:05:26 +0000 (09:05 +0200)]
Bug 28787: Mock send_or_die

To make the tests pass even if no SMTP server is defined.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Don't request a token if no email address defined
Jonathan Druart [Fri, 8 Jul 2022 06:53:22 +0000 (08:53 +0200)]
Bug 28787: Don't request a token if no email address defined

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Don't send the notice if we are not waiting for 2FA
Jonathan Druart [Thu, 7 Jul 2022 17:28:38 +0000 (19:28 +0200)]
Bug 28787: Don't send the notice if we are not waiting for 2FA

If we are fully logged-in or haven't pass the password phase, don't send
the notice!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Rename the REST API route to /auth/otp/token_delivery
Jonathan Druart [Thu, 7 Jul 2022 07:34:08 +0000 (09:34 +0200)]
Bug 28787: Rename the REST API route to /auth/otp/token_delivery

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Fix t/db_dependent/api/v1/two_factor_auth.t
Marcel de Rooy [Thu, 7 Jul 2022 06:44:04 +0000 (06:44 +0000)]
Bug 28787: Fix t/db_dependent/api/v1/two_factor_auth.t

Changing flags to 20 to include the required Staff access for
intranet login.
This changes the http status. The API raises an exception now.

Test plan:
Run t/db_dependent/api/v1/two_factor_auth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Typo authenticaction
Marcel de Rooy [Mon, 27 Jun 2022 11:39:43 +0000 (11:39 +0000)]
Bug 28787: Typo authenticaction

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: (follow-up) Changes in API auth, moved otp out of Letters
Marcel de Rooy [Mon, 27 Jun 2022 11:06:34 +0000 (11:06 +0000)]
Bug 28787: (follow-up) Changes in API auth, moved otp out of Letters

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28787: Send a notice with the TOTP token
Jonathan Druart [Mon, 23 May 2022 20:51:26 +0000 (22:51 +0200)]
Bug 28787: Send a notice with the TOTP token

Bug 28786 let librarians enable a Two-factor authentication but force them to use
an application to generate the TOTP token.

This new enhancement add the ability to send an email containing the token to the
patron once it's authenticaed

The new notice template has the code '2FA_OTP_TOKEN'

Test plan:
- Setup the two-factor authentication (you need the config entry and the
syspref ON)
- Enable it for your logged in patron
- Logout
- Login and notice the new link "Send the code by email"
- Click on it and confirm that you received an email with the code
- Use the code to be fully logged in

QA question: Is 400 the correct error code to tell the email has not
been sent?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31265: (QA follow-up) Align time selection controls like other inputs
Owen Leonard [Tue, 9 Aug 2022 16:12:08 +0000 (16:12 +0000)]
Bug 31265: (QA follow-up) Align time selection controls like other inputs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31265: Update style of time selection controls
Jonathan Druart [Sun, 31 Jul 2022 07:45:38 +0000 (09:45 +0200)]
Bug 31265: Update style of time selection controls

This patch updates the style of the time selection controls so that it
is clearer that they are elements which the user can interact with. The
times are now styled as buttons, and a check-mark icon is added when a
time is selected.

Also changed: Pickup date and notes fields are hidden until a library
has been selected. The count of existing appointments has been removed
in favor of showing the count of available appointments. A tooltip has
been added: "Appointments available: X"

I also changed the way the date selection event is fired. I found that
jQuery's "change" event on the input itself was not reliable for some
reason. I implemented instead an "onClose" event using the flatpickr
instance.

Note: The patch contains some indentation changes.

To test, apply the patch and enable and configure curbside pickups if
necessary. You should have at least two libraries with curbside hours
defined.

- Log in to the OPAC and go to "your curbside pickups."
- Under the "Schedule a pickup" tab you should see only the option to
  select a library.
- When you select a library the "Pickup date" field should appear.
- When you select a date the time-selection buttons and the notes field
  should appear.
- Hovering over a time should trigger the "Appointments available"
  tooltip.
- Clicking a time should cause the "button" to turn green with a
  check-mark icon.
- Submit a pickup request and confirm that it is saved correctly.
- Return to the "Schedule a pickup" form and confirm that selecting the
  same library again triggers a message, "You already have a pickup
  scheduled for this library."
- Select another library and another date.
- Switch your library selection to the library you already have a
  request for. The date, time, and notes fields should be hidden again
  and the same message triggered about already having a pickup
  scheduled.

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>
22 months agoBug 28909: Fix handling if backend doesn't support
Andrew Isherwood [Tue, 31 Aug 2021 09:06:03 +0000 (10:06 +0100)]
Bug 28909: Fix handling if backend doesn't support

If a backend hasn't been updated to support this functionality, we need
to handle that gracefully

Also, this commit fixes some indentation.

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>
22 months agoBug 28909: Allow illview to use backend template
Andrew Isherwood [Fri, 27 Aug 2021 10:53:00 +0000 (11:53 +0100)]
Bug 28909: Allow illview to use backend template

This commit allows illview to use an intranet template supplied by the backend, as
per other stages. The template must be named illview.inc

Test plan:
- Apply the patch
- Install FreeForm backend (https://github.com/PTFS-Europe/koha-ill-freeform)
- Create a request
- On the resulting "Manage ILL request" note the display is normal
- Create a new file in the FreeForm backend directory: /intra-includes/illview.inc
  with the following content:

  [% BLOCK backend_jsinclude %]
  <script>(function() { alert("Working!"); })()</script>
  [% END %]

- Restart Plack if enabled
- Reload the page
=> TEST: Observe that the alert specified in the template is displayed

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>
22 months agoBug 31307: Remove 'already_reserved' flag from opac-reserve.pl
Jonathan Druart [Fri, 3 Jun 2022 05:32:35 +0000 (07:32 +0200)]
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl

It was never set (was set before 14695)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31311: Remove GetItemsInfo labels/label-item-search
Jonathan Druart [Thu, 2 Jun 2022 09:35:13 +0000 (11:35 +0200)]
Bug 31311: Remove GetItemsInfo labels/label-item-search

It was commented anyway

Hey, nothing to do here!

Amended patch removes refactor comment that referred to this line, maybe?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31316: (QA follow-up) Remove stray template close tag
Nick Clemens [Tue, 9 Aug 2022 12:44:54 +0000 (12:44 +0000)]
Bug 31316: (QA follow-up) Remove stray template close tag

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31316: Remove GetItemsInfo from opac-sendbasket
Jonathan Druart [Fri, 3 Jun 2022 06:20:17 +0000 (08:20 +0200)]
Bug 31316: Remove GetItemsInfo from opac-sendbasket

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search.

Here we are going to deal with opac-sendbasket

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31319: (QA follow-up) Search items directly (biblio not used yet)
Nick Clemens [Tue, 9 Aug 2022 13:21:05 +0000 (13:21 +0000)]
Bug 31319: (QA follow-up) Search items directly (biblio not used yet)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: add 'me' prefix to prevent failure if biblio is linked
with a subscription
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31319: Remove GetItemsInfo from tags/list.pl
Jonathan Druart [Fri, 3 Jun 2022 06:29:19 +0000 (08:29 +0200)]
Bug 31319: Remove GetItemsInfo from tags/list.pl

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with tags/list

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31306: (QA follow-up) Add comments to test
Nick Clemens [Tue, 9 Aug 2022 12:57:24 +0000 (12:57 +0000)]
Bug 31306: (QA follow-up) Add comments to test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31306: Add tests for search_ordered
Jonathan Druart [Fri, 29 Jul 2022 11:06:20 +0000 (13:06 +0200)]
Bug 31306: Add tests for search_ordered

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31306: Allow to pass params and attributes to search_ordered
Jonathan Druart [Fri, 29 Jul 2022 11:06:07 +0000 (13:06 +0200)]
Bug 31306: Allow to pass params and attributes to search_ordered

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31306: Add search_ordered sub to order items with extra conditions
Petro Vashchuk [Mon, 18 Jul 2022 09:47:21 +0000 (12:47 +0300)]
Bug 31306: Add search_ordered sub to order items with extra conditions

Commit message from JD:

On bug 27272 we are going to replace C4::Items::GetItemsInfo with Koha::Items
methods, but we need to keep the existing behaviour that is:

Order by publisheddate, enumchron for searisl, or by homebranch.branchname,
enumchron, LPAD( copynumber, 8, '0' ), desc dateaccessioned

Test plan:
Confirm that the code from the new method makes sense
Run t/db_dependent/Koha/Items.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: DBRev 22.06.00.034
Tomas Cohen Arazi [Tue, 9 Aug 2022 14:58:06 +0000 (11:58 -0300)]
Bug 29897: DBRev 22.06.00.034

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Don't display empty li
Jonathan Druart [Tue, 2 Aug 2022 04:54:59 +0000 (06:54 +0200)]
Bug 29897: Don't display empty li

It's ugly to move the li to the include file, but it's the easiest for
now...

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: (QA follow-up) Add valid $2 codes to pref description
Katrin Fischer [Mon, 1 Aug 2022 18:40:50 +0000 (20:40 +0200)]
Bug 29897: (QA follow-up) Add valid $2 codes to pref description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Adjust syspref description
Jonathan Druart [Fri, 29 Jul 2022 16:29:31 +0000 (18:29 +0200)]
Bug 29897: Adjust syspref description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Remove 'linkage' leftover
Jonathan Druart [Fri, 29 Jul 2022 16:28:03 +0000 (18:28 +0200)]
Bug 29897: Remove 'linkage' leftover

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Fix tab display
Jonathan Druart [Fri, 29 Jul 2022 09:06:43 +0000 (11:06 +0200)]
Bug 29897: Fix tab display

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Don't display identifier if not in the list
Jonathan Druart [Mon, 2 May 2022 09:24:47 +0000 (11:24 +0200)]
Bug 29897: Don't display identifier if not in the list

Requested by QA, see comment 26.

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Move the identifier list to an include file
Jonathan Druart [Mon, 2 May 2022 09:23:05 +0000 (11:23 +0200)]
Bug 29897: Move the identifier list to an include file

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Add VIAF
Jonathan Druart [Mon, 2 May 2022 09:18:57 +0000 (11:18 +0200)]
Bug 29897: Add VIAF

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Improve syspref's description
Jonathan Druart [Mon, 2 May 2022 09:12:56 +0000 (11:12 +0200)]
Bug 29897: Improve syspref's description

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Add and fix POD
Jonathan Druart [Mon, 2 May 2022 09:08:41 +0000 (11:08 +0200)]
Bug 29897: Add and fix POD

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Don't use $6 for linkage but build the link instead
Jonathan Druart [Mon, 2 May 2022 08:59:23 +0000 (10:59 +0200)]
Bug 29897: Don't use $6 for linkage but build the link instead

See comment 26:
$6 is a very specialized field that will never contain a URL. Linkage here means 'linking MARC fields within the record'. For example it is used to link an original script tag with the corresponding tag in transliteration. See: https://www.loc.gov/marc/authority/ecadcntf.html

Sponsored-by: Orex Digital
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Fix linkage
Jonathan Druart [Thu, 7 Apr 2022 13:20:35 +0000 (15:20 +0200)]
Bug 29897: Fix linkage

Signed-off-by: Orex Digital <info@orex.es>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Display author's identifiers
Jonathan Druart [Mon, 17 Jan 2022 16:59:21 +0000 (17:59 +0100)]
Bug 29897: Display author's identifiers

This new enhancement add the capability to list the different
identifiers of authors. It is helpful for research publications for
instance.

This patch will add a new "Author identifiers" tab on the detail page
(OPAC) of a bibliographic record, with the list of the authors and their
identifiers.
On the detail page of the authority record, the same identifier list
will be displayed.

Test plan:
Create some authority with
024
  $a source
  $2 number
  $6 link to the source
With the pref turned ON you will be able to see the new information.

Sponsored-by: Orex Digital
Signed-off-by: Orex Digital <info@orex.es>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Add new pref OPACAuthorIdentifiers
Jonathan Druart [Tue, 18 Jan 2022 10:35:17 +0000 (11:35 +0100)]
Bug 29897: Add new pref OPACAuthorIdentifiers

Sponsored-by: Orex Digital
Signed-off-by: Orex Digital <info@orex.es>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Move code to private method for reusability
Jonathan Druart [Mon, 17 Jan 2022 16:50:26 +0000 (17:50 +0100)]
Bug 29897: Move code to private method for reusability

Sponsored-by: Orex Digital
Signed-off-by: Orex Digital <info@orex.es>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29897: Rename get_marc_authors with get_marc_contributors
Jonathan Druart [Mon, 17 Jan 2022 16:41:39 +0000 (17:41 +0100)]
Bug 29897: Rename get_marc_authors with get_marc_contributors

get_marc_authors actually return authors from 700..712, not the first
author from 200

Sponsored-by: Orex Digital
Signed-off-by: Orex Digital <info@orex.es>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28269: (QA follow-up) Fix typo in test description
Katrin Fischer [Mon, 8 Aug 2022 19:27:37 +0000 (19:27 +0000)]
Bug 28269: (QA follow-up) Fix typo in test description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28269: Add tests for Acquisitions Orders search by ISSN
Slava Shishkin [Mon, 25 Apr 2022 12:16:48 +0000 (15:16 +0300)]
Bug 28269: Add tests for Acquisitions Orders search by ISSN

also with SearchWithISSNVariations on and off

Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 28269: Add feature to search Acquisitions Orders by ISSN
Slava Shishkin [Sat, 23 Apr 2022 21:51:00 +0000 (00:51 +0300)]
Bug 28269: Add feature to search Acquisitions Orders by ISSN

- add search form field for ISSN number
- add search logic including ISSN variations search
  if SearchWithISSNVariations preference is set

Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 10086: (QA follow-up) Fix TT filters
Katrin Fischer [Mon, 8 Aug 2022 19:44:45 +0000 (19:44 +0000)]
Bug 10086: (QA follow-up) Fix TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 10086: Link to go to basket from uncertain prices page
Aleisha Amohia [Mon, 13 Feb 2017 22:53:10 +0000 (22:53 +0000)]
Bug 10086: Link to go to basket from uncertain prices page

This patch moves the Edit button into an Edit column, styled with
bootstrap button and font awesome icon, and adds a link on the basket
name to go to the basket.

To test:
1) Add an item with uncertain prices to a basket
2) Go to the vendor of the basket
3) Click Uncertain prices on the left
4) Notice 'edit' button does not look like a button, and basket name is
not a link
5) Apply patch and refresh page
6) Basket name is now a link. Click to confirm it takes you to the right
page
7) Edit button is now in edit column. Confirm it works as expected
8) Confirm you cannot sort on Edit column and the button does not wrap
on a narrower browser
9) Check that the correct information is displayed for the order column
(title, author, publisher code, publication year, copyright date, isbn)

Sponsored-by: Catalyst IT
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>
22 months agoBug 30543: Decouple DumpSearchQueryTemplate from other tempalte dump preferences
Nick Clemens [Thu, 14 Apr 2022 13:18:30 +0000 (13:18 +0000)]
Bug 30543: Decouple DumpSearchQueryTemplate from other tempalte dump preferences

To test:
1 - Enable DumpSearchQueryTemplate
2 - Confirm you can find the search query in the HTML as a comment
3 - Enable other template dump preference
4 - Confirm they work as before
5 - Confirm new description of preference makes sense

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>
22 months agoBug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill
Tomas Cohen Arazi [Mon, 18 Jul 2022 21:39:51 +0000 (18:39 -0300)]
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill

This patch makes the method use the new
Koha::Item::Transfers->filter_by_current one.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Holds.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: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31183: Add Koha::Item::Transfers->filter_by_current
Tomas Cohen Arazi [Mon, 18 Jul 2022 21:33:47 +0000 (18:33 -0300)]
Bug 31183: Add Koha::Item::Transfers->filter_by_current

This patch introduces the aforementioned method.

To test:
1. Apply this unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item/Transfers.t
=> FaIL: method not defined?
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31183: Unit tests
Tomas Cohen Arazi [Mon, 18 Jul 2022 21:33:33 +0000 (18:33 -0300)]
Bug 31183: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 29434: add UNIMARC relationship codes for authorities
Andreas Roussos [Mon, 8 Nov 2021 07:19:58 +0000 (08:19 +0100)]
Bug 29434: add UNIMARC relationship codes for authorities

When using the authority finder plugin (authorities/auth_finder.pl),
you can pick an entry from the 'Special relationship:' dropdown menu
in order to set the relationship between authorities.

However, in UNIMARC instances the relationship codes listed are those
for MARC21. The correct codes for UNIMARC are listed in pages 93-94
of the IFLA UNIMARC Manual for Authorities.

Test plan:

1) In a UNIMARC instance, launch authorities/auth_finder.pl in the
   Staff client, by clicking on the 'Tag editor' button. Notice how
   the 'Special relationship:' dropdown menu lists the relationship
   codes for MARC21 instead of UNIMARC.
2) Apply this patch.
3) Launch the authority finder again; this time the correct values
   should be listed in the 'Special relationship:' dropdown menu.

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>
22 months agoBug 31214: Make subfield code non-editable in MARC framework editor
Joonas Kylmälä [Sun, 7 Aug 2022 11:24:12 +0000 (11:24 +0000)]
Bug 31214: Make subfield code non-editable in MARC framework editor

The subfield code field became editable in framework
editor due to a regression that happened during the
switch from a previous template framework koha used
to the new Template toolkit framework currently in use:
Bug 5917 : Swapping templates over (5884fb100071e973daf671a4ada6b32724376768)
The regression happened due to the template syntax
not being updated to the new one in this particular
case.

Note: The subfield code field doesn't align with the
      other fields anymore after this patch. However,
      this alignment issue is in every other Koha form
      in intranet and should be fixed in the global
      CSS rules.

1) Apply patch
2) Browse to
   /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=995&frameworkcode=AR
3) Notice the subfield code is non-editable
4) Notice the subfield code is still editable in the New tab.

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>
22 months agoBug 30927: Improve formatting or iCal files for checkout due dates
Kyle M Hall [Mon, 13 Jun 2022 17:57:13 +0000 (17:57 +0000)]
Bug 30927: Improve formatting or iCal files for checkout due dates

We got some feedback from a patron regarding the default notifications
on the iCal export for the patron checkout summary in the OPAC.
The notifications send 1 minute before the event (the due date), which
is midnight.

Test Plan:
0) Make sure your time zone in Koha is set correctly in koha-conf.xml
1) Apply this patch
2) Restart all the things!
3) Make a checkout due at 23:59
4) Make a checkout due at 11:00
5) Download the iCal file from the OPAC
6) Import this file into Calendar
7) Note the first checkout is an all day event
8) Note the second checkout is an "instantaneous" event at the date and
   time the item is due

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: (QA follow-up) Fix unit test
Martin Renvoize [Tue, 9 Aug 2022 08:27:35 +0000 (09:27 +0100)]
Bug 27779: (QA follow-up) Fix unit test

I forgot to adapt the unit test for the new 'related_debit' key in the
outpur from the summary method.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: (QA follow-up) Better translatability
Tomas Cohen Arazi [Mon, 8 Aug 2022 18:41:36 +0000 (15:41 -0300)]
Bug 27779: (QA follow-up) Better translatability

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 30992: (follow-up) Fix semicolon at line ending
Katrin Fischer [Sun, 7 Aug 2022 22:11:03 +0000 (22:11 +0000)]
Bug 30992: (follow-up) Fix semicolon at line ending

$itemLoopIter->{reservedate}     = $first_hold->reservedate,
$itemLoopIter->{ExpectedAtLibrary}         = $first_hold->branchcode;

1st line ends with a comma instead of a semicolon.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: DBRev 22.06.00.033
Tomas Cohen Arazi [Mon, 8 Aug 2022 16:40:13 +0000 (13:40 -0300)]
Bug 27779: DBRev 22.06.00.033

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: (QA follow-up) Fix database update
Martin Renvoize [Fri, 24 Jun 2022 13:30:53 +0000 (14:30 +0100)]
Bug 27779: (QA follow-up) Fix database update

Don't overwrite peoples translations if they've already changed the
description.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: (QA follow-up) Fix translation issue with 'against'
Katrin Fischer [Mon, 31 Jan 2022 21:04:52 +0000 (21:04 +0000)]
Bug 27779: (QA follow-up) Fix translation issue with 'against'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: New atomic update syntax
Tomas Cohen Arazi [Thu, 11 Nov 2021 18:23:27 +0000 (15:23 -0300)]
Bug 27779: New atomic update syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: Update 'REFUND' description in the database
Martin Renvoize [Thu, 20 May 2021 07:48:12 +0000 (08:48 +0100)]
Bug 27779: Update 'REFUND' description in the database

This patch simplified the REFUND description from 'Refund applied
to a patrons fine' to simply 'Refund'.. this allows the description to
be combined with debit type descriptions simply to denote what it was
applied against instead of using the generic 'applied to a patrons fine'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 27779: Group payouts by type of debit they're applied against
Martin Renvoize [Thu, 20 May 2021 07:38:11 +0000 (08:38 +0100)]
Bug 27779: Group payouts by type of debit they're applied against

This patch adds additional grouping to the cashup summary output such
that payouts are additionally grouped by the types of debit they're
applied against.  The cashup sumary modal is adapted to expose the
descriptions at the grouping level too.

Test plan
1/ Add a various transactions using a cash register (Using Point of
Sale, Patron Accounts with payments etc).
2/ Refund some of the debts and pick the 'cash' option for payout.
(ensure you pick a variety of debit types)
3/ Add some credit to a patron account, (either refund a debt as
'credit' or add a 'manual credit')
4/ Payout the credit as 'cash' on the patron account
5/ Cashup the register
6/ Inspect the cashup summary for your cashup.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 30213: Hide Delete (aka Priority) column when user only has place_hold permission
Owen Leonard [Thu, 3 Mar 2022 12:34:33 +0000 (12:34 +0000)]
Bug 30213: Hide Delete (aka Priority) column when user only has place_hold permission

This patch changes the way the priority column displays when viewing a
list of holds as a user who doesn't have permission to change hold
priority.

To test:

- Apply the patch and log into the staff interface as a user with
  at least "place_hold" permission.
- Locate a record which can be put on hold and place multiple holds.
- View the list of holds.
- As a user with both "place_hold" and "modify_holds_priority"
  permission, you should see a "Priority" column with <select> fields
  allowing you to change hold priority. You should also see the arrow
  buttons for changing priority.
- As a user with only "place_hold" permission, the "Priority" column
  should show the priority as a number. You should not see the arrow
  buttons.
- In both cases, confirm that all operations work correctly: Changing
  hold date, expiration date, pickup library, suspended status;
  Cancelling holds.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31303: (follow-up) Use get_effective_rule_value instead
Tomas Cohen Arazi [Mon, 8 Aug 2022 15:09:45 +0000 (12:09 -0300)]
Bug 31303: (follow-up) Use get_effective_rule_value instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31303: Prevent fatal errors when missing "waiting hold cancellation" rule
David Cook [Mon, 8 Aug 2022 05:07:47 +0000 (05:07 +0000)]
Bug 31303: Prevent fatal errors when missing "waiting hold cancellation" rule

This patch removes method chaining which didn't account for the fact that
the "waiting hold cancellation" circulation rule might not exist.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=29
2. Search for "koha" user
3. Choose the specific item and click "Place hold"
4. Check in "39999000001310" and click "Confirm hold (Y)"
5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds
6. Rejoice in Koha not exploding
7. Go to http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl
8. Go to "Default waiting hold cancellation policy" and change "Cancellation allowed" to "Yes" and click "Add"
9. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl#opac-user-holds
10. Note the "Cancel" button appears
11. Rejoice again that the "Cancel" button appeared

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31296: (QA follow-up) Fix trivial spelling errors
Tomas Cohen Arazi [Mon, 8 Aug 2022 16:15:29 +0000 (13:15 -0300)]
Bug 31296: (QA follow-up) Fix trivial spelling errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31296: (QA follow-up) Add to debian templates
Martin Renvoize [Fri, 5 Aug 2022 12:52:46 +0000 (13:52 +0100)]
Bug 31296: (QA follow-up) Add to debian templates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31296: Add ability to disable demagnetizing items via SIP2 based on itemtypes
Kyle Hall [Fri, 5 Aug 2022 11:14:14 +0000 (07:14 -0400)]
Bug 31296: Add ability to disable demagnetizing items via SIP2 based on itemtypes

Some libraries have certain item types that can only do in house checkouts via SIP self check machines. In these cases, the items should not be demagnetized since the items cannot leave the library.

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31155: Document --since option in help of borrowers-force-messaging-defaults.pl
Caroline Cyr La Rose [Thu, 14 Jul 2022 14:26:29 +0000 (10:26 -0400)]
Bug 31155: Document --since option in help of borrowers-force-messaging-defaults.pl

This patch adds a section about the --since option in the help section
of borrowers-force-messaging-defaults.pl

To test:
0) Apply patch
1) run the script with the --help option, e.g.
./misc/maintenance/borrowers-force-messaging-defaults.pl --help
--> There should be an explanation of the --since option with examples
    for specific and relative dates
2) Optionally, run the script with different options
--> The behaviour shouldn't have changed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31305: Remove type= from detail.pl
Jonathan Druart [Fri, 3 Dec 2021 15:45:44 +0000 (16:45 +0100)]
Bug 31305: Remove type= from detail.pl

This is not related to anything known.. was it "itype" at some point?
`git log -p` will tell you that it's there for a looong time already

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 31292: Untranslatable string in sample_notices.yaml
Bernardo Gonzalez Kriegel [Fri, 5 Aug 2022 14:34:05 +0000 (11:34 -0300)]
Bug 31292: Untranslatable string in sample_notices.yaml

This patch removes a regex that discard lines in multiline YAML values
On close inspection, there is no need for it.

To test:
1) go to misc translator, update some language
    ./translate update fr-CA

2) check missing string

    egrep "You may pick up your article" po/fr-CA-installer.po

   from sample_notices.yaml

3) apply the patch, repeat 1)

4) repeat 2), verify the string is present in the translation file

5) translate the new string, install the language,
   verify string is present in the translated file
    ./translate install fr-CA

   check fr-CA/mandatory/sample_notices.yml

There are three new strings
msgid "%sDear %s %s,%s"
msgid "%s%s%sTitle: %s"
msgid "%sYou may pick up your article at %s.%sYou can download the scanned materials via the following url(s): %s.%s"

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>
22 months agoRevert "Bug 31104: Add a selenium test"
Tomas Cohen Arazi [Mon, 8 Aug 2022 14:18:02 +0000 (11:18 -0300)]
Revert "Bug 31104: Add a selenium test"

This reverts commit 56d79a483da8cac66aa22b9904fd2a64464b8eff.

22 months agoBug 29983: Fix xt/author/valid-templates.t
Jonathan Druart [Mon, 8 Aug 2022 12:18:49 +0000 (14:18 +0200)]
Bug 29983: Fix xt/author/valid-templates.t

 #   Failed test '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt'
 #   at xt/author/valid-templates.t line 141.
 # file error - modal-claims-js: not found
 # Looks like you failed 1 test of 757.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 30874: Remove category_type
Jonathan Druart [Wed, 1 Jun 2022 08:28:20 +0000 (10:28 +0200)]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 months agoBug 30874: Simplify categories loop construction
Jonathan Druart [Wed, 1 Jun 2022 08:00:37 +0000 (10:00 +0200)]
Bug 30874: Simplify categories loop construction

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>