Jonathan Druart [Thu, 4 Mar 2021 08:42:23 +0000 (09:42 +0100)]
Bug 27837: Prevent the tests to fail is the field is mapped
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 3 Mar 2021 13:54:39 +0000 (08:54 -0500)]
Bug 27837: Add unit tests
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 3 Mar 2021 13:33:21 +0000 (08:33 -0500)]
Bug 27837: Update permanent location if passed into ModItemFromMarc
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Thu, 18 Feb 2021 14:37:15 +0000 (15:37 +0100)]
Bug 27724: Use lenient also in Elasticsearch authorities search
In Elasticsearch, query for biblios uses lenient=true.
This is also needed for authorities search.
In case a search field is defined as type numeric.
Test plan :
1) Use Elasticsearch searchengine
2) Define a search field 'local-number' as type 'Number'
3) Be sure to us 'local-number' in autorities mapping
4) Rebuild autorities
5) Performe a search for autorities with 'Search entire record' and
'contains' with term '123'
=> Without patch you get error :
[query_shard_exception] Can only use prefix queries on keyword and text fields - not on [local-number] which is of type [integer]
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 18 May 2021 07:10:26 +0000 (09:10 +0200)]
Bug 28351: (bug 26261) Fix datepicker for dateformat ne mm/dd/yyyy
This patch restores the same code we have prior to bug 26261
0. Set dateformat to mm/dd/yyyy
1. Go to a patron detail page
2. Open the 'Restrictions' tab
3. Choose a future date in which the day is higher than 12
=> SUCCESS: The input has the date we chose
4. Set dateformat to dd/mm/yyyy
5. Repeat 3
=> FAIL: It sets the current date, the browser console shows an error.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 11 May 2021 12:27:21 +0000 (14:27 +0200)]
Bug 28317: Use the default CGI::Session serializer
We remove YAML::Syck on bug 22824 and YAML on 27673, to use YAML::XS.
However we need one of them for CGI::Session::Serialize::yaml
It's preferable to change the serializer and use the default one instead
of writing one based on YAML::XS (or patch the existing ::yaml that does
not seem maintained).
There was an encoding bug reported on the default serializer (see commit a858e8a8b895640f2) but we fail to recreate it.
Test plan:
Create 3 libraries with branchcode=branchname: "CPL", "ÄÄÄ~ÄãÃ" and "✔️ ❤️ ★"
Use the 3 options of SessionStorage and switch from one logged in
library to another.
Confirm that everything is working correctly (ie. no ending issue in the
library name at the top-right corner)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 18 May 2021 08:43:05 +0000 (10:43 +0200)]
Bug 28367: Fix plack condition in C4/Auth_with_shibboleth.pm
C4/Auth_with_shibboleth.pm has:
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )
When others have:
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )
This has been highlighted by https://gitlab.com/koha-community/koha-testing-docker/-/issues/249 that introduces a PLACK_WORKERS env vars, and t/Auth_with_shibboleth.t was failing with
# Failed test 'checkpw_shib tests'
# at t/Auth_with_shibboleth.t line 335.
Invalid parameter passed, categorycode= does not exist# Looks like your test exited with 255 just after 5.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 17 May 2021 14:07:17 +0000 (16:07 +0200)]
Bug 28189: Fix PluginRoutes.t
So, this one was hidden.
The failures were:
# Failed test 'Bad plugins raise warning'
# at t/db_dependent/Koha/REST/Plugin/PluginRoutes.t line 75.
# found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x556972b22da0):
# found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x5569735b8368):
# expected to find warning: (?^u:Could not load REST API spec bundle: Invalid JSON specification)
# expected to find warning: (?^u:The resulting spec is invalid. Skipping Bad API Route Plugin)
And the correct error was (after a debug warn in JSON::Validator):
Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x55fd0c3d3160):
- /info/version: Expected string - got number. at /usr/share/perl5/JSON/Validator.pm line 165.
So this patch fixes it, but I don't understand why it's only failing for
plugin routes however.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Mon, 10 May 2021 00:30:27 +0000 (10:30 +1000)]
Bug 28305: Remove doc reference to XML::Simple in C4::Context
We don't need a See Also reference to XML::Simple in the C4::Context,
especially since Bug 28278 replaced the parsing of koha-conf.xml
with XML::LibXML.
Test plan:
1. Apply patch
2. perldoc C4/Context.pm
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 13 May 2021 10:39:38 +0000 (10:39 +0000)]
Bug 28345: Patron attributes no longer have option to select empty class
This patch adds the "empty" parameter to the PROCESS directive which
builds the "Class" dropdown. This allows the user to choose a blank
option when creating or editing a patron attribute.
To test, apply the patch and go to Administration -> Patron attribute
types -> Add patron attribute type.
In the entry form the "Class" dropdown should have a blank option. When
editing an existing attribute with a class defined, the correct class
should still be preselected.
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ere Maijala [Fri, 30 Apr 2021 07:00:23 +0000 (10:00 +0300)]
Bug 28268: Improve memory usage when indexing authorities in Elasticsearch
Retrieves the complete records one by one to avoid huge memory usage.
Note that this removes the call to GuessAuthTypeCode, but it is done later in Koha::SearchEngine::Elasticsearch::marc_records_to_documents (and was never done if you asked to index a single record with --authid parameter).
Test plan:
1. Apply patch
2. Reindex authorities: perl misc/search_tools/rebuild_elasticsearch.pl -a -d -v
3. Check that indexing completed successfully and results are correct.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Tue, 2 Mar 2021 23:32:28 +0000 (23:32 +0000)]
Bug 27844: Launch koha-worker systemd service as koha linux user
This patch adds the User directive to the koha-worker systemd unit file
Test plan:
0a. DO NOT APPLY PATCH YET
0b. Start a Koha testing environment running systemd
1. koha-worker --stop kohadev
2. cp debian/templates/koha-worker@.service /etc/systemd/system/.
3. systemctl start koha-worker@kohadev.service
4. ps -efww | grep "background_jobs_worker"
5. Note koha-worker is running as root
6. APPLY THE PATCH
7. cp debian/templates/koha-worker@.service /etc/systemd/system/.
8. systemctl daemon-reload
9. systemctl restart koha-worker@kohadev.service
10. ps -efww | grep "background_jobs_worker"
11. Note that koha-worker is now running as kohadev-koha
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Fri, 7 May 2021 15:57:58 +0000 (17:57 +0200)]
Bug 28302: Forbid CGI::Compile 0.24
CGI::Compile 0.24 has a bug:
https://github.com/miyagawa/CGI-Compile/issues/25
It can cause weird bugs, like breaking the authority detail display
after trying to modify an authority.
Steps to reproduce:
1. Install CGI::Compile 0.24
2. Restart starman with only 1 worker
3. Go to the detail page of an authority (authorities/detail.pl)
4. Go to the edit page (Edit » Edit record)
5. Check starman logs, you should see "Subroutine build_tabs redefined
at [...]"
6. Click on cancel to go back to the detail page, which should now show
a "blank" authority. Now the only way to get the authority back is to
restart starman.
Test plan:
1. Reproduce the bug
2. Install CGI::Compile 0.25 and restart starman
3. Make sure the bug is gone :)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>