]> git.koha-community.org Git - koha.git/log
koha.git
17 months agoBug 33615: Date picker icon not visible
Mason James [Thu, 27 Apr 2023 03:24:07 +0000 (15:24 +1200)]
Bug 33615: Date picker icon not visible

to test:

 - apply patch, build package

 - edit item, observe calendar icon is visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9ccc5ccce0bac6076badc5f8186d953e04fdcc6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33631: Fix misaligned labels
Lucas Gass [Thu, 27 Apr 2023 21:08:35 +0000 (21:08 +0000)]
Bug 33631: Fix misaligned labels

If you look at the results_summary on either the results
or detail pages you will notice that the label and
content are slightly misaligned.

To test:
1. On staff results, detail page, or ISBD details notice
   that slight misaligmnet between label and content.
2. Apply patch, yarn_build, clear browser cache
3. Look again, alignment should be fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a86b2b1b731015aab9cfbad0fd8331d2ef9e2c9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33596: Merge result page is missing page-section
Owen Leonard [Mon, 24 Apr 2023 19:09:00 +0000 (19:09 +0000)]
Bug 33596: Merge result page is missing page-section

This patch adds a "page-section" container around the contents of the
page seen when you complete the process of merging catalog records.

The patch also adds the "merge was successful" message into the standard
message dialog.

Perform a catalog search which will return more than one record.

- Select two records in your search results and click "Edit" -> "Merge
  records."
- Complete the process of merging your selected records.
- On the last page you should see a "merge was successful" message
  styled as the standard information box.
- The "Report" section should be shown inside a "page-section" div.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2991bd6b0d233c240b9b5177a815ca53b1a08ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33196: Generalize pseudonymization system preference description
Katrin Fischer [Fri, 17 Mar 2023 22:42:47 +0000 (22:42 +0000)]
Bug 33196: Generalize pseudonymization system preference description

The Pseudonymization system preference description in
the staff interface is: "Disable/Enable pseudonymization
to comply with GDPR for personal information. Patrons and
transactions will be copied to a separate table for
statistics purpose."

GDPR is a European Union (and, at time of writing, UK) law;
it makes the system preference look irrelevant for
libraries outside this area. However, this is not correct:
pseudonymization may be useful for libraries anywhere.

This generalized the system preference description and
only uses GDPR as an example instead of the only purpose.

It also updates the fields listed to more closely reflect
the labels on the patron form.

To test:
* Search for "Pseudonymization" in the systme preferences
* Verify that the description of the system preference is
  very GDPR
* Apply patch
* Verify the system preference description is improved

https://bugs.koha-community.org/show_bug.cgi?id=33196
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>
(cherry picked from commit 54cdae763365636e71a231432d5afff637796963)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Katrin Fischer [Sat, 4 Feb 2023 23:54:22 +0000 (23:54 +0000)]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a5034792c5269ef11f2acddd3d6055886cded06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32990: Prevent deadlock in _update_batch_record_counts
Marcel de Rooy [Fri, 17 Feb 2023 08:33:41 +0000 (08:33 +0000)]
Bug 32990: Prevent deadlock in _update_batch_record_counts

Resolves:
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st execute failed: Deadlock found when trying to get lock; try restarting transaction at /usr/share/koha/C4/ImportBatch.pm line 392

See also bug 32558.

Test plan:
If you apply 32558 first, run multiple processes that stage a marc import.
Without this patch, you can trigger the deadlock.
With this patch, it works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a6d10dc312cd6fe5e33a72af6259ac9b05f6db7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server
Katrin Fischer [Sun, 5 Feb 2023 00:17:01 +0000 (00:17 +0000)]
Bug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server

This makes sure that the focus is in the first form field when
adding a new Z39.50 or SRU server.

To test:
* Administration > Z39.50/SRU servers
* Add a new server for each
* Verify the focus is not in the form
* Apply patch
* Verify the focus is now in the first form field
* Edit an existing server
* Verify the focus is not in the form

Not having the focus when editing is to avoid accidental changes.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2504a282b5890168616c1a87206f8762c38a660d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32931: Fix translatability issues on 'show agreement' view
Jonathan Druart [Wed, 19 Apr 2023 06:53:03 +0000 (08:53 +0200)]
Bug 32931: Fix translatability issues on 'show agreement' view

Signed-off-by: David Nind <david@davidnind.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 f214582bddeaaa5eb6d692e98408751370fb71bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32931: Fix translatability issues on 'new agreement' form
Katrin Fischer [Sun, 16 Apr 2023 11:29:39 +0000 (11:29 +0000)]
Bug 32931: Fix translatability issues on 'new agreement' form

This fixes the "Yes" and "No" options and "License info" placeholder.

To get to the options:
1. Enable the ERMModule system preference
2. Go to E-resource management
3. Click "Agreements"
4. Click "New agreement"
   --> Field "Is perpetual", options are Yes and No
   --> At the bottom of the form "License info" with "License info"
       within the input field
5. Install (complete) language, verify those are not translated
6. Apply patch
7. Update po files
8. Verify strings exist for this file, translate if necessary
9. Re-install language
10. Verify strings are now translated

Signed-off-by: David Nind <david@davidnind.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 1278b9f4fdab6b5863b8147aa9e9dc7d08064798)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 30367: (follow-up) Same adjustment for gitlab
Nick Clemens [Wed, 3 May 2023 10:58:22 +0000 (10:58 +0000)]
Bug 30367: (follow-up) Same adjustment for gitlab

This adds the same update for gitlab code. I was unable to trigger the error,
however, I confirm searching for 'PayPal' returns a result after this patch
as well as before.

JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88000fbccbcfe707ee3d8bf72f549c1ac11be3f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 30367: Skip processing if we don't get releases
Nick Clemens [Tue, 2 May 2023 16:27:15 +0000 (16:27 +0000)]
Bug 30367: Skip processing if we don't get releases

Some repos don't have releases, and this seems to break things as get returns an empty
response. Calling from_json on this is the error

This simply skips the bad responses to avoid the error:

To test:
1. Have this on your koha-conf.xml file:

 <plugin_repos>
    <repo>
        <name>ByWater Solutions</name>
        <org_name>bywatersolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>Theke Solutions</name>
        <org_name>thekesolutions</org_name>
        <service>gitlab</service>
    </repo>
    <repo>
        <name>PTFS Europe</name>
        <org_name>ptfs-europe</org_name>
        <service>github</service>
    </repo>
 </plugin_repos>

2. Restart all services:
   $ restart_all
3. Search for the term 'barclaycard'

The search will give an error:

malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190
4. Apply patch
5. Repeat
6. No error

Note: The barclaycard plugin won't install even though it is returned as of this note - the plugin needs an update I believe, I don't think it's a Koha issue
Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b12aa543e2e2fe1c46eca4a0e07daa369b033793)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33626: Remove invalid params
Nick Clemens [Thu, 27 Apr 2023 11:23:03 +0000 (11:23 +0000)]
Bug 33626: Remove invalid params

This patch reformats the params passed to scroll_helper as defined here:
https://metacpan.org/pod/Search::Elasticsearch::Client::7_0::Scroll

To test:
1 - perl misc/maintenance/compare_es_to_db.pl
2 - It dies:
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
3 - Apply patch
4 - Repeat
5 - It succeeds!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daa92a937193321c49c97cca5bad8809d7889d21)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33197: DBRev 22.11.05.006
Tomas Cohen Arazi [Fri, 5 May 2023 13:07:10 +0000 (10:07 -0300)]
Bug 33197: DBRev 22.11.05.006

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e38df2d6f7fd363193badff2380ebee63a702193)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33197: Rename GDPR_Policy system preference
Katrin Fischer [Fri, 17 Mar 2023 22:06:40 +0000 (22:06 +0000)]
Bug 33197: Rename GDPR_Policy system preference

GDPR is a European Union (and, at time of writing, UK) law.
The GDPR_Policy system preference is about a patron
giving consent to their personal data being processed in
line with the library's privacy policy.

The name of the preference is vague: there could be
many policies implemented by libraries to comply with
GDPR. It also makes the preference look irrelevant for
libraries outside the areas where GDPR applies, while
it may be useful for libraries anywhere.

This renames GDPR_Policy to PrivacyPolicyConsent and
adjusts the system preference descriptions.

To test:
* Apply the patch
* Run database update
* Search for GDPR_Policy in the system preference
  - you should not find anything.
* Search for DataPrivacyConsent in the system preferences
  - you should find it and be able to activate it
* Verify the feature works as expected
  - If the preference is set to "enforced", you will be
    asked to give consent to the data privacy agreement
    in the OPAC when you log in
* Verify the page is now phrased neutrally using 'privacy policy'

Bonus: Consent date is now formatted according to DateFormat
       system preference.
Signed-off-by: David Nind <david@davidnind.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 bd75309933a92341a073d06e14bac1c6a6ceb666)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32412: Do not reload COCE image for biblio
Jonathan Druart [Wed, 3 May 2023 09:16:14 +0000 (11:16 +0200)]
Bug 32412: Do not reload COCE image for biblio

We do not want to fetch again the new image for the biblio record. We
only want to fetch those for the shelf browser.

Note that the third parameter 'covernewwindow' was not used.

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>
(cherry picked from commit 13dccaaf055b49473c1cc4a6ac34c0a23eb182a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32412: Empty coce container before appending image
Lucas Gass [Tue, 4 Apr 2023 21:50:39 +0000 (21:50 +0000)]
Bug 32412: Empty coce container before appending image

To test:
1. Apply patch and clear browser cache
2. Turn on Coce for the OPAC.
3. OPACShelfBrowser must be on
4. Find a record that returns a cover image and open it's detail page.
5. Use the next/previous navigation links in the OPACShelfBrowser
6. Notice that no extra image is being added to the biblio-cover-slider.
7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.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 fec0bd18ae1e982232bf5b5d7d000c2bc6984589)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33551: (QA follow-up) Fix TT filters
Katrin Fischer [Wed, 3 May 2023 20:51:49 +0000 (20:51 +0000)]
Bug 33551: (QA follow-up) Fix TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74497dbb5a9db2cf9c89a713ffe457370eefa7cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33551: Remove span from restriction-types.inc
Jonathan Druart [Wed, 3 May 2023 07:09:25 +0000 (09:09 +0200)]
Bug 33551: Remove span from restriction-types.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63f2d76457c75de103f8257761ef5287d78796d5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33419: (QA follow-up) Remove changes to basic_workflow.t
Katrin Fischer [Tue, 2 May 2023 22:48:09 +0000 (22:48 +0000)]
Bug 33419: (QA follow-up) Remove changes to basic_workflow.t

These are not needed: 942 and 200 have no subfields for
homebranch and holdingbranch.

The tests pass without these changes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 81f2ed7e39795ef2e2e2a7cd37af587b3fc72481)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33419: Make home library and current library mandatory by default
Laura Escamilla [Tue, 2 May 2023 18:35:23 +0000 (18:35 +0000)]
Bug 33419: Make home library and current library mandatory by default

Items without a home and current library can cause errors in Koha.
On the bibliographic page, items appear without the "edit" drop-down
or the selection check box. On a bulk delete page, items without
a home library create a red error that says "Cannot delete".

Making the home and current library values mandatory
helps avoid these issues.

Test plan (using koha-testing-docker (KTD)):
1. Reset KTD so that the web installer is used to setup Koha.[1]
2. Setup Koha using the web installer
   -> When setting up the default settings, don't add any of the
      optional data.
3. Once setup and logged in, check the two frameworks (default and ACQ)
    and note that $952$a and $952$b are not mandatory.
4. Apply the patch.
5. Repeat steps 1-2.
6. Once setup and logged in, check the two frameworks (default and ACQ)
   and note that $952$a and $952$b are now mandatory.

[1] How to access the web installer to setup Koha in KTD:
1. Access the database server:
   mysql -uroot -ppassword -hkoha-db-1
2. Drop the koha_kohadev database: drop database koha_kohadev;
3. Create the database: create database koha_kohadev;
4. Add privileges (for a real installation this would be limited):
   grant all on koha_kohadev.* to koha_kohadev;
5. Restart everything (there may be some errors listed):
   flush_memcached and then restart_all
6. Access the web installer: go to 127.0.0.1:8081
7. Use the database user name and password:
   get from /etc/koha/sites/kohadev/koha-conf.xml
   (default: koha_kohadev, password)
8. Continue through the installation process.

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 a6caabfd2b0e2d5ad7c0b55a6273d62ea30807cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33329: Correctly handle UNIMARC encoding for biblios
Tomas Cohen Arazi [Fri, 14 Apr 2023 20:21:15 +0000 (17:21 -0300)]
Bug 33329: Correctly handle UNIMARC encoding for biblios

This patch introduces the same treatment we had for bug 32336, this time
for Koha::Objects::Record::Collections.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail! Encoding is wrong for UNIMARC!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5121f774604a533560c9a8e08ed357e30a5d1ddd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33329: Regression tests
Tomas Cohen Arazi [Thu, 23 Mar 2023 23:46:44 +0000 (20:46 -0300)]
Bug 33329: Regression tests

This patch introduces tests for the bug highlighted on bug 32336, but in
the context of lists of records.

To reproduce:
1. Run:
   $ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> FAIL: Test fail, encoding is bad!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 81fc1ebe71dd22eb9ce434ebc36234fcee26644b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32701: Fix I18N JavaScript libraries on self checkout help page
Katrin Fischer [Sun, 23 Apr 2023 21:16:52 +0000 (21:16 +0000)]
Bug 32701: Fix I18N JavaScript libraries on self checkout help page

The help page was missing the fixes from bug 28488. The missing
libraries are causing a JavaScript error on the page and likely
other issues.

To test:
* Make sure WebBasedSelfCheck is activated and configured
  Note: In ktd you don't need to configure anything, it's already set up.
* In the OPAC, go to:
  /cgi-bin/koha/sco/sco-main.pl
* Click on the link to the help in the top right corner
* Verify you see the error in the console:
  jQuery.Deferred exception: __ is not defined
* Apply patch
* Restart things
* Reload the page
* Veriy the errors are gone

Signed-off-by: David Nind <david@davidnind.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 289f0e80517713814fb0752b932fe612ba2d0bc4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33649: Fix use of cronlogaction
Magnus Enger [Wed, 3 May 2023 06:51:14 +0000 (08:51 +0200)]
Bug 33649: Fix use of cronlogaction

C4::Log::cronlogaction() takes a hashref as argument, with "info"
and possibly "action" as keys. But there are a couple of places
where it is called with just a string as argument, and that does
not work. Both places need lock_exec to fail to trigger the error.
I have seen this on a production server, but not been able to
reproduce in ktd.

To test:
- Run this on the Koha repo: grep -r "cronlogaction(" *
- Verify that fines.pl and process_message_queue.pl are the only
  scripts that call cronlogaction without a hashref as argument,
  but do it like this: cronlogaction( $message );
- Apply this patch
- Run the grep again and verify that all calls to cronlogaction
  now take a hashref as argument

Signed-off-by: Nick Clemens <nick@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 48a2952032bafde7041e7bf10d861e7efeff54fc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33470: Don't calculate overridden hold limits
Nick Clemens [Sun, 9 Apr 2023 18:25:41 +0000 (18:25 +0000)]
Bug 33470: Don't calculate overridden hold limits

This patch can largely be checked in the code to ensure it makes sense, it
moves a conditional up one level for the two different checks that could prevent holds

To test:
1 - Attempt to place a hold via the REST API with an invalid pickup location
    Set pickup location as no in branches to make this easy
2 - Confirm you get an error
3 - Attempt again with header (bug 27760):
    x-koha-override: any
4 - Hold is placed
5 - Repeat 1-4 above but with an item that cannot be held
6 - Apply patch
7 - Repeat 1-4 above
8 - Results should be the same

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3c31212df4d1917004a20998f47777ef0aea35d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32921: Honor SelfCheckTimeout when modal is open
Lucas Gass [Wed, 8 Feb 2023 23:28:59 +0000 (23:28 +0000)]
Bug 32921: Honor SelfCheckTimeout when modal is open

To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.

Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
JD amended patch - fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e074ffa6be15c97e6724041b12d930ed70855f1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 28267: Simplify things
Jonathan Druart [Thu, 4 May 2023 07:05:17 +0000 (09:05 +0200)]
Bug 28267: Simplify things

We don't need:
* a separate Koha::Installer module when we already have
C4::Installer
* the tests as they are actually modifying the DB structure
without rolling back
* An unecessary complicated subroutine, just make is simple

WNC amended patch: Remove change to Koha.pm

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>
(cherry picked from commit f394bf61cf7e60058afd9856f7ae8dda8afb385b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 28267: Add warnings for database row formats
David Cook [Wed, 18 Jan 2023 03:20:29 +0000 (03:20 +0000)]
Bug 28267: Add warnings for database row formats

This patch adds a warning on about.pl regarding database row formats
other than "DYNAMIC". It points to the Koha community wiki for more
information on how to resolve the problem.

This patch also stops the installer if there are any database tables
with a row format other than "DYNAMIC". It points to the Koha community
wiki for more information on how to resolve the problem.

Test plan:
0a. Apply the patch
0b. koha-plack --restart kohadev
1a. koha-mysql kohadev
1b. ALTER TABLE tags ROW_FORMAT=COMPACT;
2. Go to http://localhost:8081/cgi-bin/koha/about.pl
3. Note that there is a warning about database row formats
4a. koha-mysql kohadev
4b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
5. Go to http://localhost:8081/cgi-bin/koha/about.pl
6. Note that there is no warning about database row formats

7a. Manually change the version in Koha.pm to a higher version
7b. koha-plack --restart kohadev
8a. koha-mysql kohadev
8b. ALTER TABLE tags ROW_FORMAT=COMPACT;
9. Go to http://localhost:8081/
10. Log into the web installer and click through until you reach
a warning telling you that you have database row formats other
than 'DYNAMIC'
11. Note that you can't progress with the installer until
this problem is resolved
12a. koha-mysql kohadev
12b. ALTER TABLE tags ROW_FORMAT=DYNAMIC;
13. Refresh the page or redo the web installer process
14. Note that you're no longer blocked from running the installer
due to database row format
15. Undo your change to Koha.pm
16. Profit

Note: Due to bug 32665 you'll see an unrelated warning on
step 3

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit b76fb9cf466dd4cc4eb4d382c4bfb9fa78a1fce6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: DBRev 22.11.05.005
Tomas Cohen Arazi [Fri, 5 May 2023 12:32:48 +0000 (09:32 -0300)]
Bug 33262: DBRev 22.11.05.005

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0587d3238692429b704f4e79d62635b6aa86f29a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: DBIC schema
Tomas Cohen Arazi [Fri, 5 May 2023 12:31:58 +0000 (09:31 -0300)]
Bug 33262: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7a779bf9e0d2c2732ad6df050f1f64b4bb69386a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Add new field to REST API route for orders
Katrin Fischer [Thu, 4 May 2023 15:06:45 +0000 (15:06 +0000)]
Bug 33262: Add new field to REST API route for orders

Without this patch the API driven list of pending orders
on the order receive page was broken.

With the patch, all should be well now.

prove -v t/db_dependent/api/v1/acquisitions_orders.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ab67c196debf387f2053c3916f4cdac76901db3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Unit tests
Katrin Fischer [Thu, 4 May 2023 13:08:54 +0000 (13:08 +0000)]
Bug 33262: Unit tests

prove t/db_dependent/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 177b53d79492f7636c5e9e37a6e1f3c3f8fa8707)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Store the biblionumber of a deleted record in the order line
Katrin Fischer [Thu, 4 May 2023 12:15:36 +0000 (12:15 +0000)]
Bug 33262: Store the biblionumber of a deleted record in the order line

When a bibliographic record is deleted and linked to an order
in the acquisition module, the biblionumber in the order line is
currently deleted as well. This makes it impossible to tell what
was ordered in the first place. This is a big issue for libraries
that need to be able to track how money was spent over long periods
of time.

With this patch the biblionumber of the deleted record will be moved
to a new column deleted_biblionumber in the order line, keeping the FK
on biblionumber.

To test:
* Apply patch, run dataase update
* Create a order/basket in the acquisitions module
* Order several things, you can use existing records from the sample data
* Make sure you order one of the records at least twice
* Take a look at the aqorders table in your database, using a report:

  SELECT biblionumber, deleted_biblionumber, ordernumber from aqorders;

* From the catalog, delete the items on the records and then the records

  Note: There is a warning about attached orders warning about consequences
  for acquisitions. I have chosen to keep it at this point in time, as
  there are still visible side effects of deleting the record, like bug 10758.

* Re-run the report and compare results to the first run. deleted_biblionumber
  should now be filled with the biblionumber of the deleted record.
  biblionumber should be NULL/empty.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c8faeac4cd4cfdeab04c25bedb534d3823bbe83c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33262: Add deleted_biblionumber column to aqorders table
Katrin Fischer [Thu, 4 May 2023 13:23:31 +0000 (13:23 +0000)]
Bug 33262: Add deleted_biblionumber column to aqorders table

This adds a new column deleted_biblionumber to the aqorders table.
This will allow us to store the biblionumber of a deleted record,
so we will still be able to tell what has been ordered once the
record is deleted.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cf7687e833986d95ce9fa49bdb33252944fbbea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: (follow-up) Nothing is forever
Tomas Cohen Arazi [Fri, 5 May 2023 18:53:31 +0000 (15:53 -0300)]
Bug 22440: (follow-up) Nothing is forever

This patch picks (yet) another class for testing purposes. The class
needs to not implement to_api() and to_api_mapping().

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b22f017a1684948e89b033966585468a16ad8341)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: (follow-up) Fix existing tests
Tomas Cohen Arazi [Fri, 5 May 2023 19:22:20 +0000 (16:22 -0300)]
Bug 22440: (follow-up) Fix existing tests

As we are introducing a FK for illrequests.biblio_id, TestBuilder is
generating a linked biblio, and so tests expecting undef are failing.

This fixes it by explicitly setting biblio_id => undef on creating the
request.

The patch also cleans the area a bit, removing a redundant and fragile
test as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e0c6b397d169e6470f85619844f8682c62e5b07)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: DBRev 22.11.05.004
Tomas Cohen Arazi [Fri, 5 May 2023 12:12:47 +0000 (09:12 -0300)]
Bug 22440: DBRev 22.11.05.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95520f0fb5459244ca10462e2c4c4215311cfea2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: DBIC schema
Tomas Cohen Arazi [Fri, 5 May 2023 12:10:31 +0000 (09:10 -0300)]
Bug 22440: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a35d9fbedfcc144ec12ac458577e984c8db933c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Move backend statuses api endpoint
Pedro Amorim [Thu, 27 Apr 2023 16:08:56 +0000 (16:08 +0000)]
Bug 22440: Move backend statuses api endpoint

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50909d22668486685343df6b3e7b17f68cf7f243)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Tests
Pedro Amorim [Thu, 30 Mar 2023 10:07:05 +0000 (12:07 +0200)]
Bug 22440: Tests

Updated API tests

Co-authored-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3cfce3b79646657a22a6b5accc87f8e961a8c1f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: ILL API changes
Pedro Amorim [Mon, 24 Apr 2023 15:28:28 +0000 (15:28 +0000)]
Bug 22440: ILL API changes

* Add GET /illbackends/{id}/statuses
* Change API route to ill/requests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 313ce33b22509b2cdb349f1e4bc2793d8d972050)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: New ILL requests table
Pedro Amorim [Thu, 30 Mar 2023 10:07:17 +0000 (12:07 +0200)]
Bug 22440: New ILL requests table

Use kohaTable requesting the REST api instead of the old KohaTable

Co-authored-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33084fb40c772ec1f76cbbcb06bcbfc5b87a3042)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Add GET /ill_requests
Tomas Cohen Arazi [Thu, 30 Mar 2023 09:01:08 +0000 (11:01 +0200)]
Bug 22440: Add GET /ill_requests

Co-authored-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e64fd9aafc2b4b554429dcbbffda929c97e46cf8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Add standard accessors for later usage
Tomas Cohen Arazi [Thu, 30 Mar 2023 08:54:51 +0000 (10:54 +0200)]
Bug 22440: Add standard accessors for later usage

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b470e43a2a6d3e7608903f3693e1e7c37853a27)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Add missing foreign key
Tomas Cohen Arazi [Thu, 30 Mar 2023 08:49:51 +0000 (10:49 +0200)]
Bug 22440: Add missing foreign key

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f663221946a9d9ab5bdba586c2696f3302ebd30)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 22440: Add Koha::Illrequests->filter_by_visible
Tomas Cohen Arazi [Fri, 6 Jan 2023 15:48:39 +0000 (12:48 -0300)]
Bug 22440: Add Koha::Illrequests->filter_by_visible

This patch introduces a method for filtering out requests that match the
statuses specified on the *ILLHiddenRequestStatuses* system preference.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Illrequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a186826e46212ed7a2acbf9e63e0b6eb8e6cc79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements
Jonathan Druart [Tue, 11 Apr 2023 19:39:02 +0000 (21:39 +0200)]
Bug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a0ec93d84f8b00e7b8b583d9fcbe7a564cba2a42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: Prevent 400 when more than 1 agreement is linked
Jonathan Druart [Wed, 12 Apr 2023 14:59:29 +0000 (16:59 +0200)]
Bug 33483: Prevent 400 when more than 1 agreement is linked

We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb30aab206e218946fa3fe5104850a1d79553ac6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: (follow-up) Update the way we distinguish if AgreementsList is called...
Jonathan Druart [Tue, 11 Apr 2023 19:19:46 +0000 (21:19 +0200)]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e7ac09fe26a0fba6fa26ba7d0a4646a627594a7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: Restore 'select'
Jonathan Druart [Tue, 11 Apr 2023 19:14:25 +0000 (21:14 +0200)]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d4204cb9c685f59e213986914594b3dbd4792159)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: Make KohaTable accept customizable actions button
Jonathan Druart [Tue, 11 Apr 2023 19:11:48 +0000 (21:11 +0200)]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d1fe4591c5271bbce6d72169cb47ef17f332e10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEB...
Pedro Amorim [Tue, 11 Apr 2023 16:33:39 +0000 (16:33 +0000)]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4d9246a6c358b82a5be2f9a029b238d4d309787)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33483: Fix link EBSCO package with local agreements
Jonathan Druart [Tue, 11 Apr 2023 12:13:35 +0000 (14:13 +0200)]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0b189ff0a0f3493c5767122746b619b80d07620)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33466: Link to the vendor from the ERM module
Jonathan Druart [Tue, 11 Apr 2023 09:27:08 +0000 (11:27 +0200)]
Bug 33466: Link to the vendor from the ERM module

There are 3 tables in the ERM module where we display the vendor name
but without a link to the acquisition module.

This patch adds the links.

Test plan:
Create an agreement, a license and a local package.
Pick a vendor and notice that now there is a link on the list view.

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 f92f967626d3f3d8e1a873a5378f3fdaa0724fac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix table style
Pedro Amorim [Sun, 26 Mar 2023 10:53:25 +0000 (10:53 +0000)]
Bug 33066: Fix table style

Move table rendering outside <ol> to prevent unintended style in _forms.scss from being applied and causing table to not be full width
Remove unecessary table styling

JD: following commit has been squashed. Patch from Pedro is fixing the
FIXME
"""
Bug 33066: Fix style - FIXME

This is not working, see /cgi-bin/koha/erm/eholdings/local/packages/1
The table is not taking width: 100%
I fixed it previously with the display: table in the style block, but
here it's not applied.

There is also the "green tick" (fa-check-square-o) that is not on the
same line https://snipboard.io/jma923.jpg
"""

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8a63e6eeccac73c22223ede70039251ae705bedc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix cypress tests
Jonathan Druart [Fri, 17 Mar 2023 15:20:27 +0000 (16:20 +0100)]
Bug 33066: Fix cypress tests

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0a89bf85e0e961819d724171a6a9f201a089da68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Remove useless use of useDataTable
Jonathan Druart [Fri, 17 Mar 2023 14:38:06 +0000 (15:38 +0100)]
Bug 33066: Remove useless use of useDataTable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 674585850e2796792a3530cf3519416e5bc41480)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsEBSCOTitlesList
Jonathan Druart [Fri, 17 Mar 2023 14:01:44 +0000 (15:01 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2b9a44b711760e9bd17c0c62e1f8ebefa97dee2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList
Jonathan Druart [Fri, 17 Mar 2023 13:39:51 +0000 (14:39 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e03cee38ca24265a5befcd7e194af3199093c0f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Restore '(#id)' to lists
Pedro Amorim [Wed, 8 Mar 2023 18:36:24 +0000 (18:36 +0000)]
Bug 33066: Restore '(#id)' to lists

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8bee4a203a293bc17f840e4cab637eb0d1d35fdb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackagesList
Jonathan Druart [Wed, 8 Mar 2023 14:57:09 +0000 (15:57 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50b29f6e87638829aab28a1641a5b8ab58d4e73e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsLocalTitlesList
Jonathan Druart [Wed, 8 Mar 2023 14:02:13 +0000 (15:02 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d62764612273f3dac7907e3ff8e515cd052a7993)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList
Jonathan Druart [Wed, 8 Mar 2023 13:20:50 +0000 (14:20 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 116bc6d38630c6fb37d9b9fb9cc8a2206cb16fed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for EHoldingsLocalPackagesList
Jonathan Druart [Tue, 7 Mar 2023 20:03:39 +0000 (21:03 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackagesList

Bug 33066: (follow-up) Use KohaTable for EHoldingsLocalTitlePackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2fb59d88fa85e5d23966c2d3e3762c6025cdc93)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Restore filter by mine
Jonathan Druart [Wed, 8 Mar 2023 12:24:23 +0000 (13:24 +0100)]
Bug 33066: Restore filter by mine

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 83a6aa77e69fdaa209e83d956488109fd5cb0912)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Restore HTML escaping
Jonathan Druart [Tue, 7 Mar 2023 16:40:20 +0000 (17:40 +0100)]
Bug 33066: Restore HTML escaping

And we add a render function that will escape by default

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e129cd5fee9927a148cd525b429e84e86b94d61)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Use KohaTable for LicensesList
Jonathan Druart [Tue, 7 Mar 2023 16:04:01 +0000 (17:04 +0100)]
Bug 33066: Use KohaTable for LicensesList

Bug 33066: (follow-up) Use KohaTable for LicensesList

There was a mismatch, we can embed the whole vendor object info.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c03ff77b272eada4859569389cc37c7e0a0c583)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix width after ColVis change
Jonathan Druart [Tue, 7 Mar 2023 15:46:48 +0000 (16:46 +0100)]
Bug 33066: Fix width after ColVis change

This fixes the width to 100%, otherwise it is not recalculated correctly

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5df53ba5a5aaa1dabd1a279e575f3218e95b5981)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix ColVis
Jonathan Druart [Tue, 7 Mar 2023 15:42:38 +0000 (16:42 +0100)]
Bug 33066: Fix ColVis

The filter (header) was not removed alongwith the column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b7e6e19aec1245f08ca1c38d6bf272d8e4fc967)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix default_filters
Jonathan Druart [Tue, 7 Mar 2023 15:32:20 +0000 (16:32 +0100)]
Bug 33066: Fix default_filters

Will need to be tested when EHoldingsEBSCOTitlesList.vue will be
adjusted

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6638fdfc31ecd67b4956062e953860d42466a5ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix default_search
Jonathan Druart [Tue, 7 Mar 2023 15:26:43 +0000 (16:26 +0100)]
Bug 33066: Fix default_search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9725551aca34a66ed689659aee2eee7925e01d7e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Remove duplicate 'Actions' column
Jonathan Druart [Tue, 7 Mar 2023 15:13:03 +0000 (16:13 +0100)]
Bug 33066: Remove duplicate 'Actions' column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de3f1d1f889a6b6e93c2db849731ee5fd9a03d81)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Embed vendor and retrieve vendor name from the request
Jonathan Druart [Tue, 7 Mar 2023 14:42:48 +0000 (15:42 +0100)]
Bug 33066: Embed vendor and retrieve vendor name from the request

Bug 33066: (follow-up) Embed vendor and retrieve vendor name from the request

It needs "Bug 32923: Allow to embed user_roles for agreements"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 922ed2d2830dbfe3f8f2b069eb03b314c5d16a5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Remove build_datatable
Jonathan Druart [Tue, 7 Mar 2023 14:37:10 +0000 (15:37 +0100)]
Bug 33066: Remove build_datatable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix name display
Jonathan Druart [Tue, 7 Mar 2023 14:36:46 +0000 (15:36 +0100)]
Bug 33066: Fix name display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ea7e7aee26b9b89fd4fba5d3b3a5df5589794d92)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Reintroduce column filters
Jonathan Druart [Tue, 7 Mar 2023 14:02:25 +0000 (15:02 +0100)]
Bug 33066: Reintroduce column filters

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe3da95290698a57425c8d54ff05ed91c29b3683)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix "Loading..."
Jonathan Druart [Tue, 7 Mar 2023 14:06:50 +0000 (15:06 +0100)]
Bug 33066: Fix "Loading..."

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 730aec445e650f9b8b5406617170f0fde74aee78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Add colvis
Jonathan Druart [Fri, 24 Feb 2023 16:08:58 +0000 (17:08 +0100)]
Bug 33066: Add colvis

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c28ee17c00ba0347d34ff5da2fee15b4759baa2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Fix dt - no need to reselect
Jonathan Druart [Fri, 24 Feb 2023 14:47:41 +0000 (15:47 +0100)]
Bug 33066: Fix dt - no need to reselect

Bug 33066: (follow-up) Fix dt - no need to reselect

Patron search result table was not displayed correctly
Uncaught TypeError: this.on is not a function

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75eaa1f5c58d224b48c332fd8eac31108eb9f375)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33066: Introduce a KohaTable Vue component
Jonathan Druart [Fri, 24 Feb 2023 12:14:19 +0000 (13:14 +0100)]
Bug 33066: Introduce a KohaTable Vue component

The way we deal with DataTables in Vue component is not nice, especially when we
need to add buttons/link in the cell and interact with the rest of the Vue app from
there.

When I started to work on Vue last year there was no good solution from DataTables,
now there is a Vue component. It is not perfect, you still cannot add Vue component
in the DT component, but it brings something to follow. Agustin implemented something
on theke/import_source_vue, but he went too far, and it will need to rewrite the
whole ERM module. Additionally he didn't provide a solution that has the same features
as what we have now.

The goal of this patch is to not duplicate the code in datatables.js, we
don't want to maintain two version of this code (one is enough already!)
We split the huge function in datatables.js in small ones to make them
reusable from the Vue component.

This is quite ugly, and it needs to lot more addition, but it's a first
start!

Help, ideas, and feedback welcome (and needed!)

Bug 33066: Fix agreement name in delete confirmation dialog

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32924: (follow-up) Add left margin to 'Show mine only' label
Pedro Amorim [Thu, 9 Feb 2023 15:14:52 +0000 (15:14 +0000)]
Bug 32924: (follow-up) Add left margin to 'Show mine only' label

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fafccfd76f263445205febab0cfa5a1c8bffb934)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32924: Add the ability to filter agreement by logged in user
Jonathan Druart [Thu, 9 Feb 2023 13:00:56 +0000 (14:00 +0100)]
Bug 32924: Add the ability to filter agreement by logged in user

This patch adds a new filter checkbox at the top of the agreement list
"Show only mine" that will display agreements linked with the logged in
user.

Test plan:
Create several agreements, add your current logged in user to some of
them
On the agreement list view us the new checkbox to filter the agreements
and see those where you are involved in.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2adcd3b828c3bb6518933290efe0c0de1d8f61f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32253: Load all CodeMirror lines initially when using advanced editor
Lucas Gass [Mon, 1 May 2023 22:13:02 +0000 (22:13 +0000)]
Bug 32253: Load all CodeMirror lines initially when using advanced editor

To test:
1. Have advanced editor turned on.
2. Load a record with many lines and see that not all the lines appear until you click on the visible ones.
3. Apply patch and try again
4. All lines should load.

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 827df32798cd8046d62cb6630fd33395d78fb3ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33588: Add page-section to inventory tool items list
Katrin Fischer [Fri, 21 Apr 2023 20:13:04 +0000 (20:13 +0000)]
Bug 33588: Add page-section to inventory tool items list

The table with items created by the inventory tool was
missing the page-section class and therefore had no
white background.

To test:
* Go to cataloguing > inventory
* When you don't have a lot of data: just submit the form
* Look at the result list, confirm missing white background
* Apply patch
* Confirm the background is now correct

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>
(cherry picked from commit 3259fb122c9a035bfdf3613df5317c024a9b0375)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32874: Fix cataloguing/value_builder/unimarc_field_700-4.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:55 +0000 (11:58 +0100)]
Bug 32874: Fix cataloguing/value_builder/unimarc_field_700-4.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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 8f84bc082b6d71cc14554153bb4c062ae918186c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33505: Improve styling of scan index page
Katrin Fischer [Wed, 12 Apr 2023 20:59:34 +0000 (20:59 +0000)]
Bug 33505: Improve styling of scan index page

This patch makes some changes to the 'scan index' page.

* Updates second h1 heading "Scan index:" to h2 level heading "Scan index"
* Removes table from the search form
* Moves search index pull down and search term into one line
* Reorders options with search index first and search term after, matching
  the advanced search form
* Removes the catalog results toolbar from the top, card hold etc. are not needed
  here.
* Fixes doubled up id attribute: scan-index by turning one into scan-index-term.

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Check display, especially search options, options at the top of the page etc.
* Apply patch
* Verify changes listed above
* Regression test the normal search results, all should look the same with and without patch.
* If you think the scan index page is nicer now - sign off.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 358cb91a72e85d6ec0e85b8d88b1793062113bd3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33506: Fix false index for series and keep selected index on scan index page
Katrin Fischer [Wed, 12 Apr 2023 20:19:38 +0000 (20:19 +0000)]
Bug 33506: Fix false index for series and keep selected index on scan index page

The pull down with search options had the wrong index
linked to the Series entry: su instead of se

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Verify search results link to authors using c
* Switch to series
* Verify search results use 'su' for subject
* Verify that search option pull down always jumps back to first
  entry: Any word
* Apply patch
* Verify the search results for series now use correct index se
* Verify that coming from advanced search, the correct search option is selected
* Verify that changing the search option also keeps the selection after searching

Note: with Elasticsearch and default configuration author, title and series will
give you results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 970fe62f785ce06ca57a8bae8936158c632069ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32745: DBRev 22.11.05.003
Tomas Cohen Arazi [Fri, 5 May 2023 12:12:01 +0000 (09:12 -0300)]
Bug 32745: DBRev 22.11.05.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 601c597726e4812c2edf15f39a9d9d3f76b3b543)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 32745: Adjust context for invalid background jobs
Jonathan Druart [Fri, 24 Mar 2023 10:17:58 +0000 (11:17 +0100)]
Bug 32745: Adjust context for invalid background jobs

We had some problems recently and it's possible to have
background_jobs.context=NULL
But the REST API specs is expecting an object.
We could either modify the specs, or adjust the incorrect entries in DB,
which is IMO better.

Test plan:
0. Don't apply the patch
1. Create some background jobs
2. Set context to NULL
UPDATE background_jobs SET context=NULL;
3. List the jobs and note the datatable error, and the error in Koha log
  OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}]

4. Apply the patch
5. Run `updatedatabase`
6. Confirm that the list and detail view are not working 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>
(cherry picked from commit 15e234e5963c9c426541c76d599e5b561fd542ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33597: (follow-up) Two other occurrences for holdfor
Marcel de Rooy [Mon, 24 Apr 2023 10:51:15 +0000 (10:51 +0000)]
Bug 33597: (follow-up) Two other occurrences for holdfor

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f99bcfb6521835e6d21cad3c83973aefb0f16cf4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33597: Fix deleting cookie for holdfor(club)
Marcel de Rooy [Mon, 24 Apr 2023 10:35:26 +0000 (10:35 +0000)]
Bug 33597: Fix deleting cookie for holdfor(club)

Resolve:
Cookie “holdfor” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.

Did not see warning for holdforclub. But since it is created with Lax, we should remove it with Lax.

Test plan:
Similar to previous patch. Check console on logout page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e5e311cb0c88b9223ce98d685668962edc7baee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33597: Get rid of warning about intranet_bib_list
Marcel de Rooy [Mon, 24 Apr 2023 10:23:19 +0000 (10:23 +0000)]
Bug 33597: Get rid of warning about intranet_bib_list

Resolve:
Cookie “intranet_bib_list” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.
basket_22.1200022.js:67:65

Test plan:
Do not apply this patch.
Logout from staff.
Check browser console warnings.
Apply this patch.
Login and logout again.
Check warnings again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95de1f3e92947f157dbbbf789d88beb48645648b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33598: Use template wrapper for breadcrumbs: Tools, part 5
Owen Leonard [Mon, 24 Apr 2023 11:21:42 +0000 (11:21 +0000)]
Bug 33598: Use template wrapper for breadcrumbs: Tools, part 5

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Pages ->
    - View a page in the staff interface
  - Upload patron images
    - Upload results
  - Quote editor
    - Quotes upload
  - OPAC problem reports (must have OPACReportProblem enabled)

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 18137030ffe5d2187121e311a4394ff2f1a6e94e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33566: Use template wrapper for breadcrumbs: Tools, part 1
Owen Leonard [Wed, 19 Apr 2023 19:10:18 +0000 (19:10 +0000)]
Bug 33566: Use template wrapper for breadcrumbs: Tools, part 1

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Batch extend due dates
  - Access files (it is not necessary to have file access configured to
    test, there are no variations to the breadcrumbs)
  - News, HTML customizations, and Pages: For each category check each
    variation:
    - List of entries
    - New entry
    - Edit entry
- Cataloging ->
  - Batch record deletion
  - Item modifications by age
    - Edit rules

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 266a3ea00ea21efe74992ae021ea883d2d3eb3b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33564: Use template wrapper for breadcrumbs: Serials part 3
Owen Leonard [Wed, 19 Apr 2023 18:17:46 +0000 (18:17 +0000)]
Bug 33564: Use template wrapper for breadcrumbs: Serials part 3

This patch updates several serials templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Serials ->
 - Manage frequencies
   - New frequency
   - Edit frequency
 - Manage numbering patterns
   - New numbering pattern
   - Edit numbering pattern
 - Search subscriptions -> View subscription details
   - If necessary, edit the subscription to enable "Manual
     history"
     - Under the "Planning" tab of the detail page, click
       "Edit history"
   - If necessary, edit the subscription and select a notice under
     "Patron notification."
     - Under the "Information" tab of the subscription detail page,
       click "subscribers"

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d683d4e32f9c490868fa83a03ce308209e75059)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33559: Use template wrapper for breadcrumbs: Serials part 2
Owen Leonard [Tue, 18 Apr 2023 16:18:24 +0000 (16:18 +0000)]
Bug 33559: Use template wrapper for breadcrumbs: Serials part 2

This patch updates several serials templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Serials ->
  - Serials home page
    - New subscription
    - Serials search results
      - Subscription details -> Edit subscription
      - Subscription details -> Serial collection -> Edit serials
      - Select one or more seach results and click the "Edit selected
        serials" to test the batch edit page

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e742755ab1f7b59aea7d8e257c1590fc487ca75)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33437: Use template wrapper for breadcrumbs: Reports part 2
Owen Leonard [Mon, 17 Apr 2023 17:14:05 +0000 (17:14 +0000)]
Bug 33437: Use template wrapper for breadcrumbs: Reports part 2

This patch updates several reports templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Reports ->
  - Most circulated items
    - Report results
  - Items with no checkouts
    - Report results
  - Catalog statistics wizard
    - Report results
  - View dictionary
    - New definition (steps 1-5)
  - Saved reports
    - View report
    - New report
    - Edit report
  - Guided reports
    - Build a report
      - Steps 1 through 6

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb940cf8c4ad9537e7c7c5ca47124b852ab3703d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33634: Correct anchors in system preference submenu
Lucas Gass [Fri, 28 Apr 2023 15:53:19 +0000 (15:53 +0000)]
Bug 33634: Correct anchors in system preference submenu

To test:
1. Go to Koha Administration -> Global system preferences
2. Go to a tab with a few headings like Circulation
3. Click on a heading in the sidebar navigation under Circulation that takes you a bit down the page, like Recalls
4. Notice this anchor link does not work, you are not taken to the recalls preferences
5. Apply patch
6. Try again, the links should take you to the proper place.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d1278aa14bf2a161df87c9d73f105b2c96c5022)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 19249: Fix date inputs on patron quick add form
Jonathan Druart [Wed, 3 May 2023 14:15:28 +0000 (16:15 +0200)]
Bug 19249: Fix date inputs on patron quick add form

This patch create a "apply_flatpickr" JS function to make the code
reusable from the template, where we loop over the date inputs to
reinstantiate flatpickr.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28dc7f1f02b0515648b76abd71eaa142f5f52396)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 months agoBug 33621: (QA follow-up) Typo formated_date
Marcel de Rooy [Fri, 28 Apr 2023 09:58:19 +0000 (09:58 +0000)]
Bug 33621: (QA follow-up) Typo formated_date

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e40135a219e85f91f134bb8c3edc3593d060e8a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>