Commit graph

49716 commits

Author SHA1 Message Date
3347e66824
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.

For instance, in Koha/ArticleRequest.pm

sub biblio {
    my ($self) = @_;

    $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() );

    return $self->{_biblio};
}

This pattern exists in several places.

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 68216c541b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:50:40 +01:00
e0d3271573
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 7095ef2fa7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:42:51 +01:00
9e821301e8
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 110d74f572)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:42:51 +01:00
99070d7b4a
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 6c2e092d5b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-07-12 07:42:51 +01:00
7bfa0c5cad Update release notes for 23.05.01 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-28 15:25:23 +02:00
315eeb824b Increment version for 23.05.01 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-28 15:03:28 +02:00
Koha translators
5bfb329cc7 Translation updates for Koha 23.05.01 2023-06-26 10:10:45 -03:00
6678645740 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 deeb5ebdbd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:58:20 +02:00
80dec321bd 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 dfed7f235d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:58:20 +02:00
a51d570a6e 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 7c05333914)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:56:48 +02:00
e4503252d6 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 bb8db3c7f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:55:42 +02:00
cba15aaa09 Bug 34022: Adjust items data structure
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 a40c512bf0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:49:52 +02:00
5f24345b67 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 7eafb103b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:44:17 +02:00
4bed47bb03 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 30d2ffd295)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:41:10 +02:00
fdc345dd9c 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 1c3a35418e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-26 14:41:10 +02:00
67dfa18089 Bug 33966: (bug 23824 follow-up) Fix submit buttons for translated templates
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrii Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8c6c134d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-06-20 14:35:39 +02:00
e1be2791b8
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>
2023-06-09 16:05:10 -03:00
4017af3d6a
Bug 33725: (follow-up) Add ccode to grouping logic
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 16:05:10 -03:00
fee84425f5
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>
2023-06-09 16:05:09 -03:00
a215087a6a
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>
2023-06-09 16:05:08 -03:00
2cc9fe3949
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>
2023-06-09 16:05:08 -03:00
233094521e
Bug 32478: DBRev 23.05.00.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 16:05:07 -03:00
ab1cb8a3c0
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>
2023-06-09 16:05:07 -03:00
b4192a6525
Bug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t
Test plan:
Run t/db_dependent/Koha/Config/SysPrefs.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 16:05:06 -03:00
David Gustafsson
151c76eafb
Bug 32478: Fix syspref NULL values in tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 16:05:06 -03:00
1c3223445d
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>
2023-06-09 16:05:05 -03:00
22d3c6121a
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>
2023-06-09 16:05:04 -03:00
David Gustafsson
9c89bf1956
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>
2023-06-09 16:05:04 -03:00
David Gustafsson
342d46e611
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>
2023-06-09 16:04:58 -03:00
d7288411f0
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>
2023-06-09 12:05:00 -03:00
633cb15a63
Bug 33935: (bug 26403 follow-up) Remove occurrences to deleted files
account_credit_types.sql and account_debit_types.sql have been moved to yml files but there are still references to them in C4::Installer.

If you select the files during the installer process it will explode with

Test plan:
DROP database koha_kohadev
CREATE database koha_kohadev
restart_all
then install Koha using the UI
Select all the sample data files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:59 -03:00
ff22a2006b
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>
2023-06-09 12:04:59 -03:00
afe24bce23
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>
2023-06-09 12:04:58 -03:00
David Gustafsson
850f6f403b
Bug 32060: Improve performance of columns_to_str
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>
2023-06-09 12:04:57 -03:00
915cf57510
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>
2023-06-09 12:04:57 -03:00
Hammat Wele
b55b910a57
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>
2023-06-09 12:04:56 -03:00
3a6d369fe6
Bug 32932: Fix resource_id param for EHoldingsLocalResourcesShow
Caught by cypress tests  "ReferenceError: resource_id is not defined" in "Show title".

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:56 -03:00
a53351b4a0
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>
2023-06-09 12:04:55 -03:00
9117020143
Bug 32464: (follow-up) fix t/db_dependent/Koha/Item.t
Remove useless unit tests with mss arg

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:55 -03:00
8dfecfb176
Bug 32464: Koha::Item->as_marc_field obsolete option mss
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>
2023-06-09 12:04:54 -03:00
afd30b8f4d
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>
2023-06-09 12:04:53 -03:00
aa32188553
Bug 21983: DBRev 23.05.00.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:53 -03:00
88249d602c
Bug 21983: (QA follow-up) Skip deleted_biblio_id from the API object
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:52 -03:00
c0cf01b8a2
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>
2023-06-09 12:04:52 -03:00
a9759b3b0e
Bug 21983: Add Koha::Biblio->ill_requests
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>
2023-06-09 12:04:51 -03:00
f6a7d96e1e
Bug 21983: DBIC schema
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>
2023-06-09 12:04:50 -03:00
f1346c2025
Bug 21983: DB update
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>
2023-06-09 12:04:48 -03:00
a7b7f316ba
Bug 33236: (follow-up) Add use statements
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:48 -03:00
fe48eb74f9
Bug 33236: (follow-up) Remove export of NewSuggestion
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:47 -03:00
882aa3eb8a
Bug 33236: (follow-up) Handle new suggestion in ReNewSubscription
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 12:04:46 -03:00