So we can easily retrieve the value for the Authorization header.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 52c57538c7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This is the first step toward implementing true end-to-end testing with
Cypress.
Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).
All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.
The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.
Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).
While this is still not a perfect solution, it introduces a solid
foundation for future improvements.
Test plan:
All Cypress tests must pass
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 892df0f0c0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Cypress Warning: Cypress detected that you returned a promise in a
test, but also invoked one or more cy commands inside of that promise.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18bde948ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 892b0f4d53)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We returned the response too late: if something was wrong we processed
the response already and thrown an error.
This may introduce side-effects but it feels like a correct change.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14635a2db4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We will need to call REST API endpoints from Cypress tests, and more
specifically from Cypress's tasks.
It will be useful to reuse what has been done in http-client.js instead
of using the low-level fetch JS function.
1. Add missing get and getAll functions
2. Allow overwrite of return_response and mark_submitting
3. Add a "default" client that will bring flexibility (can call any
routes)
4. Add rspack config to generate
t/cypress/plugins/dist/api-client.cjs.js that will make it reusable
from Cypress's tasks
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0985c64a54)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
00:40:25 koha-1 | < `checkprevcheckout` enum('yes', 'no', 'inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
00:40:25 koha-1 | ---
00:40:25 koha-1 | > `checkprevcheckout` enum('yes','no','inherit') NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
00:40:25 koha-1 | ERROR - DB structures are not identical
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ffd7a4ec10)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Running this update twice fails before this patch with:
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Data truncated for column 'checkprevcheckout' at row 3 at /kohadevbox/koha/C4/Installer.pm line 825
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Replaced borrowers in the ->request POD by borrower
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff2fda90d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the capitalisation for the labels displayed in
the OPAC and staff interface for UNIMARC 214$r and $s from capital
case to sentence case, to be consistent with other labels:
- 214$r: Printing and/or publishing information transcribed
as found in the main source of information
- 214$s: Printing and/or publishing information transcribed
as found in the colophon
Test plan:
1. Have a look at the patch and confirm the changes look correct.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4883dd2754)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the capitalization for the labels displayed
in the MARC tag editor for UNIMARC subfields 181$a, 181$c,
$182$a, 182$c, and 183$c, when the value builders are used. The
labels are changed from capital case to sentence case, for
consistency with other labels:
- Content Form -> Content form (181$a)
- Content Type -> Content type (181$c)
- Media Type Code -> Media type code (182$a)
- Media Type -> Media type (182$c)
- In the dropdown list (183$a):
. Audio Carriers -> Audio carriers
. Computer Carriers -> Computer carriers
. Microform Carriers -> Microform carriers
. Microscopic Carriers -> Microscopic carriers
. Stereographic Carriers -> Stereographic carriers
Test plan:
1. In your KTD shell navigate to
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder
2. Run "git grep Audio Carriers" you should get results
3. Run "git grep Computer Carriers" you should get results
4. Run "git grep Content Form" you should get results
5. Run "git grep Content Type" you should get results
6. Run "git grep Media Type" you should get results
7. Run "git grep Media Type Code" you should get results
8. Run "git grep Microform Carriers" you should get results
9. Run "git grep Microscopic Carriers" you should get results
10. Apply the patch
11. Repeat steps 2-9 you should not get results
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 784c5ac2a1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch changes the capitalisation for the labels displayed in
the MARC editor for UNIMARC 181$b, when the value builder
unimarc_field_181b.pl is used. The labels are changed from capital
case to sentence case, to be consistent with other labels:
- Specification of type (position 0)
- Specification of motion (position 1)
- Specification of dimensionality (position 2)
- Sensory specification 1, 2 and 3 (positions 3 to 5)
Test plan:
1. Check the capitalisation in the patch.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93824068bf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.20.2/MARC/File/XML.pm line 399, <__ANONIO__> chunk 1.
Those are 2 warnings coming from MARC::File::XML when called with
invalid XML.
We should not use Test::Warn as they are not expected and that may be
fixed upstream.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b696642df7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From https://css-tricks.com/snippets/css/make-pre-text-wrap/
/* Browser specific (not valid) styles to make preformatted text wrap */
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
... I think it's now safe to remove the backward compatibility versions and simply keep pre-wrap.
Test plan (from bug 921)0:
* place a hold on a title with a very very long title or author
* mark it as "waiting for pickup" by doing a checkin
* go to command line interface, and run
* misc/cronjobs/gather_print_notices.pl /tmp
* misc/cronjobs/printoverdues.sh /tmp
* if your title/author is long enough, it's splitted on 2 lines
with this patch (it is not before this patch)
It will also remove the warnings from t/db_dependent/Patron/Borrower_Discharge.t
WARNING: Ignored `white-space: -moz-pre-wrap` at 6:14, invalid value.
WARNING: Ignored `white-space: -o-pre-wrap` at 7:14, invalid value.
WARNING: Ignored `word-wrap: break-work` at 8:14, invalid value.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03cf21fd92)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
- Fixed grammar: "Returns true if the patron is the anonymous patron"
- Fixed test cleanup: use txn_rollback instead of txn_begin
- Fixed test subroutine closure syntax
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 097ffd0af9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The first motivation of this patch is to remove the following warnings
from t/db_dependent/Auth.t:
Use of uninitialized value $anonymous_patron in string eq at /kohadevbox/koha/C4/Auth.pm line 1497
Actually a correct fix seems to add a new `is_anonymous` method to
Koha::Patron in order to remove the warnings from everywhere else.
Test plan:
Confirm that you cannot log in using the anonymous patron and that the 2
tests are passing
prove t/db_dependent/Auth.t t/db_dependent/Koha/Patron.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e49602a87e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
XMLin complains because there are several nodes with the same name
attribute. Not sure what is correct or not, but we actually cannot use
the admin/DBMS user to login to the Koha interface.
We use KOHA_USER env var or default to 'koha'.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 298884805a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test was failing because the new FacetSortingLocale system preference
added was not included in the mock preference handler in t/db_dependent/Search.t.
This caused warnings about the unknown preference when the _sort_facets_zebra
function was called.
This commit adds the FacetSortingLocale preference to the mock, returning
'default' as the value, which matches the expected fallback behavior of
the new unicode collation sorting feature.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 21a217d5bf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds a skippable unit test for the fi_FI locale to prove
that the patches work well for other locales that don't use
the default Unicode collation. It will run on koha-testing-docker,
but will be skipped on systems lacking it.
This patch also fleshes out the existing unit tests a bit more
to prove that the patches also improves the sorting of names
with diacritics generally. That is, the default Unicode sort
is better than the existing stringwise/bytewise sort even for
English and French locales.
Test plan:
0. prove -v t/Koha/SearchEngine/Elasticsearch/Search.t \
t/db_dependent/Search_FacetSorting.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c66e830b3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01543503ce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c0546d4c22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The Koha::I18N module was missing POD documentation. This adds complete
documentation for all exported functions including usage examples and
descriptions.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5acbf16948)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up adds two major enhancements to the locale-based facet sorting
implementation:
1. **System Preference Integration**
- Adds FacetSortingLocale system preference for configurable locale selection
- Dynamically detects available system locales using Koha::I18N
- Provides user-friendly dropdown with locale descriptions
- Supports both Elasticsearch and Zebra search engines
2. **Zebra Search Engine Support**
- Extends locale-based sorting to Zebra (in addition to existing Elasticsearch)
- Implements _sort_facets_zebra() function in C4::Search
- Maintains consistent Unicode-aware sorting behavior across search engines
Key Features:
- Dynamic locale detection via Koha::I18N::available_locales()
- Proper module architecture with comprehensive unit tests
- Clean fallback chain: preference → system LC_COLLATE → default
- Admin UI integration in System Preferences → I18N/L10N
- Universal facet sorting for international library systems
Test plan:
1. Apply patch and restart services
2. Install/run database update
3. Navigate to Administration → System Preferences → I18N/L10N
4. Verify "Sort facet names using" dropdown shows available system locales
5. Test facet sorting with different locales and both search engines
6. Run: prove t/Koha/I18N.t t/Koha/SearchEngine/Elasticsearch/Search.t t/db_dependent/Search_FacetSorting.t
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 146aca25f5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change uses a configurable locale-based collator to sort
the ES facet names.
Test plan:
0. Apply the patch
1. vi /etc/locale.gen
2. Uncomment the locale you want to generate (e.g. fi_FI.UTF-8 UTF-8)
3. locale-gen
4. vi "/etc/default/koha-common"
5. Add the following to the bottom of the file:
export LC_ALL=fi_FI.UTF-8
6. koha-plack --restart koha-common
7. Setup some test records with authors with accented and unaccented names,
and different cases for the lead letter
e.g. Aa author, Åa author2, aa author, étienne
8. Switch to using Elasticsearch and reindex
koha-elasticsearch -b -v --rebuild kohadev
9. Do a test search
e.g. http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
10. Confirm the facet names are sorted in ascending order following
Finnish collation rules
e.g.
aa author
Aa author
étienne
Farley, David
Humble, Jez
Martin, Robert C.
Åa author
NOTE: Any collation and language can be used. Finnish is just
an example of a Latin-based script which has a different
alphabetical ordering than just A-Z
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b76df3a168)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/api/v1/holds.t .. 1/16 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602.
We do not test the notification here, we can simply ignore the letters
code
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c14e72e782)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Koha/Booking.t .. 1/2 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '7' for key 'PRIMARY' at /kohadevbox/koha/Koha/Object.pm line 174
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data truncated for column 'status' at row 1 at /kohadevbox/koha/Koha/Object.pm line 174
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da423a717e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/AuthorisedValues.t .. 1/17 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'tagsubfield' on MarcSubfieldStructure - perhaps you forgot to set its 'is_auto_increment' attrib
ute during add_columns()? Treating 'tagsubfield' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
It is a bit scary but it's only that we forgot to pass a value for
tagsubfield (that is NOT NULL and part of the PK)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 50b9abfe4f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
It seems that they are expected, we simply need to catch them.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 364b78e653)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'filter' on SearchMarcToField - perhaps you forgot to set its 'is_auto_increment' attribute during add_columns()? Treating 'filter' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/SearchField.pm line 42
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c2df4af991)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/Test/Mock/Logger.t .. 1/10 # trace:
# (No trace messages)
# debug:
# "Debug message" at /usr/share/perl/5.36/Test/Builder.pm line 374
# info:
# (No info messages)
# warn:
# (No warn messages)
# error:
# (No error messages)
# fatal:
# (No fatal messages)
t/Test/Mock/Logger.t .. ok
All tests successful.
Files=1, Tests=10, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.40 cusr 0.07 csys = 0.50 CPU)
Result: PASS
This one is a bit tricky: we cannot use Test::Warn to capture the output because Test::Builder->diag does not write directly to STDERR.
It has its own failure_output handle (which defaults to STDERR) but bypasses Perl’s standard layers.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9d17ce951d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/selenium/basic_workflow.t .. 1/22 CP main = 1.93
t/db_dependent/selenium/basic_workflow.t .. 3/22 CP add patron category = 3.56
t/db_dependent/selenium/basic_workflow.t .. 5/22 CP add patron = 4.31
CP add biblio = 0.29
t/db_dependent/selenium/basic_workflow.t .. 11/22 CP add items = 9.81
t/db_dependent/selenium/basic_workflow.t .. 16/22 CP checkout = 5.97
t/db_dependent/selenium/basic_workflow.t .. 20/22 CP checkin = 4.04
t/db_dependent/selenium/basic_workflow.t .. 22/22 CP holds = 5.60
t/db_dependent/selenium/basic_workflow.t .. ok
This has been used in the past for benchmarking Koha.
I suggest to keep the warn but comment it.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e12c572e8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The tests was wrong, we should make sure the item has been checked in.
We were missing the mock userenv:
Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/Circulation.pm line 2744. at /kohadevbox/koha/C4/Circulation.pm line 2787
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdb9a41af3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The test is wrong, the item is not correctly checked in, it should fail.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c743feec7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Letters.t .. 95/104 Use of uninitialized value in string eq at /kohadevbox/koha/Koha/Patron.pm line 389.
contactname can be NULL in DB.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45493d0f06)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Warnings encountered while roundtripping a MARC record to/from USMARC. Failing over to MARCXML. at t/db_dependent/Koha/SearchEngine/Elasticsearch.t line 854.
=> This one is expected: we have generated a record with large fields
item-level_itypes set but no itemtype set for item (1568) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100.
item-level_itypes set but no itemtype set for item (1568) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100.
=> Those 2 ones can be removed by create a biblio and items using
build_sample_biblio and build_sample_item
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25277e8a4d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Koha/Patron/Modifications.t .. 1/7 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'borrowernumber' on BorrowerModification - perhaps you forgot to set its 'is_auto_increme
nt' attribute during add_columns()? Treating 'borrowernumber' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
t/db_dependent/Koha/Patron/Modifications.t .. 5/7 DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'verification_token' on BorrowerModification - perhaps you forgot to set its 'is_auto_inc
rement' attribute during add_columns()? Treating 'verification_token' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 174
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f851367cf4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Koha/Installer.t .. 1/4
Use of uninitialized value $db_version in numeric eq (==) at
/kohadevbox/koha/Koha/Installer.pm line 32.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1974dd9c91)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
it's an integer.
t/db_dependent/Koha/Old/Hold.t .. 1/3
Value not allowed for auto_incr biblionumber in Biblio at
/kohadevbox/koha/t/lib/TestBuilder.pm line 431.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd54cd5062)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1 - Create a closed serial
2 - Disable the syspref "RoutingSerials"
3 - Go to cgi-bin/koha/serials/serials-search.pl and search for the
closed serial ; click on the "closed" panel of the result -> on the
actions button, there is no option to reopen
4 - Apply patch
5 - Repeat 3, there is now an option to reopen.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 573b226997)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test Plan:
1. Apply patch
2. In Staff Interface inspect element and notice HTML has data attributes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 353cd8f8d6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
1. perldoc Koha/Acquisition/Order/Claims.pm
2. Check that it mentions Koha::Acquisition::Order::Claims
3. perldoc Koha/CoverImages.pm
4. Check that it mentions Koha::CoverImages.pm
4. These files no longer mention 'Koha::Cities'
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f72a235de0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds more module search paths to the zebra-biblios-dom.cfg and zebra-authorities-dom.cfg, so that a larger range of CPU architectures will work with Zebra search unit tests.
This will not change Debian package installs, but it will fix any git-based installs.
TO TEST (you'll need access to an ARM-based CPU, and, preferably, an x86-64 machine):
ON THE ARM-BASED MACHINE:
a) start ktd, then ktd --shell
b) in ktd, run: prove -v t/db_dependent/Search.t
c) notice how the test now fails
APPLY PATCH
d) rerun step b
e) notice how the test now passes
ON THE X86-64-BASED MACHINE:
f) run steps a-e
g) notice how the test passes, both before and after applying the patch
SIGN OFF
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a6ac8c843)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f1bd24e87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch makes a couple changes to the tests:
* Remove check for Copyright line. The Copyright line should not be mandatory.
* Remove dependency of GPL-related checks on the copyrigth line
existence. (this highlights several missed checks).
* Skip testing-related templates. Koha ships some templates that are not
excluded correctly.
This 'fix' will highlight existing errors that were skipped until now.
To test:
1. Run:
$ ktd --shell
k$ prove xt/find-license-problems.t
=> FAIL: Tests pass! Some files should make them fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests fail!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a4b25acb5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Unknown column 'date_due desc' in 'order
clause' at /kohadevbox/koha/Koha/Objects.pm line 401
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bb71c19635)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Checkout history does not limit to 50 items, it's a regression from bug
33949.
To limit to 50 items we need to use "rows", not "limit".
Test plan:
Have more than 50 checkouts and confirm that by default the table only
displays 50 entries.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd28d473cd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>