]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 28220: UI changes
Jonathan Druart [Thu, 6 May 2021 10:38:52 +0000 (12:38 +0200)]
Bug 28220: UI changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Add more tests
Jonathan Druart [Thu, 6 May 2021 10:31:47 +0000 (12:31 +0200)]
Bug 28220: Add more tests

* Add the transaction when a patron is created
* The changes in merge_and_replace_with prevent the creation of the
patron and so the attributes if several non-repeatable attributes are
passed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Add test for updating an existing patron
Jonathan Druart [Thu, 6 May 2021 09:59:23 +0000 (11:59 +0200)]
Bug 28220: Add test for updating an existing patron

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Handle NonRepeatable
Jonathan Druart [Thu, 6 May 2021 08:50:07 +0000 (10:50 +0200)]
Bug 28220: Handle NonRepeatable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Handle InvalidType
Jonathan Druart [Thu, 6 May 2021 08:46:24 +0000 (10:46 +0200)]
Bug 28220: Handle InvalidType

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: prevent patron to be created if attributes not stored
Jonathan Druart [Thu, 6 May 2021 08:35:16 +0000 (10:35 +0200)]
Bug 28220: prevent patron to be created if attributes not stored

Using a transaction

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Add tests to import
Jonathan Druart [Thu, 6 May 2021 08:13:55 +0000 (10:13 +0200)]
Bug 28220: Add tests to import

failure expected, we need to add a transaction

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28220: Deal with merge
Jonathan Druart [Wed, 5 May 2021 15:37:31 +0000 (17:37 +0200)]
Bug 28220: Deal with merge

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28200: Remove unit test using abbreviated format
David Cook [Mon, 10 May 2021 23:33:19 +0000 (23:33 +0000)]
Bug 28200: Remove unit test using abbreviated format

This patch removes the unit test that uses the abbreviated format,
since it's not supported in newer versions of Net::Netmask without
a workaround.

Test plan:
0. Set up Koha dev environment on Debian 11
1. perl t/Koha/Middleware/RealIP.t
2. Tests should pass

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alvaro Cornejo <cornejo.alvaro@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28091: Only show for logged in users
Kyle M Hall [Fri, 7 May 2021 18:02:35 +0000 (14:02 -0400)]
Bug 28091: Only show for logged in users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28091: add meta content with Koha version to staff client pages
Lucas Gass [Mon, 5 Apr 2021 17:58:28 +0000 (17:58 +0000)]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28189: (QA folloq-up) Fix fallback case
Tomas Cohen Arazi [Mon, 10 May 2021 11:34:41 +0000 (08:34 -0300)]
Bug 28189: (QA folloq-up) Fix fallback case

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28189: Move swagger file to YAML format
Tomas Cohen Arazi [Wed, 21 Apr 2021 15:18:31 +0000 (12:18 -0300)]
Bug 28189: Move swagger file to YAML format

This patch changes the base OpenAPI file (swagger.json) into YAML. The
motivation for this, is adding more documentation, in Markdown.

JSON doesn't accept multiline strings, so this seems like a good move
for readability.

To test:
1. Verify your API is functional
2. Apply this patch
3. Repeat 1
=> SUCCESS: No changes, really
4. Point your browser to /api/v1/.html
=> SUCCESS: Some nicely formatted description of the API can be seen. It
includes information about x-koha-library.
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: DBRev 20.12.00.050
Jonathan Druart [Wed, 12 May 2021 15:29:01 +0000 (15:29 +0000)]
Bug 18989: DBRev 20.12.00.050

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: Restore hidding items on detail
Jonathan Druart [Tue, 4 May 2021 10:18:40 +0000 (12:18 +0200)]
Bug 18989: Restore hidding items on detail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Good catch. I forgot this file didn't get the hiding logic refactoring
yet.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: (QA follow-up) Make controllers use Koha::Biblio->hidden_in_opac
Tomas Cohen Arazi [Fri, 23 Apr 2021 19:55:35 +0000 (16:55 -0300)]
Bug 18989: (QA follow-up) Make controllers use Koha::Biblio->hidden_in_opac

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: (QA follow-up) Make Koha::Biblio->hidden_in_opac aware of OpacHiddenItemsH...
Tomas Cohen Arazi [Fri, 23 Apr 2021 18:30:03 +0000 (15:30 -0300)]
Bug 18989: (QA follow-up) Make Koha::Biblio->hidden_in_opac aware of OpacHiddenItemsHidesRecord

This patch makes the method aware of the new syspref. It will only eval
the rules against items if the OpacHiddenItemsHidesRecord syspref is
set.

Tests are added to reflect this.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: Fix syspref's value selection
Jonathan Druart [Tue, 13 Apr 2021 09:19:06 +0000 (11:19 +0200)]
Bug 18989: Fix syspref's value selection

See commit 1fe1b704f9a81172f2a6b86367b314572a854d18
    Bug 22824: Fix yes/no vs 1/0

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: (QA follow-up) Have new preference default to current behaviour
Katrin Fischer [Thu, 28 Jan 2021 23:00:34 +0000 (00:00 +0100)]
Bug 18989: (QA follow-up) Have new preference default to current behaviour

At the moments the records are hidden when all items are hidden, so
we need to make sure that we keep this behaviour when the preference
is added.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: (QA follow-up) Terminology fixes and linking the system preference in...
Katrin Fischer [Sun, 24 Jan 2021 16:33:55 +0000 (16:33 +0000)]
Bug 18989: (QA follow-up) Terminology fixes and linking the system preference in pref description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: Add atomic update
Fridolin Somers [Fri, 4 Sep 2020 12:49:40 +0000 (14:49 +0200)]
Bug 18989: Add atomic update

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18989: Allow displaying biblios with all items hidden by OpacHiddenItems
Fridolin Somers [Fri, 4 Sep 2020 12:33:12 +0000 (14:33 +0200)]
Bug 18989: Allow displaying biblios with all items hidden by OpacHiddenItems

Bug 10584 made Koha hide biblios for which all items match some criteria (in OpacHiddenItems) so they are hidden.
Add syspref OpacHiddenItemsHidesRecord controlling this behaviour.

Test plan :
1)
1.1) Create some biblio records with one item having damaged=1
1.2) Define system preference OpacHiddenItems = damaged: 1
2)
2.1) Set system preference OpacHiddenItemsHidesRecord to 'don't hide'
2.2) At OPAC : perform a search showing those records and some more
2.3) Check you see the all the records
2.4) For a record with hidden item check you don't get HTTP 404 for : normal view, ISBD view, MARC view
2.5) Check you can had tags on this record
2.6) Add record to basket, check you see it in basket
3)
3.1) Set system preference OpacHiddenItemsHidesRecord to 'hide'
3.2) At OPAC : perform a search showing those records and some more
3.3) Check you don't see the records with hidden item
3.4) For a record with hidden item check you get HTTP 404 for : normal view, ISBD view, MARC view
3.5) Show basket, check you see the records with hidden item

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28135: Replace use of input type number in additem.js
Owen Leonard [Mon, 12 Apr 2021 11:25:35 +0000 (11:25 +0000)]
Bug 28135: Replace use of input type number in additem.js

This patch corrects in instance where JavaScript is creating an input
tag with type "number."

To test, apply the patch and make sure the AcqCreateItem system
preference is set to "when receiving."

- Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt
  page -> Receive.
- On the page for receiving items you should see an add item form.
- Click the "Add multiple items" button at the bottom of the form.
- Test the "Number of items to add" field. It should not accept any
  input except numbers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23406: Don't translate suppressed authorised values
Nick Clemens [Mon, 10 May 2021 12:14:08 +0000 (12:14 +0000)]
Bug 23406: Don't translate suppressed authorised values

We have a test in C4/XSLT/transformMARCXML4HTML which is meant to exclude the 942n, however,
it doesn't work because it checks the $subfield parameter against n

$subfield is an arrayref with the code and value as members

we need to check $subfield->[0]

To test:
 1 - Apply only unit tests
 2 - prove -v t/db_dependent/XSLT.t
 3 - It fails
 4 - Confirm 952$n in default framework is tied ot authorised value 'YES_NO' or do so
 5 - Set OpacSuppression to 'Hide'
 6 - Edit a record in the default template, changing 942$n to 'Yes
 7 - Confirm the record is suppressed in opac
 8 - Note there is no suppression notice in the record in staff client
 9 - Apply second patch
10 - Reload and confirm staff side shows suppression notice
11 - Confirm record still suppressed in OPAC
12 - Edit record, set 942$n to 'no'
13 - Confirm there is no suppression notice in staff client
14 - Confirm you can view the record in OPAC
15 - prove -v t/db_dependent/XSLT.t
16 - Tests pass!

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23406: Unit test
Nick Clemens [Mon, 10 May 2021 12:01:55 +0000 (12:01 +0000)]
Bug 23406: Unit test

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28283: Add `inputmode="numeric"` to quantity on orderreceive
Martin Renvoize [Tue, 4 May 2021 10:14:51 +0000 (11:14 +0100)]
Bug 28283: Add `inputmode="numeric"` to quantity on orderreceive

This patch adds an inputmode to the quantity field on the order receive
page in acquisitions.

Test plan
1. Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt
   page -> Receive.
2. Note that the 'Quantity received' input has an inputmode now.
3. Note that the 'Quantity received' input also has a pattern attribute.
4. Note that you should not be able to enter non-integer values.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18112: Use GetAuthValueDropbox from the template
Jonathan Druart [Tue, 11 May 2021 13:36:13 +0000 (15:36 +0200)]
Bug 18112: Use GetAuthValueDropbox from the template

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18112: (follow-up) add required class to select
Lucas Gass [Fri, 7 May 2021 18:59:26 +0000 (18:59 +0000)]
Bug 18112: (follow-up) add required class to select

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 18112: Add street type to self reg/self mod form
Lucas Gass [Tue, 4 May 2021 20:48:18 +0000 (20:48 +0000)]
Bug 18112: Add street type to self reg/self mod form

1. Add some values to the ROADTYPE authorized value
2. Go to PatronSelfRegistrationBorrowerUnwantedField and make sure
   streettype is NOT checked
3. Go the self reg form, no street type field
4. Apply patch
5. Check the self reg form, streettype should be there with all the
   options defined in ROADTYPE a.v.
6. Check the self modification form, street type should be there.
7. Make sure PatronSelfRegistrationBorrowerUnwantedField and
   PatronSelfModificationBorrowerUnwantedField hide the field correctly.
8. Make sure PatronSelfRegistrationBorrowerMandatoryField properly makes
   the field required.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27562: itiva notices break if record title contains quotes
Kyle M Hall [Mon, 14 Jan 2013 17:02:38 +0000 (09:02 -0800)]
Bug 27562: itiva notices break if record title contains quotes

itiva has reported to us that quotes in the title of a record cause the
call to not be made to the patron. The fix is to remove quotes from
the title, as quotes are not spoken anyway ( That is, "Queens" and
"Queen's" are pronounced the same ).

Test Plan:
1) Set up itiva to send phone notes
2) Find a record with quotes in the title
3) Trigger an itiva notice ( checkout, checkin, place hold, etc )
   using the itiva outbound cronjob
4) View the CSV, note the title has the quotes in it
5) Apply this patch
6) Repeat steps 2-3
7) View the CSV, note the title contains no quotes!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 13613: Move similar JS code to a function
Jonathan Druart [Mon, 10 May 2021 09:52:12 +0000 (11:52 +0200)]
Bug 13613: Move similar JS code to a function

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 13613: (follow-up) Add tooltip when disabled
Nick Clemens [Fri, 23 Apr 2021 12:20:07 +0000 (12:20 +0000)]
Bug 13613: (follow-up) Add tooltip when disabled

This patch adds a tooltip to the digest checkboxes when disabled.

When enabled the tooltip is hidden

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 13613: (follow-up) Use more unique classes
Nick Clemens [Wed, 17 Mar 2021 13:49:25 +0000 (13:49 +0000)]
Bug 13613: (follow-up) Use more unique classes

This resolves the issue of being unable to save email as it was being hit by the validator

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 13613: (Bug 22744 follow-up) Remove js handling for 'none'
Nick Clemens [Wed, 17 Mar 2021 13:25:44 +0000 (13:25 +0000)]
Bug 13613: (Bug 22744 follow-up) Remove js handling for 'none'

There was a function and a set of onclick events to handle the 'Do not notify'
checkboxes.

Those have been removed, so should this code

To test:
1 - Sign in to opac
2 - Click on 'your messaging' tab from 'your account'
3 - Check/uncheck some boxes
4 - Note error in the console:
    Uncaught TypeError: document.opacmessaging.none2 is undefined
5 - Apply patch
6 - repeat
7 - no more error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 13613: Don't allow digest to be selected without a digest-able transport selected
Kyle M Hall [Thu, 22 Jan 2015 17:36:31 +0000 (12:36 -0500)]
Bug 13613: Don't allow digest to be selected without a digest-able transport selected

By default, only the email transport is enabled. This gives the
messaging preferences the look of having email and digest and two
options. I.E. to some users it appears that you check email for single
emails, *or* you check digest for a digest email.

To help remove this possible confusion, the digest mode checkbox should
be disabled if no digest-able transports are checked for a given notice.

Test Plan:
1) Apply this patch
2) For both the staff interface and the opac, note that the digest
   checkbox is disabled any time that no digest enabled transport (
   email, sms if enabled ) is checked for the patron editor.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28293: (bug 20443 follow-up) Fix wrong key in Patrons::Import->generate_patron_at...
Jonathan Druart [Thu, 6 May 2021 09:18:55 +0000 (11:18 +0200)]
Bug 28293: (bug 20443 follow-up) Fix wrong key in Patrons::Import->generate_patron_attributes

It generates warnings
Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/Koha/Patrons/Import.pm line 550, <$fh> line 2.

And does not sort correctly (no fallback on the attribute's value for repeatable attributes)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27203: Calculate tax based on ecost if unitprice not set
Nick Clemens [Thu, 17 Dec 2020 12:21:32 +0000 (12:21 +0000)]
Bug 27203: Calculate tax based on ecost if unitprice not set

There is code in populate_order_with_prices that is intended to use ecost over unitprice,
it just doens't seem to be working.

Making it more explicit seems to take care of the issue.

To test:
1 - Create a basket
2 - Add an order line, don't set 'Actual cost: ', but use vendor price
and a discount.
3 - Save
4 - Display all columns, 'Actual cost tax inc.' are GST columns aren't set.
5 - Apply batch
6 - Redo 1,2, 3
7 - Display all columns, GST is calculated correctly, unitprice remains 0.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27203: Adjust unit tests
Nick Clemens [Wed, 5 May 2021 15:28:26 +0000 (15:28 +0000)]
Bug 27203: Adjust unit tests

It seems the issue here is that the price passed in is a string, and not a number, so the tax
value is not calculated when no unitprice is provided

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28272: issues.notseen needs to be marked as a boolean
Tomas Cohen Arazi [Tue, 11 May 2021 11:30:59 +0000 (08:30 -0300)]
Bug 28272: issues.notseen needs to be marked as a boolean

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: Remove one remaining occurrence in moremember
Jonathan Druart [Tue, 11 May 2021 08:46:15 +0000 (10:46 +0200)]
Bug 26995: Remove one remaining occurrence in moremember

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28272: Add unseen_renewals for checkouts
Jonathan Druart [Tue, 11 May 2021 07:26:38 +0000 (09:26 +0200)]
Bug 28272: Add unseen_renewals for checkouts

 t/db_dependent/api/v1/checkouts.t ...................... 7/93
 #   Failed test '200 OK'
 #   at t/db_dependent/api/v1/checkouts.t line 198.
 #          got: '500'
 #     expected: '200'

 #   Failed test 'exact match for JSON Pointer ""'
 #   at t/db_dependent/api/v1/checkouts.t line 198.
 #     Structures begin differing at:
 #          $got->{unseen_renewals} = Does not exist
 #     $expected->{unseen_renewals} = '0'
 t/db_dependent/api/v1/checkouts.t ...................... 88/93
 #   Failed test '200 OK'
 #   at t/db_dependent/api/v1/checkouts.t line 218.
 #          got: '500'
 #     expected: '200'

 #   Failed test 'exact match for JSON Pointer ""'
 #   at t/db_dependent/api/v1/checkouts.t line 218.
 #     Structures begin differing at:
 #          $got->{max_renewals} = Does not exist
 #     $expected->{max_renewals} = '1'
 # Looks like you failed 4 tests of 93.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28272: Fix many things...
Tomas Cohen Arazi [Mon, 10 May 2021 20:44:23 +0000 (17:44 -0300)]
Bug 28272: Fix many things...

This patch could've been splitted into several. But, overall, adding
additionalAttributes: false made the API fail on requests that send
extra info (i.e. cases in which a dev added an attribute to the
underlaying class/table and forgot to deal with it on the API (either
adding it on the spec, or removing it from the response using
Koha::Class::to_api_mapping).

- Koha::Account::Line was missing: credit_type, interface, status,
  register_id and credit_number. I decided to call cash_register_id, and
  to remove credit_number from the response.
  FIXME: We need consensus on a name for the credit_number attribute, and
  add it to the response on the API. It deserves a separate bug. Too
  opinionated for a last-minute fix.
- Koha::Club::Hold::add was returning bad auto-calculated values on
  field that (also) wasn't specified on the spec. Needs a test.
- import_batch_profile had a typo: id_profile vs. profile_id.
- error.json: In this case I reverted the change. This is because some
  routes are adding more 'info' with the error message, and I consider
  this should be done in a more generic approach. Time is required for
  us to think about this. So don't break the API in the meantime.
  FIXME: Implement a generic way to add a payload to error messages on
  the API. Maybe something to work on while on bug 28020.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/
=> FAIL: Lots of tests fail
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28272: Fix note_seen, desk_id, cancellation_reason
Jonathan Druart [Mon, 10 May 2021 15:55:30 +0000 (17:55 +0200)]
Bug 28272: Fix note_seen, desk_id, cancellation_reason

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: DBRev 20.12.00.049
Jonathan Druart [Mon, 10 May 2021 13:27:04 +0000 (13:27 +0000)]
Bug 28108: DBRev 20.12.00.049

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: (QA follow-up) Fix syspref text
Martin Renvoize [Mon, 10 May 2021 13:34:49 +0000 (14:34 +0100)]
Bug 28108: (QA follow-up) Fix syspref text

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: (QA follow-up) Move 'ORDER' back into 'ACQUISITIONS'
Martin Renvoize [Mon, 10 May 2021 13:21:46 +0000 (14:21 +0100)]
Bug 28108: (QA follow-up) Move 'ORDER' back into 'ACQUISITIONS'

With the re-introduction of 'AQUISITIONS' as a logging module in Koha,
it makes sence to move the ORDER notice logging back into that module
whilst leaving the other 'CLAIMS' notices under their own logging module
code.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: Replace one remaining occurrence
Jonathan Druart [Mon, 10 May 2021 10:12:47 +0000 (12:12 +0200)]
Bug 28108: Replace one remaining occurrence

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: (QA follow-up) Add actions to log viewer
Katrin Fischer [Tue, 4 May 2021 09:34:08 +0000 (09:34 +0000)]
Bug 28108: (QA follow-up) Add actions to log viewer

The following actions were missing from the template,
so the code showed instead of a translatable description:

* ACQUISITION CLAIM
* ACQUISITION ORDER
* SERIAL ORDER

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: (QA follow-up) Make the system preference description more precise
Katrin Fischer [Tue, 4 May 2021 09:07:10 +0000 (09:07 +0000)]
Bug 28108: (QA follow-up) Make the system preference description more precise

There has been some confusion on what the pref really covers, so
I hope this helps to resolve.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28108: Fix filtering
Martin Renvoize [Wed, 7 Apr 2021 13:25:24 +0000 (14:25 +0100)]
Bug 28108: Fix filtering

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27625: Add currencies to custom.sql
Jonathan Druart [Wed, 10 Mar 2021 13:20:13 +0000 (14:20 +0100)]
Bug 27625: Add currencies to custom.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27625: Fix sample_notices.t
Jonathan Druart [Wed, 10 Mar 2021 13:16:07 +0000 (14:16 +0100)]
Bug 27625: Fix sample_notices.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27625: Remove uk-UA installer data
Jonathan Druart [Wed, 10 Mar 2021 13:15:47 +0000 (14:15 +0100)]
Bug 27625: Remove uk-UA installer data

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27624: Add some stuffs to ru-RU custom.sql
Jonathan Druart [Mon, 8 Mar 2021 10:46:10 +0000 (11:46 +0100)]
Bug 27624: Add some stuffs to ru-RU custom.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27624: Fix sample_notices.t
Jonathan Druart [Mon, 8 Mar 2021 10:37:01 +0000 (11:37 +0100)]
Bug 27624: Fix sample_notices.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27624: Remove ru-RU installer data
Jonathan Druart [Tue, 2 Mar 2021 10:55:35 +0000 (11:55 +0100)]
Bug 27624: Remove ru-RU installer data

With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes ru-RU installer files.

1) Apply the patch
2) Translate to ru-RU
   cd misc/translator
   ./translate update ru-RU
   ./translate install ru-RU
3) Do a clean install using ru-RU,
   check no problems during install

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27623: Add PLN currency to custom.sql
Jonathan Druart [Mon, 8 Mar 2021 10:32:06 +0000 (11:32 +0100)]
Bug 27623: Add PLN currency to custom.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27623: Fix sample_notices.t
Jonathan Druart [Mon, 8 Mar 2021 10:31:48 +0000 (11:31 +0100)]
Bug 27623: Fix sample_notices.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27623: Remove pl-PL installer data
Jonathan Druart [Tue, 2 Mar 2021 10:57:42 +0000 (11:57 +0100)]
Bug 27623: Remove pl-PL installer data

With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes pl-PL installer files.

1) Apply the patch
2) Translate to pl-PL
   cd misc/translator
   ./translate update pl-PL
   ./translate install pl-PL
3) Do a clean install using pl-PL,
   check no problems during install

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27621: Keep COUNTRY and LANG
Jonathan Druart [Wed, 10 Feb 2021 07:00:54 +0000 (08:00 +0100)]
Bug 27621: Keep COUNTRY and LANG

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27621: Remove it-IT installer data
Jonathan Druart [Mon, 8 Feb 2021 12:25:09 +0000 (13:25 +0100)]
Bug 27621: Remove it-IT installer data

With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes it-IT installer files.

1) Apply the patch
2) Translate to it-IT
   cd misc/translator
   ./translate update it-IT
   ./translate install it-IT
3) Do a clean install using it-IT,
   check no problems during install

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28179: (follow-up) Remove console.log
Owen Leonard [Mon, 3 May 2021 18:08:49 +0000 (18:08 +0000)]
Bug 28179: (follow-up) Remove console.log

This patch removes a "console.log" from detail.tt and replaces it with
similar output to the user. It will probably never be triggered, but
better to handle it gracefully than have a hidden log.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28179: (follow-up) Updates to styling of lightbox controls
Owen Leonard [Fri, 23 Apr 2021 13:52:29 +0000 (13:52 +0000)]
Bug 28179: (follow-up) Updates to styling of lightbox controls

This patch fixes a bug and adds some style changes which I think are
nice. The bugfix is to change the z-index of the lightbox footer so that
it isn't hidden when there is a language menu in the footer.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.

License information about Bootstrap Icons has been added to the About
page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28179: Adjust chocolat.js to display href
Jonathan Druart [Tue, 20 Apr 2021 14:35:39 +0000 (16:35 +0200)]
Bug 28179: Adjust chocolat.js to display href

In order to display link in the description we need to adjust
chocolat.js

Maybe this needs to be reported upstream

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28179: Add a lightbox gallery to display cover images - detail page, staff interface
Jonathan Druart [Mon, 19 Apr 2021 09:37:55 +0000 (11:37 +0200)]
Bug 28179: Add a lightbox gallery to display cover images - detail page, staff interface

This patch adds the ability to display the cover images of a
bibliographic record in a gallery. Cover images attached to items can
also be displayed in separated galleries.

Test plan:
All the cover images are affected, all the different sources will be
tested.
All the steps will be done on the same bibliographic record.
1. Local cover images
 a. Turn on LocalCoverImages and AllowMultipleCovers
 b. Add several local cover images to a bibliographic record
 c. Add several local cover images to an item
 d. Click on an image and confirm that it is displayed in a gallery and
 you can navigate see all the images attached to the bibliographic
 record
 e. Same for items
2. Adlibris
 a. Turn on AdlibrisCoversEnabled
 b. Edit the biliographic record and add an ISBN that will return a
 cover image for this service (9780670026623 for instance)
 c. Display the cover images in the gallery
 d. Note the link to the adlibris.com website at the bottom
3. Amazon
 a. Turn on AmazonCoverImages
 b. Display the cover images in the gallery
4. Coce
 a. Turn on IntranetCoce, set CoceHost to "http://coce.tamil.fr:8080"
 and select some values for CoceProviders.
 b. Display the cover images in the gallery
5. Custom cover images
 a. Turn on CustomCoverImages and set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg
 of anything else meaningful
 b. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28179: Add the Chocolat gallery lightbox JS library
Jonathan Druart [Mon, 19 Apr 2021 09:38:33 +0000 (11:38 +0200)]
Bug 28179: Add the Chocolat gallery lightbox JS library

Chocolat is a lightbox JS library.
https://chocolat.insipi.de
https://github.com/nicolas-t/Chocolat
https://chocolat.gitbook.io

Why Chocolat? It's released under the GPL v3 license, easy to use,
configure and extend, and is still maintained/active.

(and it has a nice name)

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27876: changed Your tags title to caption in OPAC
Wainui Witika-Park [Sun, 25 Apr 2021 04:02:04 +0000 (04:02 +0000)]
Bug 27876: changed Your tags title to caption in OPAC

On the tags page, changed the <h2> "Your tags" to a <caption> to reduce
heading redundancy but keep the information available.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-tags.pl
4) Ensure that there is a caption above the table that says "Your tags"
and that it is not a heading tag

Sponsored-by: Catalyst IT
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27876: took away redundant heading in OPAC full serial issues
Wainui Witika-Park [Fri, 23 Apr 2021 03:18:48 +0000 (03:18 +0000)]
Bug 27876: took away redundant heading in OPAC full serial issues

Changed <h2> to <h1> and deleted current <h1> to eliminate redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-serial-issues.pl
4) Check there is only one main heading and it is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27876: added sr-only to caption of table in Charges page
Wainui Witika-Park [Fri, 23 Apr 2021 03:09:20 +0000 (03:09 +0000)]
Bug 27876: added sr-only to caption of table in Charges page

Made the "Your charges" caption of the table in the Charges page of the
OPAC hidden and for screen-readers only so that it takes out redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to Charges page
4) Ensure that there is no visible caption above the table that says
"Your charges"
5) Check that the code has the caption still with sr-only class

Sponsored-by: Catalyst IT
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing...
Phil Ringnalda [Fri, 16 Apr 2021 18:44:14 +0000 (11:44 -0700)]
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record

For names and uniform titles, when you do a z39.50 search from an authority
record, we prefill what's in the relevant tag's subfield a in the search
form, but for subjects, we don't, both because GetMandatoryFieldZ3950 thinks
the param is topic when it's actually subject, and because
z3950_auth_search.tt doesn't bother putting the value of &subject into the
form.

Test plan:

1) Authorities - New authority - Topical Term
2) Tab 1, click on HEADING-TOPICAL TERM to expand subfields
3) In subfield a, type goats
4) Click Z39.50/SRU search and verify that the Subject heading search field
   has goats prefilled

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28159: URI-encode existing values put into query string for z39.50 authority...
Phil Ringnalda [Fri, 16 Apr 2021 16:55:25 +0000 (09:55 -0700)]
Bug 28159: URI-encode existing values put into query string for z39.50 authority search

When you trigger a z39.50 search from an existing authority record,
Koha prefills the search form with the value in the record. But because
that value passes through a URL, if it isn't URI-encoded characters like
& or ; will cut off the value.

Test plan:
1) Authorities - New authority - Corporate Name
2) Tab 1, click "HEADING-CORPORATE NAME" to expand subfields
3) Subfield a, type foo & bar ; baz
4) Click Z39.50/SRU search
5) Ensure the whole string appears in the Author (corporate) field in
   the popup

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28241: Fix regex to allow for content before and after comma
Lucas Gass [Tue, 27 Apr 2021 21:23:55 +0000 (21:23 +0000)]
Bug 28241: Fix regex to allow for content before and after comma

1. Set up the OPACNoResultsFound with the {QUERY_KW} placeholder.
2.Do a search with a comma that will return no results. Like "King, Martin Luther". If the returns results add some additional characters to the search until no results are returns.
3. Look at the #noresultsfound HTML element. Anything before (or after) the comma is omitted. So the placeholder looks something like 'Martin Luther' instead of 'King, Martin Luther'.
4. Apply patch
5. Try the search again, you should see the content before and after a comma

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: DBIC schema changes
Jonathan Druart [Mon, 10 May 2021 13:50:23 +0000 (15:50 +0200)]
Bug 26995: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: Remove occurrences in sample_patrons.yml
Jonathan Druart [Mon, 10 May 2021 13:41:50 +0000 (15:41 +0200)]
Bug 26995: Remove occurrences in sample_patrons.yml

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: DBRev 20.12.00.048
Jonathan Druart [Mon, 10 May 2021 12:45:32 +0000 (12:45 +0000)]
Bug 26995: DBRev 20.12.00.048

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: Fix SQL syntax error on the about page
Jonathan Druart [Mon, 10 May 2021 12:27:58 +0000 (14:27 +0200)]
Bug 26995: Fix SQL syntax error on the about page

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: (QA follow-up) Fix logic in database update
Martin Renvoize [Tue, 4 May 2021 12:48:23 +0000 (13:48 +0100)]
Bug 26995: (QA follow-up) Fix logic in database update

The logic was reversed.. if the column exists we want to delete it ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: Remove references to relationship column
Kyle M Hall [Thu, 21 Jan 2021 11:59:00 +0000 (06:59 -0500)]
Bug 26995: Remove references to relationship column

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_mod...
Kyle M Hall [Thu, 21 Jan 2021 11:58:45 +0000 (06:58 -0500)]
Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables

Bug 14570 added a borrower_relationships table but it didn't remove the relationship column from the following tables:
- deletedborrowers
- borrowers
- borrower_modifications

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28266: fix spelling mistake on registers.tt
Lucas Gass [Fri, 30 Apr 2021 21:40:17 +0000 (21:40 +0000)]
Bug 28266: fix spelling mistake on registers.tt

TO test:
1. look at the cashup modal, see the wrong spelling of 'recieved'
2. Apply patch and see the right spelling

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28286: Replace < 1 with <= 0
Jonathan Druart [Mon, 10 May 2021 12:07:14 +0000 (14:07 +0200)]
Bug 28286: Replace < 1 with <= 0

It's the same but read more natural

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28286: show "Place hold" button if item is holdable
Petro Vashchuk [Wed, 5 May 2021 13:30:26 +0000 (16:30 +0300)]
Bug 28286: show "Place hold" button if item is holdable

This patch adds "filter_by_for_hold" method in "Items.pm" and
uses it in "cat-toolbar.inc" instead of "filter_by_for_load".

Also this patch removes "filter_by_for_loan" method.

To reproduce the bug:
1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has
item with notforloan value set as "Ordered" (-1)
2) see that button "Place hold" is not present
3) apply the patch
4) refresh the page and ensure that "Place hold" button appears even if
item is "Ordered"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25760: (bug 15422 follow-up) Display record with hold ratio greater than or equal...
Nick Clemens [Fri, 8 Jan 2021 20:12:28 +0000 (20:12 +0000)]
Bug 25760: (bug 15422 follow-up) Display record with hold ratio greater than or equal to the value entered

On bug 15422 we made it so that only holds with copies to buy to acheive the holds ratio
showed

Users have reported that they want to see record where there are 0 copies to buy i.e.
the holds ration matches the value entered

This patch changes the criteria for returning holds to be if the ratio for a given title
is equal to or greater then the ratio specified in the form

I also renamed 'ratiocalc' to 'copies_to_buy' since that is what is contains

Test plan:
1. Create bibliographic records with 1, 2 and 3 items
2. Place 1 hold on each of them
3. Go to the Hold ratios report and search with ratio = 1, 2 then 3
4. You expect to see:
   the title with 1 item with ratio 1
   nothing otherwise
5. Place another hold on each of the record
6. Repeat 3 you expect to see:
   titles with 1 or 2 items with ratio 1
   title with 1 item for ratio 2
   nothing with ratio 3
7. Place another hold on each of the record
8. Repeat 3 you expect to see:
   titles with 1 or 2 or 3 items with ratio 1
   title with 1 item or 2 items for ratio 2
   nothing with ratio 3
9. Make sure there is no regression in the test plan of bug 15422

Comments from Frank Hansen:

Some comments.
When I adding the third hold on each record in step 7, It will result in
the following result:

titles with 1 or 2 or 3 items with ratio 1
title with 1 items with ratio 2 because the title with 2 items will get
a ratio of 1.50 and not 2.
title with 1 items with with ratio 3

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28181: Filter out archived debit types in point of sale
Martin Renvoize [Thu, 22 Apr 2021 12:11:59 +0000 (13:11 +0100)]
Bug 28181: Filter out archived debit types in point of sale

The filter for only displaying un-archived debit types on the point of
sale page had been missed.

NOTE: It would be beneficial to move this to a default filter in the
Koha:: objects search method for both debit_types and credit_types.. but
I opted for the quick fix here to resolve the bug and will impliment
default filtering in a subsequent enhancement bug.

Test plan
1/ Archive a debit type that is marked as 'Can be sold'
2/ Go to the point of sale page and confirm the above debit type appears
3/ Apply the patch
4/ Confirm the debit type no longer appears in the point of sale page.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28229: Count only if needed
Jonathan Druart [Mon, 10 May 2021 10:08:21 +0000 (12:08 +0200)]
Bug 28229: Count only if needed

We don't need to count the number of clubs if we selected a patron or
club already

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28229: (follow-up) Adjust for easier translation
Owen Leonard [Fri, 7 May 2021 11:20:48 +0000 (11:20 +0000)]
Bug 28229: (follow-up) Adjust for easier translation

I think moving the [% IF %] out of the HTML tag makes for easier
translation.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28229: Only show clubs on request.tt if clubs exist
Lucas Gass [Wed, 5 May 2021 21:27:25 +0000 (21:27 +0000)]
Bug 28229: Only show clubs on request.tt if clubs exist

1. Have no existing clubs
2. Apply patch
3. Go to request.tt and you will not see the club tab or any mention of clubs
4. Create at least 1 club
5. Go back to request.tt and now see the tab for clubs
6. Make sure you can place holds as an individual with and without clubs.
7. Make sure you can place holds for clubs.
8. rejoice and sign-off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28276: Do not fetch config ($KOHA_CONF) from memcached
Julian Maurice [Sun, 2 May 2021 11:37:38 +0000 (13:37 +0200)]
Bug 28276: Do not fetch config ($KOHA_CONF) from memcached

memcached address and namespace are in $KOHA_CONF, so it is required to
read it before being able to access the cache. And after that,
configuration is kept in memory forever. Storing this in memcached is
useless and even counter-productive, since Koha reads both the file and
the cache

This patch addresses this issue by removing the cache-related code from
C4::Context->new.
It means that C4::Context->new will always read the configuration file,
so this patch also replaces inappropriate calls to
C4::Context->new->config by appropriate calls to C4::Context->config

It also fixes a bug where C4::Context->new would ignore the filepath
given in parameters if there was something in cache.

It also removes a problematic call to Koha::Caches->get_instance.
Because this call was outside of any subroutine, it would have happened
before the initialization of $C4::Context::context (which happen in
C4::Context::import)

Test plan:
1. Do not apply the patch yet
2. Add the following line at the beginning of Koha::Config::read_from_file
    warn "read_from_file($file)";
   This will allow you to check how many times the file is read.
3. Flush memcached and restart starman
4. Check the logs, you should see "read_from_file" a bunch of times
5. Apply the patch
6. Re-add the line from step 2
7. Flush memcached and restart starman
8. Check the logs, you should see "read_from_file" only once
9. Make sure the memcached config from $KOHA_CONF (memcached_servers,
   memcached_namespace) is taken into account by checking the About page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28272: Prevent api spec to accept extra parameters
Jonathan Druart [Thu, 6 May 2021 13:11:51 +0000 (15:11 +0200)]
Bug 28272: Prevent api spec to accept extra parameters

Some of our definition files are missing { additionalProperties: false }
We must have it to make sure all properties are defined and prevent the
spec to accept extra parameters (being more strict but also allowing to
catch errors more easily)

grep -rL additionalProperties api/v1/swagger/definitions/*.json

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26471: Remove invalid Map URL
Jonathan Druart [Tue, 9 Feb 2021 15:20:36 +0000 (16:20 +0100)]
Bug 26471: Remove invalid Map URL

There is a warning in the console:
Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL del recurso: http://kohadev-intra.mydnsname.org:8081/intranet-tmpl/lib/datatables/datatables.min_20.1200011.js
URL del mapa fuente: pdfmake.min.js.map

https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24154: Adjust assignment
Nick Clemens [Wed, 5 May 2021 18:41:47 +0000 (18:41 +0000)]
Bug 24154: Adjust assignment

The code seems to work either way
We have a mix in our code:
git grep "}) %]"

Using '=>' over '=' does look nicer

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24154: (follow-up) Make parameter and variable more explicit, add tests
Nick Clemens [Fri, 23 Apr 2021 10:34:06 +0000 (10:34 +0000)]
Bug 24154: (follow-up) Make parameter and variable more explicit, add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24154: Get rules rather than values to determine if set or not
Nick Clemens [Fri, 16 Apr 2021 16:59:44 +0000 (16:59 +0000)]
Bug 24154: Get rules rather than values to determine if set or not

Template plugin CirculationRules.Search returns "" if a rule doesn't
exist or if the rule exists but is set to ""

To get more info, we add a 'want_rule' parameter and use that to test
if defined but blank

To test:
1 - In circulation rules set the 'Default checkout, hold and return
    policy' without setting values
2 - Unset it
3 - Notice there is no visual difference
4 - Apply patch
5 - Reload the page
6 - note there is no 'Unset button' and first column says 'Not set'
7 - Save the rule with no values
8 - Now 'Defaults' is displayed and the unset button exists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24564: Use the same tab as the other subfields within a field
Julian Maurice [Thu, 1 Apr 2021 09:04:35 +0000 (11:04 +0200)]
Bug 24564: Use the same tab as the other subfields within a field

For each subfield added, we check if other subfields exists in the same
field. If that's the case we use the same tab as the first subfield
found.

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that doesn't exist
   in your default biblio MARC framework (or delete one). The field
   should exist and have other subfields with a tab set.
2. Change the tab of all subfields within that field it's different from
   what's in the .yml file
3. Run misc/migration_tools/ifla/update.pl
4. Verify that the subfield has been added and have the same tab as
   others subfields
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: Koha team <koha@univ-lyon.fr>
Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24564: Do not modify the tab of existing subfield in ifla/update.pl
Julian Maurice [Wed, 31 Mar 2021 08:44:48 +0000 (10:44 +0200)]
Bug 24564: Do not modify the tab of existing subfield in ifla/update.pl

Test plan:
1. Find a biblio subfield in
   misc/migration_tools/ifla/data/biblio/default.yml that you have in
   your default biblio MARC framework (or create one).
2. Change the tab of this subfield so that it's different from what's in
   the .yml file
3. Run misc/migration_tools/ifla/update.pl --force
4. Verify that the tab of this subfield has not been changed.
5. Do the same for authorities (files are in
   misc/migration_tools/ifla/data/auth/)

Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27756: Fork background jobs to prevent memory leak
Jonathan Druart [Tue, 2 Mar 2021 10:22:29 +0000 (11:22 +0100)]
Bug 27756: Fork background jobs to prevent memory leak

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23215: DBRev 20.12.00.047
Jonathan Druart [Fri, 7 May 2021 12:38:35 +0000 (12:38 +0000)]
Bug 23215: DBRev 20.12.00.047

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23215: Remove traces of the PayPal feature
Tomas Cohen Arazi [Wed, 5 May 2021 13:16:50 +0000 (10:16 -0300)]
Bug 23215: Remove traces of the PayPal feature

This patch removes the PayPal payments feature. It has been moved to
its' own plugin.

To test:
1. Apply this patches
2. Run:
   $ updatedatabase
=> SUCCESS: Database updates correctly
3. Run:
   $ koha-mysql kohadev
   > SELECT * FROM systempreferences WHERE variable LIKE 'paypal';
=> SUCCESS: No results
4. On the sysprefs, OPAC section
=> SUCCESS: No PayPal-related sysprefs show up
5. Add some charges to your patron
6. In the OPAC, log in and see your charges
=> SUCCESS: Nothing broken
7. Install the PayPal plugin [1] or any other payment plugin
8. Restart plack (mandatory for the PayPal plugin)
9. Set some random data in the config (or better, real sandbox testing
   data)
10. Go to the OPAC's account page and try to pay your debts (use the
    checkbox to select lines)
=> SUCCESS: The PayPal payment method shows, you can click the button,
    it fails due to bad config, but things work as expected.
11. Sign off :-D

[1] https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal/-/releases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 23215: Remove PayPal-related sysprefs
Tomas Cohen Arazi [Wed, 5 May 2021 13:16:18 +0000 (10:16 -0300)]
Bug 23215: Remove PayPal-related sysprefs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28291: Make koha-translate script produce valid UTF-8 YAML files
Joonas Kylmälä [Wed, 5 May 2021 14:20:38 +0000 (17:20 +0300)]
Bug 28291: Make koha-translate script produce valid UTF-8 YAML files

We had two problems in the LangInstaller.pm module:
 1) the PO file was read as bytes instead of as a UTF-8 text stream
 2) The YAML file being outputted was double encoded, once by setting
    the file handle to output UTF-8 and other time in the DumpFile
    function internally

To test:
1. Before applying patch do the following
$ cd misc/translator
$ ./translate update pl-PL
$ ./translate install pl-PL
$ cd -
$ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml
2. Notice the output of the authorities_normal_marc21.yml contains
invalid looking UTF-8 characters
3. $ git clean -d -f # to remove the old translation files
4. Apply patch and repeat the steps and notice the
authorities_normal_marc21.yml contains valid looking UTF-8 characters

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>