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>
Paul Derscheid [Thu, 8 Aug 2024 10:35:21 +0000 (10:35 +0000)]
Bug 36915: (follow-up) Add tests
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Tue, 6 Aug 2024 13:22:10 +0000 (13:22 +0000)]
Bug 36915: (follow-up) Include branchname in sample notice
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 5 Aug 2024 12:07:48 +0000 (12:07 +0000)]
Bug 36915: (follow-up) Make basic sample notice html and add breaks
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Wed, 26 Jun 2024 14:56:59 +0000 (15:56 +0100)]
Bug 36915: (follow-up) Basic sample notice
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Wed, 26 Jun 2024 14:27:14 +0000 (15:27 +0100)]
Bug 36915: (follow-up) Pass object to GetPreparedLetter
This patch updates the logic to pass the object to be deleted through to
GetPreparedLetter.
This way, as we add fields and accessors to the object in the future,
they will automatically become available to the notices.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Thibaud Guillot [Wed, 22 May 2024 07:59:51 +0000 (09:59 +0200)]
Bug 36915: Send email notification when a booking is cancelled
When a booking is cancelled, patron received an email based on specific
letter.
Test plan:
1) Create a letter with code "BOOKING_CANCELLATION" on "Notices and
slips" tool.
2) Add booking or go on item already booked in advance.
3) Cancel it
4) Verify in message_queue table directly or go on patron page and click
on "Notices" tab section.
Sponsored by: Association de Gestion des Å’uvres Sociales d'Inria (AGOS) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 26 Aug 2024 12:00:10 +0000 (14:00 +0200)]
Bug 35402: (follow-up) Remove bootstrap version 4 and revert import paths to 'bootstrap'
This patch
- removes bootstrap 4 from the project dependencies.
- reverts the import paths for sass back to 'bootstrap' from 'bootstrap5'.
- updates yarn's lockfile.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 26 Aug 2024 11:31:46 +0000 (13:31 +0200)]
Bug 35402: (follow-up) Use ~ to resolve to nearest node_modules when building css
- This patch adds a new dev dependency node-sass-tilde-importer.
- We use the tilde to resolve to the nearest node_moduldes, meaning
- /kohadevbox/koha/node_modules
or
- /kohadevbox/node_modules
- We explicitly prefix the last path component with an underscore to prevent the
resolution from failing (this doesn't seem necessary for all cases, though)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Fri, 9 Aug 2024 12:49:55 +0000 (12:49 +0000)]
Bug 36707: Links on itemnumbers in report should say "item", not "record"
This patch changes the labels on SQL report result links so that the
term "item" is used for editing or viewing an item.
To test, apply the patch and go to Reports -> Saved reports
- If necessary, create a report which will return biblionumbers and
itemnumbers, e.g.
SELECT itemnumber, biblionumber FROM items LIMIT 20
- Save and run the report. In the results, test the menus which can be
triggered by clicking a biblionumber or itemnumber.
- A biblionumber's menu should have "Edit record" and "View record."
- An itemnumber's menu should have "Edit item" and "View item."
Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Thu, 8 Aug 2024 07:38:05 +0000 (07:38 +0000)]
Bug 37574: (follow-up) disable ordering and searching on status column
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Wed, 7 Aug 2024 10:51:31 +0000 (10:51 +0000)]
Bug 37574: Add visual indicator that bookings are expired
Adds a status column to the table configuration that displays whether a
booking is active or expired (at the moment).
This column is conditionally shown in the 'Show Expired' state, meaning
after expired bookings are loaded into the table.
To test:
1) Create a couple booking for any item for a single patron.
2) Open a db shell with `koha-mysql <INSTANCE>`
3) Update one or two of the created bookings with:
update bookings set start_date = '<date in the past>', end_date = '<date also in the past'> where booking_id = '<booking id of the booking you just created>'.
4) Go the the bookings tab of said item.
5) Click the 'Show Expired' option in the top left of the table.
6) Note that bookings are tagged with 'Expired' and 'Active'.
7) Repeat 5 and 6 for the bookings tab in the patron's details view.
8) Sign off.
Note: the bootstrap classes for v5 are already included so they become
colored once the patch is in.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Brendan Lawlor [Thu, 1 Aug 2024 13:59:28 +0000 (13:59 +0000)]
Bug 14322: (follow-up) Perl tidy
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>
Bug 14322: (follow-up) add check for single logical operator param
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>
Bug 14322: (follow-up) make shareable link load results immediately
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>
Bug 14322: (follow-up) update shareable link button style
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>
Bug 14322: Add shareable link button to item search
This patch adds a 'Copy shareable link' button to the item search results page.
When pasted into the browser the item search form will be prefilled.
The item search form submission still gets it's parameters from the form.
Test plan:
1. Apply patch
2. Try some item searches (try searches using the '+ New field' button too)
3. On the results page click the 'Copy shareable link' button
4. Paste the link into the browser and hit enter
5. Notice the item search form is filled out exactly as you did earlier
6. Click 'Search' and confirm the results are as you would expect
7. Click 'Edit search', modify the search and search again
8. Test the 'Copy shareable link' button again
9. Test pasting the example link below
10. With default ktd data the search will return one result for:
Intermediate Perl / Schwartz, Randal L.
Sponsored-by: CLAMS 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>
Sam Lau [Wed, 10 Jul 2024 17:03:04 +0000 (17:03 +0000)]
Bug 20411: Remove StaffDetailItemSelection system preference
This patch removes the 'StaffDetailItemSelection' along with any usages of it. Now, the checkboxes on an item details page are always there.
To test:
1) Apply patch, restart_all, updatedatabase
2) In sys prefs, search for 'StaffDetailItemSelection', nothing should show up.
3) Visit an items details page, make sure there are checkboxes next each item that allow you to perform modification/deletion.
Signed-off-by: Eric Garcia <cubingguy714@gmail.com> Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 11 Jul 2024 12:47:09 +0000 (14:47 +0200)]
Bug 37309: Clear itemnumbers array before 'select all'
Otherwise the same itemnumber can appear several times in the array.
It could be moved to its own bug but this is only code cleaning it
seems, there is no impact on the UX
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Thu, 11 Jul 2024 11:51:45 +0000 (11:51 +0000)]
Bug 37309: (follow-up) Adjust appearance of controls
This patch makes an adjustment to the style of .btn-link controls
associated with the holdings table. I've also updated the markup of the
other controls so that they match the updated batch controls.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Thu, 11 Jul 2024 07:50:43 +0000 (09:50 +0200)]
Bug 37309: Improve Delete and Modify items links on the biblio detail page
The way the "Delete selected items" and "Modify selected items" links
are build on the bibliographic detail page is not nice. We could do
better, for instance using a proper form element instead of building an
URL.
Test plan:
Go to the detail page of a bibliographic record which has several items.
In the items table check some checkboxes and play with "select all",
"clear all" and the action buttons.
Notice that everything works as before.
Minor UI regression that must be fixed: there are CSS rules that cause
problem. When the action links are displayed or hidden the table is
moving up and down.
I think the problematic rules are:
.btn {
padding: 6px 12px;
font-size: 12px;
}
It makes the UI better if I remove them but still get the bumping
issue.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Wed, 12 Jun 2024 12:54:47 +0000 (12:54 +0000)]
Bug 2486: Show user comments in staff interface
This patch the staff interface's bibliographic detail page, adding a tab
that shows comments submitted by users from the OPAC.
To test, apply the patch and restart services.
- If necessary, enable the "OPACComments" system preference and submit
some comments in the OPAC.
- In the staff interface, locate the title you submitted comments on.
- The bibliographic detail page should show a "Comments" tab with a
count of the number of all comments (approved and unapproved).
Sponsored-By: Athens County Public Libraries Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 5 Aug 2024 13:41:23 +0000 (13:41 +0000)]
Bug 37141: (follow-up) Check for expired bookings when rendering bookings table
We preserve the existing logic of this bug and add another case
for when we just encounter expired bookings.
In that case we render the fieldset without the 'filtered' class and
determine the value of filter_expired in bookings.js by the class being set.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Paul Derscheid [Mon, 5 Aug 2024 12:37:05 +0000 (12:37 +0000)]
Bug 37141: (follow-up) Move filter_expired to outer scope
This allows access by the bookings-tab and the expired_filter click handlers
which are both required for the state change to work.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Martin Renvoize [Thu, 20 Jun 2024 11:01:34 +0000 (12:01 +0100)]
Bug 37141: Add 'Show completed' option to bookings tab
This patch adds the 'Show completed' filter toggle option to the
bookings display tab on both the patron details and circulation pages.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Mon, 24 Jun 2024 16:29:34 +0000 (16:29 +0000)]
Bug 26777: Allow ability to select diffferent barcode types
These cumalation of patches introduce a new patron page on the OPAC: "My virtual card." This page and its contents are reliant on the system preferences 'OPACVirtualCard' and 'OPACVirtualCardBarcode'. OPACVirutalCard determines whether the virtual card page is even displayed on the OPAC whereas OPACVirtualCardBarcode selects the type of barcode to display on this page (if page is displayed). Currently, the virtual card page consits of a patron image (if available), the patron's barcode, and the library name. A potential follow up would be to allow customization of this page. The barcode generation is handled by a new library bwip-js.
To test:
1) Apply patch, updatedatabase, restart_all, build yarn
2) In system preferences, search for 'OPACVirtualCard'. Both this and the barcode sys. pref should show up with the same search. Notice they are dependent on one another. The default for the first pref should be "Don't allow". Leave this as is for now.
3) Leave the preference page open and log into the OPAC. Visit the user page. Notice that the navbar on the left consiting of 'Summary', 'Charges', etc. looks the same.
4) Go back to the sys. pref page and set the OPACVirtualCard to "Allow"
5) Also in the sys. prefs, make a search for "patron images" and set 'OPACpatronimages' to "Show" and 'patronimages' to allow.
6) Visit the patron's page that you used to sign in to the OPAC. Add a patron image if there is not one already.
7) Now, edit their details and change their card number to '00012345678905'
8) Venture back to the OPAC patron page. Refresh this and you should see a new "My Virtual Card" page at the bottom.
9) Click this page and you should see a new virtual card for you patron, consiting of their image, a barcode, and their library.
10) Open the dev tools for your browser and switch to vieiwing in mobile mode. Make sure the card looks good. This would likely be the most common use case.
11) Switch back to a system preference page and try playing around with the 'OPACVirtualCardBarcode'. Note that these changes affect the type of barcode that is display in the virtual card page. If you selected a barcode format that is incompatible, an error message should display in the virtual card page.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Mon, 24 Jun 2024 16:26:36 +0000 (16:26 +0000)]
Bug 26777: Add new system preference 'OPACVirtualCardBarcode'
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Wed, 26 Jun 2024 02:07:12 +0000 (02:07 +0000)]
Bug 26777: Add bwip-js library to Koha
bwip-js is the chosen library for generating and displaying barcodes in the OPAC. It allows for many different barcode types and customizable settings. This patch created a new directory and file for the js library code to live as well as updating the about.tt to give credit.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 21 Jun 2024 17:15:57 +0000 (17:15 +0000)]
Bug 26777: (follow-up) Fix file permssions and tidy
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Fri, 21 Jun 2024 17:13:38 +0000 (17:13 +0000)]
Bug 26777: (follow-up) Adjust script, template, and CSS
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Tue, 18 Jun 2024 22:47:47 +0000 (22:47 +0000)]
Bug 26777: Add new patron page 'My Virtual Card'
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Thu, 20 Jun 2024 20:50:04 +0000 (20:50 +0000)]
Bug 26777: Add barcode generator file and initial styling
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sam Lau [Tue, 18 Jun 2024 19:04:44 +0000 (19:04 +0000)]
Bug 26777: Added new sys pref 'OPACVirtualCard'
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Matt Blenkinsop [Wed, 12 Jun 2024 13:36:42 +0000 (13:36 +0000)]
Bug 37076: Fix incorrect needsconfirmation code
This patch corrects two instances of RESERVED_WAITING to RESERVE_WAITING
Test plan:
1) Navigate to system preferences and search for AllowItemsOnHoldCheckoutSCO
2) Observe from the description that the correct status code is RESERVE_WAITING
3) Search the repository for RESERVED_WAITING - you should find two instances, one in Checkouts.pm and one in checkout.js
4) Apply patch
5) Repeat step 3 - there should be 0 instances
Signed-off-by: Lucas <lchirlias@ville-roubaix.fr> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Nick Clemens [Mon, 5 Aug 2024 18:21:46 +0000 (18:21 +0000)]
Bug 23387: Add caching to C4::ClassSource
These routines ultimately need to be moved to the Koha namespace, for now though,
we can reduce look ups during import and batch modification by caching the values
here for each request
To test:
1 - prove -v t/db_dependent/ClassSources.t
2 - Import some records with items, confirm cn_sort values correctly built
3 - Edit some items, confirm cn_Sort correclty built
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Katariina Pohto [Fri, 3 May 2024 10:30:02 +0000 (13:30 +0300)]
Bug 35931: More preselected items in the renew column on patron checkouts
When viewing patron checkouts table from details or circulation page, overdue checkouts
are preselected for renewals and the overdue dates are bolded and red. This patch will enable
also preselecting checkouts that are due on the current day. The due dates for these checkouts
will be bolded but not red.
Test plan:
1) See/create a patron with several checkouts: overdue, due today and due later.
2) Note that only the overdue checkouts have a checkmark on Renew column when loading the table.
3) Apply patch.
4) Load the checkouts table again. Note that now also the checkout due today has a preselected renewal
checkmark and the due date has been bolded.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Wed, 3 Jul 2024 15:59:33 +0000 (15:59 +0000)]
Bug 24471: Rename handle_commit_maybe method
To test (k-t-d):
1) Enable ILLModule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Checkout 24.05.x branch, run:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout 24.05.x
3) Create a new ILL request from:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
4) Confirm the request creation works as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Owen Leonard [Fri, 23 Aug 2024 15:29:39 +0000 (15:29 +0000)]
Bug 35402: (follow-up) Remove form from returns.tt
If you have AllowReturnToBranch enabled and you check in an item which
is disallowed by the preference (returned at the wrong branch, for
instance) You get a "Cannot check in" modal.
Previously clicking the "OK" button in this form triggered JS which is
supposed to submit a form. However, all the button needs to do is
dismiss the modal. The form and the "approve" class on the button are
removed by this patch.
NOTE: This patch contains indentation changes.
To test, apply the patch and set the AllowReturnToBranch system
preference to "only at the library that the item is from."
- Locate an item belonging to another library and check it out to a
patron.
- Check in the item.
- You should see a modal confirmation, "Cannot check in".
- Clicking the "OK" button should dismiss the modal window without
triggering a reload of the page.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pedro Amorim [Fri, 26 Jul 2024 13:05:17 +0000 (13:05 +0000)]
Bug 35044: (QA follow-up): Fix flaky tests
To test, run the following test file a couple times until it fails:
prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
My testing this failed around 50% of the time so it should not take
long to reproduce. I believe this is because the order of the array
elements may differ.
Apply this patch and run the test file again many times. It should
never fail.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1) Follow any of the above test plans to add some
additional_field_values entries
2) Run the following SQL:
update additional_field_values set value = '';
3) Run updatedatabase twice. Notice the first time it tells you how many
entries were removed. The 2nd time it does nothing.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>