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>
t/db_dependent/Biblio.t .. 2/25 Finding auth type GENRE/FORM at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
t/db_dependent/Biblio.t .. 12/25 Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type TOPIC_TERM at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
Finding auth type PERSO_NAME at t/db_dependent/Biblio.t line 300.
t/db_dependent/Biblio.t .. ok
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 afa1cfb63a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value $cn_item in sprintf at /kohadevbox/koha/C4/ClassSplitRoutine/LCC.pm line 53.
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 9b0709fb47)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Reserves/CancelExpiredReserves.t .. 3/4 No reserves HOLD_CANCELLATION letter transported by email at /kohadevbox/koha/C4/Letters.pm line 602.
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 10b673ee1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
t/db_dependent/Reserves.t .. 10/70 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.
However we do test it later so we need to limit the scope of mock
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 1ceea0019c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Using perl -MCarp::Always:
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945
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 3aa81fa654)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
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 e21d6c04a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.
The context is:
3045 my $current_issues = $biblioitem->totalissues // 0;
3046 if ( defined $value ) {
3047 $totalissues = $value;
3048 } else {
3049 $totalissues = $biblioitem->totalissues + $increase;
3050 }
3051 return 0 if $current_issues == $totalissues; # No need to update if no changes
It feels correct to use $current_issues to suppress the warning
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 5661df2f70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This file should have been removed years ago.
See the history:
commit a5a419616d
Date: Tue Aug 28 01:50:55 2007 +0100
Disable tests
@ t/dummy.t:1 @
+# Dummy test until Test::Harness or similar
+# is used by the other tests to check deps.
+print "1..1\nok 1\n";
Then
commit 7f01995446
Date: Fri Dec 7 17:15:22 2007 -0600
installer (part 3): enabled 'make test'
- # disable tests
- 'test' => {TESTS => 't/dummy.t'},
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 b8de89eaaa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If a yellow error message appears when saving the guaranteed patron,
also an extra popup message "Patron is already a guarantor for this
patron" will appear on the screen. It should only appear when you try
to add the same patron as a guarantor that already is a guarantor for
that patron. This happens because js function select_user is triggered
every time when guarantor data is send back to front-end with variable
new_guarantors if error occurs. Already existing guarantors shouldn't
be send back to front-end since their data is not lost. This patch
changes existing guarantors form elements to use classes "guarantor_id"
and "guarantor_relationship" to prevent this.
To test:
1. Find a patron with Patron guarantor or add first a Patron guarantor
(not a Non-patron guarantor) to a juvenile patron and save.
2. Edit again the same patron with guarantor and modify their age
to be greater than the upperage or under the required age of the
patron category.
=> Notice that you will get a yellow message "The following fields
are wrong. Please fix them..."
=> Notice that you will also get a pop up notice that says "Patron is
already a guarantor for this patron".
3. Apply this patch.
4. Repeat step 2.
=> Confirm that yellow message box is displayed but "Patron is..."
pop-up is not
=> Also confirm that guarantors data is not lost.
5. Try to add same patron guarantor as guarantor for guarantee patron
again.
=> Confirm that pop-up is displayed right after attempting to add
guarantor.
6. Try to add new guarantor for patron.
=> New guarantor should be added.
7. Attempt to save the patron.
=> Confirm that both guarantors data is still displayed in form.
8. Fix patrons age and attempt to save.
=> Patron is saved and both guarantors are displayed in their
details.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f2fe453dd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
> Cannot read properties of undefined (reading 'description')
Not sure since which change this is failing but it has always been
wrong.
The code in patron-search.inc is:
var categories = [% To.json(categories) | $raw %].map(e => {
e['_id'] = e.categorycode.toLowerCase();
e['_str'] = e.description;
return e;
});
var categories_map = categories.reduce((map, e) => {
map[e._id] = e;
return map;
}, {});
It's the keys that are lower cased.
Test plan:
`yarn cypress run \
--config video=false,screenshotOnRunFailure=false \
--spec t/cypress/integration/KohaTable/KohaTable_spec.ts`
should return green
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7bc3b24827)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule
2) Create a new ill request at:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type and any library, pick '42' for patron. This is the 'koha' user.
4) Create the request, click 'Send notice to patron'. Pick any template. Notice nothing is shown on the UI.
5) Apply patches. Repeat. Notice you get the message:
"The requested notice was NOT queued for delivery by email, SMS".
6) Edit the 'koha' patron and tick the following boxes on 'Patron messaging preferences':
- Interlibrary loan ready
- Interlibrary loan unavailable
7) Go back to the request and click 'Send notice to patron' and pick any option again. Notice now you get a success message.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd5b58cd9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Its tran_fail, not tran_error.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbbdfaa7f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
And only those files.
Currently the test is failing with
02:52:31 koha_1 | # Failed test at xt/find-license-problems.t line 65.
02:52:31 koha_1 | # got: '0'
02:52:31 koha_1 | # expected: '1'
02:52:33 koha_1 | # File ./misc/translator/po/LICENSE has wrong copyright: hasgpl=1, hasv3=1, hasorlater=1, haslinktolicense=0, hasfranklinst=0
02:52:33 koha_1 | # Looks like you failed 1 test of 1381.
02:52:33 koha_1 | [00:51:24] xt/find-license-problems.t
Because a LICENSE file has been added to koha-l10n, and now this test fails on it.
27ab9ff4d2
But we should not test files that are not part of the git index.
Test plan:
0. Do not apply this patch
1. Edit xt/find-license-problems.t, add
warn scalar(@files);
2. Run `prove xt/find-license-problems.t`
=> Notice that 4056 files are processed
Note that you need to have a clean git repo. You can run the following
git command BUT BEWARE /*\ it will remove all changes not committed
`git clean -d -f`
3. Apply this patch, prove again
=> Tests are passing, with the same number of tests
xt/find-license-problems.t .. ok
All tests successful.
Files=1, Tests=4056
Note that I think we lost one file, as Test::NoWarnings is adding a
test. But I don't think it is worth the trouble to find out which one is
missing.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 491ffdc7f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
Use of uninitialized value in numeric le (<=) at /kohadevbox/koha/C4/Circulation.pm line 3151.
Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Circulation.pm line 3158.
$issue->renewal_count is undefined in C4::Circulation:3151, but it's NOT
NULL in DB
We need to refetch the row to get the default defined at the DB level
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53b3d5756e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 536.
I think this is the correct fix. We generate a random av category that
is used in the data, so $label get undef:
521 $label = $authorised_values{$t};
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6cbe0a25e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152.
We need to mock the userenv
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b1bc1bbc5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
02:28:36 koha_1 | WARNING: The key derivation method "opensslv1" is deprecated. Using -pbkdf=>'pbkdf2' would be better.
02:28:36 koha_1 | Pass -nodeprecate=>1 to inhibit this message.
02:28:36 koha_1 | at /kohadevbox/koha/Koha/Patron.pm line 3216.
We should deal with that on a separate bug report. For now we can remove
the warnings from the log/output.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 12e4e92e53)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Those diag statements are not really needed
# Filling a hold when pref enabled should trigger a test
# Filling a hold when pref disabled should not trigger a test
# Updating a hold location when pref disabled should not trigger a test
# Updating a hold location when pref enabled should trigger a test
# Update with no change to pickup location should not trigger a test
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6c8cee965)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If we build an object and pass a primary key (ie. suffixed by _id) we
should not replace it.
Test plan:
The test highlights the problem, it won't affect existing tests.
0. Apply only the first patch (Cypress tests)
1. Run yarn cypress run t/cypress/integration/t/mockData.ts
=> It fails
2. Apply this patch
=> It passes
Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart
Remove .only
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0aaf193a75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Amended by: Jonathan Druart
Remove .only
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea703016d4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26f17cbf68)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When StripWhitespaceChars is enabled and the user by chance enters
some white spaces in the input field, Koha generates empty subfield
(or even entirely empty field).
Test plan:
==========
1. Enable StripWhitespaceChars system preference.
2. Edit an existing record, putting just some spaces into an empty
subfield. Save the record.
3. Go to bibliographic record Normal view and in modal "MARC preview"
notice that the subfield you entered spaces in exists as an empty
subfield. If it was the only subfield in a field, the field exists
with no data at all. This is wrong.
4. Apply the patch ; restart_all.
5. Repeat 2. and 3. You should not see any empty subfield now. If the
empty subbfield was the only subfield in a field, the field should
have been removed from the record.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d0ce815600)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This fixes the error 500 generated when using the label
generator if you use the "Bibliographic data precedes
barcode" layout type when printing a barcode range.
Test plan:
1. Set up information for testing:
1.1 Create a new label layout:
1.1.1 Cataloging > Tools > Label creator
1.1.2 New > Label layout
1.1.3 Add these details:
- Layout name: BZ34157
- Choose layout type: Bibliographic data precedes barcode
- Select 'List fieds'
- Data fields: add some text at the end
title, author, isbn, issn, itemtype, barcode,
itemcallnumber, 'Some text'
1.1.3 Save
1.2 Ranges of barcode numbers for testing:
1.2.1 Where the numbers are not used in KTD, and are LOWER than
the highest barcode number (39999000019193):
500000 to 500100
1.2.3 Where the numbers are not used in KTD, and are HIGHER than
the highest barcode number (39999000019193):
39999000020000 to 39999000020100
1.2.2 Where the numbers are used in KTD:
3999900000001 to 3999900001001
2. Print a barcode range using the ranges in 1.2:
2.1 Cataloging > Tools > Label creator > Print barcode range
2.2 Enter the barcode ranges
2.3 Select a layout to be applied: BZ34157
2.4 Export
2.5 Click "Download as PDF"
2.6 Results for all barcode ranges:
==> You get a page with "An error has occured! Error 500...".
3. Repeat step 2, but select the DEFAULT layout for 2.3:
==> Results for all barcode ranges: PDFs with barcode labels
successfully generated
4. Apply the patches and restart everything (restart_all)
5. Repeat steps 2 and 3.
6. Results for all barcode ranges and the BZ34157 and DEFAULT layouts:
==> PDFs with barcode labels successfully generated
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: David Nind <david@davidnind.com>
Bug 34157: (Follow up) Removed the debugging data
Signed-off-by: David Nind <david@davidnind.com>
Bug 34157: (follow-up) Tidiness fix
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a51460e2c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The diff doesn't contain intentional HTML formatting, and pre tags do
not prevent un-escaped HTML from being interpreted, so we should not
use the raw filter here
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c702e2ea4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This change removes the incorrect instruction from about.pl:
"Run the following SQL to fix the database" and fixes the HTML
formatting so that the line "-- Convert schema '' to '':;" is
displayed correctly at the start of the line.
Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/about.pl?tab=database
2. Note that "Run the following SQL to fix the database" no
longer appears and "--Convert schema '' to '':;" starts
at the beginning of the line instead of with leading whitespaces.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6699bdb142)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
So that we can reuse it from somewhere else.
The current need is to be able to reuse it from Cypress tests.
Test plan:
Try to hit several places where APIClient is used:
* Syspref edition
* Translation of item type description (be aware of bug 40161)
* Delete of cover images
* checkin, renew from the checkout list
* etc.
Note that this does not affect Vue components.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 44ed8d5400)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
0. APPLY PATCH
1. Transfer an item from Library A to Library B
2. Place and item-level hold on the item
3. Set library to Library B
4. Go to Circulation > Transfers to receive
5. In the 'On hold for' column you should now see the patron card number.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 295fd3bf89)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch restores the generation of subfield s from field 240 (Uniform Title)
in the MARC21 773 field generation, addressing cataloger feedback about the
critical importance of this field for:
- Bibles and books of the Bible
- Laws and statutes
- Translations
- Academic and specialized library materials
- Legal materials and treaties
The MARC21 standard defines subfield s as "Uniform title (NR)" and this data
is essential for proper bibliographic relationships.
This patch also fixes a warning when 245 indicator 2 contains non-numeric
values by adding proper validation.
Test plan:
1. Create a record with a 240 field containing uniform title data
2. Generate a child record from it
3. Verify the 773 field now contains subfield s with the uniform title
4. Run prove t/db_dependent/Koha/Biblio.t to ensure all tests pass
Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f025aee75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch updates the Koha::Biblio->generate_marc_host_field method to
more closely match the updated logic in C4::Biblio::prep_marc_host.
We change a number of things including:
1) Constructinging the 773 subfield generation from a hash to an array
to preserve field order.
2) Updating main entry handling for 100/110/111 fields to clone the
field and then remove relevant subfields as apposed to fetching only
a limited set of subfields.
3) Add handling to generate subfield 7 content depending on LDR and
Main Entry information
4) Improve handling for title subfield construction from 245 to respect
non-filing characters and remove trailing punctuation
5) Remove trailing punctuation from subfield b when generated from 250
6) Remove generation of subfield s from the 240 field entirely
7) Remove trailing punctuation from subfield d when generated from 260
8) Add generation of subfield k from 800-830 fields
Rebased-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
We dropped the upstream aforementioned C4::Biblio method, but this patch
faithfully replicates it's functionality within
Koha::Biblio->generate_marc_host_field
Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 610ad29bf8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When creating a child record (New > New child record from Normal view)
the information put in field 773 is very basic, sometimes not
complete (e.g. only one ISBN, only 245 $a in 773 $t, 773 $w
missing 003 of the host record etc.) and put in random order.
Test plan:
==========
1. Find any record to be a host record for an analytical record. You
can enrich the record with multiple 020, 490+830 fields, make sure that
there are 001 and 003 fields present.
2. From upper menu chose New > New child record.
3. See the generated field 773 - the subfields are incomplete and in
random order.
4. Apply the patch ; restart_all.
5. Repeat p. 2.-3. See that the generated 773 field contains now much
more information, including 773 $7 and also preset leader.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Rebased-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
The rebase removed the majority of this patch as the prepare_host_field
method was removed entirely upstream. The follow-up patch re-implements
the same but in the newer Koha::Biblio->generate_marc_host_field method
instead. We also dropped the Unit tests that were introduced in the
subsequent patch.
Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b4b8e7078)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Enable the system preference: marcflavour: choose UNIMAR,
PrivacyPolicyConsent, ILLModule, TagsEnabled, OpacCloud.
1- Apply the patch
2- Go to the OPAC, log in to a patron account. Go to personal details,
check the html code of the date of birth field, and notice that there
is a aria-hidden="false".
3- Inspect the search bar, and notice in the library select, there is a
label with a for attribute which match the id.
4- Search a record, click on "save to list" and check the Category
select, inspect if the label has a for attribute and match the select
id.
5- Go to interlibrary Loan Request in the user menu, Check if the "Note"
field has a label for attribute which match the id.
6- Go to Consent, check if the checkbox has a label for "Yes" and "No".
7- Go to Suggestions and check that the checkbox has the same id as the
label in the Summary column.
8- Go to "Tag Cloud", inspect the HTML code of the "Tags to show from
other users" label, notice that there is a for attribute which match
the id of the input tag. and check if in the html code there is an
aria-label with the term of the tag.
9- Go to Subject Cloud, check the html code, and notice that there is a
label that surounds the input tag.
10- Go to Advanced Search, click on "More options", and check that all
the additional options have a label with a for attribute which match
the id of the select.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59a8b35f8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>