Matt Blenkinsop [Wed, 7 Jun 2023 16:07:02 +0000 (16:07 +0000)]
Bug 33941: Fix wrong URL name in EBSCOPackagesList
This patch fixes a URL pointing to the wrong route which stops filtering from working in the table.
Note: To test you will need some EBSCO credentials
Test plan:
1) In ERM, go to EBSCO > Packages and search for a package
2) It should fail with a warning in the console saying that a required param "package_id" is missing
3) Apply patch
4) Repeat step 1
5) It should now successfully fetch packages
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab5dc834009b846e3850ca8eb34c3fdb43f855a1) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 9 May 2023 11:49:48 +0000 (11:49 +0000)]
Bug 32894: (QA follow-up) Fix tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4d613494abef955c41479b2e0269481e73b99176) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 9 May 2023 09:02:30 +0000 (11:02 +0200)]
Bug 32894: Make ->sharee looks like others
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e84ef47018e5682764b64073c43b6f95f37c5b31) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ad94cf3e06836da81cfef272f65ae9d9fe9cf3e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 21 Apr 2023 10:24:04 +0000 (11:24 +0100)]
Bug 32894: (QA follow-up) Fix typo
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 70d7bb57d88a8ed6d26d85eacdea8c0cd6550ad7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 21 Apr 2023 10:18:35 +0000 (11:18 +0100)]
Bug 32894: Remove incorrect caching from bundle_items
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8e2d841a2950f3cd6008f296e67c362ebfe4b954) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 28 Feb 2023 16:14:52 +0000 (17:14 +0100)]
Bug 32894: Fix test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45d882de53058ebf49f9683e53bdc3751cd22e99) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 28 Feb 2023 15:40:00 +0000 (16:40 +0100)]
Bug 32894: Koha::Biblio->biblioitem
Can we do better here?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 994132a60a2e4a12eb88cc8b9d1a89f28450a7bf) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 28 Feb 2023 15:13:56 +0000 (16:13 +0100)]
Bug 32894: Koha::Item->last_returned_by
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3545292513453b2383c406e96c3d51a3a2f5e6c5) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 28 Feb 2023 15:11:38 +0000 (16:11 +0100)]
Bug 32894: Remove wrong caching from Koha:: methods - simple
In some of our Koha:: objects we have methods that cache their result and return it in subsequent calls. However there is no invalidation of the cache if the object is modified.
It can lead to confusion and incorrect results, such as:
use Koha::ArticleRequests;
my $ar = Koha::ArticleRequest->new({
borrowernumber => 42,
biblionumber => 42,
})->store;
say $ar->biblio->biblionumber; # Display 42, correct
$ar->set({ biblionumber => 24 })->store;
say $ar->biblio->biblionumber; # Display 42, wrong
$ar->discard_changes;
say $ar->biblio->biblionumber; # Display 42, wrong
$ar->delete;
We should remove those caching and rely on DBIC/DBMS caching mechanism instead.
This patch is adjusting the trivial occurrences
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68216c541bfd9b5baf5e3fe97c0a99d193dfccce) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 2 Jun 2023 09:10:01 +0000 (09:10 +0000)]
Bug 33493: (QA follow-up) Only bless the first transfer
No need to do a walk through on all the results.
Correcting two test descriptions on the way.
Test plan:
Run t/db_dependent/Koha/Item.t
Run t/db_dependent/Koha/Items.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7095ef2fa757cca641cd4236878cdec3bbaa8479) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 31 May 2023 12:02:41 +0000 (12:02 +0000)]
Bug 33493: (follow-up) Rename relationship and add test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 110d74f572748958720ee690ea68d666a7a0b477) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 10 Mar 2023 16:14:50 +0000 (16:14 +0000)]
Bug 33493: Add a filter relationship for branchtransfers
Prefetching is useful, but we don't want to fetch all the inactive
transfers for an item. This patch adds a filtered relationship and
updates get_transfer(s) to use this
To test:
prove -v t/db_dependent/Koha/Item.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c2e092d5b120d251e161ab914ce342fddd35a5a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 6 Jun 2023 08:42:20 +0000 (10:42 +0200)]
Bug 33904: Fix 2FA registration when library name has non-latin characters
If the library name contains non-latin characters, the 2FA registration
process will fail with a JS alert coming from a 500 server-side.
The problem is that Auth::GoogleAuth is expecting an already UTF8 encoded string.
We should set the encoding correctly to make Auth::GoogleAuth deal with
the URL escaping internally correctly, then decode on our own (in the
REST API controller)
Test plan:
* Modify your logged in library name and add some non-latin characters
(eg. "my ❤ library")
* Turn on TwoFactorAuthentication
* Go to your account > More > Manage 2FA
* Click the enable button
=> Notice that you see the QR code and that both "issuer" and "key id"
entries display the library name correctly.
* Test the whole 2FA process, confirm that the library name is correctly
displayed on the app you are using.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit deeb5ebdbd59956f5f6cf1bfa989ef41c9af9720) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 6 Jun 2023 08:40:03 +0000 (10:40 +0200)]
Bug 33904: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfed7f235d2e079743a74bb2791db2d4ebd63b1d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Fri, 16 Jun 2023 06:04:37 +0000 (06:04 +0000)]
Bug 34028: Fix manual entry for two factor authentication
This patch changes the "Account" and "Key" display so that
you can manually enter two factor authentication details into
an authenticator app.
The details are the same as those provided by scanning the QR code.
Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
2. Change setting to "Enable"
3. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Click "More" on record toolbar and choose "Manage two-factor authentication"
5. Click "Enable two-factor authentication"
6. Scan the QR code into an authenticator app and note it creates an entry called
"Centerville: Centerville_koha"
7. Manually enter an entry into an authenticator app (like Google Authenticator)
7a. Add the "Account" as shown on the Koha screen
7b. Add the "Key" as shown on the Koha screen
8. Note that the entries added by QR code and manual entry have the same
label and both were accepted by the authenticator app
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c05333914e3f54d66b9de6dde82b614ea83569a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 22 Jun 2023 11:02:31 +0000 (11:02 +0000)]
Bug 34093: Fix paths to jQuery for OAI XSLT
To test:
1 - Enable OAI-PMH system preference
2 - Browse to:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
3 - Click 'Metadata' button for a record
4 - Nothign happens
5 - Check the console:
Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/jquery/jquery-migrate-3.3.2.min.js”.
Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/jquery/jquery-3.6.0.min.js”.
Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/bootstrap/js/bootstrap.bundle.min.js”.
6 - Apply patch
7 - Reload
8 - Console errors are gone
9 - Clicking 'Metadata' expands the record content
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb8db3c7f6f14cb04312c49bd9b8b7ca6b74425c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When creating items at receiving, the generated data structure didn't
match what the code expected, so this patch adapts the code to match the
new data structure introduced by bug 8179.
Once I fixed that, I noticed that the $.ajax request payload, when it
contains an array parameter, it renames it like `param[]`. So the
finishreceive.pl controller is adjusted to this behaviour for the 'on
receiving' use case.
To test:
1. Apply this patch
2. Create a basket with 'create items on receive'
3. Create an order line
4. Close basket
5. Receive shipment
6. Enter invoice number
7. Click on Receive link in the table
8. Fill out item form, make sure all mandatory fields are set
9. Save
10. Verify that the order line is marked as 'received'
11. Verify that there item is created on the record
=> SUCCESS: Works as expected
12. Sign off :-D
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a40c512bf083a1bb48daeecd2f407b4f5586d819) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 7 Jun 2023 08:33:40 +0000 (10:33 +0200)]
Bug 33888: (bug 22375 follow-up) Add missing USE KohaDates
Bug 22375 added use of KohaDates without the USE statement.
Test plan:
Make sure you have overdues and go to circ/branchoverdues.pl
Without this patch you get a 500
Template process failed: undef error - : filter not found at /kohadevbox/koha/C4/Templates.pm line 127
With this patch applied you can see the overdue list
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7eafb103b584dcc41b863c3920ee8ab4e94b2c06) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 7 Jun 2023 09:07:36 +0000 (11:07 +0200)]
Bug 33885: Prevent JS crash if creator does no longer exist
JS error in the console was
Uncaught TypeError: row.creator is null
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30d2ffd2953434eec112a403a0297e285fa4a76d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 7 Jun 2023 09:05:18 +0000 (11:05 +0200)]
Bug 33885: Make Koha::Acq::Order->creator return undef if no creator
If the account of the creator of an order has been deleted we should
return undef here, instead of crashing with
GET /api/v1/acquisitions/orders: unhandled exception (Mojo::Exception)<<DBIC result _type isn't of the _type Borrower at /kohadevbox/koha/Koha/Objects.pm line 445.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c3a35418ea3defb50debbab4fd334bee4eb5229) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Mon, 5 Jun 2023 23:00:43 +0000 (23:00 +0000)]
Bug 33902: Move modal inside HTML body
To test:
-Go Administration > Libraries and add a URL for a branch.
-Also add some OPAC info: ( via HTML Customizations )
-Now find a record belonging to that branch and bring up the OPAC detail page.
-In the holdings table there should be a link under the 'Current library' column.
-Clicking it should bring up a modal.
-Make sure the modal pops up correctly, can be dismissed, and the 'Visit web site' link works.
Nothing about the appearance or behavior of the page should change.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 12 May 2023 17:54:26 +0000 (17:54 +0000)]
Bug 33725: Add collection to search results
To test:
1. Apply patch and restart services
2. Do a catalog search that will return available, onloan, and notforloan items. (withdrawn,lost,damaged)
3. Notice that the location column should now also include the collection description underneath the shelving location.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 26 May 2023 12:58:22 +0000 (12:58 +0000)]
Bug 33844: Fix is_denied_renewal
Going via result_set->has_column does cost actually nothing if
the object is already there.
Test plan:
Run again t/db_dependent/Koha/Item.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 26 May 2023 12:54:22 +0000 (12:54 +0000)]
Bug 33844: Modify test to show problem
Add delete key.
Without the follow-up, this triggers a delete. Test fails.
DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234
Test plan:
Run t/db_dependent/Koha/Item.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 26 May 2023 09:28:28 +0000 (09:28 +0000)]
Bug 32478: (QA follow-up) Keep current hashref behavior
Prevent a crash on wrong contents for ItemsDeniedRenewal pref
as we did before.
Note: Could be a provisional measure (no band aid to repeat anywhere)
until we resolve this in preferences.pl.
Test plan:
Without this patch:
Change ItemsDeniedRenewal to 'nonsense'
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Crashes with: Can't use string ("nonsense") as a HASH ref ... No OK print.
Apply this patch
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Warns only with: Hashref expected for ItemsDeniedRenewal. You got OK.
Clear ItemsDeniedRenewal
Try again. No warning anymore.
Run t/Context.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 4 May 2023 18:39:50 +0000 (18:39 +0000)]
Bug 32478: (follow-up) Tidy code
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 4 May 2023 18:37:53 +0000 (18:37 +0000)]
Bug 32478: (follow-up) UpdateItemLocationOnCheckin no longer needs flattening
This patch removes a line flattening the arrays generated by get_yaml_pref_hash
as it is no longer necessary
Conditionals are adjusted to avoid warnings in tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32478: Fix handling of undef values in ItemsDeniedRenewal
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Gustafsson [Thu, 29 Sep 2022 15:18:40 +0000 (17:18 +0200)]
Bug 32478: Remove Koha::Config::SysPref->find since bypasses cache
get_yaml_pref_hash also allows invalid YAML and only parses a limited
subset so remove this method to avoid future issues.
To test):
Since tests already exists for C4::Context->yaml_preference and this
is a trivial change, do we really need a test plan for this?
Sponsored-by: Gothenburg University Library Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 7 Jun 2023 07:30:15 +0000 (09:30 +0200)]
Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml'
If encryption_key is not set in $KOHA_CONF we are raising an exception.
This key was only needed for a couple of feature, but now we are using Koha::Encryption from the update DB process, and so the upgrade fails with no more info than 'No encryption_key in koha-conf.xml'.
We need to provide more detail in this error.
Additionally we reject "__ENCRYPTION_KEY__", in case people will simple
copy/paste that
Test plan:
Apply the patch
Edit $KOHA_CONf, remove the encryption_key entry (or blank)
restart_all
Go to the about page and enable 2FA
=> warning on the about page, and 500 server-side are displaying more
info about how to generate the missing entry
Edit $KOHA_CONF and set the value to __ENCRYPTION_KEY__
restart_all
=> Same messages
Edit $KOHA_CONF and set a correct value
restart_all
=> No error, everything is working correctly
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 26 May 2023 13:45:56 +0000 (13:45 +0000)]
Bug 33524: Use template wrapper for tabs: Authority editor
This patch updates the authority editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.
To test, apply the patch and go to Authorities -> New authority.
- Confirm that the tabs look correct, with the same style they had
before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
change and the list of numbered tags in the menu just below should
change to match the section.
- Confirm that these tag number links still work correctly to jump you
down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
- You should get an error message about missing mandatory fields.
- Clicking the "Go to field" link should take you to the correct tab
and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
e.g. "/cgi-bin/koha/authorities/authorities.pl?authtypecode=PERSO_NAME#tab5XX_panel"
The correct tab should be selected upon page load.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 16 May 2023 14:36:26 +0000 (16:36 +0200)]
Bug 32060: Use selectrow_array
Trivial ergonomic patch, use selectrow_array, no need to prepare the
query
+ perltidy the sub
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: Tomas Cohen Arazi <tomascohen@theke.io>
To test:
1) Ensure the following tests pass
t/db_dependent/Koha/Item.t
t/db_dependent/Koha/Bibio.t
2) Go to a biblio (preferably as serial) with many items and
click "New" -> "New item" and note down the response time.
3) Apply the patch
4) Ensure tests in 1) still pass
5) Repeat step 2), the response time should be substantially
improved
Sponsored-by: Gothenburg University Library 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: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 22 May 2023 14:54:14 +0000 (15:54 +0100)]
Bug 33343: Catch more cases and correctly use new-password hint
I believe where we're allowing a user to set a new password instead of
using autocomplete="off" we should be hinting to the brownser that it's
a new password box with autocompelte="new-password".
I also correct a couple of missing instances.. Honestly, I'm not sure
how much this helps these days as most browsers offer to save passwords
regardless.
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 33343: Make use of the 'autocomplete=off' attribute on password fields
This patch adds 'autocomplete=off' to all password type fields in the OPAC
To test:
1. Apply the patch
2. Visit http://master/cgi-bin/koha/opac-main.pl
3. Inspect the page
--> Confirm html shows autocomplete off on the password field
4. Click on Log in (without filling any field)
5. Repeat step 3
--> Confirm html shows autocomplete off on the password field
6. Set 'PatronSelfRegistration' system preference to 'Allow' and PatronSelfRegistrationDefaultCategory to 'Board'
7. Visit http://master/cgi-bin/koha/opac-memberentry.pl
9. Repeat step 3
--> Confirm html shows autocomplete off on the password field
10. Connect to the OPAC
11. Click on Change password
11. Repeat step 3
--> Confirm html shows autocomplete off on the password field
12. Set 'EnableExpiredPasswordReset' system preference to 'Enable'
13. Visit http://master/cgi-bin/koha/opac-reset-password.pl
14. Repeat step 3
--> Confirm html shows autocomplete off on the password field
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Tue, 21 Mar 2023 19:14:45 +0000 (16:14 -0300)]
Bug 32932: Update router to use object references - agreements
This patch updates the Vue files for ERM to use router object links rather than urls - this will make it much simpler to maintain the router if urls need to be updated. This first patch only updates the files in the agreements section of ERM as a first step to introduce the topic for discussion.
Test plan:
1) Apply patch
2) Navigate to the Agreements section of ERM and click on different navigation links/buttons
3) The links/buttons should all work as normal
4) Review the code to see that the component files now refer back to the router using objects rather than url strings
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Since Bug 28445 the method Koha::Item->as_marc_field has the option mss not anymore.
This patch removes this in Koha::Filter::MARC::EmbedItems.
Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 5 Jun 2023 13:06:39 +0000 (13:06 +0000)]
Bug 33892: Use template wrapper for tabs: OPAC authority detail
This patch updates the OPAC authority detail page so that it uses
the new WRAPPER syntax to generate tabs markup.
To test, apply the patch and locate an authority record in the OPAC
which has notes fields.
When viewing the details for that record the notes should appear in a
single "Notes" tab.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 21983: Make DelBiblio update linked ILL requests
This patch makes DelBiblio update the biblio linked ILL requests so the
value in biblio_id is moved to the deleted_biblio_id.
The change is covered by tests.
To test:
1. Apply this patchset
2. Run:
$ ktd --shell
k$ updatedatabase
k$ qa --run-tests
=> SUCCESS: Tests pass! All green/good
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a new method, used for retrieving the linked ill
requests for a biblio.
To test:
1. Apply this patch and run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch:
- Adds a illrequests.deleted_biblio_id column
- Adjusts existing db_rev so people upgrading have the biblio_id value
moved to the also created column, before attempting to add the FK
constraint on the biblios table.
- Adds a new db_rev for those who unfortunately already updated, it
should be idempotent.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 15 Mar 2023 15:27:11 +0000 (15:27 +0000)]
Bug 33236: Move NewSuggestion to Koha::Suggestion->store
The NewSuggestion routine saved the suggestion to the DB
and returned the id
This patch moves the code to Koha::Suggestion->store and
handles emailing upon creation, this adds that functionality to
suggestions added via api
To test:
1 - Apply patch
2 - Test adding a suggestion on the opac and staff client
3 - Confirm the suggestions are added correctly
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Tue, 23 May 2023 16:24:30 +0000 (16:24 +0000)]
Bug 33813: Masthead lists button requires an aria-label
This patch adds an aria-label to the Lists button in the masthead. It is currently not descriptive enough and doesn't identify what is displayed when clicking the button.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Tue, 30 May 2023 09:20:20 +0000 (09:20 +0000)]
Bug 33786: ILL requests table id
Make sure requests table is unique when visiting patron ILL
history so the table state is not shared unintentionally
Reproduce:
1) Have a borrower with >20 ILL requests in their history
2) Visit cgi-bin/koha/members/ill-requests.pl?borrowernumber=<borrowernumber>
3) On the table, click page 2
4) Visit a different borrower with <20 ILL requests
5) Verify that no requests are shown, this is because the table is using page 2 from step 3)
6) Go back to original borrower, click table page 1
7) Now go back to 2nd borrower, verify is now showing page 1 correctly
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 1 Jun 2023 20:03:53 +0000 (20:03 +0000)]
Bug 33882: Add spans in dateofbirth column on member.tt
To test:
1 Apply patch
2 Do a patron search that will return multiple patrons.
3 Look at the date of birth column and notice the text is now wrapped in a class called 'dateofbirth'
4. Notice that the age hint is wrapped in a class called 'agehint'.
5. Add '.agehint { display: none }' to intranetusercss.
6. Now notice the date of birth still displays but no age information.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 2 Jun 2023 14:00:34 +0000 (14:00 +0000)]
Bug 33883: "Make sure to copy your API secret" message overlaps text
This patch updates the markup on the patron API keys page so that it
uses standard classes for dialogs and page sections.
To test you must have RESTOAuth2ClientCredentials enabled.
- Apply the patch and locate a patron record.
- From their checkout or detail page, choose More -> Manage API keys
- Click "Generate a new client id/secret pair"
- Enter a description and click Save.
- You should see a message in a standard message-style dialog, "Make
sure to copy your API secret now. You won’t be able to see it again!"
- The API key information should be displayed in a .page-section div.
- The table of existing keys should be displayed in a .page-section div.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 31 May 2023 17:51:46 +0000 (17:51 +0000)]
Bug 33891: Use template wrapper for tabs: OPAC advanced search
This patch adds the tab WRAPPER markup to the OPAC, adapted for the
Bootstrap version used by the OPAC (4.5.0). The advanced search page is
updated to use the wrapper construction.
Unrelated markup fix: an empty size attribute is removed from an
<input>.
To test, apply the patch and view the the advanced search page in the
OPAC. The tabs for item type, shelving location, and collection should
all look correct and work correctly.
In the staff interface, go to Administration -> System preferences ->
OpacAdvancedSearchTypes and try various configurations, confirming each
time that the OPAC page adjustes correctly.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 23 May 2023 08:58:55 +0000 (10:58 +0200)]
Bug 33803: Remove comment about tab width
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 23 May 2023 16:45:10 +0000 (16:45 +0000)]
Bug 33525: Use template wrapper for tabs: Basic MARC editor
This patch updates the basic MARC editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.
To test, apply the patch and go to Cataloging -> New record.
- Confirm that the tabs look correct, with the same style they had
before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
change and the list of numbered tags in the menu just below should
change to match the section.
- Confirm that these tag number links still work correctly to jump you
down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
- You should get an error message about missing mandatory fields.
- Clicking the "Go to field" link should take you to the correct tab
and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
e.g. "/cgi-bin/koha/cataloguing/addbiblio.pl#tab5XX_panel" The correct
tab should be selected upon page load.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
use git grep extensively and confirm that this patch removes all
occurrences of this feature.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b9355088ad6e5238921ef554af44ffeb7677364) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 229b6b58efdac2972e9739dbe6959649c89d3bac) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 24 May 2023 18:38:42 +0000 (18:38 +0000)]
Bug 33789: Add unit test
JD amended patch: Remove biblionumber => 144
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 143e0fe8aca35c15e8a37c18807f54fdf570b06d) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 19 May 2023 22:09:16 +0000 (22:09 +0000)]
Bug 33789: Return issue info. when adding a credit
To test:
1. Make sure MarkLostItemsAsReturned is set so a lost item will stay on a patrons account after being marked as lost.
2. Check an item out to a patron, make sure it has a replacementprice
3. Mark the item as lost.
4. Now check the item in.
5. Go to the patrons account -> transaction tab. You should see 2 accountlines related to the item.
6. For the account type 'Lost item' you will see issue infomation ( check out date, due date, checkouted out from, etc )
7. For the account type 'Lost item fee refund' there is no issue information.
8. Apply patch
9. Try 2 - 6 again. This time the 'Lost item fee refund' should include issue information.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 14e4a3b5c7aabf816a6c21a0c318d6c4e3b1939a) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 25 May 2023 13:48:34 +0000 (13:48 +0000)]
Bug 33779: Terminology: biblio record
This patch corrects a string in the staff interface's ILL requests
template. "This item cannot be issued as it has no biblio record
associated with it" is updated to read "This item cannot be checked out
as it has no bibliographic record associated with it."
I don't know how to trigger the error message in the interface, but the
change is simple enough that it could be verified by examining the
patch.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 7 Apr 2023 18:50:25 +0000 (18:50 +0000)]
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
To test:
1 - Find an adult patron in Koha
2 - Add two guarantees
3 - Add $1 fine to parent, $5 fine to each guarantee
4 - Set no issues charge guarantees to 9
5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
6 - Note the 64 message starts with Y's that mean patron is blocked
7 - Repeat with each child barcode
8 - They are blocked?
9 - Apply patch, restart all (restart_all will restart SIP)
10 - Try again
11 - Parent blocked, children should not be
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 7 Apr 2023 18:49:41 +0000 (18:49 +0000)]
Bug 33411: Unit test update
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 11 May 2023 11:48:50 +0000 (13:48 +0200)]
Bug 33247: Flag the authority pending deletion in the result list
When an authority is removed from the result list it is not removed from
the search engine yet.
This patch suggests to add a note in the summary column to tell the user
that the deletion is pending.
Test plan:
1 - Go to authorities home and perform a search;
2 - Delete any authority;
3 - After the confirmation, the page is refreshed but still contains the
deleted authority, with a red note explaining that the deletion is
pending.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 25 May 2023 22:04:08 +0000 (22:04 +0000)]
Bug 33748: Fix UI issue when importing records from a staged MARC file
This patch attempts to fix a UI issue on addorderiso2709.tt. It removes the <td> which contains the actoin buttons MARC, Card, and Add Order and adds them to the title line. This is so there is more space for the fieldsets.
1. Apply patch
2. Set MarcItemFieldsToOrder like this:
3. Stage a MARC file where the bibs have items attached
4. From acquisitions create a new basket and add 'From a staged file'.
5. Add the staged files to a basket.
6. Make sure the display looks correct.
7. Expand the data by clicking on the checkbox on the left hand side, or by clicking 'Select all'.
8. Make sure the display looks correct.
9. Tab over to 'Item informtion' and make sure that display looks correct.
10. Shrink the screen size down to less that 992px, ensuring the display remains correct.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 30 May 2023 10:51:16 +0000 (10:51 +0000)]
Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'
This patch updates instances in the code and templates where the term
"Authentication providers" is used, replacing it with the preferred
"Identity provider."
Most of the instances of this change are in module or API documentation,
but you can see a couple of the changes in the interface:
- Administration -> Identity providers:
- The sidebar menu should show "Identity providers" instead of
"Authentication providers."
- Patrons -> Patron details -> More -> Set permissions
- Under " Manage Koha system settings (Administration panel)" you
should see "Manage identity providers (manage_identity_providers)"
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Wed, 31 May 2023 20:58:45 +0000 (10:58 -1000)]
Bug 33875: Fix missing closing tag a in API key management page
In API key management page, anchor closing tag is missing in message "No keys defined for the current patron".
This patch fixes that.
Also changes display with link on a new line.
Translatable text is on purpose surrounded by span or div.
Test plan :
1) Enable system preference RESTOAuth2ClientCredentials
2) Go to a patron page
3) Click More > Manage API Keys
4) Look at page source HTML code
=> Check code is OK
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 1 Jun 2023 06:29:53 +0000 (08:29 +0200)]
Bug 33865: (bug 27421 follow-up) Remove leftover
Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.
Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"
Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Thu, 1 Jun 2023 08:27:35 +0000 (08:27 +0000)]
Bug 33877: Fix some entries in teams.yaml
Trivial edit.
Remove versions from the name of the packaging manager.
As also commented on BZ:
The script only expects to find a name here, not a version too.
See also maintainer role and how versions are handled there.
In this case I dont think it is really needed to still add that
distinction when we had two packaging managers in the past.
Test plan:
Look again at about.pl, Koha team, Koha development team.
Look at Mason James.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mason James [Thu, 1 Jun 2023 12:49:27 +0000 (00:49 +1200)]
Bug 33371: Add [Install] section to koha-common.service
to test:
1/ install pkg, reboot, note service is not 'active'
2/ add patch, build package
3/ install pkg, reboot, note service is 'active' :)
root@deb11:/etc# systemctl status koha-common
* koha-common.service - Start required services for each Koha instance
Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<<
Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago
Tasks: 0 (limit: 2244)
Memory: 0B
CPU: 0
CGroup: /system.slice/koha-common.service
Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance...
Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 33864: Trigger the 'change' event when setting quantity
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch corrects the behavior of the 'Confirm' button on the three
possible scenarios regarding item creation.
Ordering:
- 'Confirm' disabled, only gets enabled if quantity > 0
Receiving:
- Quantity gets locked (only changeable when creating items)
- 'Confirm' disabled, only gets enabled if quantity > 0
Cataloguing:
- It now defaults to 1
- 'Confirm' enabled by default (because of 1) if quantity is set to 0,
it gets disabled.
To test:
1. Verify the described behavior with the sample orders for the previous
patch.
=> SUCCESS: It does the job!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>