Phil Ringnalda [Fri, 30 Aug 2024 04:10:13 +0000 (21:10 -0700)]
Bug 37779: Fix forms that POST without an op in tag moderation
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
There are two in tags/review.tt: the filters for term, status, reviewer, and
dates, which are better as a GET since you can then bookmark and link to a
particular set of filters, and the no-JavaScript fallback for checking whether
a term has been approved or rejected, which currently doesn't work at all,
but with a working op param then works just fine as a GET.
Test plan:
If you have to use Chrome, you're on your own for the disabling JavaScript
and getting rid of the body {display: none !important} style rule, my plan
uses Firefox's devtools to do it
1. Without the patch, Tools - Tags - change the filter from the default
status "pending" to "all", Apply, and bookmark the page
2. Open your bookmark, note that it's status "pending"
3. You can't test the no-JS fallback for term testing since it doesn't
work, so apply patch and restart_all
4. Tools - Tags - change the filter from the default status "pending"
to "all", Apply, and bookmark the page
5. Open your bookmark, note that it's status "all"
6. You need a couple of tags to test the Test feature, so open the OPAC,
log in, search for any record and add the tags approveme, rejectme
7. Back in Tools - Tags, click the Reject button to reject rejectme
8. In the Check lists input, test that approveme shows "approveme is
permitted!" and rejectme shows "rejectme is prohibited!"
8. Now to disable JavaScript, open Firefox's More tools - Web Developer
Tools. You're going to need the Style Editor, so if it's not visible
you'll want to enable it in Settings in the next step
9. Top bar, right side, there's a three-dots menu, with an option for
Settings. In Advanced settings, click the checkbox for Disable JavaScript
(which as hovering the * says, is only for that tab and only until you
close the tab or the toolbox).
10. Checking Disable JavaScript turned your page to blank white, so go to
the Style Editor, where the first thing, already selected, is an inline
style sheet with the rule "body {display: none !important}" - select all
the text of the rule and delete it, which you'll have to do on every
page load
11. In the Check lists input, test that approveme still shows "approveme
is permitted!" (after you delete the display: none !important rule, and
with a rather annoying message about "Tested 1 Term(s)." replacing the
list of terms).
Sponsored-by: Chetco Community Public Library Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Wed, 4 Sep 2024 04:46:11 +0000 (21:46 -0700)]
Bug 37827: Switch OPAC download list form from POST to GET
The hidden form that the OPAC uses for downloading a list has no need to be
a POST, which is good because it can't be one without having an op param
that starts with "cud-" which it doesn't have.
Test plan:
1. Nothing visible will change, so start with the patch applied
2. Log in to the OPAC, then do a search for something like Perl which will
return a couple of results. Select two, With selected titles: Add to
list - New list - give it a name and Save
3. Lists - choose the one you just created
4. Download - ISBD
5. Verify that the page you were on didn't change, that a file was downloaded,
and that the file contains the two titles in your list
Sponsored-by: Chetco Community Public Library Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 5 Sep 2024 22:13:32 +0000 (15:13 -0700)]
Bug 37853: Do not POST a form at the end of changing the password (OPAC)
Rather than having a form that does a POST (without an op, which isn't proper),
the final step in changing your password in the OPAC should just be a link.
Test plan:
1. Without the patch applied, log in to the OPAC as a user that you don't
mind changing the password for
2. Welcome, {username} - Your account - Change password
3. Type the old password, and a new password twice, click Change password
4. Below the success message is a green button with white text, Return to
my account - click it
5. Apply patch
6. Change password, type the (new) old password, and a (newer) new password
twice, click Change password
7. Below the success message is what looks like a green button with white
text, Return to my account
8. Hover the button, check your browser status bar for a URL showing you
that it's now a link. Click it to be sure it works.
Sponsored-by: Chetco Community Public Library Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Amended-by: Jonathan Druart
Edited commit message
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 9 Sep 2024 11:45:17 +0000 (11:45 +0000)]
Bug 37859: Fix style of tabs on comment review page
This patch corrects the tab markup on the comment review page. These
tabs are just links styled as tabs -- there isn't any JS tab swapping.
This kind of "static" tab markup wasn't handled by the tabs WRAPPER
work.
To test you should have some comments data in your system:
- Go to Administration -> System preferences and enable the
"OPACComments" preference.
- Log in to the OPAC and search for a bibliographic record.
- View the detail page for the record and click the "Comments" tab.
- Click "Post your comments on this title."
- Enter some text in the review box and submit.
In the staff interface, go to Tools -> Comments.
- You should see two tabs: "Approved comments" and "Comments awaiting
moderation."
- Confirm that the tabs look correct.
- Approve one or more comments and confirm that the tabs work correctly
to switch views.
Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 30 Aug 2024 04:17:09 +0000 (21:17 -0700)]
Bug 37785: Remove dead code in tools/letter.tt that looks like a form that would POST without an op
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
The two in tools/letter.tt are blocks of never-used code which would display
a message confirming that you saved a notice, or that a notice was deleted
after you confirmed that you wanted to delete it, but neither one has ever
been executed. Now, the names of the ops don't match, because they are
cud-add_validate etc. and would have to explicitly set a param for
add_validate, but even before the CSRF change to cud- ops, they explicitly
unset their $op so that as they say "# we return to the default screen for
the next operation". Prior to that, they just did
"print $input->redirect("letter.pl");"
No test plan is possible, since this code has never once done anything.
Sponsored-by: Chetco Community Public Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Katariina Pohto [Tue, 21 May 2024 13:33:52 +0000 (16:33 +0300)]
Bug 35771: Unselecting titles when making multi-hold
When placing a hold on multiple biblios Place Holds page (request.pl) has checkboxes for unselecting some of the listed biblios.
Removing the checkmark does not actually unselect the biblio. Clicking the Place holds button will place a hold for all the biblios on page that can be reserved.
If unchecked biblio does not have a pickup location, it will get past form validation and cause an error.
Test plan:
1. Select several biblios and choose Place hold
2. Choose a patron
3. Select a pickup location for all biblios and unselect one of the checkmarks
4. Place holds and note that even the deselected holds was placed.
5. Repeat steps 1-2.
6. Leave pickup locations empty and try to place the holds.
7. Note alert: "Please make sure all selected titles have a pickup location set"
8. Uncheck one of the biblios and add pickup locations to the checked biblios.
9. Try to place the holds and note that there is no alert, and you get an error 500.
10. Apply patch.
11. Repeat steps 1,2,8 and place holds.
12. Note that there is no error 500, and while all the biblios are shown on page, only the checked biblios have a new hold placed on them.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 29 Aug 2024 02:57:52 +0000 (19:57 -0700)]
Bug 37765: Fix forms that POST without an op in systemprefernces
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
The two in systempreferences are the button to cancel deleting a local
preference, which can be fixed with no visible change, and the button to
return to the preferences list after being told that your requested deletion
has been done, which makes a visible change because right now, the whole page
that tells you the preference was deleted doesn't show at all.
Test plan:
1. Without the patch, Administration - System preferences - Local use (in the
left sidebar)
2. New system preference - Explanation and Variable are required, so make
them both Trash and Save
3. In the row for your new preference, click the Delete button
4. In the confirmation page, click the No, do not delete button
5. You'll be taken back to the list of Local use preferences. That's the
behavior that you want to see unchanged after the patch
6. Click the Delete button for your preference again, but this time click
Yes, delete
7. You'll be taken to a blank page with no category of preferences selected
or listed. That's the behavior that you want to see change with the patch
8. Apply patch, restart_all
9. Administration - System preferences - Local use - New system preference -
'Trash' for both Explanation and Variable - Save
10. In the row for the new preference, click the Delete button
11. In the confirmation page, click No, do not delete
12. Verify that it returns you to the list of Local use preferences just like
before
13. Click Delete again, but this time click Yes, delete
14. Now you should get a page saying "Data deleted" with a Back to system
preferences button. Click that button, you should return to the list
of Local use preferences, with your Trash preference gone
Sponsored-by: Chetco Community Public Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37820: Upgrade fails at 23.12.00.023 [Bug 36993]
If table aqbudgets is miissing foreign key
'aqbudgetperiods_ibfk_1' database update fails on
"Can't DROP FOREIGN KEY" error.
To test:
1. Remove changes made in bug 32132, drop foreign key
aqbudgetperiods_ibfk_1 and downgrade your database:
- ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL;
- UPDATE aqbudgets SET budget_period_id = NULL
WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget");
- DELETE FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget";
- ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1;
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on error "Can't DROP FOREIGN KEY `aqbudgetperiods_ibfk_1`;...".
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.
=> Confirm table aqbudgets now contains 'aqbudgetperiods_ibfk_1'.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 3 Sep 2024 11:41:03 +0000 (11:41 +0000)]
Bug 37814: Fix incorrect use of __() in .tt files
This patch corrects instances of the double-underscore function being
used in .tt files where the single-underscore function should
be used instead.
To test, apply the patch and update a translation, e.g. fr-FR:
> gulp po:update --lang fr-FR
- Open the corresponding .po file for the affected strings, in this
case misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
should find these lines:
- koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt:
"Are you sure you want to unsubscribe %s from email alerts for %s?"
- koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
"Click to expand this section"
- Check fr-FR-opac-bootstrap.po for this line:
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt:
"Are you sure you want to unsubscribe %s from email alerts for %s?"
Sponsored-by: Athens County Public Libraries Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Fri, 30 Aug 2024 01:17:12 +0000 (18:17 -0700)]
Bug 37783: Fix form that looks like it would POST without an op in reserve/request.tt
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
In reserve/request.tt the modal for cancelling a hold looks like it is a form
that will do a POST without an op input, but in fact it requires JavaScript to
work at all, and with JavaScript it clears out the div where it stashes inputs
and then inserts one with the op cud-cancel.
To persuade the test at xt/find-missing-op-in-forms.t that there is an op,
and to let a casual skimmer of the code see what that op will be, without
actually changing the behavior in any way, we can just stick the op in the
div which the JS will .empty() out before sticking the same thing back in.
Test plan:
1. Search for any record with an item, click Place hold, place two holds
2. In the row for the second hold, click the trash can icon to delete
3. Nothing changed from normallly cancelling a hold, did it? It shouldn't
have.
Sponsored-by: Chetco Community Public Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 29 Aug 2024 23:18:52 +0000 (16:18 -0700)]
Bug 37768: Fix form that POSTs without an op in itemtype administration
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
For itemtype administration, that's the "No, do not delete" cancel button
when you decide not to delete an itemtype, which doesn't need to POST
anything since it's just taking you back to the list of itemtypes. The only
visible change from switching to a GET is that the URL ends with a "?" from
a GET with no params, but someone can fix that by choosing one of our various
link-as-a-cancel-button styles and switching it to a link in a bug that
doesn't block an RM_priority bug.
Test plan:
1. You aren't going to see a visible difference, so start with the patch
applied
2. Administration - Item types
3. You need an itemtype that isn't in use to be able to delete it - ktd
provides you with an unused Computer Files type, so click the Delete
button for that row
4. In the "Are you sure..." page, click No, do not delete
5. Verify that you are back at the list of itemtypes, with only the "?" at
the end of the URL to tell you that you did a GET rather than a POST
Sponsored-by: Chetco Community Public Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Phil Ringnalda [Thu, 29 Aug 2024 23:51:27 +0000 (16:51 -0700)]
Bug 37766: Fix forms that POST without an op in MARC bibliographic frameworks
We intend not to have forms with method="post" without an op variable
(so we can check that the op starts with "cud-" as part of the CSRF
protection), but because of bug 37728 some were missed.
In MARC bibliographic frameworks, that's the tag search form, which
should be a GET so the URL includes what you searched for and you can
bookmark it or link to the search, and the cancel "No, do not delete"
button in the page to confirm deleting a subfield, which should also be
a GET to take you back to the page where you were, which was
?tagfield=903&frameworkcode=VR when you clicked Delete.
Test plan:
1. No visible change in behavior (only the URL), so start with the
patch applied
2. Administration - MARC bibliographic framework - choose one other
than Default, since the "&framework=" of Default could be confused
with a failure to get the code in there - Actions - MARC structure
3. Type any three digit number higher than 009 (you want something with
subfields) in the Search for tag input and hit Enter
4. Verify that your URL has the searchfield and frameworkcode correct
and that number or next highest number tag is displayed first
5. Change the In framework select menu to another non-Default framework
and click search, and verify that the URL change to that
frameworkcode, and that framework is displayed
6. Toggle the Display only used tags/subfields checkbox, search for a
different tag, and verify that the state of the checkbox persists as
you do more searches
7. On any other listed tag - Actions - View subfields
8. For any displayed subfield click Delete
9. In the confirmation page click No, do not delete
10. Verify that the page you return to has the correct tagfield and
frameworkcode for the tag you chose
Sponsored-by: Chetco Community Public Library Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 10 Sep 2024 08:40:20 +0000 (10:40 +0200)]
Bug 37870: Run tests from ClassSources.t within transactions
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 10 Sep 2024 08:39:13 +0000 (10:39 +0200)]
Bug 37870: Fix sort order of class sources
There are several things going on here.
The tests are failing randomly when some additional class sources are in the
DB. This should never happen on Jenkins, but it happened, see the third
patch of this patch set (spoiler: tests not run within a txn)
There were also a sorting problem: by default sort will show
uppercases first:
A, B, C, a, b, c
However we want:
a, A, b, B, c, C
which is what fc does (https://perldoc.perl.org/functions/fc)
Test plan:
0. Checkout the main branch, without patches from this patchset.
1. Run t/db_dependent/ClassSources.t several times
=> Notice that new entries in the DB table 'class_sources' are created
2. Run t/db_dependent/Koha/UI/Form/Builder/Biblio.t and
t/db_dependent/Koha/UI/Form/Builder/Item.t
=> They fail (if not, run t/db_dependent/ClassSources.t again)
3. Apply the patches
4. Run t/db_dependent/ClassSources.t
=> No more additional entries in DB, tests are correctly run within
transactions
5. Run t/db_dependent/Koha/UI/Form/Builder/Biblio.t and
t/db_dependent/Koha/UI/Form/Builder/Item.t several times
=> They always pass
Note that the sort should actually be done on the description, not the
code. But that's for another bug...
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 10 Sep 2024 07:57:30 +0000 (09:57 +0200)]
Bug 37870: Remove warning if biblionumber is not passed
Not directly related to the failure, only a bit of cleaning before
starting.
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Tue, 3 Sep 2024 09:03:17 +0000 (11:03 +0200)]
Bug 35402: Fix regressions.t
The audio alert feature is not correctly designed and is problematic.
It looks at the class name in the DOM, not when the element with this class name
will be displayed to the end user
So it's not possible to make it work for modals for instance, or if an element
is built in JS then displayed
This patch remove the modal code from the code, if there are no waiting
holds. It is the behaviour that existed prior to the Bootstrap update.
However it is kind of random behaviour, the song that is played when the
librarian open the circ page is different if the user has waiting holds or not.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Mon, 2 Sep 2024 16:24:56 +0000 (16:24 +0000)]
Bug 34440: bookings_lead_period and bookings_trail_period cant be set at categorycode level
Follow Joubu's test plan. It should no longer fail.
Error from eval Koha::CirculationRules->set_rules($params) at onboarding.pl was:
set_rule cannot set 'bookings_trail_period' for a 'categorycode'! at /kohadevbox/koha/installer/onboarding.pl line 301.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Phil Ringnalda [Fri, 30 Aug 2024 17:04:12 +0000 (10:04 -0700)]
Bug 37794: Fix form that POSTs without an op in Holds to pull
We intend not to have forms with method="post" without an op variable (so we
can check that the op starts with "cud-" as part of the CSRF protection), but
because of bug 37728 some were missed.
In Holds to pull that's the form which lets you change from the default
starting and ending date. Switching that to a GET at least lets you refresh
the page without getting a browser warning about resending a POST and maybe
having your credit card double-charged.
Test plan:
1. Without the patch, Circulation - Holds to pull - change the start date to
something earlier and click Submit
2. Refresh the page, get a warning about resubmitting data
3. Apply patch, Circulation - Holds to pull - change the start date to
something earlier and click Submit
4. Refresh the page, no warning
Sponsored-by: Chetco Community Public Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
Create a new report and run it
Use the "Rows per page" dropdown to select another value
=> Without this patch nothing happens
=> With this patch applied the page is reloaded and the correct number
of rows is displayed
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 18 Sep 2023 14:09:48 +0000 (14:09 +0000)]
Bug 33907: Improve translation of title tags: OPAC part 1
This patch updates a batch of OPAC templates so that title tags can
be more easily translated. Some templates have been updated for
consistency as well: Harmonizing page title, breaddrumb navigation, and
page headers.
To test, apply the patch and confirm that the following pages have
correct title tags:
- Log in to the OPAC by navigating directly to a user page like
/cgi-bin/koha/opac-user.pl
- From your user summary page, click "Charges."
- Check the advanced search page.
- Search for a bibliographic record and view the details, and then click
"MARC view" and "ISBD view."
- From this page click "Save to your lists" and check the title in the
popup window."
- Still on a detail page, click "Add to your cart." Open the cart and
check that page.
- Go to authority search (must have OpacAuthorities enabled).
- Perform an authority search which will return results.
- View the detail page for one of the results, and check the MARC view
as well.
- With UseCourseReserves enabled, view the course reserves page, then
the course reserve detail page.
- Search for a subscription which has patron notification enabled.
- View the detail page, then open the "Subscriptions" tab. Click "More
details."
- On this page you should see a "Subscribe to email notification"
button. Click it to open the subscription page.
- Check both /cgi-bin/koha/opac-browse.pl and
/cgi-bin/koha/opac-browser.pl. Whether or not the features are enabled
you should be able to check the title.
- Check /cgi-bin/koha/ilsdi.pl as well as one or more views linked to on
that page.
- Navigate to a page in the OPAC which doesn't exist to test the error
page template.
- Go to Administration -> System preferences and enable the
OpacMaintenance preference.
- Go to the OPAC and check the system maintenance page.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 6 Jun 2024 16:17:36 +0000 (16:17 +0000)]
Bug 37046: Use template wrapper for OPAC curbside pickup tabs
This patch updates the OPAC curbside pickups template to use WRAPPERs
for the Bootstrap tabs markup.
To test, apply the patch and enable the "CurbsidePickup" system
preference if necessary.
- Log in to the OPAC and click the "Curbside pickups" tab in the sidebar
of the user summary page.
- With no curbside pickup policy defined, you shoul see a single tab,
"Your pickups" and the message "No curbside pickups."
- In the staff interface go to Administration -> Curbside pickup.
- Configure curbside pickups for at least one branch.
- Return to the OPAC and refresh the curbside pickups page.
- You should now see a "Schedule a pickup" tab along with the "Your
pickups" tab, and it should be active by default.
- Schedule a pickup.
- When the page refreshes, the "Your pickups" tab should now be
active by default.
Sponsored-By: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Nind [Mon, 8 Jul 2024 02:36:24 +0000 (02:36 +0000)]
Bug 34325: Rename "Barcode" to "Item barcode" on manual invoice and credit forms
The forms for adding a manual invoice and credit for patrons (in
the accounting section) have a field for entering a barcode. This
can cause confusion, as it is not clear if it is for an item
barcode or the patron card number.
This patch changes the form labels and error message for the
manual invoice and credit forms to clarify that this is for an
item barcode. Related table column headings are left as "Barcode".
Test plan:
1. Go to a patron's record: Patrons > search for a patron >
select a patron.
2. Go to Accounting > Create manual invoice.
3. Note that there is a label "Barcode:"
4. Enter details for a manual invoice and 'Save':
- Type: Manual fee
- Barcode: an item barcode, for example 39999000011418
- Amount: 15
==> Result: Manual invoice saved
5. Repeat step 4, but enter a patron card number for the barcode.
For example: 23529000651225.
==> Result: You get an error message
"Error: Invalid barcode entered, please try again".
6. Enter details for a manual credit and 'Save':
- Credit type: Credit
- Barcode: an item barcode, for example 39999000011418
- Amount: 5
==> Result: Manual credit saved.
7. Check the tables listing transactions - note that the column
heading is "Barcode". (Tables are Transactions, Make a payment,
and Transactions > Details (under the Actions column).
8. Apply the patch.
9. Repeat steps 4 to 7. Note that:
- The label is now "Item barcode:" for the manual invoice and
manual credit forms.
- The error message in step 5 is now "Error: Invalid item
barcode entered, please try again".
- For the tables in step 8, the column headings remain as
"Barcode" - there is generally enough context that it doesn't
need to be changed.
10. Sign off D:
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jennifer Sutton [Thu, 25 Jul 2024 22:22:06 +0000 (22:22 +0000)]
Bug 32218: Update string grammar in identity-providers.tt
Adiministration > Identity Providers > New identity provider under allow
OPAC the language string was updated.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Fri, 26 Jul 2024 11:12:16 +0000 (11:12 +0000)]
Bug 37491: Remove duplicate asset import
This patch removes a duplicated asset import from import_from_kbart_file.inc
Test plan:
1) Apply patch and look at import_from_kbart_file.inc to observe that where previously there were two uses of "[% Asset.js("js/job_progress.js") | $raw %]" and now there is just one
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37436: Move EmailPatronWhenHoldIsPlaced to Holds policy sysprefs
This patch moves the EmailPatronWhenHoldIsPlaced system preference
from Circulation > Patron restrictions to Circulation > Holds policy.
To test:
1. Apply patch
2. Go to Administration > System preferences > Circulation > Holds
policy
--> EmailPatronWhenHoldIsPlaced should be right after
emailLibrarianWhenHoldIsPlaced
Signed-off-by: hebah <hebah@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 34183: Remove MARC format hint from OPACResultsLibrary system preference description
Test Plan
1. Navigate Koha Administration
2. Search for OPACResultsLibrary
3. Note that sentence "Please note that this feature is currently available for MARC21 and UNIMARC." is removed
Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 29 Jul 2024 18:28:00 +0000 (18:28 +0000)]
Bug 37515: Add common class to all places where an item type image is shown
This patch adds an "itemtype-image" class to templates in all places
where we show itemtype images. This patch affects both the OPAC and the
staff client.
To test you should have icons associated with multiple item types.
- Apply the patch and go to Administration -> System preferences
- Search for "itemtype"
- noItemTypeImages should be set to "Show"
- OpacNoItemTypeImages should be set to "Show"
- BiblioItemtypeInfo should be set to "Show"
- Search for "usercss"
- Add an obvious style rule for item type images to IntranetUserCSS
and OPACUserCSS, e.g.
.itemtype-image { border: 3px solid orange; }
- In the staff interface, check the following pages to confirm that your
custom style is visible:
- Administration -> Item types
-> Edit
- Administration -> Authorized values -> CCODE -> Edit a CCODE
- Advanced search
- Search results
- Bibliographic details
- Place hold
- Lists -> List contents view (must set the item-level_itypes
preference to "bibliographic record")
- In the OPAC:
- Advanced search
- Search results
- Bibliographic details
- Place hold
- Log in as a user with checkouts ->
- View the checkouts tab on the patron summary page
- Lists -> List contents view (must set the item-level_itypes
preference to "bibliographic record")
Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
$ prove ./xt/verify-yarnlock.t
./xt/verify-yarnlock.t .. error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
./xt/verify-yarnlock.t .. 1/1
# Failed test 'verify yarn.lock file is updated correctly'
...
Result: FAIL
3/ set koha repo to state where yarn.lock is updated
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Wed, 14 Aug 2024 16:35:42 +0000 (16:35 +0000)]
Bug 33731: Allow for default sounds on SCO page
To test:
1. APPLY PATCH
2. Enable AudioAlerts system preferencce
3. Set up some audio alerts to trigger on the SCO page. ( I used #sco_main for east testing)
4. Make sure the sounds work properly.
Note: It is not my favorite thing to duplicate these assets for intranet and OPAC, is there a better way?
modified: koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
new file: koha-tmpl/opac-tmpl/bootstrap/sound/IM_notification.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/beep.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/call.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/critical.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/device_connect.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/device_disconnect.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/ending.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/fail.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/incoming_call.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/loading.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/loading_2.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/maximize.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/minimize.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/new_mail_notification.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/opening.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/panic.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/popup.ogg
new file: koha-tmpl/opac-tmpl/bootstrap/sound/warning.ogg
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Wed, 21 Aug 2024 10:31:09 +0000 (10:31 +0000)]
Bug 37691: Improve visibility of password expiration reset link
This patch moves the password expiration reset link into the error box
so that it is more prominent.
To test, apply the patch and rebuild the staff interface
CSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface
Try to log in to the staff interface as a user whose password has
expired. You will probably have to use SQL to update a patron record
directly, e.g.
UPDATE borrowers SET password_expiration_date = '2022-01-01' WHERE borrowernumber = X;
When you submit your login details the page should reload with an error
message: "Error: Your password has expired." Within the red dialog you
should see the "You must reset your password" link.
Sponsored-by: Athens County Public Libraries Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 6 Jun 2023 15:29:12 +0000 (15:29 +0000)]
Bug 33925: Improve translation of title tags: Serials
This patch updates serials templates so that title tags can be more
easily translated. Some templates have been updated for consistency as
well: Harmonizing page title, breaddrumb navigation, and page headers;
Adding "page-section" <div> where it was lacking.
To test, apply the patch and confirm that the following pages have the
correct title tags:
- Serials home
- Serials search results
- Subscription details
- Subscription edit
- Search for vendor
- Search for bibliographic record
- Subscription renew
- Serial collection
- Create and modify routing list
- Preview routing list
- View routing slip
- Claims
- Check expiration
- With a subscription which has manual history enabled, click the
"Edit history" link under the "Planning" tab.
- Select multiple serial search results and batch edit
- New subscription
- Manage frequencies: Create and edit
- Manage numbering patterns: Create and edit
Signed-off-by: Loïc Vassaux-Artur <loic.vassaux-artur@outlook.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 23 May 2024 12:32:01 +0000 (12:32 +0000)]
Bug 36945: Fix several missed instance of breadcrumb WRAPPER use
This patch corrects some templates which never got the breadcrumb
WRAPPER update. Some breadcrumbs and page titles have been updated to be
more consistent with page headings.
To test, apply the patch and enable the "CatalogConcerns" system
preference if necessary. Check the following pages to confirm that the
breadcrumbs menu looks correct and that breadcrumbs are consistent with
page titles and page headings.
Lucas Gass [Mon, 17 Jun 2024 13:54:45 +0000 (13:54 +0000)]
Bug 37081: Reword button on addorderiso2709.tt
To test:
1. Go to Acquisition and create or find a vendor.
2. Create a new basket.
3. Add to basket -> from a new file
4. Upload a .mrc file and stage fro import.
5. Add the files to your basket.
6. For each item in the basket notice the button set which includes MARC, Card, and Add order.
7. APPLY patch and reload the page.
8. Add order should now be New order.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Fri, 26 Jul 2024 13:20:07 +0000 (13:20 +0000)]
Bug 37493: [DONT PUSH] Test only - Force test fail
Apply this patch only, run:
1) cypress run --spec "t/cypress/integration/flatpickr_spec.ts"
2) run `git status`.
Notice t/cypress/screenshots/ and t/cypress/videos/ show
3) Apply 2nd patch. Repeat 2). Notice its empty
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Laura_Escamilla [Fri, 30 Aug 2024 16:54:19 +0000 (16:54 +0000)]
Bug 34185: Capitalized OPAC in OpacItemLocation syspref
To test:
1. In K-T-D git grep for “OpacItemLocation”
1. Notice that related XSLT / XSL scripts are not coming up. Only .pm, .pl and .sql scripts.
2. Git grep for “OPACItemLocation”. Note that XSLT/XSL files show up but not the .pm, .pl and .sql scripts.
3. Apply the patch. Updatedatabase. Restart_all
4. Git grep for “OPACItemLocation”
1. Notice that both the XSLT/XSL files in addition to the .sql, .pm and .pl scripts are now showing up.
5. Sign off and have a spectacular day :D
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 31 May 2024 21:12:04 +0000 (21:12 +0000)]
Bug 37004: Add branchcode as HTML class to each grouped result in search results
To test:
1. Apply patch and restart_all
2. Do a catalog search that returns results.
3. Using the browsers dev tools inscpet the page and look for the 'available_items_loop_items' class in the 'Location column'.
4. Each child <li> element should have a class that is the branchcode.
5. Make sure that branchcode is correct.
6. Change the StaffSearchResultsDisplayBranch system preference. Make sure that each branchcode is still correct.
7. Change the system preference 'noItemTypeImages' to 'Dont show'.
8. Make sure the branchcode is still correct.
9. Checkout an item that would show up in these search results.
10. Do steps 3-8 again excpet this time look for the HTML element 'onloan_items_loop_items'.
11. Put some items in transfer that would show up in these search resultss.
12. Do steps 3-8 again excpet this time look for the HTML element 'other_items_loop_items'.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Fri, 26 Jul 2024 18:17:11 +0000 (18:17 +0000)]
Bug 35239: (follow-up) Correct more missing label inconsistencies
This patch corrects a couple more labels and modifies the process of
cloning a patron attribute field so that each new cloned row has
matching label and input.
To test, apply the patch and, if necessary, create some patron attribute
types:
- Go to Administration -> Patron attribute types
- Create at least two new patron attribute types.
- Go to Tools -> Batch patron modification.
- Submit a batch of patrons for batch modification
- In the list of fields to modify, test that clicking each label gives
focus to the corresponding field (except date fields, we need to fix
that globally).
- Click "New" next to the patron attribute field.
- A copy of the field should be created. Test that the new field also
has matching label and <select>
Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 35239: Missing form field ids in batch patron modification template
Test Plan
1. Tools > Batch patron modification
2. List valid card number in text box
3. [Continue]
4. Edit patrons form, click on input box label
5. Matching input box gets focus
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 36085: Only superlibrarians can protect patrons
A drive-by patch which hopes to resolve bug 36085 by only allowing superlibrarians
to protect or unprotect patrons.
Test plan:
a) prepare two koha staff users:
1) a superlibrarian
2) a user that only has permission to edit patrons
b) when logged in as the user prepared in step a2 (non-superlibrarian),
then go to edit any patron
*) note how you can set the protected yes/no radios
c) apply the patch
d) repeat steps a-b as this same user
*) note how you can now no longer see the protected yes/no radios
e) log in as the user prepared in step a1 (superlibrarian), then repeat
steps a-b
f) note how the protected yes/no radios are back
Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 22 Aug 2024 10:02:58 +0000 (11:02 +0100)]
Bug 34440: Unit test for change to Koha::Item
This adds a unit test for the new preparation_period handling introduced
into the find_booking method of Koha::Item.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 25 Jul 2024 15:15:18 +0000 (16:15 +0100)]
Bug 34440: Enforce lead/trail restrictions
This patch adds rule enforcement into the user interface. When
attempting to make a booking now, instead of just visually displaying
the lead and trail period and highlighting when an overlap appears, we
now block the ability to select a date when such an overlap case is
found.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Mon, 15 Jul 2024 15:23:02 +0000 (16:23 +0100)]
Bug 34440: Highlight overlaping lead and trail periods
This adds a further distinction between a lead/trail period and whether
it would conflict with an existing booking or not.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Mon, 15 Jul 2024 13:42:26 +0000 (14:42 +0100)]
Bug 34440: (follow-up) Enable flatpickr only once rules are populated
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 21 Jun 2024 11:25:24 +0000 (12:25 +0100)]
Bug 34440: Update for change to /circulation_rules
We updated the preceeding bug that introducing the /circulation_rules
endpoint such that it always returns an array.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Fri, 21 Jun 2024 11:13:18 +0000 (12:13 +0100)]
Bug 34440: Use circulation_rules for buffer timing
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 26 Mar 2024 13:38:34 +0000 (13:38 +0000)]
Bug 34440: Simplify modal code using isSameOr* functions
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Tue, 26 Mar 2024 13:38:04 +0000 (13:38 +0000)]
Bug 34440: Add isSameOrBefore dayjs plugin
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Mon, 25 Mar 2024 22:28:20 +0000 (22:28 +0000)]
Bug 34440: Add handling for lead/trail display
This patch adds code to insert classes into the flatpickr for lead and
trail time on bookings and includes some scss additions to highlight
said periods in display.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Wed, 27 Mar 2024 22:04:07 +0000 (22:04 +0000)]
Bug 34440: Add itemtype selection to bookings modal
Whilst we still don't need to know the specific item we will need to
know the itemtype to be able to fetch the correct circulation rules for
adjusting the datepicker with lead and trail times.
This patch adds such a picker option. You should be able to select the
item or itemtype in either order.. selecting itemtype first will limit
the items list to options available (and 'Any item').. upon selecting a
specific item the itemtype selector should become disabled and reflect
the itemtype of the item selected.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Wed, 27 Mar 2024 17:29:00 +0000 (17:29 +0000)]
Bug 34440: Take preparation period into account at checkout
This patch ensures we catch checkouts that would interfer with the
preparation period set for an existing booking by adding said period to
the bookings search.
We also reduce the proposed due date for the checkout to be confirmed by
the preparation period for the item.
Test plan
1) Set a booking preparation period for an itemtype
2) Add a booking for an item with that itemtype to fall beyond the due
date that the item would be assigned if you were to check it out now
to your test user, but within the number of days you've set for your
preparation period.
3) Attempt to check the item out to your test user.
4) Note that we catch the booking and warn and that the latest return
date suggested take the preparation period into account.
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Fri, 9 Aug 2024 11:57:53 +0000 (11:57 +0000)]
Bug 37177: "item" should be "record" in list page
This patch rewords areas of the lists and cart templates so that the
term "record" is preferred over "item" when referring to a bibliographic
record.
To test, apply the patch and go to Lists in the staff interface.
- If necessary, create a new list.
- From the list contents view, click "Add records" in the toolbar.
- Submit some valid barcodes and biblionumbers
- After adding biblionumbers you should see the message "The record
( [number] ) has been added to the list"
- After adding barcodes you should see the message "The record for
this item ( [barcode] ) has been added to the list"
- Click "Add records" again
- Submit some of the same barcodes and biblionumbers
- You should see these messages:
- "The record for this item ( [barcode] ) has not
been added to the list. Please verify it is not already in the
list."
- "The record ( [number] ) has not been added to the
list. Please verify it is not already in the list.
- Check the checkbox for one or more titles on your list and click
"Remove selected"
- You should see the message, "The record has been removed from the
list."
- Perform a catalog search and from the results screen, select one or
more results and add them to the cart.
- Open the Cart and confirm that the controls at the top of the table
of titles reads "Selected records: ..."
Sponsored-by: Athens County Public Libraries Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Laura_Escamilla [Wed, 28 Aug 2024 19:45:48 +0000 (19:45 +0000)]
Bug 37758: Add descriptive labels for accessibility
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Wed, 28 Aug 2024 18:28:57 +0000 (18:28 +0000)]
Bug 37740: Fix saved SQL reports tab switching
The tabs on the saved SQL report page are not really full tabs, they're
just styled that way. There is only one tab "panel," and clicking each
tab triggers a DataTable filter so that the tab only shows the relevant
data.
The problem with this setup is that when Bootstrap tries to "switch"
tabs, it wants to hide the initial tab and then show the new one. There
is no "new" one here.
The attached patch solves this problem by adding a CSS rule to
guided_reports_start.tt with higher specificity than our global CSS
making the relevant tab pane visible at all times.
To test, apply the patch and go to Reports -> Use saved.
- If necessary, create multiple SQL reports and assign them to different
report groups (Accounts, Acquisitions, Catalog, etc.).
- Test that tab switching works:
- The tab should be style as "active" after you click it.
- The table of reports should be filtered to include only reports in
the relevant report group.
Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Tue, 27 Aug 2024 01:48:58 +0000 (01:48 +0000)]
Bug 37741: Do not send cookie back from error pages
This change stops the cookie from being sent back from error pages,
so that backcalls that cause errors don't overwrite the existing cookie
used by the foreground request page.
Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Set syspref IntranetFavicon to http://localhost:8081/cgi-bin/koha/bad.jpg
2. Open browser developer tools
3. Go to http://localhost:8081/cgi-bin/koha/mainpage.pl
4. Open the Network tab, disable the cache, and shift refresh
5. Notice that bad.jpg fails to load with a 404
6. Try to login to Koha
7. Confirm login works
*. Extra points if you note that the cookie returned by the first
mainpage.pl request is used for the bad.jpg lookup and the second
mainpage.pl request.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 6 Jun 2024 17:14:35 +0000 (17:14 +0000)]
Bug 37048: Use template wrapper for self checkout page
This patch updates the OPAC's self checkout page template to use
WRAPPERs for the Bootstrap tabs markup.
To test, apply the patch and enable the "WebBasedSelfCheck" system
preference if necessary.
- Navigate to the self checkout page
(http://127.0.0.1:8080/cgi-bin/koha/sco/sco-main.pl)
- Start checking out to a patron
- You should see three tabs, "Checkouts", "Holds", and "Charges."
The tabs should look correct and work correctly.
Sponsored-By: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 22 May 2024 09:23:07 +0000 (11:23 +0200)]
Bug 36919: Remove yet another warning from Koha/Object.t
DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'currency' on Currency - perhaps you forgot to set its 'is_auto_increment' attribute during add_columns()? Treating 'currency' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 172 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 22 May 2024 09:22:44 +0000 (11:22 +0200)]
Bug 36919: Remove another warning from Koha/Object.t
C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm
line 1890.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 22 May 2024 09:22:06 +0000 (11:22 +0200)]
Bug 36919: Remove a warning from Koha/Object.t
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Patron.pm line 446.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Wed, 28 Aug 2024 14:21:52 +0000 (14:21 +0000)]
Bug 37759: Duplicated "Set library" menu item caused by bad merge
This patch removes an unnecessary block of markup accidentally left
behind during a rebase of Bug 35402, removing a duplicate "Set
library..." menu item from the header menu in the staff interface.
After the batch, users who have permission to change their logged-in
library should see only a single "Set library..." menu item in the user
menu found on the right-hand side of the header menu.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Mon, 5 Aug 2024 13:43:19 +0000 (13:43 +0000)]
Bug 34486: Show OPAC Column Due Date only if items on loan exist
This patch updates the OPAC bibliographic detail page so that in the
holdings table, the following columns are hidden if they contain no
data: Call number, date due, materials, checkouts, barcode,
and item-level holds.
To test, apply the patch and restart services.
- In the staff interface, go to Administration -> System preferences.
- Search for OPACShowHoldQueueDetails and set it to "Show holds and
their priority level."
- Search for OPACShowHoldQueueDetails and set it to "Show holds and
their priority level."
- In the OPAC, locate a bibliographic record with multiple items.
- View the detail page and confirm that the holdings table doesn't show
these columns if there is no data in any of the rows: Call number,
date due, materials, barcode, and item-level holds
- For each of the affected fields, update the record the record so that
there is data to be shown for at least one of the items:
- Edit an item to add: call number, materials specified, barcode
- Check out an item to someone in order to show the date due column
- Place an item-level hold on one of the items to show the item holds
column.
- Go to Administration -> Table settings -> OPAC -> biblio-detail and
configure some columns to be hidden by default. Confirm that your
changes are correctly shown in the OPAC holdings table.
Sponsored-by: Athens County Public Libraries Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Thu, 22 Jun 2023 00:56:12 +0000 (00:56 +0000)]
Bug 34088: Short circuit database upgrade check
If the database version and the code version are the same, we should
short circuit and exit immediately.
This patch adds the Koha::Installer module which can very quickly
check if a db or atomic update is needed.
It also moves the logic for C4::Installer::TransformToNum to
Koha::Installer::TransformToNum for performance reasons.
It also moves the logic for C4::Installer::get_atomic_updates to
Koha::Installer::get_atomic_updates for performance reasons.
Test plan:
1. Apply patch
2. Run `time koha-upgrade-schema kohadev`
3. Note that it completes in less than .1 seconds
4. To test db updates, change the database Version to a number
slightly behind the code version, and run
`time koha-upgrade-schema kohadev`
5. Note that the correct version update is processed
6. To test atomic updates:
cp installer/data/mysql/atomicupdate/skeleton.pl \
installer/data/mysql/atomicupdate/bug_34088.pl
7. Run `time koha-upgrade-schema kohadev`
8. Note that it takes over 1 second to run and the atomic update
is attempted
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jake Deery [Wed, 28 Aug 2024 11:02:50 +0000 (12:02 +0100)]
Bug 37755: Fixed JavaScript for modification tabs
This patch addresses a new bug which prevents correct submission on mod
borrowers and mod records (mod + delete). The bug appears to have been
introduced since the recent Bootstrap5 switch, and shouldn't be surfacing
anywhere else in the system
Note that the test plan focuses on tools/modborrowers.pl. The error also
appears to exist on tools/batch_record_modification.pl and
tools/batch_delete_records.pl, but is a lot harder to reproduce.
Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr
and follow-up comments for details on reproducing this.
To test:
a) go to tools/modborrowers.pl and try to enter valid cardnumbers or
borrowernumbers
1) notice how you cannot proceed
b) APPLY PATCH
c) repeat steps a
1) notice how you can now proceed
d) SIGN OFF
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Eric Garcia [Wed, 28 Aug 2024 16:00:46 +0000 (16:00 +0000)]
Bug 37753: Fixed navigation links when editing authority type subfields
To test:
1. Go to Koha administration > Catalog > Authority types.
2. For any authority type, select Actions > MARC structure.
3. For any tag that has multiple subfields (for example 020 ISBN), select Actions > Subfields.
4. Select Edit for any subfield.
5. Notice that the links are now in the standard tabbed style.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Tue, 27 Aug 2024 20:11:23 +0000 (20:11 +0000)]
Bug 37752: Add missing class to navigation tab links
To test:
1. Go to Administration > MARC bibliographic frameworks > Default framework Tag 942 > subfield structure
2. Notice the tabs at the top have no style.
3. APPLY PATCH
4. 1 -3 again, tabs should look right.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch fixes a conflict between bug 31921 and bug 35402.
Test plan:
Create a vendor then delete it using the "Delete vendor" button
Confirm that the modal looks like other modals in Koha.
Click the "x", "No" and "Yes". Confirm that "x" and "no" close the modal
but "yes" correctly delete the vendor.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Wed, 21 Aug 2024 05:58:59 +0000 (05:58 +0000)]
Bug 37697: use shadow DOM for additional contents preview
This change uses the declarative HTML style of Shadow DOM
to encapsulate the additional contents preview so that they don't
affect the main Koha page.
Test plan:
0. Create opacheader with following content:
<style>* { background-color: red }</style>
<p>This is awesome</p>
1. Note that most background-color in /cgi-bin/koha/tools/additional-contents.pl
is now red
2. Click "Preview content" for "opacheader"
3. Note that the background-color of the "p" in "opacheader" is red
4. Apply the patch
5. Refresh the page at /cgi-bin/koha/tools/additional-contents.pl
6. Note that the background-color is normal again
7. Click "Preview content for "opacheader"
8. Note that the background-color of the "p" in "opacheader" is red
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 28 Aug 2024 11:59:15 +0000 (13:59 +0200)]
Bug 37748: Adjust the 'Update child to patron' selenium test
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Tue, 27 Aug 2024 11:43:01 +0000 (11:43 +0000)]
Bug 37748: In Bootstrap 5 "disabled" class must be on anchor tag, not list item
This patch revises the markup for disabled dropdown menu items to
conform to Bootstrap 5 requirements. The patch also revises many
instances of Bootstrap tooltips which were not working -- tooltips which
should be shown with many of the disable dropdown items.
In BS5, a tooltip can't be attached to a disabled link. Instead the
tooltip must be attached to the link's container. These changes also
include the addition of "aria-disabled='true'" to the disabled menu
items.
Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37375: Fix holdings table not loading if MARC framework is missing certain 952 subfields
When you've catalogued a record with MARC framework that is for some reason missing
certain 952 subfields (8, a, b, c, or y), holdings table is no longer loading but
stuck in the "Processing..." loader.
To test, open Koha in two browser tabs:
IN TAB 1 (framework configuration):
1. Create a new MARC framework "TEST", based on the default MARC framework
IN TAB 2 (record view):
2. Create a new record using MARC framework "TEST"
3. Add an item to the newly created record
4. Observe item visible on the record's holdings list
IN TAB 1 (framework configuration):
5. Delete all 952 subfields in framework "TEST" except: 8, a, b, c, y
IN TAB 2 (record view):
6. Refresh page
7. Observe item visible on the record's holdings list
8. Open your browser's console for upcoming error messages
IN TAB 1 (framework configuration):
9. Delete subfield <FIELD> in framework "TEST"
IN TAB 2 (record view):
10. Refresh page
11. Observe error "Uncaught TypeError: <NAME> is undefined" (Firefox)
(or Cannot read properties of undefined (reading 'str') (Chromium))
12. Apply patch
IN TAB 2:
13. Refresh page
14. Observe item visible on the record's holdings list
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Brendan Lawlor [Mon, 26 Aug 2024 15:02:34 +0000 (15:02 +0000)]
Bug 37734: Fix insert runtime parameter button in reports
The drop down item links had two class attributes which
prevented javascript from opening the modal.
This patch combines the classes into one class attribute.
To test:
1. Go to Reports > Create from SQL
2. Click the Insert runtime parameter button
3. Click on any of the drop down options
4. Nothing happens :(
5. Apply patch
6. Repeat steps 2 and 3 for all different parameters
7. Notice the modal launches :)
8. Confirm the parameters are inserted as expected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37513: Only display delete button if usage_count == 0
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37513: Add a way for KohaTable to decide if a button should be displayed
This patch adds, for the case of object parameters in the actions config
entry for the KohaTable Vue component, a check for a function on the
current row, that will be used to determine if a button needs to be
displayed or not.
It checks for the function to be defined, and uses it for checking
displayability.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37513: Allow embedding usage_count in record sources
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds the `usage_count` method to be used for embedding from
the API. Tests cover all use cases.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/RecordSource.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37513: Handle Koha::Exceptions::Object::FKConstraintDeletio in controller
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Tue, 20 Aug 2024 04:31:31 +0000 (04:31 +0000)]
Bug 37682: Lazy-load modules for setters in koha-preferences tool
This change lazy-loads modules for setters in the
koha-preferences tool, so that getters are free to run super fast.
Between BZ 37657 and BZ 37682 we effectively eliminate the
overhead of running "get" or "dump" commands via the koha-preferences
tool.
Test plan:
1. time misc/admin/koha-preferences get SearchEngine
2. Note time is about .35 seconds
3. time misc/admin/koha-preferences dump
4. Note time is about .35 seconds
5. Create sysprefs.yml
---
marcflavour: MARC21
viewMARC: 1
6. time misc/admin/koha-preferences load -i sysprefs.yml
7. Note time is about .35 seconds
8. time misc/admin/koha-preferences set SearchEngine Elasticsearch
9. Note time is about 1 seconds
10. Apply patch
11. Repeat the koha-preferences commands above
12. Note that the "dump" and "get" commands run in about .09-.1
seconds. The "load" and "set" commands still take the same amount
of time as their behaviours haven't changed
13. misc/admin/koha-preferences set SearchEngine Elasticsearch1
14. koha-mysql kohadev
15. select * from action_logs where module = 'SYSTEMPREFERENCE'
order by action_id desc limit 5;
16. Note that the action log showing Elasticsearch1 update says
"interface"
of "commandline" and "script" of "koha-preferences"
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
David Cook [Tue, 20 Aug 2024 04:13:38 +0000 (04:13 +0000)]
Bug 37657: Make koha-preferences CLI tool faster
By using Koha::Database->dbh() to use a minimal database handle
which doesn't preload the whole DBIx::Class schema, we're able to
run the same command 2-3 times faster.
This is beneficial when running the tool in a loop which runs the
command serially one by one.
Test plan:
1. time misc/admin/koha-preferences get SearchEngine
2. Note time is about 1 second
3. time misc/admin/koha-preferences dump
4. Note time is about 1 second
5. Create sysprefs.yml
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Fri, 12 Jul 2024 15:56:45 +0000 (15:56 +0000)]
Bug 37349: Use cache for authority types and remove extra fetch
This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once.
Additionally it removes a second call to fetch the same type in some scenarios
To test:
1 - Apply patch
2 - Enable linking during cataloging/updating records
3 - Edit a record and confirm it is linked ocrrectly
4 - Run the authority linking cron and confirm it works as expected
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>