Commit graph

53077 commits

Author SHA1 Message Date
57ee369e90
Bug 30897: Limit to plack environments
I had a feeling we'd want to do this when I submitted the proof of
concept, though I hadn't appreciated the wider issues that have now been
highlighted.. it makes a lot of sense to limit to the plack scope.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:42 +02:00
0a0487d884
Bug 30897: Gracefully restart plack after plugin install/remove
This patch adds a graceful plack restart to the plugin
install/uninstall routine to fully allow plugin install to work via the
staff client.

Test plan
1. list your worker processes with something like htop
2. install a plugin
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases
3. note that the PIDs of the workers stay the same and no sign of
   restart (no PID changes and no CPU activity that the workers would
   have if they were starting)
4. apply patches and restart services
5. unistall plugin
6. notice worker restart
7. install plugin
8. notice worker restart
9. downgrade plugin
10. notice worker restart
11. upgrade plugin
12. notice worker restart
13. disable and enable plugin
14. *no restart*

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-11 16:53:41 +02:00
747f513231
Bug 36511: Some scripts missing a dependency following Bug 24879
These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-10 09:09:50 +02:00
14b69a254e
Bug 33568: (follow-up) Fix duplicated key in item spec
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-04-09 09:55:28 +02:00
Phil Ringnalda
c52af2cef0
Bug 36531: Serve text/javascript compressed, like application/javascript is
Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.

Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
   the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
   patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
   Transferred size around 160KB

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:12 +02:00
69ad327379
Bug 36463: (follow-up) Adjust other occurence (intranet)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:11 +02:00
bccf7764c0
Bug 36463: Compress application/json
This patch simply adds application/json to the mod_deflate configuration

To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:11 +02:00
Phil Ringnalda
d7702d6fad
Bug 36379: Fix auth_finder.pl to not expect the op cud-do_search
The authority finder just does a GET for a list of search results, it
doesn't create or update or delete, so the template that thinks the op
is do_search is correct.

Test plan:
1. Cataloging - New record
2. In the 1 tab click the Tag editor icon at the end of 100 subfield a
3. In the popup, click Search, and nothing happens, no results are shown.
4. Apply patch, reset_all
5. Repeat steps 1-3, see that you get results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-08 15:41:10 +02:00
a64383de16
Bug 32707: (follow-up) Fix link in system preference description
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:50 +02:00
c57e25a408
Bug 32707: DBRev 23.12.00.017
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:50 +02:00
Janusz Kaczmarek
3af36faf3e
Bug 32707: Unit tests
NB in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t,
I had to modify four existing test by changing Local-number:123456 to
Personal-name:donald -- since Local-number should never be
auto truncated according to the submitted patch.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:49 +02:00
Janusz Kaczmarek
4a0713c80b
Bug 32707: ElasticSearch should not auto truncate (even if QueryAutoTruncate = 1) for identifiers (and some other fields)
Koha with Zebra prevented auto truncation in some circumstances -- see
the first return for ccl inside C4::Search:: buildQuery, before applying
auto truncation, and setting $auto_truncation = 0 for some search
fields.

Koha with ElasticSearch applies auto truncation for all search fields,
not paying attention to these special cases when it should not be done.
This leads to various problems as described in bug 26508, 26608, etc.

The solution would be to prevent auto truncation for certain search
fields, above all – the identifiers.  In addition, under no
circumstances should a search field other than of text type be truncated
(an attempt to truncate would generate an exception from ElasticSearch,
e.g. number_format_exception for integer).

Test plan
=========

0. Use the test data sample provided in the bug report. Comment 16 in
   the ticket.

Scenario A (authority)
----------------------
1. Enable Elasticsearch engine.
2. Have like 100+ bibliographic records and properly linked authority
   records.
3. Reindex ElasticSearch if needed.
4. Enable QueryAutoTruncate systempreference.
5. Find the authority record #1 and note the number of linked biblio
   records.
6. Show the detail of authority #1 and compare the number of linked
   biblio records.
7. If in the database there are authority records with ids =~ /^1/ (i.e.
   10, 11, 12, ..., 100, 101, ...) linked to the biblio records you get
   two different numbers of linked records.
8. Also, as lists of linked biblio records (via link: Used in N
   record(s) from results view and detail view) you will get two
   different sets of biblio records.  In particular, on the list generated
   from detail view (authorities/detail.pl?authid=1) you will get biblio
   records that are in fact not linked to the auth #1 (the list is
   generated with &q=an:1).
8.99. Skip to scenario B and come back here after finishing to not have
to unapply the patches and restart services for nothing.
9. Apply this patch.
10. Counts and list of linked biblios should be ok.

Scenario B (analytics)
----------------------
1. Enable Elasticsearch engine.
2. Have three monographic bibliographic records with 001 = 1, 10, 100
   (i.e. =~ /^1/).
3. Have an analytical record with 773 $w = 1 (in the test data set - biblio 896).
4. Enable QueryAutoTruncate and UseControlNumber systempreference.
6. Find the analytical record and click on the link generated from 773,
   i.e. (In: ... --> catalogue/search.pl?q=Control-number:1).  You should see
   a list of 100+ records (001 = 1, 10, 100) instead of one (001 = 1).
7. From the biblio # 1 try to go to the analytice records (with Show analytics
   link) - you should get 60+ records with from different host records (773 $t)
   -- instead of one.
8. Apply this patch. Make sure that control-number and record-control-number
   are included in ESPreventAutoTruncate syspref.
9. Repeat steps 6 and 7.  You should arrive at the right host record in p. 6
   and at one analytical records when looking for analytical records in p. 7
   (or more than one, but right, if you modified the test data set).

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:49 +02:00
Janusz Kaczmarek
10b43ddd64
Bug 32707: Add 'ESPreventAutoTruncate' preference
This patch adds a new 'ESPreventAutoTruncate' preference allowing to define
Elasticsearch search fields that should not be autotruncated when 'QueryAutoTruncate'
is active (e.g. barcode).

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:48 +02:00
37a992365c
Bug 35392: Use the same selector as everywhere else for .message
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:48 +02:00
57802a3869
Bug 35392: Update tests
Run:
yarn cypress run --spec "t/cypress/integration/ERM/DataProviders_spec.ts"

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:47 +02:00
fcacfaaafa
Bug 35392: Fix HTML in translatable string
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:47 +02:00
8acdc1e8e9
Bug 36307: SMS::Send driver errors are not captured and stored
If an SMS::Send driver succeeds, it returns a value that evaluates to true. Every driver I've inspected uses croak when it encounters a failure state.

When an SMS message fails to send, code hard codes the failure code to NO_NOTES (No notes from SMS driver).

We should store the real error in `failure_code` and display that if the failure code doesn't match a known failure code.

Test Plan:
1) Apply this patch
2) Set SMSSendDriver to any value
3) Generate a pending sms message
4) Run the following query:
   update message_queue set status = 'failed', failure_code = "This is a test";
5) View the patron's messages, note the delivery note contains the
   contents of the failure code
6) Run the following query:
   update message_queue set status = 'failed', failure_code = "SMS_SEND_DRIVER_MISSING";
7) Reload the patron's messages, not the delivery note is now "The SMS
   driver could not be loaded".

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-04-05 17:39:46 +02:00
ae975f9eca
Bug 36082: Set branchcode correctly in opac-facets.inc
1. Tools> HTML Customization
2. Choose OPACresultssidebar
3. Create an entry specific to a library.
4. Also try to add this same entry into a translation tab, if installed.
5. Go to the OPAC
6. Login as a patron of that library that the specific OPACresultsidebar is assigned to
7. Search the catalog, and look below the facets,where the OPACresultssidebar would appear.
8. No text.
9. APPLY PATCH
10. Try step 7 again.
11. TEXT!

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-04-05 17:39:46 +02:00
6005a9a430
Bug 33568: Prevent api/v1/biblios.t to fail randomly
koha_1       |     #   Failed test 'The items are returned'
koha_1       |     #   at t/db_dependent/api/v1/biblios.t line 196.
koha_1       |     #     Structures begin differing at:
koha_1       |     #          $got->[0]{external_id} = 'th151O2JtgfGdVW6aiF'
koha_1       |     #     $expected->[0]{external_id} = 'uxrMzUXrkHQy7MHOSfjK'
koha_1       |     # Looks like you failed 1 test of 11.
koha_1       |
koha_1       | #   Failed test 'get_items() tests'
koha_1       | #   at t/db_dependent/api/v1/biblios.t line 206.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:45 +02:00
0f49a171fa
Bug 33568: (follow-up) Add search on home and holding library's names
Silly typo!
Caught by a test

koha_1       |     #   Failed test 'Home branch code matches holdingbranch'
koha_1       |     #   at t/db_dependent/Items.t line 581.
koha_1       |     #          got: 'QHImNSEoNi'
koha_1       |     #     expected: 'VY5y6p'
koha_1       |     # Looks like you failed 1 test of 7.
koha_1       |
koha_1       | #   Failed test 'Koha::Item(s) tests'
koha_1       | #   at t/db_dependent/Items.t line 588.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:45 +02:00
b581996160
Bug 33568: Fix translatability issues
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 17:39:44 +02:00
d616967631
Bug 33568: Fix false positive 'missing_filter'
It was ok but the QA script complains and xt/find-missing-filters.t as
well.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:14 +02:00
fc468c43bb
Bug 33568: Add hint on the table settings admin page
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:14 +02:00
eeb48dbc52
Bug 33568: POD fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:13 +02:00
c48e632bf4
Bug 33568: serialitem => serial_item
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:13 +02:00
db74a8112a
Bug 33568: Remove LPAD ordering
This is coming from bug 3521 it seems. And we are going to deal with
this later if people complains.

kidclamp> the performance issue for sites with many copies is bigger than sorting issues imho
kidclamp> drop the LPAD I say :-)

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:12 +02:00
a767e15c74
Bug 33568: Fix columns shift when pref are off
From comment 66:
If StaffDetailItemSelection and/or LocalCoverImages is turned off, the alignment of the drop-down filters for the other columns is offset by 1 for each of the two sysprefs that is disabled

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:12 +02:00
13947b9554
Bug 33568: (follow-up) Fix ordering - WIP
This is not working. We are still getting the error
Unable to programatically derive a required group_by from the supplied order_by criteria. To proceed either add an explicit group_by, or simplify your order_by to only include plain columns     (supplied order_by: 'lpad_copynumber').

To recreate the problem you can go to detail.pl and search for something
Without search the query is working.

The problem appears when the query has WHERE parameters added and "GROUP
BY" is added.
DBIC is adding to the GROUP BY what is added to the select, but does not
handle this situation (not a plain column).

You can play with:
1.
Remove from Koha::Items->search_ordered
475                     'lpad_copynumber',
=> all good

2. Remove the following block from /usr/share/perl5/DBIx/Class/Storage/DBIHacks.pm
 584     # only consider real columns (for functions the user got to do an explicit group_by)
 585     my $chunk_ci;
 586     if (
 587       @{$order_by[$o_idx]} != 1
 588         or
 589       # only declare an unknown *plain* identifier as "leftover" if we are called with
 590       # aliastypes to examine. If there are none - we are still in _resolve_attrs, and
 591       # can just assume the user knows what they want
 592       ( ! ( $chunk_ci = $colinfos->{$order_by[$o_idx][0]} ) and $attrs->{_aliastypes} )
 593     ) {
 594       push @$leftovers, $order_by[$o_idx][0];
 595     }
=> all good

I don't know if we are doing something wrong here, but I have no idea
how we can build the group_by explicitely.

Is there another way to do this?

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:11 +02:00
59a7a68fea
Bug 33568: Fix patron_to_html display
Take HidePatronName into account
Display cardnumber
Remove parenthesis around cardnumber if the name is hidden

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:11 +02:00
ce216aaa82
Bug 33568: Restore column filters when StaffDetailItemSelection is off
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:10 +02:00
67c472eeac
Bug 33568: Restore link to patron
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:09 +02:00
32331a1f5a
Bug 33568: Fix popup behaviour for SpineLabelShowPrintOnBibDetails
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:09 +02:00
57997263b2
Bug 33568: Hide 'Host records' if EasyAnalyticalRecords is off
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:08 +02:00
712a481c6d
Bug 33568: Do not display 'null' when no barcode
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:08 +02:00
e7088fd06c
Bug 33568: Fix ordering
Use search_ordered for default ordering

It also fixes a crash when StaffDetailItemSelection is turned off.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:07 +02:00
Julian Maurice
729d37d442
Bug 33568: JSON-encode html output of build_table
This prevents error with quotes coming from translations

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:07 +02:00
afc55cb68c
Bug 33568: Hide holdings tabs if empty (SeparateHoldings)
See comment 34.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:06 +02:00
42c653518c
Bug 33568: Add some missing StaffDetailItemSelection conditionals
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:06 +02:00
a5ace06893
Bug 33568: Follow-up for 29523
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:05 +02:00
61f9416133
Bug 33568: Do not embed item types
Performance for 1000 items from 22 to 19s

It replaces the input in the column header filter with a dropdown list.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:05 +02:00
5ced551cb7
Bug 33568: Do not embed library names
Performance for 1000 items from 30s to 22s

It replaces the input in the column header filter with a dropdown list.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:04 +02:00
b151bcf0e7
Bug 33568: (bug 34226 follow-up) Add type=date to date columns
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:04 +02:00
c46e1da54f
Bug 33568: Fix 'actions' links when filters are shown/hidden
It also fixes a problem when "Select all" was clicked, the checkbox
selection was not kept when the table was refreshed (was comparing
string and integer, parseInt needed)

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:03 +02:00
0604580c6d
Bug 33568: Fix local cover images
We need to reprocess the images when the table is refreshed, to do that
we teach verify_cover_images to go through a given container instead of
the whole document, and pass a call back function to build_items_table
that will be called when DataTables will have redrawn the table
(drawCallback).

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:03 +02:00
a8cc831735
Bug 33568: (follow-up) Restore filters
This is a bit ugly but fixes the problem raised in the previous commit,
as well as others

for instance comment 18
"* Click 'show filters', 'hide filters' and repeat X 2 - status column disappears?"

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:02 +02:00
f1054fd9a7
Bug 33568: Prevent 500 when filtering by item type (FIXMEs)
See FIXMEs added by this patch

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:01 +02:00
67d480f625
Bug 33568: Add search on home and holding library's names
QUESTION - Do we prefer this or a dropdown list in the column filter
header?

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:01 +02:00
026adcbcd3
Bug 33568: Fix select/clear all links
Follow-up for "Bug 33568: Preserve item selection across pagination and filtering"

FIXME We should deal with the items selection in a better way, but I
would not consider it blocker, that can be done later.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:00 +02:00
0db40981db
Bug 33568: Fix DT dom and remove DT info if not needed
Was there a real need to deal with a specific dom? The "no filter" view
was not really light, only the column filters were shown/hidden.

This patch is suggesting to remove all the DT info in case the table is
displaying all the items of the bibliographic record: Pagination, filtering, buttons, etc.

This patch is for discussion.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:35:00 +02:00
5016cae47c
Bug 33568: Move code to a dedicated include file
Not very nice but at least the code is isolated in a separate file and
reduce the size of detail.tt

We could also move the code related to the item bundle that is included
inside this same table.

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

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-05 15:34:59 +02:00