Katrin Fischer [Sat, 23 May 2020 15:19:37 +0000 (15:19 +0000)]
Bug 25448: Update German (de-DE) framework files
The updated files have been auto-generated based on the
po files and downloaded from
https://translate.koha-community.org/files/
To test:
- Make sure German language is installed, see:
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
- Run the web installer and choose de-DE
- Select all sample files
- Make sure they all install without any errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c0adeab58feaa7fb0b5c97e55b8356bb916aa163)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 20 Aug 2020 12:32:43 +0000 (14:32 +0200)]
Bug 24147: Don't assume search_related will return ordered values
This test is failing randomly because it assume the order is always the
same. But it's not.
Note: Koha::Objects->search_related is never used , last use removed from
commit 9aa724cdf29a57bc91e42b240b5bcd19e3814ada
Bug 19599: Speed anonymise_issue_history up
We should keep it however IMO
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e10dc503289e8d7e8c742af0111acb79d4d53111)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the button present some space between the icon and the
text.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2a0ccf7af26236db9a3e40968cf8f43bc308f142)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25584: Refresh checkouts table when a return claim is added
This patch triggers a checkouts table refresh when a return claim is
added. I also noticed the same when a return claim is deleted so it is
now also refreshed.
To test:
1. Set the ClaimReturnedLostValue to some valid value (2)
2. Check something out for a patron, and choose to display all checkouts
=> SUCCES: There's the checkouts table, showing the checkout
3. Click on the 'Claim returned' button and confirm
=> SUCCESS: There's no 'Claim returned' button anymore
=> ERROR: The checkout row doesn't display anything about the claim
4. Go to the 'Claims' tab, delete resolve and delete the claim
5. Go to the Checkouts tab
=> ERROR: It doesn't reflect the changes either
6. Apply this patch and start over
=> SUCCESS: Once the claim returned is added, the checkouts table is
refreshed and the information updated
=> SUCCESS: On the Claims tab, if you delete the claim and go to the
Checkouts tab, you are presented the button again.
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7fc7427dd41ce10070a6a3d3070fb660850be511)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 31 Aug 2020 12:26:26 +0000 (14:26 +0200)]
Bug 26324: Fix spelling resizable vs resizeable in Dopop
The correct spelling of the parameter is resizable
https://developer.mozilla.org/fr/docs/Web/API/Window/open
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ce7f4d16d6acdc6a56d40e6ebd96d722f1c77387)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 21 Aug 2020 14:07:46 +0000 (16:07 +0200)]
Bug 26069: Pass correct URL to twitter
We don't provide the url of the detail page so the twitter JS code
retrieve the current location, with the search terms.
Test plan:
Do a search
Click on a result
Click on the twitter button and confirm that the link only contain
biblionumber=x in the parameter
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5fd8774c687c6aaf6716485ab9bd72a69a0e2f76)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 27 Aug 2020 16:27:09 +0000 (16:27 +0000)]
Bug 17661: (follow-up) Update regex to support Unicode characters
Rather than limiting initials to [A-Z] we should test for a broad
range of uppercase letters.
The ES/Zebra changes are slightly different because of Perl vs Java regex
conventions. POerl may support either, but I found 'Uppercase' to be a bit more explicit
More info here:
https://perldoc.perl.org/perlunicode.html
TO test:
Same plan as before but use Ж. as the ending initial
Confirm the period is preserved and other punctuation removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 224ac84aeca3b8dba87366925d83b01e0f5c1110)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The current code for facets doesn't pull strip ending punctuation from facets
This causes duplicate facets for terms that should be combined
Sometimes series can have different punctuation depending on the field they are in
Author initials punctuation should be preserved
To test:
1 - Do search and pull up some records
2 - Edit some of the records to have authors like:
Date, C.J.
Date, C.j.
Date, C.J .
3 - Edit the records to have some series statments like:
830 $aDate, C.J. ;$v5
830 $aDate, C.J. ; $v5
830 $aDate, C.J.; $v5
4 - Add some 490s to the record with first indicator 1 and series like:
You wouldn't want to--
You wouldn't want to
You wouldn't want to..
5 - Search again and note you have 3 facets each for author and series
6 - Apply patch
7 - Repeat
8 - Now you get 2 facets for author, period not removed when following Upper case immediately, is otherwise
9 - Now you should have a single series facet
10 - Switch search engine to ES (index before applying patch)
11 - Note facets are separate again
12 - Reset mappings and reindex
perl misc/search_tools/rebuild_elasticsearch -v -r
13 - Repeat search, facets combined as above
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e34f95a1f5eb0fce238ab442553bec5233263a9c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 25 Aug 2020 19:30:00 +0000 (19:30 +0000)]
Bug 26289: Add missing variable definition to templates
This patch puts definition of the missing "searchid" variable into an
include file to be used by various bibliographic detail pages. The
variable is required by several JavaScript functions.
To test, apply the patch and locate or create a record with no items.
Open the labeled MARC view and choose Edit -> Delete record. Confirm the
deletion. The deletion should complete correctly.
Perform the same test with the detail view, ISBD view, MARC view, and
items view.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a4e922ffe8a5ea760f2401aca44b1dd9be97c7ec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 29 Jul 2020 10:56:37 +0000 (10:56 +0000)]
Bug 25639: Add search query strings as global javascript variables
To test:
1 - Search on OPAC for "qwertyuiop"
2 - View the HTML source
3 - Find 'qwertyuiop' in the source, it is not easily accessible via JS
4 - Apply patch
5 - Repeat
6 - Note that now there are global variables with the query strings
7 - Add to OpacUserJs:
console.log( query_desc );
console.log( querystring );
console.log( query_cgi );
8 - Reload page and confirm variables are warned in the JS console (Press F12)
9 - Sign off
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cf93255428125241745faaaec0a0b1f8455c7526)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Fri, 17 Jul 2020 22:03:28 +0000 (22:03 +0000)]
Bug 26013: Fix formatting for dates on "Manage stage MARC records" page
The "staged" dates were not formatted according to system
preferences DateFormat and TimeFormat as the appropriate TT
filters were missing.
To test:
- Stage a record in MARC format
- Go to Staged MARC management
- Check the date in the list of imports
- Click on the import and check the "Staged:" date
- Apply patch
- Repeat and verify formatting is now correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9e97dbca2983163e1ffc19fc435ac8bea6550c82)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Fri, 7 Aug 2020 08:58:51 +0000 (10:58 +0200)]
Bug 26175: Remove warn if undefined barcode in misc/export_records.pl
When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn :
Use of uninitialized value in say at /home/koha/src/misc/export_records.pl
Also exporting barcode if empty string makes no sense.
Test plan :
1) Delete an item with barcode = NULL
2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes
3) Check you se no warn "Use of uninitialized value in say ..."
4) Delete an item with barcode = ''
5) Run 2)
6) Check there is no empty line in /tmp/deleted_barcodes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4d9ab04a9391a4960a6155d983fdf839467bfdf4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25662: (follow-up) Add tests for the wrong patron_id added behaviour
This patch adds trivial tests for the new error (400) raised when the
passed patron_id doesn't exist.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
2. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit deee485a24df0734cace673dc519f15d41a5b575)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25662: Make the route for holds restpect maxreserves
This patch fixes the behaviour for the POST /holds route. It assumed
maxreserves was checked in CanItemBeReserved which is not the case.
Tests are added to check for this behaviour.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69bdc94cd4f420094c5706fb2bfc472ba24a5054)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9a63cf6dec55c67491e5a2807fe74f9083167ccc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 22 Aug 2020 02:41:20 +0000 (02:41 +0000)]
Bug 25958: (QA follow-up) Add some punctuation to new DefaultLongOverdueSkipLostStatuses
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d99651efd0a9a827b91f4575ab6f1d4344c7cfb0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Tue, 28 Jul 2020 11:55:18 +0000 (07:55 -0400)]
Bug 25958: Allow LongOverdue cron to exclude specified lost values
When lost items are not marked as returned, they are still subject to
the long overdue cron, so an item that has already been marked Lost may
automatically roll to Long Overdue. In some cases, a library may not
want that lost value to change. This becomes especially important with
the introduction of Claims Returned, which uses a variety of lost.
Test Plan:
1) Set up a long overdue item that would be moved to lost by longoverdue.pl
2) Run the cronjob with the new --skip-lost-value option
3) Note the item is not altered
4) Include that value in the new system preference DefaultLongOverdueSkipLostStatuses
5) Run the cronjob *without* the new option
6) Note the item is not altered
7) Run the cronjob again with the new command line option, but set it to
a different value so the item will be affected
8) Note the item is altered as it would have been before this patch was
applied
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48edb2947163c1e9a70b11de40a71ebed747952f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 5 Aug 2020 17:00:26 +0000 (17:00 +0000)]
Bug 26150: Remove the use of jquery.checkboxes plugin from inventory page
This patch removes the use of the jquery.checkboxes plugin from the
inventory page and replaces it with custom JS.
To test, apply the patch and go to Tools -> Inventory.
- Submit the form with some selections which will return results on the
following page. I filtered by library.
- On the page showing results, test that the "Select all" and "Clear
all" links work correctly.
Signed-off-by: Brandon J <brandon.jimenez@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9655029bca97ab5f159f03acadf6601b5edbc421)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Wed, 10 Oct 2018 15:13:37 +0000 (11:13 -0400)]
Bug 21539: addorderiso2709.pl forces librarian to select a ccode and notforloan code when using MarcItemFieldsToOrder
There is no reason that MarcItemFieldsToOrder should force librarians
to select a ccode and notforloan value for each item.
They are both optional fields.
As with location, the first value should be an empty 'none' option.
Test Plan:
1) Set up MarcItemFieldsToOrder, do *not* set mappings for ccode and notforloan
2) Add an order record to a basket that uses MarcItemFieldsToOrder
3) Note you must choose a ccode and nfl value
4) Apply this patch
5) Reload the page
6) Note you no longer have to select values for ccode and notforloan
Signed-off-by: Daniel Gaghan <daniel.gaghan@pueblolibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c79b7d93b96434ddf91c6ddabb1570836736a15)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 12 Aug 2020 12:58:58 +0000 (13:58 +0100)]
Bug 26189: Improve styling of datatables within fieldsets
Unset label width restriction: The label width restriction within
fieldsets causes issues for the datatables header. Unsetting it
explicitly here resolves the line wrapping issues :)
Reset margins for datatables found inside fieldsets such that the
datatable properly utilises the available space and restore the
default datatable label font weights.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b65efd3f224342be8e751e54f7ada8fc482755bb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 15 Jul 2020 22:28:07 +0000 (22:28 +0000)]
Bug 25791: Remove win.print()
Test plan:
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Click 'Print receipt and end session'
5) Notice two print dialog boxes right on top of each other
6) Apply patch
7) Repeat steps 1 - 4
8) Should only get a single print dialog.
9) Test in FF/Chrome and make sure behavior is consistent
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6797f07bbdfb90c556f52bfe2f83cefdf91495f3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Tue, 30 Jun 2020 18:37:21 +0000 (14:37 -0400)]
Bug 25903: Sending a SIP patron information request with a summary field flag in indexes 6-9 will crash server
The 'summary' field in the patron information request specifies if detail information should be send for holds,
overdues, fines, etc. The field is 10 characters in length (0-9). However, the SIP2 spec only defines indexes 0
though 5, leave 6 though 9 undefined. Some ILSs specify behavior for these undefined indexes. Apparently the
7th field is often used to request 'Fees', as opposed to 'Fines' in some ILS. Some software that integrate via
SIP try both the 5th and 7th indexes to ensure they get all fines and fees.
The problem is that Koha's SIP server crashes if any 'summary' index beyond 5 is flagged. We should simply
ignore flags beyond 5 and act as if no flags were sent.
Test Plan:
1) Enable SIP for your instance
2) Send a patron information request with a summary flag in any index beyond 5.
i.e.: 6300120200617 124846 Y AOMIDAY|AA21030050054321
3) Note the SIP server just closes the connection without a response
4) Apply this patch
5) Restart the SIP server
6) Send the same request
7) Note you get back the patron information response!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jeff Gaines <jgaine@arlingtonva.us> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fd4dbba7fb25bb73bcee152c84e704f9796664fd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Thu, 30 Jul 2020 13:35:38 +0000 (09:35 -0400)]
Bug 26076: (QA Follow up) Prevent error by using a fresh resultset
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9887a87538b2113c48db8cd2751a4bcf2bd2168)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Tue, 28 Jul 2020 16:49:35 +0000 (12:49 -0400)]
Bug 26076: Sum the amount due in the database query instead of a loop in Perl
This appears to be a bug due to inaccuracies in floating point math. I've been unable to reproduce it on demand. Sometimes when using the "Write off selected" button, Koha will give the error that the payment is more than the amount owed, even though they are the same. The solution I've implemented is to move the summation from Perl code to the database query. This video demonstrates the issue and afterward, shows the error goes away after the patch is applied: https://monosnap.com/file/pG69HC7iI9mU9kkuoCtbkVzVTffKlE
Test Plan:
1) Apply this patch
2) Restart all the things!
3) Verify that "Write off selected" functions as usual
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 64412969037ac9a9f81f05c69c3dd43bd3cab90b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Andrew Nugged [Sun, 19 Jul 2020 21:20:56 +0000 (00:20 +0300)]
Bug 24683: Fix for take smart rules into account in "if all unavailable"
Inside of ItemsAnyAvailableAndNotRestricted was no effect from main set
of smart rules (per record and other limits): i.e. call to
"CanItemBeReserved" was absent totally.
Because of this there was a bug: for example none of two items were
allowed to be held when first was allowed by one smart rule, BUT on loan,
and second was disallowed by another smart rule (for example,
0 "Holds per record"),
i.e. in this case both items unavailable: so on-shelf holds setting
"allow hold if all unavailable" should allow to hold first one, and not
the second one. But it was that both wasn't allowed to be held.
Solution: call to sub "CanItemBeReserved" added so it checked for
"...->{status} ne 'OK'" so now if item restricted by smart rule it also
accounted as "unavailable" and "AnyAvailavble" not counts it.
How to reproduce:
1. Add 2 smart rules (/cgi-bin/koha/admin/smart-rules.pl) with "on shelf
holds": "if all unavailable" for all rules, no "item level holds", and
set "holds per record" to 2 for "books" and "0" for "computer files".
2. Create only 2 items for one biblio, but different types, "book"
and "computer file". For example in misc4dev env:
/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1#additem
3. Check out that item of type "book" to some person, for example,
in misc4dev:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=2&barcode=3999900000001
4. Open reserve/request, for example, for item 1 and patron 1 in misc4dev
env (/cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=1)
5. It does not allow to hold, both red crossed, but computer file says
"Exceeded max holds per record" because of "0" limit set on step 1.
6. Apply the patch.
7. Reload page on step 5 and see that "book" will be available for hold,
but "computer file" still will be red-crossed "Exceeded max holds
per record", now that's correct because both items unavailable:
one because on load, another because of "0" limit for computer files.
8. Check-in book from step 3 so it will be returned to the library,
9. Reload page on step 5 and see that again no any holds available,
but it's now also correct: "book" now returned but "on shelf holds"
set to "if all unavailable".
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4599fcc59d4036cb5e3d776b9f162062968e8d98)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Andrew Nugged [Fri, 5 Jun 2020 06:59:48 +0000 (09:59 +0300)]
Bug 24683: Subroutine name changed (fix), no code logic changed This is the intermediate refactor: renamed subroutine only.
Naming mistake came because this sub is used to detect if anything
available for hold, but it used in "if ANY UNAVAILABLE rule", so actually
results of this sub negated (see below "return" in the code).
In details:
when previous refactor was done, name for subroutine was chosen
wrongly in "opposite" direction from what it actually does:
it was named "ItemsAnyAvailableForHold", but this subroutine gave
truth (1) if at least one of the items available on shelf, not lost,
not on loan, not held, and not restricted by smart rules and damaged
status. So, if this sub says that item is still "available", this
actually PREVENTS item from hold in parent sub (see negated return):
sub IsAvailableForItemLevelRequest {
...
my $any_available = ItemsAnyAvailableAndNotRestricted...
return $any_available ? 0 : 1;
# ^^^ if any available and not restricted - we don't allow
# on-shelf holds
...
I.e. like it named now: "ItemsAnyAvailableAndNotRestricted".
Small aside fix: white space for '&&' inside brackets added to join
operation by priority visually.
Testing plan not needed: all places where sub used it just renamed.
More: all this places/code was introduced in one older commit so there
is also no overlaps or other calls/uses for this subroutine.
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 618cf80df9b0b668174b28ff61cad8a938704ec3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 4 Aug 2020 14:02:03 +0000 (15:02 +0100)]
Bug 26023: Properly secure the cashup and refund actions
The cash register summary page for cash management is available for users
with the 'anonymous_refund' or 'cashup' permission and the actions available
are appropriately displayed.
However, the actions are not yet correctly tested for at the server and
so a user may force submit to accomplish the action.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e0420165694c790f2346fb598862e4aacfdf0fcc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Mon, 20 Jul 2020 08:44:05 +0000 (09:44 +0100)]
Bug 26023: Properly secure the cashup action for libraries
The libraries summary page for cash management is available for users
wit the 'anonymous_refund' permission to allow them to navigate to
alternate cash registers and search for the prior transaction to refund.
However, currently the cashup option appears, and is not blocked at the
server, for all user who may access the page. It should be blocked for
those users without the 'cashup' permission.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4356e678f2254707c48a6f89658ed089a6b9e662)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 1 Jun 2020 08:19:05 +0000 (10:19 +0200)]
Bug 25626: Fix untranslatable strings on the 'OPAC problem reports' admin
The 'Sent to' and 'Status' column values were not translatable.
Test plan:
Translate the interface
Report some problems at the OPAC
Go to the admin page and notice that all the columns are now translated
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit af0929abbb72c9c2469b1f2ccba338f51801ad98)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Colin Campbell [Wed, 29 Jul 2020 12:23:14 +0000 (13:23 +0100)]
Bug 26082: Call store on new items to update itemnumber
Need to add call to store to Koha::Item->new so that itemnumber
is returned - otherwise is not defined and causes an error
Bug is a side-effect of Bug 23463 as this was implicitly
done in AddItem
Also set biblioitemnumber explicitly for item adds this also
used to be done explicitly but can now cause an FK error
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b5a36c20a20721e82820ccaaf139285beadbaaf0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Wed, 19 Aug 2020 11:46:16 +0000 (11:46 +0000)]
Bug 26251: Remove unused routines from svc/split_callnumbers
This is just a copy and paste from svc/localization
Test plan:
Read the code.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 909755e5f66adea521a5b516c86bfdb5a83f6b0d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Didier Gautheron [Tue, 26 May 2020 11:31:31 +0000 (13:31 +0200)]
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text
Test plan :
1- Create a new report : select * from items;
2- Run it
3- Download the report as a tab separated text
4- There's a lot of 'use of uninitialized value in join or string at ...koha/reports/guided_reports.pl line xxx.'
in plack-error.log
5- Apply patch
6- Restart all
7- Redo 2 and 3
8- No more warning.
9- diff both downloaded files, they must be the same.
Signed-off-by: Marco Abi-Ramia <marco.abi-ramia@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 392a7e1a1ffb327986a5c0cb6863bbb87e43deaf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 5 Aug 2020 18:24:08 +0000 (18:24 +0000)]
Bug 26153: Remove the use of jquery.checkboxes plugin from items lost report
This patch removes the use of the jquery.checkboxes plugin from the
lost items report page and replaces it with custom JS.
To test, apply the patch and go to Reports -> Lost items.
- Run the report with parameters which will return multiple results.
- On the results page Create a CSV export profile if there's none.
- On the results page test the "Select all" and "Clear all"
links at the top of the results. The controls should work correctly.
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e24a294f393defeea12fd0bbfba73839c29d14f0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 18 Aug 2020 08:54:43 +0000 (08:54 +0000)]
Bug 26233: (bug 25553 follow-up) Make date columns sortable on the edit items table
We were missing to pass the title-string to datatables.
Test plan:
Retest bug 26233, with appropriate dates
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 25945: Description of AuthoritySeparator is misleading
This patch changes the description of the AuthoritySeparator system preference
To test:
1. Apply patch
2. Go to Administration > Global system preferences > Cataloging and locate the
AuthoritySeparator preference
3. Read the description and make sure it makes sense and that there are no typos
or grammatical errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7941d8d3c00086c7990cdfa4c72791ee96addfae)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Fri, 14 Aug 2020 01:49:40 +0000 (01:49 +0000)]
Bug 25778: Fix var scope in koha-plack for PERL5LIB and KOHA_HOME
Currently, if a koha-plack is given multiple instances, it will create
duplicate $KOHA_HOME/installer and $KOHA_HOME/installer/lib entries
in PERL5LIB as these changes are done at the global rather than local level.
This issue can only be seen in non-dev Koha, since dev Koha installs
rewrite PERL5LIB.
This patch localizes PERL5LIB to each instance.
To test dev installs:
0. cp debian/scripts/koha-plack /usr/sbin/koha-plack
1. koha-plack --restart kohadev
2. Note that nothing breaks
To test non-dev installs:
0. Don't replace /usr/sbin/koha-plack yet
1. Create multiple non-dev installs with plack enabled and running
2. Set up one of these non-dev installs so you can use the web
UI (that is beyong the scope of this test plan)
3. koha-plack --restart test1 test2 test3
4. For test3, go to /cgi-bin/koha/about.pl
5. Note that there are duplicate /usr/share/koha/installer
and /usr/share/koha/lib/installer entries in PERL5LIB
6. cp debian/scripts/koha-plack /usr/sbin/koha-plack
7. koha-plack --restart test1 test2 test3
8. For test3, go to /cgi-bin/koha/about.pl
9. Note that there are no duplicates entries in PERL5LIB
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 89721cb42b3928c745677c70fd9061273d1848dd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 5 Aug 2020 16:35:37 +0000 (16:35 +0000)]
Bug 26149: Remove jquery.checkboxes plugin from problem reports page
This patch removes the inclusion of the jquery.checkboxes plugin from
the problem reports template in the staff interface.
To test, apply the patch and make sure the OPACReportProblem system
preference is enabled.
- Submit a few OPAC problem reports if necessary
- Go to Tools -> OPAC problem reports
- Test that the "Select all" and "Clear all" controls at the top of the
table work correctly.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 393ecb4a9cc4c906b4bfcecf6357874e300fa3bd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 6 Aug 2020 11:42:33 +0000 (11:42 +0000)]
Bug 26159: Remove the use of jquery.checkboxes plugin from batch record delete page
This patch removes the use of the jquery.checkboxes plugin from the
batch delete records page.
To test, apply the patch and go to Tools -> Batch record deletion.
- Submit a batch of biblionumbers which includes one or more
checked-out items, one or more on-hold items, and one or more records
with no items.
- On the confirmation page, test the selection links at the top of the
results table. Each one should work correctly.
- Submit a batch of authority record ids which includes some records
which are in use and some which aren't.
- On the confirmation page, test the selection links at the top of the
results table. Each one should work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4fadb7ac1931b48a4be8160409d35ca97ab6b322)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 13 Aug 2020 12:34:19 +0000 (12:34 +0000)]
Bug 26201: Remove the use of jquery.checkboxes plugin from batch extend due dates page
This patch removes the use of the jquery.checkboxes plugin from the
batch extend due dates page.
Unrelated change: Removed 'enctype="multipart/form-data"' from the form
because there is no file upload.
To test, apply the patch and go to Tools -> Batch extend due dates.
- Submit the form with parameters which will return a set of multiple
checkouts.
- On the results page, test the "Select all" and "Clear all" links to
confirm that they work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 467e491a25652bf8ee85651ab91e3780c66e3aa1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 13 Aug 2020 13:19:19 +0000 (13:19 +0000)]
Bug 26202: Remove the use of jquery.checkboxes plugin from batch record modification page
This patch removes the use of the jquery.checkboxes plugin from the
batch record modification page.
To test, apply the patch and go to Tools -> Batch record modification
- Submit a batch of biblionumbers for modification.
- On the results page, test the "Select all" and "Clear all" links to
confirm that they work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9371685b973a287b7642fb907721f4964d92e65a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 13 Aug 2020 13:54:54 +0000 (13:54 +0000)]
Bug 26204: Remove the use of jquery.checkboxes plugin from staff interface lists
This patch removes the use of the jquery.checkboxes plugin from the
staff interface lists page.
To test, apply the patch, go to Lists, and view the contents of a
list with multiple titles on it.
Check that the "Select all" and "Clear all" links work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2de2b1330f540ef9482c1ed547b111757f0a551a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 14 Aug 2020 13:39:17 +0000 (13:39 +0000)]
Bug 26212: Remove the use of jquery.checkboxes plugin from pending offline circulations
This patch removes the use of the jquery.checkboxes plugin from the
pending offline circulations page, replacing it with in-page JS.
Unrelated: The JS-based creation of the "select all" and "clear all"
controls has been replaced with HTML links. Labels are added to the
results table to make checkbox selection easier.
To test, apply the patch and go to Circulation.
- Upload an offline circulation file (.koc) with multiple transactions.
If you don't want to generate this file using the desktop application
or Firefox add-on you can create a text file like this (tab
separated):
- Go to Pending offline circulation actions. You should see the list of
transactions you uploaded.
- Test that the "Check all" and "Uncheck all" controls work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c7174b204a324ee2431012e7f9a3cc09738d57de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 14 Aug 2020 14:47:40 +0000 (14:47 +0000)]
Bug 26214: Remove the use of jquery.checkboxes plugin on late orders page
This patch replaces the use of the jquery.checkboxes plugin on late
orders page in acquisitions.
Unrelated changes: The "Check all" and "Uncheck all" links are moved out
of the table header so that it matches similar interfaces. Sorting is
now disabled on the checkboxes column and the table is sorted by default
on the "Order line" column.
To test, apply the patch and go to Acquisitions -> Late orders.
- On the initial view, there should be no "Check all" or "Uncheck all"
links.
- Select a vendor in the left-hand sidebar form.
- When the filtered table is redisplayed the "Check all" and "Uncheck
all" links should now be visible.
- Test that the links work correctly.
- Confirm that the checkboxes column cannot be sorted and that the
table is sorted by default by order line number.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 41205adf34a4cde773fb399728ca74d9dada0e81)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 14 Aug 2020 15:18:37 +0000 (15:18 +0000)]
Bug 26215: Remove the use of jquery.checkboxes plugin from Z39.50 search pages
This patch removes the use of the jquery.checkboxes plugin from three
Z39.50 search templates: Acquisitions, Authorities, and Cataloging.
To test, apply the patch and test the controls for selecting and
deselecting Z39.50 search targets on the following pages:
- In Acquisitions: Locate a vendor and add to basket -> From an
external source.
- In Authorities: Click "New authority" -> "New from Z39.50/SRU."
- In Cataloging: Click "New from Z39.50/SRU."
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff5f7c787482fff5611b3fdeaed89598dfa29d64)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 14 Aug 2020 17:28:22 +0000 (17:28 +0000)]
Bug 26216: Remove the use of jquery.checkboxes plugin from catalog search results
This patch removes the use of jquery.checkboxes plugin from the
staff interface catalog search results page.
To test, apply the patch and perform a catalog search in the staff
interface which will return results.
On the search results page test the "Select all" and "Clear all" links
at the top of the results. They should work correctly.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit af8aa1ad7eb4857a86d395b3833b8040630306b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 14 Aug 2020 14:18:00 +0000 (14:18 +0000)]
Bug 26213: Remove the use of jquery.checkboxes plugin when adding orders from MARC file
This patch removes the use of the jquery.checkboxes plugin from the page
for adding orders to a basket from a staged MARC file.
This patch fixes an unreported bug wherein the "select all" and "clear
all" controls affected not only MARC record checkboxes but also the
"show inactive funds" checkboxes.
To test, apply the patch and go to Acquisitions.
- Go to Vendor -> Add to basket -> From a staged file.
- Select a staged file with multiple records.
- Test the "Select all" and "Clear all" links at the top of the "Select
to import" tab. They should work correctly to select and deselect
checkboxes corresponding to staged MARC records.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8344ee7b4ced266ac7bd48254f4695175fd8f19b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 6 Aug 2020 09:28:53 +0000 (11:28 +0200)]
Bug 23632: Remove C4::Logs::GetLogs
Koha::ActionLogs->search must be used instead.
There is no call to this subroutine in our code, it should be removed.
Test plan:
Make sure the 3 test files still return green and that there is no more
occurrences of GetLogs in the codebase.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 807147fb7b20c837f9afc3e2d6ba589d86d86cbe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 16 Jun 2020 13:44:40 +0000 (15:44 +0200)]
Bug 25751: Add ORDERED in dropdown list of suggestion's statuses
The status "ORDERED" is missing from the pull down list of
status values when editing a suggestion, so the first
option is selected "No status".
This leads to data loss when editing a suggestion in the
status "ORDERED". Worse: the status can't be reset to
"ORDERED" and so no AVAILABLE notice can be sent to the patron.
Test plan:
- Create a suggestion, accept it, create a new order from this suggestion.
- Verify status is "ORDERED"
- Edit the suggestion
=> Without this patch the dropdown list does not have
"Ordered", and if you save you lost the status
=> With this patch applied the dropdown list has "Ordered"
preselected. You can save and preserve the status.
Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit eeb7ac6fc0d14c9e731b7759c78f37cadcfa575f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Alex Buckley [Sun, 14 Jun 2020 22:41:03 +0000 (22:41 +0000)]
Bug 25750: fix fallback to ecost_tax_included/ecost_tax_excluded
If 'Actual cost' has not been set then it has the value of 0.00 which
Perl evaluates to true so this patchset resets it to 0, so the fallback
to ecost_tax_included/ecost_tax_excluded happens.
Test plan:
1. Add item to acquisition basket (make sure the vendor has: tax rate: 15%, 'List prices: Include tax', 'Invoice prices: Include tax')
2. Set 'Vendor price' = 10 and do not set 'Actual cost'
3. Save order
4. Observe basket.pl shows 'Total tax exc.' has a value of 0.00 and GST
column has value of -8.70
5. Jump into the database:
select tax_value_on_ordering from aqorders where
ordernumber=<ordernumber>;
[You can get the ordernumber from clicking on the 'Modify' line the item
is listed in]
6. Observe a negative value: -8.70
7. Apply patch and restart plack
8. Add a second item to the basket
9. Set 'Vendor price' = 10 and don't set 'Actual cost'
10. Save order
11. Observe basket.pl shows 'Total tax exc' has value of 8.70 and GST
has value of 1.30
12. Repeat step 5 and observe tax_value_on_ordering = 1.30
13. Run t/Prices.t unit test:
sudo koha-shell <instancename>
prove t/Prices.t
Sponsored-by: Horowhenua District Council, NZ Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7b66b90fe707e8ac650a1c85d87560fc2f4a223d)
Nick Clemens [Thu, 13 Aug 2020 12:56:33 +0000 (12:56 +0000)]
Bug 25872: Fix scoping of $limits
The code in build_query_compat contained a 'my' in the assigning of limits for the search in a conditional
This meant the limits were being set correctly during the conditional, but we blanked when passed to the rest
of the code. The effect was that the searches worked, however, the template params to repeat the search were
incomplete.
Removing the my ensures the same limits are applied during search and on re-sorting
To test:
1 - Enable Elasticsearch
2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit
3 - Attempt to sort results
4 - You are returned to Advanced search
5 - Apply patch
6 - Repeat
7 - It sorts!
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43dc505a52a2679e40a22ff610c91552cd8f2fd1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 3 Aug 2020 11:09:54 +0000 (13:09 +0200)]
Bug 26119: Enable patron's attribute edition when PatronSelfRegistrationVerifyByEmail
There is no good reason remove the ability to edit patron's attributes
if PatronSelfRegistrationVerifyByEmail is set.
We cannot have them in the self-registration form (because we don't
store patron's attributes during self-ref), but we can have them when
a patron show/edit their information.
Test plan:
0. Enable PatronSelfRegistrationVerifyByEmail and create patron's
attributes that can be edited at the OPAC
1. Create a new patron using the self-reg feature
=> You don't have the ability to fill in the patron's attribute
2. Edit your personal details (OPAC)
=> Without this patch you still don't see the patron's attribute that
can be edited at the OPAC
=> With this patch applied you can!
3. Notice the wording change on the "Modify patron attribute type" form
and confirm it makes sense
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fc22fb308bdbfc6d1bda3448e966542f2828ad76)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 3 Aug 2020 13:07:24 +0000 (15:07 +0200)]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive
In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity
Test plan:
- Use koha-testing-docker
- Notice the value of OPACBaseURL
=> http://kohadev.myDNSname.org:8080
- Use the "reports a problem" feature at the OPAC
- Notice that the "Problem found on page" is correctly filled with the
referer
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7a53c5f04cf2bb03734c82e9f964f108f9198d28)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 26182: Clarify wording on CanMarkHoldsToPullAsLost and UpdateItemWhenLostFromHoldList
To test:
- apply patch, restart
- search sysprefs for CanMarkHoldsToPullAsLost
- confirm both sysprefs come up in search and syspref descriptions refer to each other
Signed-off-by: Holly Cooper <holly.teresa.cooper@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9509e834de14b3fd88296143032100f2b1c907fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 26228: Update gulpfile to work with Node.js v12
This patch makes the gulpfile work with gulp v4 on Node v12. To test it,
make sure your dev env has Node.js v12.
It also replaces the use of 'gulp-util' (deprecated) by 'minimist' as
recommended on their site.
On both KTD and KohaDevBox edit your sources.list so the node line
points to 'node_12.x' instead of 'node_8.x'.
Once that's done:
1. On your clone run:
$ yarn install
$ npm install -E
2. Build the CSS:
$ yarn build
$ yarn build --view opac
=> SUCCESS: Things build correctly
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a7e3c12e6175e19299e7bdbe60d1bc7d41d45ce8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 30 Jul 2020 16:59:14 +0000 (16:59 +0000)]
Bug 26078: Prevent generating a new transfer from return policy when resolving a transfer
To test:
- Have 2+ branches
- Set your default return policy to Item returns to issuing library
- Find an item with holding branch of Branch A
- Set your library to Branch B
- Check item in
- Koha generates a transfer to Branch A. In doing so, it sets the item holding branch to Branch B
- Set your library to Branch A
- Check item in
- Koha generate a transfer to Branch B. In doing so, it sets the item holding branch to Branch A
- Set you library to Branch A
- Check the item in
. . . Repeat indefinitely.
Apply patch
Repeat
No more loop
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 47671123206a475f86de9316d8b256e14aa54bc1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch does the minimum to make it usable, but it would need more
love.
Test plan:
To test you will need to try the 4 combinaisons:
item-level_itypes = item or biblio
With or without a library selected in the dropdown list
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5bca73080f89bb2f4ca83ce6ceb9fa8e3c4a7d92)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Thu, 3 Sep 2020 03:57:01 +0000 (03:57 +0000)]
Bug 26361: switch TableSettings to ColumnSettings
Test Plan:
-Be on 20.05.x
-Go to returns.tt
-See the error Uncaught SyntaxError: expected expression, got keyword 'var'.
-Apply patch
-Reload returns.tt, no error
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 21 Aug 2020 12:00:51 +0000 (14:00 +0200)]
Bug 26270: Fix ThingISBN after a change in behaviour
This is just a guess! One of our tests is failing since today and we
don't modify anything in this area.
My guess is that the service is now returning the normalized version of
the ISBN
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fe529e3324405b30329054b9e8125babc357e1fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 21 Aug 2020 13:10:18 +0000 (15:10 +0200)]
Bug 26265: Add missing xt dir
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f9598240c5d94fa5bd20aac1c25e32ea2b5e57dd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Mon, 24 Aug 2020 08:03:48 +0000 (08:03 +0000)]
Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
Adding .git. Using a regex.
If we make it a bit smarter, we do not need most dirs listed.
Test plan:
Run the test again
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 01bee142e6e0b997ddfb000a9623082b74bbe9ab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87570d81a28d043ba7c5111a64552e82974ca07e)
Jonathan Druart [Fri, 21 Aug 2020 13:09:44 +0000 (15:09 +0200)]
Bug 26265: Add test for missing directory in Makefile.PL
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 035ed3cee5f391fc90df53e537589dd702e056a8)
Martin Renvoize [Fri, 21 Aug 2020 08:24:29 +0000 (09:24 +0100)]
Bug 26265: Add pos directory to the Makefile
This patch adds the /pos directory to the Makefile so that pos gets
properly mapped at make and install time.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit acbd6b72052381151f69a3b8aa70ab39cf4fda1c)
Jonathan Druart [Thu, 20 Aug 2020 08:10:14 +0000 (10:10 +0200)]
Bug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml
It was there already but not at the same place!
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a4998b7d5758b0bee682fa7485d66390a3657a20)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8305f582aafe348f5f2697fe5432e162989296b5)
Jonathan Druart [Thu, 6 Aug 2020 10:50:36 +0000 (12:50 +0200)]
Bug 26134: (bug 23463 follow-up) Fix add to basket from staged file
There is a ->store call missing when we attempt to create a new item.
Test plan:
- set at least one value in MARCItemFieldsToOrder
- add to a basket via staged file with at least one value matching your MARCItemFields mappings
- set required fields for your order and click Save
=> Without this patch you got:
receive error: "DBIx::Class::Storage::DBI::_dbh_execute(): Column 'itemnumber' cannot be null at /kohadevbox/koha/Koha/Acquisition/Order.pm line 113
at /usr/share/perl5/DBIx/Class/Exception.pm line 77"
=> With this patch applied the order has been created successfully
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 12e1b2faccf6396d3c4b5327c881e78f177f135b)
Marcel de Rooy [Wed, 5 Aug 2020 13:48:59 +0000 (13:48 +0000)]
Bug 25360: (follow-up) Remove the https FIXME in Auth.pm
The FIXME is no longer valid since we fixed the X-Forwarded headers
for Plack. And since we do not even use using_https anymore in
the templates (see bug 21094).
Test plan:
Run Auth.t
Git grep for using_https
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f6fb719bf6f6e6e0f830f97561ddc6e29012071)
David Cook [Mon, 4 May 2020 01:12:26 +0000 (11:12 +1000)]
Bug 25360: Use secure flag for CGISESSID cookie when using HTTPS
This patch adds the secure flag to the CGISESSID cookie when using HTTPS.
This prevents the cookie being used again over a normal HTTP
request.
Bug 25360: [Follow-up] Test for "on" or "ON" value for HTTPS env var
This patch tests for HTTPS "on" or "ON" before setting the secure
cookie.
Bug 25360: [Follow-up] Fix typo in C4/InstallAuth.pm
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended number of tests in Context.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c2a0b7a4e761b7d3bea9145440313e832808c60b)
Jonathan Druart [Mon, 2 Mar 2020 09:08:12 +0000 (10:08 +0100)]
Bug 24663: (follow-up) Remove authnotrequired if set to 0
2 newly added scripts
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 12fc93f03a906317933dbd4dbbe63033e684840f)
Jonathan Druart [Mon, 17 Feb 2020 15:44:37 +0000 (16:44 +0100)]
Bug 24663: Handle special cases for recovery password and selfreg
The password recovery and self-registration features need to be
accessible at the OPAC even if not public.
Test plan:
Self register a new account, then ask for a new password with OpacPublic
turned off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5df7a3b6b589e692bec13a8f09258f2c26bfaa2c)
Jonathan Druart [Mon, 17 Feb 2020 12:31:38 +0000 (13:31 +0100)]
Bug 24663: Force authentication in svc/records/preview (?)
Was this wrong?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f4bbeab8581b4abd926b14e4c2aed100598ec06e)
Jonathan Druart [Mon, 17 Feb 2020 12:31:17 +0000 (13:31 +0100)]
Bug 24663: Force auth in adveditorshortcuts.pl
This was wrong!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 165c1c67613362a299138359e056f7b355d05c9e)
Jonathan Druart [Mon, 17 Feb 2020 12:20:48 +0000 (13:20 +0100)]
Bug 24663: Remove authnotrequired if set to 0
It defaults to 0 in get_template_and_user
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79f7a3fc024323d8b4016d201a222118801bdcc6)
Jonathan Druart [Mon, 17 Feb 2020 12:16:48 +0000 (13:16 +0100)]
Bug 24663: Test OpacPublic for all OPAC scripts
Prior to this patchset there were 3 different calls to
get_template_and_user (or checkauth) with the authnotrequired param:
* authnotrequired => 0
* authnotrequired => 1
* authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 )
The first one says that an unauthenticated user can access the page, the
second that the user has to be authenticated, and the last one that it
depends on the OpacPublic syspref.
Actually we must replace the first one with the third one, if the OPAC
is not public, the authentication must be forced.
To do so we are going to remove the "authnotrequired => 0" occurrences,
and check the OpacPublic syspref's value in C4::Auth
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b095d1d80e5d4026a68e8df72ccd9918aff3dee)
Bug 23634: (QA follow-up) Our PUT is really a PATCH
This patch makes the controller not expect that there will always be all
the email fields. So it now checks if an email field was passed, and
changed, and renders the error if that stands.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests written by Nick highlight a problem
2. Apply this patch
3. Repeat 1
=> SUCCESS: Problems solved
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f58ae3f0ead21e77da038f37fa098593e50615d5)
Nick Clemens [Mon, 13 Jul 2020 10:33:11 +0000 (10:33 +0000)]
Bug 23634: (QA follow-up) Adjust tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ad5e09be0208290463a31ccb3be5b2be3a1082f)
Martin Renvoize [Fri, 10 Jul 2020 08:38:31 +0000 (09:38 +0100)]
Bug 23634: (QA follow-up) Catch all email cases in API
The API was only catching the primary email change case, but we need to
catch email, emailpro and B_email.
We were also not accounting for any of the emails (on PUT or from the
DB) being undefined.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 31e362484bba5a42f218027cee0b15a714eccb8c)
Martin Renvoize [Tue, 19 Nov 2019 16:59:06 +0000 (16:59 +0000)]
Bug 23634: (follow-up) Prevent updates on POST
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e213d65860ab4fcb6a425244729ac4a9fe8c19f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 624aa55ff33e6fe228ca806f8eb9c6592ab8cdbc)
Martin Renvoize [Tue, 19 Nov 2019 14:51:50 +0000 (14:51 +0000)]
Bug 23634: Prevent non-superlibrarians from editing superlibarian emails
This patchset prevents a non-superlibrarian user from editing a
superlibrarians email address via memberentry. This is to prevent a
privilege escalation vulnerability whereby a user could update a
superlibrarians contact details to match their own and then request a
password reset via the OPAC.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e4fdbd69722ee33fb0e7125f9a1b316e7f9f8b02)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c8b23c42786463ce7eb617e5a22bf84e6635f1c)
Martin Renvoize [Tue, 19 Nov 2019 14:11:34 +0000 (14:11 +0000)]
Bug 23634: Add is_superlibrarian method to Koha::Patron
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4825fd5d82241631745016e1dfbfe75e77138e7a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6d7e7fc066c93b3893527ec3de0e34b2fc4fe58f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 1 May 2020 16:24:44 +0000 (12:24 -0400)]
Bug 25348: Add support for circulation status 12 ( lost )
We should support the SIP2 "circulation status" value 12, "lost".
Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Transaction.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ed6a65c1ddacaa80fe825056cc77c3a3170af683)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>