Commit graph

1739 commits

Author SHA1 Message Date
Janusz Kaczmarek
d4b7fc521e
Bug 36578: Elasticsearch: publisher-location (pl) index should include field 752 (for old prints) and also support UNIMARC
Extension to bug 36269: 1) when cataloguing old prints, the standardized form of
the place of publication is given in the field 752 and as such should also be indexed.

2) Also, normal UNIMARC fields for publication place should be indexed (210a, 214a).

Test plan
=========

Scenario A (MARC 21, field 752)
-------------------------------
0. Have an installation with Elasticsearch and MARC 21 configuration.
1. Activate subfields 752 $a, $d in the default framework (Visibility: Editor).
2. Edit an existing record with this framework, putting some rare words in the
   752 $a and $d subfields.
3. Try to make a search with tis words (general keyword or by publication place,
   i.e. pl:).
4. You hsold get no results.
5. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
6. Repeat p. 3. You should get your edited record.

Scenario B (UNIMARC)
--------------------
0. Have an installation with Elasticsearch and UNIMARC configuration.
1. Try to search for a publication place, either with pl: directly in the
   search window, or in Advanced search, with Publisher location.
   With ktd UNIMARC test date you can search for 'Ste Geneviève Cedex'.
2. You should get no results.
3. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
4. Repeat p. 1. You should get some results (with ktd test data set and
   Ste Geneviève Cedex - record #1).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-06 11:18:12 +02:00
Caroline Cyr La Rose
64ad6469ef
Bug 34693: Add 035$a as Other-control-number index in default authorities search indexes
This patch adds a new index for authorities, Other-control-number, and maps it to 035$a.

This will help when trying to match authority records when importing external records.

Test 1:
0. Make sure Elasticsearch is set as the search engine
1. Apply patch and restart
2. Import the attached record
   2.1. Go to Cataloging > Stage records for import
   2.2. Choose the file
   2.3. Click Upload file
   2.4. Choose Record type: Authority
   2.5. Click Stage for import
   (wait until the job is finished...)
   2.6. Click View batch
   2.7. Click Import this batch into the catalog
   (wait until the job is finished...)
   2.8. Click Manage imported batch
   2.9. Click View next to the record
   2.10. Note the auth id number

3. Examine the ES entry for the record (replace INDEX_NAME with the index name (found in koha-conf.xml and XX with the auth_id)

curl -XGET 'http://localhost:9200/INDEX_NAME_authorities/data/XX?_source_includes=other-control-number&pretty'

--> It should give you the value of 035$a

Test 2 (optional):
1. Steps 1 and 2 as above
2. Add a matching rule to match on 035$a for authority records
   2.1. Go to Administration > Record matching rules
   2.2. Click New record matching rule
   2.3. Fill out the form
        - Matching rule code: enter a code (for example AUTCONTROL)
        - Description: enter a description (for example 035$a for authorities)
        - Match threshold: 100
        - Record type: Authority record
        - Search index: Other-control-number
        - Score: 100
        - Tag: 035
        - Subfields: a
   2.4. Click Save
3. Import the same record again, checking for matches using the new rule
   3.1. Go to Cataloging > Stage records for import
   3.2. Choose the file
   3.3. Click Upload file
   3.4. Choose Record type: Authority
   3.5. Choose Record matching rule: rule created above
   2.6. Click Stage for import
   (wait until the job is finished...)
   --> It should say that 1 record was found using the rule

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-06 11:18:12 +02:00
Janusz Kaczmarek
915d585b50
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21
For MARC 21, canceled/invalid ISBNs (subfield 020 $z) are not being
indexed in Elasticsearch (search fields identifier-standard and isbn),
but it is for UNIMARC (subfield 010 $z).  As a result, a user searching
for such an ISBN (e.g. with wrong checksum--and therefor put in 020 $z)
will not find the record in the catalogue.

A new isbn-all Elasticsearch search field 'isbn-all' has been created with
020az (MARC 21, and 010az for UNIMARC), 010z has been removed from isbn
search field for UNIMARC, and 020z has been added to identifier-standard
search field.

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a cancelled ISBN
   e.g. 9780007269854.  You will get no results.
2. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
3. Repeat the test. You should get "The ice princess / Camilla Läckberg".

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-03 16:02:56 +02:00
f9effbfdb4
Bug 36673: Filter used categories and item types to current branch
To test:
1 - Define some circulation rules for default and specific branches
2 - Apply patch
3 - Confirm rules display as before

PA amended:
- bug->Bug in commit title
- squashed tidy

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-03 16:02:44 +02:00
d4bea3f9c8
Bug 36614: Restore 'phone' on the main patron search
It disappeared at some point (history is tricky here, I didn't manage to
track down what happened, it's a mess)

This patch adds a phone column after the "name and address" one. It's
hidden by default.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-02 13:19:12 +02:00
Katrin Fischer
ff306da736
Bug 32610: Add date option to extended patron attributes administration page
With this page it will be possible to configure patron attributes
to be a date.

To test:
* Go to administration > patron attribute types
* Add a new patron attribute of type date
  * Dates cannot be repeatable or linked to an AV category, so:
  * Verify, if you check repeatable, date is disabled
  * Verify, if you select an AV category, date disabled
  * Verify, if you check date, AV category and repeatable are disabled
* Save the new patron attribute
* Edit the patron attribute
  * Verify all settings have been kept/stored correctly

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-30 17:09:48 +02:00
e7b0bf583b
Bug 35138: Adjust existing data
We want the label from the DB displayed on the UI so we are adjusting
the yaml and the DB.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-30 12:00:57 +02:00
ef5307d254
Bug 35138: Add the ability to manage ES facets
This new feature allows to manage facets for Elasticsearch from the
administration page.
Prior to this the facet fields were hardcoded in the codebase.

Librarians can then add/remove facet fields and modify their label.

Test plan:
1. Create a new search field and set it a label different than its name.
2. Save
3. Go the bibliographic mapping tab
4. Add 1+ mapping for this search field (Searchable and facetable must be "Yes")
5. Add, reorder, remove new facets
6. Save and reindex your records
7. Search and notice the new facet list

QA: There are several wrong things in this area (ES + facets code,
everything, pm, pl, tt AND on this administration page). I have done my
best to clean the code as much as I could and keep the code cleaner
after than before. But there are still a lot to do.
There are still inconsistencies on this page (like we need to save to
see the changes applied to the other tables), but this is clearly out of
the scope of this bug report.
Another enhancement would be to move the facet list to a different DB
table, that could bring more flexibility:
  * display or not (could be opac/staff/both/none)
  * define the size per field (number of facet to display)
  * order: move search_field.facet_order to this new table.
But, again, it's a lot more work.

More work is done in this area, please see related bug reports.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-30 12:00:56 +02:00
Mark Hofstetter
4bed77da08
Bug 31652: Add geo-search
This patch adds geosearch to Koha (using Elasticsearch 7). ElasticSearch
search_mappings get new types to store lat/lon, which can be indexed
from MARC 034$s and 034$t. There is a small change to the DB to allow a
new value in search_field.type ENUM.

The QueryBuilder is extended to allow for building advanced
ElasticSearch Querys (eg geo_distance) that cannot be represented in a
simple string query. The UI for searching (including showing the results
on a OSM/Leaflet map) is implemented in a separate plugin
(https://github.com/HKS3/HKS3GeoSearch)

Test Plan:

* make sure you're running ElasticSearch 7
  (eg via `curl http://es:9200?pretty | grep number`)
* apply patch
* got to a Framework, check Editor for 034$s and 034$t and save
* got to some books (in the correct framework) and enter some lat and lon into 034$s and 034$t (for example lat=48.216, lon=16.395)
* Run the elasticsearch indexer, maybe limited on the books you edited (-bn 123 -bn 456):
  misc/search_tools/rebuild_elasticsearch.pl -b -v
* You can check if the indexing worked by inspecting the document in elasticsearch:
  * get the biblionumber (eg 123)
  * curl http://es:9200/koha_kohadev_biblios/_doc/123?pretty | grep -A5 geolocation
  * You should get back a JSON fragment containing the lat/lon you stored
* You can query elasticsearch directly:
  * Run the following curl command, but adapt the value for lat/lng and/or the distance (in meters)
  * curl -X GET "http://es:9200/koha_kohadev_biblios/_search?pretty" -H 'Content-Type: application/json' -d '{"query": {"bool":{"must":{"match_all":{}},"filter":{"geo_distance":{"distance":100000,"geolocation":{"lat":48.2,"lon":16.4}}}}}}'
* To run the search via Koha, you need to either install and use https://github.com/HKS3/HKS3GeoSearch or create a handcrafted query string:
  * handcrafted query string:
    * /cgi-bin/koha/opac-search.pl?advsearch=1&idx=geolocation&q=lat:48.25+lng:18.35+distance:100km&do=Search
  * HKS3GeoSearch
    * install the plugin and enable it
    * got to OPAC / Advanced Search
    * There is a new input box "Geographic Search" where you can enter lat/long/radius
    * On the search result page a map is shown with pins for each found biblioitem

Sponsored-by: ZAMG - Zentralanstalt für Meterologie und Geodynamik, Austria - https://www.zamg.ac.at/
Sponsored-by: Geosphere - https://www.geosphere.at/
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Additional finetuning:

- Fix update and remove fixed fixme
- Update test count as well
- fix last small issues raised in Comment 23

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-29 15:19:34 +02:00
149a6da9ec
Bug 35919: Add record sources admin page
This patch introduces a Vue.js based record sources managing page. To
test it:

1. Apply this patch
2. Build the Vue.js stuff:
   $ ktd --shell
  k$ yarn js:build
  k$ restart_all
3. On the staff interface, go to Administration > Record sources
4. Play with the interface and the offered actions
=> SUCCESS: Things go well
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 17:06:04 +02:00
5e71338ae5
Bug 16122: Add display and Table settings
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 14:15:00 +02:00
3becfe41d2
Bug 36206: (QA follow-up) Tidy admin-home.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 14:14:56 +02:00
f751ec9fd7
Bug 36206: Add 'admin' plugins option
This patch adds an admin plugins class to the plugins system and
displays such plugins under the 'Plugins' section in the Administration
page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 14:14:54 +02:00
b190c5b058
Bug 35581: Illbatchstatus* -> ILL::Batch::Status*
Koha/IllbatchStatus.pm -> Koha/ILL/Batch/Status.pm
Koha/IllbatchStatuses.pm -> Koha/ILL/Batch/Statuses.pm
Koha/REST/V1/IllbatchStatuses.pm -> Koha/REST/V1/ILL/Batch/Statuses.pm

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-22 08:57:42 +02:00
0c6a2bd1ad
Bug 35724: Define non-standard ports for EDI SFTP in EDI accounts
Not all EDI vendors accept Koha servers connecting on port 22, sometimes
they require a different port to be used, so it would be helpful for
librarians to be able to configure non-standard EDI SFTP ports
themselves.

Test plan:
1. Set EDIFACT syspref = 'Enable' and define a EDI account: Administration > Acquisition parameters > EDI
accounts.
2. Create an EDI order: https://koha-community.org/manual/latest/en/html/acquisitions.html#ordering-via-edi
3. Confirm you can upload the EDI order and download the vendor invoice.
4. Apply patches, update database, and restart services.
5. Go to the EDI account you made in #1.
6. Confirm there are two new fields: Upload port and Download port, both
have the value of 22.
7. Create a new EDI order.
8. Confirm you can upload the EDI order and download the vendor invoice.
9. Change the EDI account. Set the Download port = 10022.
10. Create a third EDI order.
11. Confirm you can upload the EDI order and download the vendor
invoice.

Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:31:36 +02:00
a81c98e1ea
Bug 36597: Fix deletion of circulation desks broken by CSRF
Our CSRF work introduced a problem with deleting circulation desks: The
"delete_confirm" does not need "cud-" because it's a GET operation
leading to a POSTed deletion after the confirmation is submitted.

To test, apply the patch and restart services.

- Go to Administration -> Circulation desks.
- If necessary, create a circulation desk.
- Click the "Delete" button for you new desk.
- You should be taken to a confirmation page which shows details of the
  desk you're deleting.
- Confirming the deletion should result in deletion of the desk.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-18 16:51:11 +02:00
a130290ccb
Bug 20388: (QA follow-up) Tidy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-16 17:59:47 +02:00
Alex Arnaud
0607e6adfa
Bug 20388: Elasticsearch - Ability to add search fields from UI
Test plan:

  - apply this patch,
  - check that SearchEngine system preference is set to Elasticsearch,
  - go to Admin > Search engine configuration,
  - on the search fields tab, fill a new line at the bottom of the table
    (name, label, type)
  - click on the "Add" button and save,
  - check that the new search field has been saved,
  - also test field deletions,
  - check that you can't delete already mapped fields.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: David Schmidt <davewood@gmx.at>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-16 17:59:45 +02:00
e2a48eff6d
Bug 6796: Take CalenderFirstDayOfWeek and TimeFormat into account
This patch adds accounting for the `CalendarFirstDayOfWeek` and
`TimeFormat` preferences in the libraries management pages.

We respect CalendarFirstDayOfWeek for both input and display, but we
only respect TimeFormat for input at this time. We need a new template
helper and js helper for formatting just time in the appropriate format,
currently we only have such formatters for full datetimes.

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:08 +02:00
Aleisha Amohia
3db1a76a62
Bug 6796: (follow-up) Displaying library hours
This patch shows the set library hours on a library's view page.
Still to be done:
- show on the Libraries summary page
- write tests
- consider time format settings
- fix translateability of day names in Libraries summary page

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Sponsored-by: PTFS Europe
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:06 +02:00
Aleisha Amohia
41edb937df
Bug 6796: (follow-up) QA test tool fixes
Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:06 +02:00
Aleisha Amohia
d80ef8df78
Bug 6796: Fix saving of libraries and tests
Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:05 +02:00
Aleisha Amohia
7dac9eb7b5
Bug 6796: Add library_hours table and set opening hours for library
Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 11:26:03 +02:00
Andreas Jonsson
38875e920d
Bug 36439: Remove duplicate section in columns_settings
The patch for bug 33575 was carelessely applied so
   the holds section was overwritten by a duplicated
   section which cause the table configuration for
   the holds-to-pull table to be missing.

   Test plan:

   * Place a hold on a record that has items (so there is at least one hold to pull)
   * Go to the page "holds to pull" and verify that the column settings are present
     to the left above the table (<cog wheel icon> Columns).

     NOTE: the column settings are cached, so you need to reset memcached
     between tests if you want to test with and without the patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:20 +02:00
4158783eb2
Bug 36395: Remove useless fetch in admin/marc_subfields_structure.pl
Since (a long time ago!)
  commit 62aa3f4292
  Bug 17216: Use Koha::AVC from mss.pl

This $sth2 is never fetched, we are retrieving the AV cat using
Koha::AV::Categories

Sponsored-by: The Research University in the Helmholtz Association (KIT)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 11:51:16 +02:00
Thomas Klausner
df9bc0b86a
Bug 36269: Elasticsearch: publisher-location (pl) should use260a/264a
Currently the index `pl` points to 008/15-17. It should
(additionally/instead?) point to 260a and/or 264a.

Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`)

Verify the old/broken behaviour:

* Go to Staff/Advanced Search
* Select "Publisher Location" and enter "cau", start search
* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17
* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5)
* Inspect 260$a, which should containt "Sebastopol, CA :"
* Go back to Advanced Search and search for  "Publisher Location" = "Sebastopol"
* No hits!

Apply the patch!

* exit ktd and stop it (ktd --es7 down; ktd --es7 stop)
* start it again
* Go to Staff / Administration / Search Engine Config (Elasticsearch)
* Click on the Tab "Bibliographic records" and search/filter for "pl"
* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a"
* Go to Search,
* Select "Publisher Location" and enter "cau", start search
* same hits as befor
* Search again, but for "Sebastopol"
* Now you'll get 9 hits!!

Bonus: Test 264a

* Got to Admin / MARC bibl framework, select BKS -> MARC structure
* search for tag "264", edit subfields
* in tabs a, b, c: Check the "Editor" Checkbox (Visibility)
* Save changes
* find a book, eg again "Perl best practices" and edit it
* find field 264 and enter "Test" into  264a, Save
* Depending on your setup, you might have to manually re-index the book:
  * enter ktd: ktd --shell
  * reindex the one book (via --bn) or all (might also need a -d)
    /usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d
* Go again to Advanced Search, Publisher Location = "Test"
* You should find the book

If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a".

One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL:
update search_marc_map set marc_field='260a' where marc_field='008_/15-17';

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-04 15:24:35 +02:00
4e04ff28b6
Bug 36447: Circ rules slow to load when many itemtypes and categories
It seems that we loop all categories and item types to build the circ
matrix. We should only loop over values that have actually been used
in circulation rules.

Test Plan:
1) Create 1000 itemtypes and category codes. You can use the following
   script:

   use t::lib::TestBuilder;
   my $builder = t::lib::TestBuilder->new();
   $builder->build( { source => 'Category' } ) for 0..1000;
   $builder->build( { source => 'Itemtype' } ) for 0..1000;

2) Note the lengthy load time for smart-rules.pl
3) Apply this patch
4) Restart all the things!
5) Reload the page
6) Note the much faster load time!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-02 17:59:11 +02:00
ce4e4ba516
Bug 35564: Add homebranch to the holds queue report
To test:
1 - Place some holds in your system
2 - perl misc/cronjobs/holds/build_holdsqueue.pl
3 - View the holds queue
4 - Note there is no holding branch column
5 - APPLY PATCH
6 - Reload and try again
7 - Note the column is not there
8 - Click column setting gear to expose the column
9 - Go to Admin -> Table settings and make sure you can expose the column via Table settings

Signed-off-by: Michelle <mspinney@clamsnet.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:47:33 +01:00
faee84f3d4
Bug 35316: Fix column settings for holds history
Test plan:
Verify that you are able to toggle the column on the holdshistory
form.
Verify that you are able to hide the column via Table settings
by default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:07:37 +01:00
e701926442
Bug 36190: Fix problems found by test
opac-shelves           - forms were stateless - changed to GET
sco-main               - forms stateless - changed to GET
                         ** untested because sco + auth is broken
smart-rules.tt         - JS form template - added placeholder 'cud-' op
ill-requests           - added cud- tp ops
                         ** tested comments, but not checkout, simple changes
boraccount             - removed repeated op - updated script
patroncards/edit-batch - add placeholder 'cud-' op
patroncards/manage     - add placheholder 'cud-' op
elasticsearch/mappings - separate forms - this could use a style follow-up, but makes more sense separate I think
reports/dictionary      - stateless - changed to GET
guided_reports_start    - stateless - changed to GET
suggestion/suggestion   - add placeholder 'cud-' op
inventory               - filed bug 36305, needs more handling

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:54 +01:00
53fa38f539
Bug 36193: cud- treatment for restrictions.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:31 +01:00
58bcd036b1
Bug 36193: cud- treatment for reset_confirmed on mappings.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:30 +01:00
7961ac04d1
Bug 36193: cud- treatment for debit_types.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:30 +01:00
9e352b83d9
Bug 36193: cud- treatment for credit_types.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:29 +01:00
1415fee322
Bug 36193: cud- treatment for cash_registers.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:29 +01:00
c706fc9e41
Bug 34478: Replace delete links with form - smart-rules
We can certainly do better here (too many duplicated code in on click
functions), but it's good enouh for now...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:15 +01:00
647d59b449
Bug 34478: import_export_authtype - cud-import, export
Changing action to op.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:01 +01:00
aa5ec5029d
Bug 34478: Manual fix - admin/patron-attr-types
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:54 +01:00
1d23984ce3
Bug 34478: Manual fix - admin/matching-rules
Bug 34478: [TO SQUASH] Manual fix - admin/matching-rules

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:53 +01:00
5bb56bd57a
Bug 34478: Correct value of "op" when loading the edit form.
The op doesn't need "cud-" because it's a GET operation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:36 +01:00
cb1f73b1bc
Bug 34478: Corrections to add and delete of OAI sets
This patch makes two changes: The first changes the name of the op value
matched in the script when editing a set. The "mod" step is a GET
operation to load the edit form.

The second change is a workaround for the fact that a submit
button looks bad in a Bootstrap dropdown. The patch creates a hidden
form for deletion operations. Clicking a "delete" link in a dropdown
fills the hidden form with the OAI set id to be deleted and submits it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:34 +01:00
ecbb2f9a52
Bug 34478: Item type deletion - correct delete_confirm and delete_confirmed
"delete_confirm" is a GET operation leading to a confirmation page,
where "cud-delete_confirmed" should submit a POST to delete.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:33 +01:00
0af9d12027
Bug 34478: Fix op variable in item circulation alerts
The AJAX call in the template still used "action" instead of
"op".

The patch also fixes references to "action" in the POD and corrects
"toggle" to "cud-toggle".

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:31 +01:00
b920d12090
Bug 34478: Fix op check in table settings admin
The "action" hidden field was renamed to "op", but "action" was still
being looked for in the script.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:27 +01:00
bf22d52098
Bug 34478: Classification config - Convert delete links to form POSTS
This patch converts the delete links on the classification
configuration page for sources, filing rules, and splitting rules to
POST forms.

A couple of op checks in the script are corrected to match.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:24 +01:00
2cfd7c4bfe
Bug 34478: Cities - Incorrect op check for cud-delete_confirm
On the cities administration page, the delete button is a GET operation
to a second form for confirmation.

This script should be checking for op=delete_confirm, not
cud-delete_confirm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:23 +01:00
09bfb81c5e
Bug 34478: Authority frameworks - first subfield delete button has incorrect op value
From the list of a tag's subfields (e.g.
/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=245&frameworkcode=)
the delete button is a GET operation to a second form for confirmation.

This script should be checking for op=delete_confirm, not cud-delete-confirm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:21 +01:00
906059fd03
Bug 34478: Frameworks - first subfield delete button has incorrect op value
From the list of a tag's subfields (e.g.
/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=245&frameworkcode=)
the delete button is a GET operation to a second form for confirmation.

This script should be checking for op=delete_confirm, not
cud-delete-confirm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:20 +01:00
768b24af78
Bug 34478: Manual fix - Remove cud-search from z3950-admin-search.inc
Convert POST to GET for z3950 server search

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:10 +01:00
b624cc9928
Bug 34478: Manual fix - audio alerts
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:02 +01:00