Commit graph

49981 commits

Author SHA1 Message Date
45852c950e
Bug 30860: Cache CanItemBeReserved return value
This patch caches the return value of CanItemBeReserved that could
be then returned *on
demand*
We don't want to introduce side-effects hard to catch from this simple
change, so let's return the cache value only from the 2 scripts we are
dealing with.

This patch requests all item values from CanBookBeReserved on request.pl

Before this we either:
- Looped every item to find out that book could not be reserved
- Looped until we found an item that could be reserved, then looped all items to get statuses

In the worst case we avoid double processing a single item, in the best case we avoid double
processing all items (if only last on record is holdable)

To test:
1 - Find a record in staff client with several items
2 - Set AllowHoldsOnDamagedItems  to 'Dont allow'
3 - Add a damaged item to record
4 - Set a hold rule to only allow holds form homebranch and ensure record has items from other branches
5 - Setup things to prevent more items from being held
6 - Attempt hold for patron
7 - Note item statuses
8 - Apply patch
9 - Confirm statuses are as they were before

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:07 -03:00
Michael Hafen
79f8e148af
Bug 28726: Add sort1 and sort2 to patron card creator - patron search.
Also adds a select all / clear all and checkboxes.

Test plan:

1. start a new batch in the patron card creator (Tools -> Patron card creator -> New -> card batch)
2. click the Add patron(s) button.  Observe that Category and Library are the only options.
3. Close search for patron window.
4. Apply patch.
5. click the Add patron(s) button.  Observe that you can now search for patrons by their sort1 and sort2 values.
6. perform a search and observe the 'Select all | Clear all | Add selected patrons' links and button.
7. use the Select all link to select all the patrons found by the search.
8. use the Add selected patrons button to add the selected patrons to the card batch's Add by borrowernumber(s) text input field.
9. close the search for patron window.

Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:07 -03:00
Sam Lau
e2e236fa9e
Bug 34071: Change the phrasing of 'automatic checkin' to fit consistent terminology
This patch simply changes 'Automatic checkin' to be 'Automatic
check-in'.

Test plan:
1) Go to administration -> item types and click the edit button on an
   item.
2) Notice there is a checkbox labeled 'Automatic checkin'.
3) Apply patch.
4) Refresh the page and notice the checkbox now says 'Automatic
   check-in'.
5) prove t/db_dependent/Koha/Checkouts.t
6) Sign-off :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:06 -03:00
b5de15c4b8
Bug 33578: Fix controller when editing a restriction type
Do not display a warning when we are editing a restriction type and no
other types with this description exists.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:06 -03:00
9e32945f20
Bug 33578: Fix patron restriction types edition
When editing an existing patron restriction type you'll always get an error on saving:

Label is already in use

To test:
* Activate use of patron restriction types
* Edit any of the system types
* Create new ones

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:05 -03:00
2c6e64ba96
Bug 33894: Use template wrapper for tabs: OPAC search history
This patch updates the OPAC search history page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and view the OPAC search history page. With the
OpacAuthorities system preference enabled you should see two tabs:
Catalog and Authority. Confirm that each tab shows the correct
information.

Deactivate OpacAuthorities and reload the search history page. The
bibliographic search history should display without tabs.

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>
2023-06-23 10:01:05 -03:00
f3def0d264
Bug 33894: Restructuring: Use BLOCKs for biblio and authority sections
In order to make the conversion to the tab wrapper markup easier I'm
putting the biblio search history and authority search history sections
into blocks. This will make it easier to include or not include the
sections using template logic.

To test, apply the patch and, if necessary, perform some searches for
bibliographic and authority records. The OPAC search history page should
be unchanged, with the correct information showing under each tab and in
each section for current and previous searches.

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>
2023-06-23 10:01:04 -03:00
44759b4be3
Bug 34013: Recalls awaiting pickup doesn't show count on each tab
This patch modifies recalls_waiting.pl so that it defines template
variables for 'recalls waiting' and 'recalls waiting over x days'
counts in the same way that waitingreserves.pl handles it.

To test you must have UseRecalls enabled, and some recalls data that
will allow you to see content under each tab.

Go to Circulation -> Recalls awaiting pickup and confirm that both tabs
show the correct count.

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>
2023-06-23 10:01:04 -03:00
309148160b
Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup
This patch updates the recalls awaiting pickup template so that it uses
the new WRAPPER directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test you must have UseRecalls enabled. Apply the patch and go to
Circulation -> Recalls awaiting pickup.

Both the "Recalls waiting" and "Recalls waiting over X days" tabs should
look correct and work correctly.

Signed-off-by: Sam Lau <samalau@gmail.com>
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>
2023-06-23 10:01:03 -03:00
e0c09d230c
Bug 33896: Check whether index is defined before string match
This patch checks that $indexes[$i] is defined before testing whether the string matches to remove the logged warning when searching

Test plan:
1) In the intranet, search the catalog from the top search bar
2) Check plack-intranet-error.log
3) There should be a warning "[WARN] Use of uninitialized value within @indexes in string eq"
4) Apply patch
5) restart_all and then re-try the search
6) The warning should no longer appear

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:03 -03:00
Sam Lau
74bd332051
Bug 31618: Fix typo in POD for C4::ImportBatch::RecordsFromMARCXMLFile
To test:
1) Apply the patch
2) Visit C4::ImportBatch::RecordsFromMARCXMLFile
3) See that in the POD (mine was somewhere around line 1592) the line starting with '@PARAM1' now says '@PARAM1, String, absolute path to the MARCXML file.'
4) Sign off :)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:02 -03:00
7b1391ea9f
Bug 33169: (QA follow-up) Tidy Vue-related files
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:02 -03:00
c61669f92c
Bug 33169: Add support for FA styles
Font awesome now provides a different approach to icon styles so you can
specify things like:

```
<i class="fa fa-camera-retro"></i>
```

but also

```
<i class="fa-solid fa-camera-retro"></i>
```

The original implementation had a hardcoded `fa` and having an extra
parameter for the *style* seemed overkill, as we would need to handle
even a list of styles like on this example:

```
<i class="fa-sharp fa-solid fa-camera-retro"></i>
```

So I chose to just explicitly require the full FA icon class and pass it
thru. With no manipulation on the Vue side.

This patch does that, and adjusts the 'style' for some icons, as
introduced by the FA v6 patchset.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:01:01 -03:00
Agustin Moyano
13fbc155d2
Bug 33169: Build breadcrumbs and left-hand side menu from routes definition
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 10:00:56 -03:00
a40c512bf0
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>
2023-06-23 09:46:45 -03:00
5f1c5a04fa
Bug 33117: DBRev 23.06.00.006
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:45 -03:00
c50fab16b5
Bug 33117: (follow-up) Rename preference
As it's been requested that we keep the search defaults consistent, I
think this preference is better names DefaultPatronSearchMethod and
appear next to DefaultPatronSearchFields. This patch makes that change,
though actually applying it to the other search area's (outside of
autocomplete) has been left for another bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:44 -03:00
Laura Escamilla
7b675997b4
Bug 33117: Adding new PatronAutoCompleteSearchMethod system preference
This patch adds a new system preference called "PatronAutoCompleteSearchMethod"
which allows staff to choose between "Starts with" or "Contains" when
searching for patrons.

The "Contains" option should be useful when searching for patrons that have
multiple surnames or when searching using a patron's middle name.

New Test Plan:
 0. Ensure system preference PatronAutoComplete is set to Try
 1. Create a patron that has a first name, middle name and two surnames.
    (i.e. Adela Maria, Hernandez Acosta).
 2. In patron or checkout search, enter their first name and first
    surname without submitting.
 3. Confirm that a record is found in the autocomplete results
 4. In patron or checkout search, enter their first name and second
    surname without submitting.
 5. Confirm that no record is found.
 6. Enter their middle name and first surname. Confirm that no record is
    found.
 7. Enter their middle name and second surname. Confirm that no record
    is found.
 8. Apply the patch, update database
 9. Under Administration > Global System Preferences > search for
    "PatronAutocompleteSearchMethod"
10. Choose "Contains" instead of "Starts with" for the system
    preference, reload your search page
11. Repeat steps 2-4. The patron record should appear for all search
    methods.
12. Sign off!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:44 -03:00
b7f89dcca3
Bug 34052: Use root relative URL for subscription-detail.pl
This patch replaces a same directory relative URL with a root
relative URL, so that the navigation to subscription-detail.pl
works correctly after deleting a serial.

To test:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
2. Click "New subscription"
3. Click "Search for a vendor"
4. Click "OK"
5. Click "Choose"
6. Click "Search for record"
7. Type "e" into "Keyword:" box
8. Click "Search"
9. Click "Choose" on top result
10. Click "Next"
11. Fill in "Serials planning" however you like, and click
"Test prediction pattern"
12. Click "Save subscription"
13. Click "Serial collection" in left nav menu
14. Click "Delete selected issues"
15. Click "Yes, delete"
16. Click the link under the "Subscription num." table column
17. Note that you're taken to the subscription detail page

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>
2023-06-23 09:46:43 -03:00
4610bc64eb
Bug 33944: Don't fetch item object unless using recalls
To test:
1 - Check someitems out to a patron
2 - View thier checkouts
3 - Apply patch, restart_all
4 - Confirm checkouts load as before
5 - Enable recalls
6 - Recall an item checked out to this patron
7 - Confirm recall shows as expected

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>
2023-06-23 09:46:43 -03:00
7990f3e741
Bug 33973: Restore sorting on Vue tables
Regression from the KohaTable Vue component added by bug 33066.

_dt_default_ajax expects options.columns to contain the columns.

Test plan:
Add some agreements, go the the agreement list view and confirm that you
can now sort the agreements using the header columns.

Note that the CSS is not correct yet. My understanding is that the
DataTable Vue component keep the 'sorting' class on the th which display
the grey up/down icon over the blue icon which indicate the current sort
column.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:42 -03:00
a9389b60d3
Bug 32245: Fix delete news item from staff home page
Simple fix: op was named incorrectly in URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:41 -03:00
ec6f8186ae
Bug 34010: Template corrections to recall pages
This patch makes some corrections to recall pages:
- Update breadcrumbs menu to use wrapper.
- Add <div class="page-section"> where it is missing.
- Use biblio-title include to show links to bibliographic record titles.
- Correct Bootstrap button dropdown markup for consistent style
- Change some submit buttons to <button> elements for consistent style

To test you must have UseRecalls enabled. Having some sample recalls
data will help. Check the following pages to confirm that everything
looks correct:

- Circulation ->
  - Recalls queue
  - Recalls to pull
  - Overdue recalls
  - Recalls awaiting pickup
  - Old recalls
  - Existing recalls: View a bibliographic record with a recall and
    click "Recalls" in the sidebar.

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>
2023-06-23 09:46:41 -03:00
12a986e668
Bug 24517: Add missing 6th position to date-entered-on-file index
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adding the biblio-zebra-indexdefs.xsl on same patch (as should
be generated with xsltproc).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:40 -03:00
Jacob O'Mara
d6566f41e9
Bug 31651: Replaced duplicate error message
The duplicated error message on ln119 has now been replaced for clarity.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:40 -03:00
2238d9f096
Bug 33500: Add tests for RecordLocalUseOnReturn
To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.

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>
2023-06-23 09:46:39 -03:00
1f0cd38d56
Bug 33993: Add order_receive to GET orders endpoints
This adds order_receive to the list of permissions that allow the
endpoint to return orders.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Sharon Dugdale <Sharon.Dugdale@cumberland.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-23 09:46:39 -03:00
bb8db3c7f6
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>
2023-06-23 09:46:38 -03:00
Adolfo Rodríguez
f0360be7a7
Bug 31185: Link authorities automatically doesn't detect duplicate authorities
Signed-off-by: Rachael Laritz <rachael.laritz@inlibro.com>
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>
2023-06-21 13:20:33 -03:00
30b06a6c00
Bug 31185: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-21 13:20:33 -03:00
756de0f09a
Bug 33820: (follow-up) Add hint to member-password.tt
This follow-up makes the same change to the "Change password" template.

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>
2023-06-21 13:20:32 -03:00
8e611b79f1
Bug 33820: Add hints to warn the librarian that they will be logged out if they change their username
This patch adds some JavaScript to the patron entry form which adds a
hint if the logged-in librarian tries to change their own username. It
warns them that they will be logged out.

To test, apply the patch and log into the staff interface.

- Locate and edit your own patron record.
- In the "OPAC/Staff interface login" section, change the value in the
  username field. When focus leaves that form field a hint should
  appear, "You will be logged out if you modify your username."
- Change the username field back to your original username. The hint
  should disappear.
- Confirm that submitting a username change works correctly: You should
  be logged out, and when you log in again your username should be
  updated.

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>
2023-06-21 13:20:32 -03:00
a3a0aaec10
Bug 34051: Cache empty hashref for non-existent authorised values
When fetching authorised value descriptions, we need to handle
scenarios where a value doesn't exist in the cache and doesn't
exist in the database. In this situation, we return an empty
hashref, and this patch makes us cache this empty hashref.

This is important because otherwise the function
Koha::AuthorisedValues->get_description_by_koha_field will
do a database call every time it encounters the same value that
doesn't exist in the authorised values table.

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-21 13:20:31 -03:00
7c05333914
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>
2023-06-21 13:20:31 -03:00
396030df43
Bug 34042: Item search broken by FontAwesome upgrade
This patch corrects a small regression in one of the templates for
outputting item search results. The template lost the change made to it
by  Bug 33070: "Remove use of can_edit_items."

The error meant that item searching wasn't working at all.

To test, apply the patch and perform an item search in the staff
interface. Results should be returned as expected.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-21 13:20:30 -03:00
96794db659
Bug 34033: (bug 30649 follow-up) Fix update typos
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-21 13:20:29 -03:00
a28af7ba4c
Bug 32910: Fix 'Agreements' icon
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-16 10:55:20 -03:00
ab91409f7f
Bug 33987: Combine multiple db updates one in BatchCommitRecords
When replacing existing records BatchCommitRecords will the table import_records will be updated three times for three different fields by three different queries. Not only is this inefficient ( especially for large batches ), it seems that this is causing the dreaded "Lock wait timeout exceeded; try restarting transaction" error on some mysql/mariadb configurations.

1) Test plan
2) Download a marc record from Koha
3) Modify the title of that same bib in Koha
4) Stage the downloaded record and overlay the existing record
5) Verify the title has reverted to the original title from the
   downloaded record!

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-16 10:55:20 -03:00
30d2ffd295
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>
2023-06-16 10:55:19 -03:00
1c3a35418e
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>
2023-06-16 10:55:18 -03:00
2ab07927e2
Bug 29691: Unit tests
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-15 08:48:14 -03:00
c1f628fbc9
Bug 29691: Use template to display news on opac homepage
This patch moves the fetching of news to the template and
adds a p[lugin method to get news by id

TO test:
1 - Define some general and library specific news items
2 - Define in various languages
3 - Define some 'Additional contents' as well
4 - Apply patch
5 - Confirm onlly 'all libraries' news show if not loigged in to opac
6 - Confirm correct library news show when logged in
7 - View specific news items:
    http://localhost:8080/cgi-bin/koha/opac-main.pl?news_id=12
8 - Confirm that non-existent ids show " This news item does not exist. "
9 - Confirm if you enter ID for additional contents you get 'does not exist'

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-15 08:48:13 -03:00
de49b8cd3a
Bug 32402: Add "Modification date" to OPAC Lists table
This change adds a "Modification date" column to the
OPAC Lists table, so that you can see when a list was last modified.

Test plan:
1. Apply patch
2. Create a public list and a private list
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=list&public=1
4. Note that "Modification date" appears in the relevant date format
on both the "Your lists" and "Public lists" tabs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-15 08:48:13 -03:00
719b300001
Bug 33963: Remove leftovers from previous works
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-15 08:48:12 -03:00
37f441edd8
Bug 33963: Remove C4::BackgroundJob
Finally! No more occurrences of this module, we can happily remove it!

Test plan:
git grep is your friend

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-15 08:48:12 -03:00
7a417aa33f
Bug 33962: Remove background job from process koc
The last occurrence of C4::BackgroundJob is in process_koc.pl that is used to upload a file.
Added by bug 2608 (15 years ago), I think it does not longer make sense as networks are faster, and we should not expect big koc files to be uploaded.
If there are complains we will move it to Koha::BackgroundJob.

Test plan:
Upload a koc file, enqueue the operations and confirm that everything is
working correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-15 08:48:06 -03:00
9f4e9f451b
Bug 33528: Fix basic_workflow.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-14 12:46:47 -03:00
fa809812be
Bug 33868: Upgrade the Multiple Select plugin in the staff interface
This patch upgrades the Multiple Select plugin in the staff interface
and adds some minor adjustments to system preferences CSS to accommodate
the change. The listing on the about page is updated with current
information.

To test, apply the patch and clear your browser cache if necessary.

- Go to Administration -> System preferences.
- Test some preferences which use the plugin, e.g.
  - ApplyFrameworkDefaults
  - CoceProviders
  - OpacHiddenItemsExceptions
  - OPACAllowUserToChangeBranch
- Confirm that the menus look correct and work correctly.

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>
2023-06-14 09:22:05 -03:00
62b2609e86
Bug 33417: Fix translation in toolbar
This commit allows the string to be translated - tested using fr-FR and a dummy string in the .po file

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-14 09:22:04 -03:00
bd9255d849
Bug 33417: Remove old components
This commit deletes the old toolbar components as they are no longer
necessary

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-14 09:22:04 -03:00