We have insert_final_newline = true to ensure files will contain a new
line at the end. However we have seen commits with "No new line" added
in the git log.
We should have a xt test to prevent more occurrences.
We should also have a test at the QA script level:
https://gitlab.com/koha-community/qa-test-tools/-/issues/96
Test plan:
prove xt/find-missing-new-lines-at-the-end-of-file.t
should return green.
Remove the new line at the end of a file, eg.
vim -b mainpage.pl
:set noeol
:wq
Now
prove xt/find-missing-new-lines-at-the-end-of-file.t
is failing on mainpage.pl.
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>
The table global search didn't combine correctly with the status filters.
Test plan:
1. Have a patron with holds history
2. Go to members/holdshistory.pl?borrowernumber=x where x is the borrowernumber
3. Try to us the DT seacch to filter
=> Filtering is working as expected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Including chmod 755 xt/use-test-no-warnings.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files
Test plan:
prove xt/tt_tidy.t xt/use-test-no-warnings.t
should return green
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>
Update to show license version as v3, instead of the specific
minor and point release.
Update license to use US American spelling.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates the license page with information
about Cypress.
Test plan:
1. Apply the patch.
2. In the staff interface, go to More > About > Licenses.
3. Scroll to Cypress and note the library name and
licensing information.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates the license page with information
about Vue.
Test plan:
1. Apply the patch.
2. In the staff interface, go to More > About > Licenses.
3. Scroll down to Vue and note the library name and
licensing information.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
Test plan:
1. Navigate to Tools > Patron clubs
2. Create a club template
3. Create a new club using new club template
4. Observe the date fields are "start date" and "end date"
5. Apply patch
6. Refresh page, observe that the date fields have changed to "Enrollment start date" and "Enrollment end date".
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates the default patron card layout to replace "Expires:
August 31, 2010" with the patron's account expiry date.
To test:
1. Apply patch and reset_all
2. Go to Tools > Patron card creator
3. Click New > Card batch
4. In Add by borrowernumber(s), enter borrowernumbers 1 to 6, one per line
5. Click Add patron(s)
6. Click Export card batch
7. Click Export
8. Open the PDF
--> Note that the patron's account expiry date is printed on the card
Optional : Change the expiry date of one or more patrons and redo steps 6-8.
--> The updated expiry dates should be printed on the cards.
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test Plan:
1. In OPAC create a public list, add a book to the list.
2. Notice a link to the list on the biblio's detail page.
3. Create a private list and add the book to it. Notice there is no link to the list in the details page.
4. Apply patch, restart_all
5. Notice there is now a link to the private list
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
When displaying messages on a patron account, group the messages by
type and label which are OPAC messages and which are internal staff
messages.
To test:
1. Find a patron and add several messages to their account, alternating
between internal staff messages and OPAC messages
--> Note that the messages display in the order that they are added and
not explicitly labeled
2. Apply patch and refresh page
--> Confirm that all staff messages display first and all OPAC messages
display underneath
--> Confirm that messages are now labeled "Staff note" or "OPAC"
3. Play around on the patron account and confirm that the message
display is consistent after taking different actions:
- On the Details page
- On the Check out page
- After adding a new staff message
- After adding a new OPAC message
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
1) Navigate to ERM agreements and create an agreement
2) In the agreements table, click on the filter for Is Perpetual
3) Only the option for 'Yes' will be shown
4) Apply patch
5) yarn js:build
6) Hard refresh the browser and repeat step 2
7) Filter options for Yes and No should be available
8) Check the filtering works appropriately
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
1- Apply the patch and enable the folowing system preference: OpacBrowseResults
2- Make a search, choose a record, and expand the 'Browse results' menu.
3- Check the color contrast of these elements: close buttons, results number navigation, record name link and author name. (you can use a color checker like WCAG Color contrast checker)
4- If all the color contrast between the elements and the background are greater than or equal to 4.5 the test succeeds !
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the install and upgrade process for plugins to add the
newly added extra parameters to the thrown exceptions.
This is covered by the tests
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove -r t/Koha/Exceptions.t \
t/db_dependent/Koha/Plugins
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch tweaks the `Koha::Exceptions::Plugin` class by adding an
extra parameter to the plugin install and upgrade related exceptions so
they carry the actuall error (if any).
* Koha::Exceptions::Plugin::InstallDied: install_error
* Koha::Exceptions::Plugin::UpgradeDied: upgrade_error
I didn't pick plain 'error' because it is a reserved word for
`Exception::Class` which makes it stringify using its value only.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
I reused an implemented hook in C4::Letters and overlooked the
redundancy in it. This patch clears that.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Plugins/Notices_content_hook.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass! No behavior change!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1 - apply patch
2 - make sure registers are enabled in system preferences so the permission shows
3 - find a patron, set permissions
4 - confirm the permission reads "Pefform refunds of point of sale transactions."
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch updates the terminology used in the overdue notice (ODUE)
to change 'branch' to 'library'.
Test plan:
1. Check the wording of the ODUE notice under Tools > Patrons and
circulation > Notices and slips.
2. Note that it includes this wording that uses 'branch':
"Please return or renew them at the branch below as soon as possible."
3. Apply the patch.
4. Check that the updated ODUE notice has changed 'branch' to 'library'
by either:
4.1 Resetting everything: reset_all
4.2 Viewing the default notice - click "View default" when viewing
the email notice
The updated text is now: "Please return or renew your overdue items
at the library as soon as possible."
5. Sign off.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
On the UI, not in the comment of the DB
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We've got those tests running without warnings now too.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds a new xt test (xt/use-test-no-warnings.t) to make sure
all our Perl test files will use Test::NoWarnings.
It also adds Test::NoWarnings to some files that were missing it and
that didn't need any other changes.
However we still have 7 non-trivial tests that we will consider
exception for now, until they are fixed.
Test plan:
prove xt/use-test-no-warnings.t
should return green.
And all other tests modified by this patch (the qa script will do that
for you)
You can also test the 2 selenium tests:
1. DROP and CREATE the DB
DROP DATABASE koha_kohadev;
CREATE DATABASE koha_kohadev;
restart_all
2. KOHA_TESTING=1 prove t/db_dependent/selenium/00-onboarding.t
3. Repeat 1
2. KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
We are removing a wrong method name at the same time ;)
Test plan:
Read the patch. Just removing a few outdated POD lines.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
apply the patch and search for RestrictPatronsWithFailedNotices in sysprefs. It will now include a note that the cron looks at the preceding 7 days.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Also corrects the alphabetic ordering for Calyx.
To test:
* Apply patch
* Go to About Koha: you can do so from the more menu or by clicking
on the version number in the bottom right corner
* Open the tab "Koha team"
* Scroll to the bottom of the page and verify that KIT and CLAMS show
up in the correct spot in the list of "Contributing companies and institutions"
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This displays the LOST authorized value description when checking an
item in, instead of the generic "Item was lost, now found." message.
Test plan:
1. Set an item’s Lost status to "Lost". When you check in that item,
you should see the message: “Item was lost, now found.”
2. Set an item’s Lost status to "Missing". When you check in that
item, you should see the message: “Item was lost, now found.”
(default behavior before patch)
3. Apply the patch.
4. Set an item’s Lost status to "Missing" again. When you check in
that item, the message should now be: “Item was Missing, now found.”
(using the authorised value description)
5. Repeat step 4 with other custom LOST authorised values. The check-in
message should correctly reflect the corresponding authorised
value descriptions.
6. Sign off and have a wonderful day! 😊
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>
This is a trivial patch to correct the low color contrast of the
"Refine your search" link.
To test this patch, you can use the firefox extension: WCAG Contrast
Checker or WAVE.
Test plan:
1. Apply the patch
2. Search in the Koha OPAC
3. Check the color contrast of the "Refine your search" link.
4. If it is greater than 4.5, the test succeeds !
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
1. Enable the system preferences: ILLModule, OPACHoldsHistory,
OPACHoldRequests.
2. Apply the patch and log in to a patron account.
3. Go to the "Interlibrary loan requests". Look at the "Show 'select
number' entries" and check the color contrast, which should be
greater than 4.5.
4. Search for a record, choose "Place hold", and check the color
contrast. The "show more options" should have a color contrast
greater than 4.5.
5. Now go to the Holds history, you need at least one record on hold.
Look at the "Showing 1 to ... of ... entries" and check the color
contrast, which should be greater than 4.5.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The left margin is only necessary for span.required
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch corrects some CSS which was broken during the upgrade to
Bootstrap 5. The .required class should not add any style differences to
form fields.
To test, apply the patch and rebuild the staff interface CSS.
- Go to Administration -> Patron categories.
- Edit an existing category.
- Confirm that the contents of input fields are not styled red and
italic.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds <span>s with classes around the patron's email and phone
information in the results of the overdues report. This will allow for
greater flexibility in styling or hiding the information.
To test, apply the patch and go to Administration -> Sytem preferences
-> IntranetUserCSS.
- Add this to the preference:
.overdue_email { color: red; }
.overdue_phone { color: blue; }
- Go to Circulation -> Overdues and confirm that you can see the custom
colors in the results.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan, apply patch:
1) Enable ILLModule
2) Create a new OPAC request, visit:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Press 'Create'. Notice the required 'type 'is now validated before the form is submitted.
Additional testing:
1) Enable ILLOpacUnauthenticatedRequest. Log out. Repeat 2)
2) Press 'Create'. Notice the required unauthenticated fields are highlighted as required.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the messages more streamlined.
To test:
1. Enable `useDischarge`
2. Have a patron with two checkouts
3. Log into the OPAC and try to request a discharge
=> FAIL: You get a message that says '2 item(s)' and has redundant
words.
4. Check one of the items in
5. Repeat 3
=> FAIL: Same, but says '1 item(s)'.
6. Check it in
7. Add a manual fee
8. Repeat 3
=> FAIL: Another redundant text about charges.
9. Apply this patch and repeat 2-8
=> SUCCESS: Things read better
10. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch revises the breadcrumbs in the staff interface lists template
so that the correct link is shown when editing or viewing a public list.
To test, apply the patch and go to Lists in the staff interface.
- Create a public list
- Go to the list of public lists
- Click to view your newly created public list
- The breadcrumb menu should show Lists -> Public lists -> Contents of
[list name]
- The link to public lists should work correctly.
- Perform the same check when editing your public list.
- Check the viewing and editing of a private list to make sure no
breadcrumb errors were introduced.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Decoded the barcode in add items to collection.
Test plan:
1. Go to Tools -> Rotating collections
2. Create a rotating collection
3. Chose Actions -> Manage items
4. Paste a barcode and put some spaces around it, for example " 39999000010053 "
5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace
6. Apply patch
7. Repeat steps 1 - 5, barcode should be accepted
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch fixes selection of a library when editing a desk in
Administration. The form should provide all libraries as options, not
just the currently selected one.
To test, apply the patch and go to Administration -> Desks.
- If necessary, create a new desk.
- Edit the desk. The form should load with the correct library prefilled
in the <select>, but should offer all libraries as a choices.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bootstrap 5 sets the "resize" property on textareas to "vertical." For
our purposes this is a regression in functionality and should be
overridden.
To test, apply the patch and rebuild OPAC and staff interface CSS.
- Log into the OPAC and go to the "Your personal details" page.
- Under "Alternate address" -> "Contact note," check that the textarea
can be freely resized.
- In the staff client, create a new patron and test the same textarea in
that form.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch improves the accessibility of the OPAC. It's a trivial patch
to help assistive technologies understand the different tables.
Test plan:
Enable the system preferences: OPACShelfBrowser, OPACPrivacy,
ShowComponentRecords.
1- On the Koha OPAC, Research a record.
2- Inspect the result page HTML and notice that there is a
role='presentation' in the table tag.
3- Choose a record with a Component section and inspect the HTML, there
should be a role='presentation' in the table tag.
4- Open the Browse shelf. Inspect the HTML and notice that there is a
role='presentation' in the table tag of the browse shelf.
5- Log in to a patron account, go to the Your Summary page, and choose
Privacy in the menu.
6- Inspect the HTML of the page and notice that there is a
role='presentation' in the table tag of the 'Immediate deletion'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1 - Create a patron in a category that can be a guarantee and do not assign any guarantor
2 - Create a patron in a 'Child' account type and do not assign a guarantor
3 - Enable system preference 'ChildNeedsGuarantor'
4 - View 'Check out' and 'Details' tabs for both patrons, note there is no warning
5 - Apply patch
6 - Repeat 4, note warning on all pages
7 - Add a patron gaurantor on the child - repeat 4 - warning is gone
8 - Add non-patron guarantor information to other patron - repeat 4 - warning is gone
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds a catch during circulatoin actions and passes a message back to the caller
For checkouts and renewals we don't have a method for passing messages so we simply catch the exception
and warn - this seems reasonable, as we have now added a warning on the patron display that they are missing
a guarantor
To test:
1 - Create a Child type patron with no guarantor
2 - Create a patron in a non-child category that can_be_guarantee with no guarantor
3 - Check out an item to each patron above
4 - Enable system preference 'ChildNeedsGuarantor' and TrackLastPatronActivityTriggers - select all
5 - In mysql
UPDATE borrowers SET datelastseen = '2025-01-01';
6 - Restart all to clear cache (so update last seen will update)
7 - Attempt to checkout a book to either patron - 500 error
8 - Attempt to returnt he books the patrons have checked out - 500 error
9 - Attempt to renew their items - 500 error
10 - Apply patches, restart all
11 - Repeat checkout, renewal, checkin
12 - On checkout and renewal there should be a warning on the patron page, but actions succeed with no additional problems
13 - On return you get a warning letting you know the action succeeded but there is still a problem to resolve
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>