]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30882: (QA follow-up) Fix tests
Tomas Cohen Arazi [Mon, 18 Jul 2022 17:36:28 +0000 (14:36 -0300)]
Bug 30882: (QA follow-up) Fix tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31069: Remove ExplodedTerms dependency on templates
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:33:47 +0000 (12:33 -0300)]
Bug 31069: Remove ExplodedTerms dependency on templates

This patch removes the use of templates and CGI in ExplodedTerms by using the
Koha::I18N library.

The functionality on the package is too simple, and messing with the
template paths complexity on the tests was too much, given we have a
nice way to have translatable strings at the package level.

This patch does that, and cleans up the test file as well, that required
complex template and CGI mocking to run properly.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
=> FAIL: It fails in master
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Follow the original test plan
=> SUCCESS: Things work
5. Enjoy the rest of the day and forget this ever happened

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29632: DBIC update
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:11:15 +0000 (12:11 -0300)]
Bug 29632: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29632: (QA follow-up) Add ENUM value to kohastructure.sql :-D
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:09:41 +0000 (12:09 -0300)]
Bug 29632: (QA follow-up) Add ENUM value to kohastructure.sql :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: DBIC update
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:07:42 +0000 (12:07 -0300)]
Bug 28854: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29632: DBRev 22.06.00.017
Tomas Cohen Arazi [Mon, 18 Jul 2022 15:05:40 +0000 (12:05 -0300)]
Bug 29632: DBRev 22.06.00.017

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30882: Add max_result_window to index config
Fridolin Somers [Thu, 2 Jun 2022 06:24:03 +0000 (20:24 -1000)]
Bug 30882: Add max_result_window to index config

Elasticsearch number of results is by default limited by setting "index.max-result-window", default value is 10000.
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window

We use this setting:
https://git.koha-community.org/Koha-community/Koha/src/commit/44d6528b566e5c16eba9b15f8aa24667293766c3/Koha/SearchEngine/Elasticsearch/Search.pm#L411

I propose we add this setting in index config.

Test plan:
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes: misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check the settings of index (when using koha-testing-docker*):
   curl 'es:9200/koha_kohadev_biblios/_settings?pretty&filter_path=**.max_result_window'
5) You should see:
   "max_result_window" : "1000000"

* You also need to add this setting to the es section in koha-testing-docker's
docker-compose.yml (after the networks configuration):
     ports:
         - "9200:9300"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29632: Unit tests
Nick Clemens [Mon, 11 Jul 2022 15:56:05 +0000 (15:56 +0000)]
Bug 29632: Unit tests

This patch adds unit tests, as well as changing existing test to use a mock
and read the data as passed in tests, rather than relying on what exists in
the DB

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29632: Don't sort cn-sort numerically
Nick Clemens [Tue, 28 Jun 2022 13:47:45 +0000 (13:47 +0000)]
Bug 29632: Don't sort cn-sort numerically

When defining our sort fields in we defined all as 'numeric'

For other string containing numbers this is likely correct, however,
for callnumbers it is not. e.g. E45 should sort before E7

This patch adds a new 'callnumber' type and deifnes this for cn-sort and
adds to the field maping a sort without numeric set

To test:
0 - Be using ES with Koha
1 - On records with single item, add callnumbers:
    VA65 E7 R63 1984
    VA65 E7 T35 1990
    VA65 E45 R67 1985
2 - Add public note 'shrimp' or something to make them easily searchable as a group
3 - Search for 'shrimp', sort by callnumber
4 - Note E45 comes last, it should come first
5 - Apply patch
6 - Reset ES mappings
7 - Reindex ES
8 - Repeat search
9 - Sorting should be correct when set to callnumber

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31153: Correct include for patron-search-header
Lucas Gass [Thu, 14 Jul 2022 15:10:55 +0000 (15:10 +0000)]
Bug 31153: Correct include for patron-search-header

To test:
1) Turn on recalls
   1.1) In Administration > Global system preferences, enable UseRecalls
   1.2) Add recalls permissions in your circulation rules
2) In the OPAC, log in as a patron
3) Find a record with checked out items and place a recall
4) In the staff interface, go to the patron's account
5) Click on any tab on the left in the patron's account (e.g. Holds history)
--> Note that the Koha logo and search bar is at the top of the page between the module menu and the breadcrumbs
6) Click on the 'Recalls history' tab
--> Note that the Koha logo and search bar disappear
7) Apply patch
8) Conform search bar is there

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14680: Always subtract discount from price to calculate estimated cost
Nick Clemens [Tue, 12 Jul 2022 18:10:54 +0000 (18:10 +0000)]
Bug 14680: Always subtract discount from price to calculate estimated cost

This patch simply removes a discrepancty where when a discount is provided on the order form
we add the discount to the price, and when it comes form the vendor we subtract the discount.

Discounts should always descrease the estimated cost

To test:
 0 - Have a vendor with a discount of 10% specified
 1 - Export a record from your Koha
 2 - Stage the record for import and match on biblionumber
 3 - Add to a basket in acq from the staged file
 4 - Select the title, and set order price to $10 and do not fill the discount field
 5 - Add the order - note $10 RRP and $9 actual/budgeted cost
 6 - Repeat 2&3
 7 - Select the tile, set price $10 and discount 50%
 8 - Add the order - note $20 RRP and $10 actual/budgeted cost! FAIL
 9 - Apply patch, restart all
10 - Repeat 2-7
11 - Add the order, note $10 RRP and $5 actual.budgeted cost

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31083: Fix part_name handling in js-biblio-format
Martin Renvoize [Mon, 4 Jul 2022 10:49:00 +0000 (11:49 +0100)]
Bug 31083: Fix part_name handling in js-biblio-format

This patch corrects the typo introduced in bug 28854 for part_name
handling in the js-biblio-format include.  We also introduce proper
whitespace addition when concatenating subtitle, medium and parts to the
title string.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30578: Fix multi-terms search
Jonathan Druart [Mon, 13 Jun 2022 18:58:44 +0000 (20:58 +0200)]
Bug 30578: Fix multi-terms search

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30578: Remove ajaxSetup from checkouts.js
Jonathan Druart [Mon, 13 Jun 2022 18:46:28 +0000 (20:46 +0200)]
Bug 30578: Remove ajaxSetup from checkouts.js

It was a IE fix apparently
  commit f021b52e71deaac0b46992fa33ef02f2b001e56d
  Bug 11703 [QA Followup] - Stop IE from caching ajax request

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30578: Fix on-select for 2 occurrences
Jonathan Druart [Mon, 13 Jun 2022 18:46:17 +0000 (20:46 +0200)]
Bug 30578: Fix on-select for 2 occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30578: Restore highlighting of patrons from the logged-in library
Jonathan Druart [Mon, 13 Jun 2022 18:37:44 +0000 (20:37 +0200)]
Bug 30578: Restore highlighting of patrons from the logged-in library

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30578: Remove circ/ysearch.pl in favor of the /patrons REST API route
Jonathan Druart [Thu, 9 Jun 2022 09:03:27 +0000 (11:03 +0200)]
Bug 30578: Remove circ/ysearch.pl in favor of the /patrons REST API route

This patch removes the circ/ysearch.pl script used by the jQuery autocomplete widget.
We can now use the /api/v1/patrons endpoint to retrieve the patrons and
generate the patron result list.

Prior to this patch the different occurrences were defining the style
and the list of patron's attributes to display for each option (name,
date of birth, age, address, etc.). Now they are all displaying the same
information.

To acchieve this we had to:
* Make js-date-format.inc and js-patron-get-age.inc available from js_includes.inc
and so available from everywhere, which is certainly a good move. We
could discuss why this code is in include file instead of JS files
however.
* Remove the .ajaxSetup call in tags-review.js to reduce its scope: an
underscore parameter was added to the REST API query (?)

A better solution would have been to extend the existing widget
(https://learn.jquery.com/jquery-ui/widget-factory/extending-widgets/)
but I didn't manage to do it, and I feel like there is a bug in jQuery
autocomplete. The "source" was not taken into account.
We could think about replacing the jQuery autocomplete with something
else, but that's outside the scope of this bug.

Test plan:
Search for patrons and confirm the autocomplete works and that the
"select" action works as before (either a redirect or select the
patrons) on the different views:
* Place a hold
* Search for tags (form on the left)
* In the header, "Check out" and "Search patrons"
* Add instructors to course reserves
* View logs (the "librarian" input)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 11158: Add complete field to authority "starts with" search
David Cook [Tue, 5 Jan 2021 00:21:16 +0000 (00:21 +0000)]
Bug 11158: Add complete field to authority "starts with" search

This patch adds "complete field" to the authority "starts with"
search so that it uses the untokenized "p" register.

Test plan:
1. Apply the patch
2. koha-plack --restart kohadev
3. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl
4. Type in "Espen" into the search box and hit "Submit"
5. Note that there are 3 results
6. Change "contains" to "starts with" and hit "Submit"
7. Note that no results are returned
8. Change the search from "Espen" to "Sandberg" and hit "Submit"
9. Note that 3 results are returned
10. Experiment to your heart's content and rejoice at your new found power

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31036: (QA follow-up) Add a warning to the system preference
Martin Renvoize [Fri, 15 Jul 2022 14:20:03 +0000 (15:20 +0100)]
Bug 31036: (QA follow-up) Add a warning to the system preference

As suggested by Katrin, adding a warning to the system preference that
this has an effect on SIP configurations that needs to be understood.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31036: Treat SIP00 that same as CASH
Martin Renvoize [Fri, 24 Jun 2022 08:20:52 +0000 (09:20 +0100)]
Bug 31036: Treat SIP00 that same as CASH

SIP00 is the code for CASH transactions that have taken place on a SIP
client.  Cash management treats CASH type transactions as a special case
for banking and register requirements. This patch brings SIP00 in line
with the CASH handling code of cash management.

Test plan
1) Enable cash management with 'EnablePointOfSale'
2) Enable cash registers with 'UseCashRegisters'
3) Add a cash register via 'Administration > Cash registers'
4) Make some payments against the ash register in the staff client
5) Attempt to make a payment via a SIP client without having associated
   a cash register to the SIP account config
5a) This should now fail
6) Attach the cash register to the SIP account used above
6a) Payment should now work again on SIP transactions
7) Look at the cash register details page for the cash register
7a) 'Bankale' should now include cash from both SIP and Staff client
sales

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31069: fix <span> in OPAC search suggestions (Did you mean)
Victor Grousset/tuxayo [Sat, 9 Jul 2022 03:39:39 +0000 (05:39 +0200)]
Bug 31069: fix <span> in OPAC search suggestions (Did you mean)

== test plan ==
1. Enable "Did you mean?":
   . go to Administration > Additional parameters > Did you mean?
   . put a tick in each plugin and save the configuration
2. In the OPAC, search for 'open source'
3. Without the patch you see escaped <span> after "Did you mean:"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29094: Adding hold via SIP should check if patron can hold item first
Kyle Hall [Thu, 23 Sep 2021 12:57:30 +0000 (08:57 -0400)]
Bug 29094: Adding hold via SIP should check if patron can hold item first

When placing holds via SIP2, there is no holdability check. This seems very incorrect.

Test Plan:
1) Apply this patch
2) prove -r t/db_dependent/SIP

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31137: (QA follow-up) Also fix new template page
Nick Clemens [Fri, 15 Jul 2022 12:10:43 +0000 (12:10 +0000)]
Bug 31137: (QA follow-up) Also fix new template page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31137: Only display label printer profiles when editing labels
Adolfo Rodríguez [Tue, 12 Jul 2022 07:20:45 +0000 (09:20 +0200)]
Bug 31137: Only display label printer profiles when editing labels

This patch filters the printer profiles in the label edition template so you may only choose Printer Profiles created for Labels.

To test
1 Create a new Printer Profile in Patron Cards
2 Edit a Label template, pick the Printer Profile you just created.
3 Save the Label Template. You get an error 500
4 apply patch, restart services
5 Edit a Label template and check that you can't pick the Printer Profile you created in Patron Cards

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31146: Fix unclosed table element
Lucas Gass [Thu, 14 Jul 2022 15:30:09 +0000 (15:30 +0000)]
Bug 31146: Fix unclosed table element

To test:
1) Install another language and enable it in the OPACLanguages system preference
2) Also make sure opaclanguagesdisplay is set to Allow
3) Make sure OpacLangSelectorMode is set to display the switch in the footer (either top and bottom or footer only)
4) Turn on recalls
   4.1) In Administration > Global system preferences, enable UseRecalls
   4.2) Add recalls permissions in your circulation rules
5) In the OPAC, log in as a patron
6) Find a record with checked out items and place a recall
7) Go to your account
--> Note that the language switch is at the bottom left of the screen
8) Click on any tab in the patron's account
--> Note that the language switch is at the bottom left of the screen
9) Click on 'Your recalls history'
--> Note that the language switch is right under the recalls history table
10) Apply patch
11) The changelanguage div should now be properly placed at the bottom of the page.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31134: Mock EdifactLSQ for t/Edifact.t
Martin Renvoize [Thu, 14 Jul 2022 11:05:29 +0000 (12:05 +0100)]
Bug 31134: Mock EdifactLSQ for t/Edifact.t

This patch adds a mock for the EdifactLSQ preference so we can
consistently pass when a database is not available.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31129: Fix debarment count on circulation page
Martin Renvoize [Mon, 4 Jul 2022 12:14:45 +0000 (13:14 +0100)]
Bug 31129: Fix debarment count on circulation page

This patch was split from bug 23681 where QA identified the issue.

This patch fixes the debarment count displayed on the circulation page
tabs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25449: (QA follow-up) Set items.itype to mandatory by default (UNIMARC)
Katrin Fischer [Sun, 12 Jun 2022 12:32:37 +0000 (12:32 +0000)]
Bug 25449: (QA follow-up) Set items.itype to mandatory by default (UNIMARC)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25449: Set items.itype mandatory by default
Jonathan Druart [Tue, 26 May 2020 10:08:23 +0000 (12:08 +0200)]
Bug 25449: Set items.itype mandatory by default

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>
2 years agoBug 31139: Fix basic_workflow.t
Jonathan Druart [Tue, 12 Jul 2022 09:30:55 +0000 (11:30 +0200)]
Bug 31139: Fix basic_workflow.t

Error while executing command: element not interactable: Element <input id="tag_952_subfield_w_810691" class="input_marceditor items.replacementpricedate noEnterSubmit flatpickr-input" name="items.replacementpricedate" type="hidden"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

Not sure if it's coming from bug 30717 or not. git bisect told me it was the culprit but we released 22.05 and it seems that we got basic_workflow.t green since then.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Fix permissions problem
Tomas Cohen Arazi [Wed, 13 Jul 2022 22:09:39 +0000 (19:09 -0300)]
Bug 28854: Fix permissions problem

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Compiled CSS
Tomas Cohen Arazi [Wed, 13 Jul 2022 19:48:17 +0000 (16:48 -0300)]
Bug 28854: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: DBRev 22.06.00.016
Tomas Cohen Arazi [Wed, 13 Jul 2022 19:22:21 +0000 (16:22 -0300)]
Bug 28854: DBRev 22.06.00.016

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Replace unique constraint in return claims
Martin Renvoize [Wed, 13 Jul 2022 17:11:34 +0000 (18:11 +0100)]
Bug 28854: (follow-up) Replace unique constraint in return claims

This patch fixes the failing test for the return claims api.  We add a
new unique constraint to replace the one we removed earlier in the
patchset. One should not be able to create a duplicate return claim for
the same issue of an item.

Test plan
1) Run the database update
2) Confirm that t/db_dependent/api/v1/return_claims.t now passes
3) Confirm that t/db_dependent/api/v1/items.t continues to pass
4) Bonus points, confirm that bundle checkin still works when items are
   missing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: DBRev 22.06.00.015
Tomas Cohen Arazi [Wed, 13 Jul 2022 15:21:05 +0000 (12:21 -0300)]
Bug 28854: DBRev 22.06.00.015

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: DBIC update
Tomas Cohen Arazi [Wed, 13 Jul 2022 13:34:23 +0000 (10:34 -0300)]
Bug 28854: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (QA follow-up) Fix DB revision for AV's above 10
Martin Renvoize [Mon, 11 Jul 2022 15:18:25 +0000 (16:18 +0100)]
Bug 28854: (QA follow-up) Fix DB revision for AV's above 10

The authorised_value field is a varchar and so 'MAX' will sort '9' above
'10' and cause issues if you have more than 9 AV values already for LOST
or NOT_LOAN.

This patch adds a 'CAST' to the field so we can use MAX correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (QA follow-up) Remove duplicate key test
Martin Renvoize [Mon, 11 Jul 2022 15:08:05 +0000 (16:08 +0100)]
Bug 28854: (QA follow-up) Remove duplicate key test

We now allow duplication of issue_id accross the return claims table (to
allow for the case where a bundle item has been loaned and thus multiple
claims can result from the same checkout.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (QA follow-up)
Kyle Hall [Mon, 11 Jul 2022 12:31:34 +0000 (08:31 -0400)]
Bug 28854: (QA follow-up)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Remove fields from from bundle items
Martin Renvoize [Fri, 1 Jul 2022 11:43:12 +0000 (12:43 +0100)]
Bug 28854: (follow-up) Remove fields from from bundle items

This patch removes the itemtype and collection code fields from the
bundle items table.

We will add the itemtype back in at a later date with a new bug as the
display code needs some careful consideration and we felt that doing
that work inline here would be an unrequired blocker.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (QA follow-up) Add missing TT filters
Katrin Fischer [Fri, 1 Jul 2022 11:38:26 +0000 (11:38 +0000)]
Bug 28854: (QA follow-up) Add missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Add handling for part_numbers/names
Martin Renvoize [Mon, 27 Jun 2022 15:36:09 +0000 (16:36 +0100)]
Bug 28854: (follow-up) Add handling for part_numbers/names

This patch adds part number/name handling to the new biblio-format js
include. This will add such details to bundle management tables.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Link to 'In bundle' on OPAC
Martin Renvoize [Mon, 27 Jun 2022 14:26:04 +0000 (15:26 +0100)]
Bug 28854: (follow-up) Link to 'In bundle' on OPAC

This patch adds the 'In bundle: Link' to the OPAC to mirror what we have
on the staff client.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Restore block styling on bundled span
Martin Renvoize [Mon, 27 Jun 2022 14:00:50 +0000 (15:00 +0100)]
Bug 28854: (follow-up) Restore block styling on bundled span

This patch restores a css rule that we lost during rebases that makes
the 'bundled' span that appears for bundled items on their respective
details pages so that the 'In bundle: ' text in the status field of the
table appears beneath the 'Not for loan (Added to bundle)' text.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Make 'Manage bundle' button a 'toggle'
Martin Renvoize [Mon, 27 Jun 2022 13:54:42 +0000 (14:54 +0100)]
Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle'

This patch adds and removes the 'active' class to the 'Manage bundle'
button such that it correctly reflects whether the manage area is
expanded or not for the bundle item.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Add bundle item status to manage button
Martin Renvoize [Mon, 27 Jun 2022 13:47:03 +0000 (14:47 +0100)]
Bug 28854: (follow-up) Add bundle item status to manage button

This patch adds the item counts (Present|Lost) to the 'Manage bundle'
button in the catalogue details page.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Restore last seen date formatting
Martin Renvoize [Mon, 27 Jun 2022 13:31:04 +0000 (14:31 +0100)]
Bug 28854: (follow-up) Restore last seen date formatting

We lost the date formatting somewhere along the line with rebases, this
patch restores the call to $date for last seen date.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Link bundle items to thier biblios
Martin Renvoize [Mon, 27 Jun 2022 10:54:49 +0000 (11:54 +0100)]
Bug 28854: (follow-up) Link bundle items to thier biblios

This patch splits out the title formatting from the bundle item title
display into it's own new js-biblio-format include file and adds biblio
linking options.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Disable bundle editing for checked out
Martin Renvoize [Mon, 27 Jun 2022 09:15:16 +0000 (10:15 +0100)]
Bug 28854: (follow-up) Disable bundle editing for checked out

This patch disables the add and remove options under bundle management
when the bundled item in question is checked out.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items
Martin Renvoize [Fri, 24 Jun 2022 15:55:25 +0000 (16:55 +0100)]
Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items

This removes any leading or trailing whitespace from the external id
passed

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Improve error for item not found
Martin Renvoize [Fri, 24 Jun 2022 15:50:53 +0000 (16:50 +0100)]
Bug 28854: (follow-up) Improve error for item not found

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Fix typo in templates and test plan
Katrin Fischer [Fri, 24 Jun 2022 13:55:54 +0000 (13:55 +0000)]
Bug 28854: (follow-up) Fix typo in templates and test plan

* aready > already
* 61 > 62

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Move preferences to "Item bundles"
Martin Renvoize [Mon, 20 Jun 2022 10:44:07 +0000 (11:44 +0100)]
Bug 28854: (follow-up) Move preferences to "Item bundles"

Move the preferences into a section under 'Circulation' called 'Item
bundles'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Rename column configuration to barcode
Martin Renvoize [Mon, 20 Jun 2022 10:30:38 +0000 (11:30 +0100)]
Bug 28854: (follow-up) Rename column configuration to barcode

This patch updates the column configuration from 'external_id' to
'barcode'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Translations fixes
Martin Renvoize [Mon, 20 Jun 2022 10:14:53 +0000 (11:14 +0100)]
Bug 28854: (follow-up) Translations fixes

This patch wraps and unwraps strings appropriately for trasnlation.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add default AV and Syspref values
Martin Renvoize [Mon, 20 Jun 2022 09:18:08 +0000 (10:18 +0100)]
Bug 28854: Add default AV and Syspref values

This patch adds the new AV and System Preferences to the installer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Unit tests - chargelostitem
Martin Renvoize [Mon, 20 Jun 2022 09:06:37 +0000 (10:06 +0100)]
Bug 28854: Unit tests - chargelostitem

This patch adds unit tests for the changes to chargelositem to ensure
bundle charging works as expected setting the correct issue_id.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Unit test for AddReturn addition
Martin Renvoize [Fri, 17 Jun 2022 14:01:04 +0000 (15:01 +0100)]
Bug 28854: Unit test for AddReturn addition

This patch adds tests for the AddReturn change that adds an 'InBundle' message
to the return.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Unit test for Koha::Item additions
Martin Renvoize [Fri, 17 Jun 2022 12:08:46 +0000 (13:08 +0100)]
Bug 28854: Unit test for Koha::Item additions

This patch adds unit tests for the new methods added to Koha::Item
including:

* return_claim
* return_claims
* is_bundle
* in_bundle
* bundle_host
* bundle_items
* add_to_bundle
* remove_from_bundle

Test plan
1) Run t/db_dependent/Koha/Item.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Martin Renvoize [Fri, 17 Jun 2022 11:24:09 +0000 (12:24 +0100)]
Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (QA follow-up) Fix QA tool complaints
Katrin Fischer [Fri, 17 Jun 2022 09:28:27 +0000 (09:28 +0000)]
Bug 28854: (QA follow-up) Fix QA tool complaints

* Typo in code comment
* Permissions on atomicupdate
* Missing TT filter in template
* Spelling in template

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Make barcode comparison case insensative
Martin Renvoize [Wed, 15 Dec 2021 11:15:42 +0000 (11:15 +0000)]
Bug 28854: Make barcode comparison case insensative

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: (follow-up) Only count rows in the body
Martin Renvoize [Tue, 14 Dec 2021 16:47:54 +0000 (16:47 +0000)]
Bug 28854: (follow-up) Only count rows in the body

This patch fixes the count to only include table rows in the body, i.e.
skip the header row.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add modal after checkin to print missing items list
Martin Renvoize [Tue, 30 Nov 2021 14:34:48 +0000 (14:34 +0000)]
Bug 28854: Add modal after checkin to print missing items list

This patch adds a further modal to the post checkin alert to allow the
user to print a view and print a list of items that went missing at this
checkin to allow for replacements to be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add 'Remove from bundle' dialogue to details display
Martin Renvoize [Tue, 30 Nov 2021 09:35:46 +0000 (09:35 +0000)]
Bug 28854: Add 'Remove from bundle' dialogue to details display

This patch adds the counterpart of the 'Add to bundle' modal prompt for
adding items to bundles from the catalogue details display.  It allows
for scanning barcodes to remove them from a bundle.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add count of scanned items to verification modal
Martin Renvoize [Fri, 26 Nov 2021 10:21:08 +0000 (10:21 +0000)]
Bug 28854: Add count of scanned items to verification modal

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Highlight when a scanned item is unexpected
Martin Renvoize [Thu, 25 Nov 2021 17:54:08 +0000 (17:54 +0000)]
Bug 28854: Highlight when a scanned item is unexpected

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Enable claims return view when BundleLostValue is set
Martin Renvoize [Thu, 25 Nov 2021 14:28:03 +0000 (14:28 +0000)]
Bug 28854: Enable claims return view when BundleLostValue is set

This patch adds the alternation of BundleLostValue to enable the return
claims functionality when Bundles are enbled.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Improve lost details display for bundle items
Martin Renvoize [Thu, 25 Nov 2021 12:10:57 +0000 (12:10 +0000)]
Bug 28854: Improve lost details display for bundle items

This patch adds the return claim details to the bundle item status
display on the catalogue details page.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add ordering to checkin validation modal
Martin Renvoize [Wed, 24 Nov 2021 10:16:53 +0000 (10:16 +0000)]
Bug 28854: Add ordering to checkin validation modal

This enhancement adds simple dataTable ordering to the verification
modal table at bundle checkin time.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Add option to print content list after verification
Martin Renvoize [Fri, 19 Nov 2021 15:11:26 +0000 (15:11 +0000)]
Bug 28854: Add option to print content list after verification

We already allowed the user to view and print an updated content list
after a varification showed that items were missing from the bundle.
This patch adds the option to view and print the list even if the
content has been varified to have not changed.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Simplified status handling for bundle inventory check
Martin Renvoize [Thu, 18 Nov 2021 15:17:03 +0000 (15:17 +0000)]
Bug 28854: Simplified status handling for bundle inventory check

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Record and display who lost the item
Martin Renvoize [Thu, 23 Sep 2021 12:58:50 +0000 (13:58 +0100)]
Bug 28854: Record and display who lost the item

This patch records the bundle issue from which an item is marked as lost
so that we may use that to infer who lost the item (for later charges
and display).

Test plan
0) Apply all patches up to this point
1) Checkout a bundle to a user
2) Checkin the bundle and do not scan one of the barcodes at
   confirmation
   * Note that the item not scanned is marked as lost
3) Navigate to the biblio for the lost item and note that it is marked
   as lost.
4) Navigate to the biblio for the collection and expand the collection
   item that contains the lost item. Note the item is marked as lost and
   checkout details are listed.
5) Checkin the lost item
   * The item should be marked as found and the return_claims line should
   be marked as resolved.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Drop unique index on issue_id in return claims
Martin Renvoize [Thu, 18 Nov 2021 15:04:38 +0000 (15:04 +0000)]
Bug 28854: Drop unique index on issue_id in return claims

With the introduction of circulating items within a bundle set, we can
now loose multiple items from the bundle from the same issue.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Highlight bundle rows to clarify UI
Martin Renvoize [Thu, 30 Sep 2021 07:44:22 +0000 (08:44 +0100)]
Bug 28854: Highlight bundle rows to clarify UI

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Update circulation functionality for bundles
Martin Renvoize [Thu, 23 Sep 2021 10:37:52 +0000 (11:37 +0100)]
Bug 28854: Update circulation functionality for bundles

This patch updates the circulation system to account for bundle
checkins. We add a content verification step to ensure bundle content is
all present at checkin and we use this comparison to mark missing items
as lost.

Test plan
0) Apply patches up to this point
1) Checkin an item that belongs to a bundle
   * An alert should be triggered noting that the item belongs to a
     bundle
   * The option to remove the item from the bundle should be clear
   * Click remove should result in the alert dissapearing and the item
     having been removed from the bundle.
2) Checkin an item bundle
   * A modal confirmation dialog should appear requesting each item
     barcode be scanned
   * As items are scanned they should be highlighted in yellow in the
     bundle content table
   * Upon submission;
     * The user will be alerted to any unexpected items that were
       scanned and told to put them to one side.
     * The user will be alerted that any missing items in the validation
       will have been marked as lost.
     * The bundle item will be marked as checked in.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Expose functionality to attach items to bundles
Martin Renvoize [Thu, 23 Sep 2021 09:01:23 +0000 (10:01 +0100)]
Bug 28854: Expose functionality to attach items to bundles

This patch adds methods the the Koha::Item object for managing item
bundling operations and then exposes those methods via the REST API.

We include the new `BundleNotLoanValue` preference for setting not
for loan values when an item is added to a bundle.

Finally, we expose bundle management via the catalogue details page.

Test plan:
0) Apply patches up to this point and run the database update
1) Configuration: `BundleNotLoanValue` should have been set by the
   database update and point to a newly added AV value.
2) Creating a new bundle
   * Add a new bib record
   * Mark the bib record as a 'collection' type by setting leader
     position 7 to 'c'
   * Add a new item to this bib record
   * You should see a new 'Manage bundle' button available in the
     'Actions' column of the Holdings table.
   * Clicking 'Manage bundle' should expand the table to include a new
     row directly beneath this one.
   * Use the new 'Add to bundle' button that appears in this row to
     trigger a modal that allows entering the barcode of items you wish
     to add to the bundle
   * Upon closing the modal, the bundle content table should reload and
     contain your newly associated items.
   * You can subsequently remove an item from a bundle using the new
     'Remove' button.
3) Not for loan
   * Items that have been added into a bundle should now appear as 'Not
     for loan' from their original biblio record and note which bundle
     they belong to.
4) Error cases
   * Try adding an item that already belongs to a bundle to another
     bundle: Note an error is displayed in the modal form.
5) The bundles feature can be disabled by unsetting the
   `BundleNotLoanValue` system preference.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28854: Database update
Martin Renvoize [Thu, 23 Sep 2021 07:28:15 +0000 (08:28 +0100)]
Bug 28854: Database update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31145: Supply defaults for vendors and funds
Nick Clemens [Tue, 12 Jul 2022 18:52:21 +0000 (18:52 +0000)]
Bug 31145: Supply defaults for vendors and funds

This is a convenience bug - when koha testing docker creates sample vendors and budgets there are small issues:

1 - The vendor website gets a random string - you can't edit the vendor without removing this
2 - The funds have random values for statistical categories, and you get empty dropdowns when choosing a fund in ordering

To test:
1 - Apply patch
2 - Restart all
3 - Edit 'My vendor'
4 - note webstie is empty and you can save without changing anythign
5 - Add order to basket for my vendor
6 - Confirm that when selecting a fund statistic 1 and statistic 2 remain as text input fields

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31141: Remove 'select_column' from waiting_holds.inc
Martin Renvoize [Tue, 12 Jul 2022 10:22:36 +0000 (11:22 +0100)]
Bug 31141: Remove 'select_column' from waiting_holds.inc

In the only place we use the waiting_holds include, we were hard coded
to always pass the 'select_column' variable as true.

We can simply and clarify the logic by just removing this superflous
variable.

Test plan
1. Confirm that the waiting holds tables continue to display as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31133: Don't generate values for more than one FK
Jonathan Druart [Tue, 12 Jul 2022 07:11:12 +0000 (09:11 +0200)]
Bug 31133: Don't generate values for more than one FK

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31104: Add a selenium test
Jonathan Druart [Tue, 12 Jul 2022 08:25:25 +0000 (10:25 +0200)]
Bug 31104: Add a selenium test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31140: (QA follow-up) Remove leftover POD
Jonathan Druart [Tue, 12 Jul 2022 13:44:25 +0000 (10:44 -0300)]
Bug 31140: (QA follow-up) Remove leftover POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31140: TestBuilder.t is failing on item groups modules
Kyle Hall [Tue, 12 Jul 2022 10:12:26 +0000 (06:12 -0400)]
Bug 31140: TestBuilder.t is failing on item groups modules

Test Plan:
1) prove t/db_dependent/TestBuilder.t
2) Note failures
3) Apply this patch
4) prove t/db_dependent/TestBuilder.t
5) Note all tests pass!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21978: Fix Selenium tests
Jonathan Druart [Tue, 12 Jul 2022 08:42:39 +0000 (10:42 +0200)]
Bug 21978: Fix Selenium tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (QA follow-up) Trivial fix to schema file
Tomas Cohen Arazi [Tue, 12 Jul 2022 02:36:56 +0000 (23:36 -0300)]
Bug 30275: (QA follow-up) Trivial fix to schema file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31054: Manual importing for EDIFACT invoices fails with a 500 error page
Kyle Hall [Mon, 27 Jun 2022 12:13:39 +0000 (08:13 -0400)]
Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page

Error in plack log is: Can't locate object method "new" via package
"Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin" (perhaps you
forgot to load "Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin"?)
at /usr/share/koha/lib/Koha/EDI.pm line 219.

Test Plan:
1) Set EdifactInvoiceImport to "Don't"
2) Configure an EDI vendor to use an EDIFACT plugin
3) Attempt to import an invoice file
4) You will be shown an error page
5) Apply this patch
6) Restart all the things!
7) Attempt to import another invoice file
8) It works!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31116: (QA follow-up) Remove duplicate line
Marcel de Rooy [Fri, 8 Jul 2022 06:05:43 +0000 (06:05 +0000)]
Bug 31116: (QA follow-up) Remove duplicate line

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31116: Add circulation sidebar to article requests
Martin Renvoize [Thu, 7 Jul 2022 11:39:01 +0000 (12:39 +0100)]
Bug 31116: Add circulation sidebar to article requests

This patch adds the circulation sidebar menu to the article requests
page to make it consistent with other circulation module pages.

Test plan
1) Prior to applying the patch confirm that there is no sidebar on the
   article requests management page, regardless of the CircSidebar
   perference.
2) Apply the patch
3) Confirm there is still no sidebar when CircSidebar is disabled
4) Confirm there is now a sidebar present when CircSidebar is enabled
5) Confirm the current page is highlighted correctly in the sidebar when
   on the article requests page.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31000: Warn removal: param record_type can be undef
Andrew Nugged [Fri, 26 Nov 2021 11:45:37 +0000 (13:45 +0200)]
Bug 31000: Warn removal: param record_type can be undef

Uninitialized value warning on /tools/export.pl when $record_type is undef

Use of uninitialized value $record_type in string eq
at /home/vagrant/kohaclone/tools/export.pl line 43.

This warning in koha-testing-docker appears in:
/var/log/koha/kohadev/intranet-error.log

This patch fixes it by working when $record_type is Undef.
The functionality still remains the same but warning doesn't flood
error log.
To reproduce:
1. Go to export data tool page (/tools/export.pl).
2. Check the error log and find the upper mentioned warning,
check the timestamp to ensure that it was added when you loaded the page.
3. Apply the patch.
4. Load the page again, ensure that the same warning doesn't get added
to the log file again.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31104: Put each link on a separate header
Tomas Cohen Arazi [Wed, 6 Jul 2022 19:27:23 +0000 (16:27 -0300)]
Bug 31104: Put each link on a separate header

This patch makes the Pagination helper put each Link entry on the
response headers on a separate header. In practice, this leads to
shorter headers and will avoid apache default/reasonable limits.

To test:
1. Open the patron search page
2. Open the koha logs:
   $ tail -f /var/log/koha/kohadev/*.log
3. On the 'Search for patron' input, use a really long string, like
   'superlongstringthatistoolongforapacheyeahsuperlong'
=> SUCCESS: There's no user with an attribute with that content :-D
=> FAIL: You get an error like (28)No space left on device: [client 127.0.0.1:60330] AH10124: header size is over the limit allowed by ResponseFieldSize (8192 bytes). Bad response header: 'Link:...'
4. Apply this patch
5. Restart all:
   $ restart_all
6. Repeat 2 and 3
=> SUCCESS: No results
=> SUCCESS: No error in the logs
7. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!

Note 1: The Link header is expected to be in CSV format, which is
usually the way libraries treat repeated headers anyway.

Note 2: Apache is not rejecting the response, just stripping out the
'bad header'. So this is not a critical issue.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31039: (follow-up) Wrap jQuery in $(document).ready()
Owen Leonard [Mon, 11 Jul 2022 14:03:44 +0000 (15:03 +0100)]
Bug 31039: (follow-up) Wrap jQuery in $(document).ready()

cashup_modal.js consists only of jQuery code, so the whole thing should
be contained in a $(document).ready() function. This may or may not be
contributing to the behavior this bug is trying to fix.

Please note that this patch contains whitespace changes, so diff
accordingly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31039: Remove duplicate modal printing JS
Martin Renvoize [Fri, 24 Jun 2022 12:10:46 +0000 (13:10 +0100)]
Bug 31039: Remove duplicate modal printing JS

This patch removes the erroneos duplication of the modal printing js.

Test plan
1) Create some transactions and perform a cashup.
2) Open the cashup summary modal
3) Click 'Print'
4) Cancel the print dialogue
5) Note that the dialogue re-appears
6) Apply the patch
7) Repeat and note the dialogue closes first time now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Fix missing additionalProperties in spec
Tomas Cohen Arazi [Fri, 8 Jul 2022 22:11:23 +0000 (19:11 -0300)]
Bug 24857: Fix missing additionalProperties in spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: DBRev 22.06.00.014
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:23:05 +0000 (16:23 -0300)]
Bug 24857: DBRev 22.06.00.014

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: (QA follow-up) Make update idempotent
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:19:35 +0000 (16:19 -0300)]
Bug 24857: (QA follow-up) Make update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: DBIC update
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:11:11 +0000 (16:11 -0300)]
Bug 24857: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add object classes to Schema
Nick Clemens [Thu, 28 Apr 2022 17:54:48 +0000 (17:54 +0000)]
Bug 24857: Add object classes to Schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add new Schema files
Kyle M Hall [Thu, 2 Jun 2022 16:19:26 +0000 (16:19 +0000)]
Bug 24857: Add new Schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Delete item group when last item is deleted
Nick Clemens [Tue, 8 Mar 2022 12:31:12 +0000 (12:31 +0000)]
Bug 24857: Delete item group when last item is deleted

To test:
1 - Find a record with an item gorup, or add a group
2 - Add an item to this group, ensure it is the only item in the group
3 - Delete the item
4 - Confirm the gorup was also deleted
5 - prove t/db_dependent/Koha/Biblio/ItemGroups.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>