]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 21035: Handle new lines when running reports
Jonathan Druart [Wed, 4 Jul 2018 18:05:25 +0000 (15:05 -0300)]
Bug 21035: Handle new lines when running reports

See https://metacpan.org/pod/Text::CSV_XS#Embedded-newlines

Test plan:

1) Choose two items, say barcode '123' and '456'
2) Change the public note on 123 to read

Line1
Line2

(I.e. type 'Line1', then press Enter, type 'Line2' and click update).
3) Change the public note on 456 to read

Public note has one and only one line.

Click update.
4) Create a report with the followng query:

select barcode, itemnotes from items where barcode in ( '123', '456' )

Let's say that this is report number 10.

5) run ./misc/cronjobs/runreport.pl --format=csv REPORT_ID:

=> You should see both lines

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f16fb888f132703063f0591e329d72d065f4b1d9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4fd18a7df711f5a59f459234ec186b175ee05eb6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour
David Cook [Mon, 30 Jul 2018 04:35:40 +0000 (14:35 +1000)]
Bug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour

When using the WYSIWYG editor for system preferences, the editor only
updates the textarea element if the content is different from the
original content. This means if you change a system preference and
then change it back to the original content, the textarea will have
the 2nd last change you made.

This patch removes the TinyMCE.isDirty() check, which was responsible
for comparing the original and changed content. Every input/keydown/dragend
or TinyMCE command will cause the textarea element to be updated and
trigger the input event which causes the "modified" class to be added
to the element, so that the system preference can be saved.

__TEST PLAN__

_Before applying_
0. Change "UseWYSIWYGinSystemPreferences" to "Show"
1. Change "opaccredits" to "123a"
2. Click "Save all OPAC preferences"
3. Reload the page
4. Change "opaccredits" to "123"
5. Change "opaccredits" to "123a"
6. Click "Save all OPAC preferences"
7. Reload the page
8. Note that "opaccredits" says "123"

_Apply the patch_

_After applying_
1. Change "opaccredits" to "123a"
2. Change "opaccredits" to "123"
3. Click "Save all OPAC preferences"
4. Reload the page
5. Note that "opaccredits" says "123" (and not "123a")
6. Change "opaccredits" to "1234"
7. Click "Save all OPAC preferences"
8. Reload the page
9. Note that "opaccredits" says "1234"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f4cf075fbea353a5cbf11aaead37c92eac8179b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1dfa4318262a908b1df9d8d2454c15a39c84416c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19291: Make breadcrumbs for OPAC search history consistent with other patron...
Owen Leonard [Fri, 27 Jul 2018 17:22:54 +0000 (17:22 +0000)]
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages

This patch adds the logged-in patron's name to the search history page's
breadcrumb navigation.

To test, apply the patch and view the OPAC search history page with no
user logged in. The breadcrumbs should read:

- Home ->  Search history

Log in and return to the search history page. The breadcrumbs should
read:

- Home -> Owen Leonard -> Your search history

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21137

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ff3987c023a658e63e46ea8601666916287c8ec5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fe9888e1ab5aa67c4b52efb1dbca5290e9c3dfd7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21056: Add another flush later
Jonathan Druart [Tue, 31 Jul 2018 15:14:54 +0000 (12:14 -0300)]
Bug 21056: Add another flush later

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5abcd3312adc02a14465a0781f735b8494d60f42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88a2c8886c4cf37e6dff00cffd26674d6ac548e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21056: Changing the logged in library can fail sporadically
Kyle M Hall [Mon, 9 Jul 2018 18:05:29 +0000 (14:05 -0400)]
Bug 21056: Changing the logged in library can fail sporadically

We are getting reports that sometimes changing the logged in library via selectbranchprinter.pl sometimes appears to fail. Flushing the session after updating the branch appears to fix this.

Test Plan:
1) Change your logged in library repeatedly. Hopefully ( sort of ) it will fail to change.
   You may want to try various browsers.
2) Apply this patch
3) Note the change no longer fails

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 76a06a7050643add32f4cbccbdc2fb00f66f5485)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a5dabc27174d5b77783f81c59248f5da8b37c79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required...
Owen Leonard [Thu, 2 Aug 2018 13:46:31 +0000 (13:46 +0000)]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

This patch adds some CSS to target mandatory fields on the add item
screen which are styled by the Select2 plugin.

To test you must have at least one item field marked mandatory and
linked to an authorized value.

Open the add item form for an existing record. Try to submit the form
without making a selection in the mandatory dropdown. You should get an
alert warning you that you have empty mandatory fields, and the field
should be highlighted in yellow.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 62aacb5865719e27224bf8f1963de1888d2ca05d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9bb74effa31053c685902df48714a61c18d3c6d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21075: Unit tests
Nick Clemens [Fri, 13 Jul 2018 15:13:31 +0000 (15:13 +0000)]
Bug 21075: Unit tests

prove -v t/db_dependent/Reserves/AutoUnsuspendReserves.t

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e5865ee4feaca3ca5575ce45d11fc88d88dc43d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77f2da8fb26e68fa87d2858fc1dfc9f223e24821)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21075: AutoUnsuspendHolds should unsuspend holds <= today
Nick Clemens [Fri, 13 Jul 2018 14:45:55 +0000 (14:45 +0000)]
Bug 21075: AutoUnsuspendHolds should unsuspend holds <= today

To recreate:
 1 - Place a hold in your system
 2 - Set that hold (or all holds) to expire today
    update reserves set suspend_until=CONCAT( CURDATE()," 00:00:00");
 3 - Run misc/cronjobs/holds/auto_unsuspend_holds.p
 4 - Note the hold is sitll suspended
 5 - Visit /cgi-bin/koha/reserve/request.pl for the book with the hold
 6 - Note the suspend date is tomorrow (and cannot be set to today]
 7 - Click update holds - the date in db is now set to tomorrow
 8 - Reset to today
 9 - Apply patch
10 - Run the cron again
11 - Visit the page and note hold is unsuspended

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c0f7aed84d663029b2f1b37ce0391b5a40b10b97)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e67cff276297fe52e2f8c58ab559758ad5043f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: (follow-up) Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 15 Aug 2018 17:21:47 +0000 (14:21 -0300)]
Bug 21139: (follow-up) Floating toolbars - Remove unecessary height

Found where QAing bug 20935, we actually want the hidden toolbar to be
the exact same height as the visible one.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 592905a4d2d41a1a7b757c48fbac8fc6f025bf9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 514939a8046cb82a66cfb3966a14020e846face3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: No table in toolbar
Jonathan Druart [Wed, 1 Aug 2018 16:18:47 +0000 (13:18 -0300)]
Bug 21139: No table in toolbar

We do not need this selector, we will not have a table in the toolbar

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40577065b60ab87330f1fc0c3e6bbe52f2373e6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 71adb4380c101b10ddbda95be32806052e75d0d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Resize toolbar on window resize
Jonathan Druart [Wed, 1 Aug 2018 15:34:29 +0000 (12:34 -0300)]
Bug 21139: Floating toolbar - Resize toolbar on window resize

Prior to this patch the toolbar was not resized when the window was
resized

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ecf4da7d49357832b77ee087d968e071ab46b93)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5eecc789af216e56638525961a8c25dd9677c9db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Remove horizontal scrollbar on resize
Jonathan Druart [Wed, 1 Aug 2018 15:31:01 +0000 (12:31 -0300)]
Bug 21139: Floating toolbar - Remove horizontal scrollbar on resize

To test:
- add/edit a patron
- resize the window
=> Without this patch a horizontal scrollbar appears when resized
shorter

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5520f3e019f38cbd2ea75be0a13806f68a2f515)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 106ad2d6f01e6bdcf79b54791a437ae31746a059)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 1 Aug 2018 15:28:54 +0000 (12:28 -0300)]
Bug 21139: Floating toolbars - Remove unecessary height

This patch remove some pixels under the toolbar, they were used by the
hidden element.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2588811ef249f0996527e952e4ef5307c1834a71)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d0d2a35585b6563148178d41545db09dcc8c007)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Remove dup id
Jonathan Druart [Wed, 1 Aug 2018 15:28:37 +0000 (12:28 -0300)]
Bug 21139: Floating toolbar - Remove dup id

We should not have twice the same id, we always use fixFloat() on an
element with an id and then duplicate this element.
The id must be changed (just in case)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 77196e91402cdb59242f80e596f1812d238923c2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit af2ccb13e3001f388a320a0619e22871429e09b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21099: Reposition floating toolbars earlier
Jonathan Druart [Fri, 20 Jul 2018 15:59:16 +0000 (12:59 -0300)]
Bug 21099: Reposition floating toolbars earlier

To recreate:
- Go to the advanced search form
- scrolldown to position the toolbar on top of the window
- scrollup

https://screenshots.firefox.com/NnkFg3iOXqLPxfkd/pro.kohadev.org

The toolbar should have been repositioned earlier

Test plan:
Edit a patron
- scrolldown
- scrollup
- unfold the form in the header (tab "Search patrons", link "[+]")
- scrolldown
- scrollup
Advanced search
scrolldown
scrollup

You should notice the difference with and without this patch

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68e735b10151d7b70187fa7f9d4ecb2b94b34e6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0d349fba89697bf58d86a9b26d8ebc385d1a8417)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21048: (QA follow-up) Fix authorized value statuses in filter
Marcel de Rooy [Fri, 27 Jul 2018 07:42:06 +0000 (09:42 +0200)]
Bug 21048: (QA follow-up) Fix authorized value statuses in filter

If you select an authorized value status in the filter, you want to keep
it too just like normal statuses as CHECKED.
The variable selected_status was not filled. The minimal fix is adding that
template variable in the script. Note that suggestion.STATUS is out of scope
within a loop using suggestion as loop var.

Note: Adding a regular status like CHECKED as an authorized value with
same code but another description works, but is kind of confusing ;) Not
in the scope of this report though.

Test plan:
Select an authval status in the filter. Apply the filter and verify again
that it is still selected under Suggestion information.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b1e8193a84a8df6d70ad8de16dadb8c4301a706b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f5121183d9049a82645797e18028d600e11a2476)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21048: Fix display of suggestion's status (SUGGEST_STATUS)
Jonathan Druart [Wed, 11 Jul 2018 21:23:49 +0000 (18:23 -0300)]
Bug 21048: Fix display of suggestion's status (SUGGEST_STATUS)

When a suggestion's status is set to a customized value (AV
SUGGEST_STATUS), the description is not always displayed correctly.

Test plan:
- Create different values for the AV SUGGEST_STATUS
- Create several suggestions
- Change the status using the SUGGEST_STATUS values
- Edit the suggestion and change again the status
- View the suggestions for a given patron
(members/purchase-suggestions.pl?borrowernumber=XX), the statuses must
displayed correctly

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b25c063f950076234cf7bb4a496921983a7cc23f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e81fdb07c68fb80bc497190dfd2dd15f24491447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21031: Apache Rewrite rules don't work for API when using anything but Debian...
David Cook [Tue, 3 Jul 2018 09:04:50 +0000 (19:04 +1000)]
Bug 21031: Apache Rewrite rules don't work for API when using anything but Debian package Plack configuration

The Rewrite rules for Apache don't work unless you're using
debian/templates/apache-shared-opac-plack.conf or
debian/templates/apache-shared-intranet-plack.conf.

This patch fixes the Rewrite rules for the non-Plack Debian
Apache configuration templates as well as the standard
Apache configuration file that comes with Koha.

__BEFORE APPLYING__
1. Visit /api/v1/app.pl/api/v1/spec on your git dev install
2. This should display a large page of JSON
3. Visit /api/v1/spec on your git dev install
4. This should generate a 404 error

__APPLY PATCH__

__AFTER APPLYING__
5. Visit /api/v1/app.pl/api/v1/spec on your git dev install
6. This should display a large page of JSON
7. Visit /api/v1/spec on your git dev install
8. This should display a large page of JSON (identical to
the one from earlier steps)

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA with few notes posted separately to Bugzilla.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6b50f0bac092779f93033c8a3f002cb8722d7d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11b6ad197ab279aca89944001a9751a492bdb573)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21094: Syndetics: always use https instead of http
Owen Leonard [Thu, 19 Jul 2018 16:57:42 +0000 (16:57 +0000)]
Bug 21094: Syndetics: always use https instead of http

This patch removes the 'using_https' check in OPAC templates in calls to
Syndetics resources. Instead, https is always used.

To test, apply the patch and enable Syndetics-related preferences. View
the following pages in the OPAC:

- Bibliographic detail page
  - Browse shelf section of the bibliographic detail page
- Search results
- List contents
- Recent comments
  - Recent comments RSS
- User summary page
  - Circulation history

NOTE: I tested with made-up Syndetics credentials. This means my changes
didn't make the template explode, but it doesn't confirm conclusively
that the resources work.

Signed-off-by: John Doe <you@example.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e0548cc1a7a924731bd414fec2f7917f044040a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40cf253a0df46613340b301a8ce600de2e680a1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21077: Fix database documentation for statistics.type
Katrin Fischer [Sun, 15 Jul 2018 17:27:03 +0000 (19:27 +0200)]
Bug 21077: Fix database documentation for statistics.type

There's a typo for 'locause', this should be 'localuse'.
Also, 'Credit*' is never used.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b89cbf6a473e71597bc051d88c2152531648ad8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc490f7d86c182047a55f875d0db9081fe974996)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21134: Correctly throw the exception in Koha::Patron::Modification->approve
Jonathan Druart [Tue, 31 Jul 2018 15:43:54 +0000 (12:43 -0300)]
Bug 21134: Correctly throw the exception in Koha::Patron::Modification->approve

koha_1       |     # Looks like you planned 20 tests but ran 9.
koha_1       |
koha_1       | #   Failed test 'approve tests'
koha_1       | #   at t/db_dependent/Koha/Patron/Modifications.t line
259.
koha_1       | [Something went wrong]# Looks like your test exited with
255 just after 5.
koha_1       | [21:13:47] t/db_dependent/Koha/Patron/Modifications.t
.....................

"Something went wrong" should never been thrown,
Koha::Patron::Modification->approve raises $@, but it's not defined, it
should raise $_ instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e99cfbca7e904b7664163838a334c487c94e462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6133753ed661902a9ec3cce14190c7d3d683ef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21097: Missing optgroup closing tag in orderreceive.tt
David Cook [Fri, 20 Jul 2018 08:13:49 +0000 (18:13 +1000)]
Bug 21097: Missing optgroup closing tag in orderreceive.tt

There is a missing optgroup closing tag in orderreceive.tt. It doesn't
actually cause any display issues (at least in modern browsers), but
it's invalid markup, so this patch fixes it.

_TEST PLAN_
0. Add a budget and add a fund
1. Add a vendor
2. Add a basket
3. Add an order to a basket
4. Close the basket
5. Receive the order
6. Make sure the budget and fund both display when selecting the fund

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12e18f91be2a26501fba502d5f1106d66b06caee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 881781240cf0c1a487da1d05732dab300d6e1be7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20974: Remove files left behind after removing Solr
Owen Leonard [Thu, 21 Jun 2018 13:37:35 +0000 (13:37 +0000)]
Bug 20974: Remove files left behind after removing Solr

Some files were left behind when Bug 12538 removed support for Solr.
This patch removes them.

To test, apply the patch and fail to observe the existence of these
files:

koha-tmpl/opac-tmpl/bootstrap/en/includes/search/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Perform a search in the OPAC to confirm that nothing broke.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad34ef74cdee0f204c03cdf88b1db775768a44fe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 517827fb9c2e69d58d8e9345ba2d259de08efded)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21064: Use undefined instead of undef
Nick Clemens [Thu, 12 Jul 2018 10:18:10 +0000 (10:18 +0000)]
Bug 21064: Use undefined instead of undef

To test:
1 - Load the advanced cataloging editor
2 - Refresh the page several times
3 - Check the JS console, you shoudl see an error:
    'undef is not defined'
4 - Apply patch
5 - Try again, should be no error

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 367f47c416fa9164ccb8d9e5f50772e5a516d6b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f60c611972fe0442ee66f6ebf3a40f00bd11efcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21053: Encode URI characters in plugin 008
Jonathan Druart [Wed, 11 Jul 2018 21:55:06 +0000 (18:55 -0300)]
Bug 21053: Encode URI characters in plugin 008

A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.

These characters need to be correctly encoded before being passed as
parameters of the url

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfdf896111849454ade806bf49f48f1de5f626be)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 512ee5d57617c63da90be09268a77a0317c9e886)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21076: Don't call autocomplete code after patron found
Nick Clemens [Fri, 13 Jul 2018 17:49:14 +0000 (17:49 +0000)]
Bug 21076: Don't call autocomplete code after patron found

To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5a9bad787458411c790d26b3b115fe3e7e2e0ab2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 50f4e8635056d7b664b846db91d48bf282fef949)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20564: Don't use system to unzip files
Nick Clemens [Tue, 10 Jul 2018 13:48:07 +0000 (13:48 +0000)]
Bug 20564: Don't use system to unzip files

To test:
1 - Setup a zip file for patron images and cover images
2 - Test each tool
3 - Get a '500 error' after upload (note images do upload and attach)
4 - Apply patch
5 - Restart all the things
6 - Test agtain, uploads should complete and results display

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8b806227c130e86712e3e5bda61520447c60671d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f45f3afdf67193ec849f72955b6de4fbeb17db0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21285: Add missing select2x2.png file
Tomas Cohen Arazi [Wed, 29 Aug 2018 16:46:39 +0000 (13:46 -0300)]
Bug 21285: Add missing select2x2.png file

This file is part of the Select2 jquery plugin, but wasn't added when
the use of the plugin was introduced in Koha.

To test:
- On a high DPI screen (retina mac?) on Chrome or Safari
- Edit an item
=> FAIL: dropdowns using Select2 (like 'Shelving location') don't display the icons (down arrow and cross) and a default value is wrongly selected
=> FAIL: the inspector says the requested select2x2.png file returned a 400 error.
- Apply this patch
- Reload the edit page
=> SUCCESS: Things display correctly! Dropdowns without selected values
by default!
=> SUCCESS: No errors fetching select2x2.png
- Sign off :-D

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 235654a3cfa5b6e323489408ddc7875281bb1f50)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 637469974c3290a43ac259642df0fefdfe2d369f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl
Mirko Tietgen [Tue, 22 May 2018 10:32:19 +0000 (12:32 +0200)]
Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl

libhttp-oai-perl in Stretch is 4.03 and broken. Koha depends on
libhttp-oai-perl << 4 for that reason. To make the installation of Koha
on Stretch as easy as possible, this patch adds the alternative
libhttp-oai-3.27-perl which we provide in the Koha repository.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 56813f5c90827df0fd89262917e7f9920f7d9175)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20437: Update debian/control
Mirko Tietgen [Tue, 15 May 2018 17:23:25 +0000 (19:23 +0200)]
Bug 20437: Update debian/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9b31bc2d27c6e045a6e7ea079778c47674c135db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20437: Force the dependency on HTTP::OAI < 4.0
Tomas Cohen Arazi [Fri, 16 Mar 2018 18:22:47 +0000 (15:22 -0300)]
Bug 20437: Force the dependency on HTTP::OAI < 4.0

Until HTTP::OAI is patched so it actually works, and bug 17704 fixes the API change Koha-side, we need to explicitly pull the right version. Otherwise people using Debian 9+ derived distros (Ubuntu 16.04+) are seeing production issues.

This implies packaging our custom libhttp-oai-perl distribution in the meantime.

This patch makes Koha require a version lower than 4.0.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 05ebfaf0c04cce35933f81e48de95b307da1c325)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20770: ILL loans OPAC form notes field allow arbitrary input
Andrew Isherwood [Tue, 15 May 2018 15:00:02 +0000 (16:00 +0100)]
Bug 20770: ILL loans OPAC form notes field allow arbitrary input

This patch addresses the lack of sanitization of the "notes" field on
the OPAC "View Interlibrary loan request" page.

To test:

- Apply the patch
- As an OPAC user, create an ILL request
- Navigate to the request's "View Interlibrary loan request" page
- Add the following note:

  Hello
  <h1>TESTING</h1>
  <script>alert('pwned');</script>

- Click "Submit modifications"
- TEST: Observe, when the page reloads, only the following is preserved in the
"Notes" textarea:

    Hello
    TESTING

- As a staff user, naviate to the ILL requests table
- Select "Manage request" for the request you created
- TEST: Observe that the Notes field only contains:

    Hello
    TESTING

- TEST: Observe that no Javascript alert is displayed

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 552873f7d466abee6919414b8d2f5e6c99f9a44f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc81442349cb07afe242607f2c40acb62e4e76fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21226: DBRev 17.11.09.001
Nick Clemens [Thu, 16 Aug 2018 14:03:28 +0000 (14:03 +0000)]
Bug 21226: DBRev 17.11.09.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21226: Remove xISBN services
Jonathan Druart [Wed, 15 Aug 2018 14:58:12 +0000 (11:58 -0300)]
Bug 21226: Remove xISBN services

OCLC has decided to retire all xISBN services:
https://www.oclc.org/developer/news/2018/xid-decommission.en.html

The code for related features has to be removed from Koha.

Test plan:
You need to be familiar with the different sysprefs (I am not):
- FRBRizeEditions
- SyndeticsEnabled
- SyndeticsEditions
- ThingISBN

Make sure there are no regressions introduced by this patchset.

QA Note: C4/XISBN.pm should be renammed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bce549bc4c0f9fefddb34fe614f6bf79aef882ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7cacd4ddb90d55238e0446a67ce4d68a54c58e3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21226: DB Changes
Jonathan Druart [Wed, 15 Aug 2018 14:36:21 +0000 (11:36 -0300)]
Bug 21226: DB Changes

Remove prefs OCLCAffiliateID, XISBN and XISBNDailyLimit

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b19090c4505c0f407a7f3cbfe3c14da5cfecc657)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8111e0c380c9d2c61a2b6b6665b5a7bad3a3e646)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.11.09 release v17.11.09
Fridolin Somers [Tue, 28 Aug 2018 14:02:04 +0000 (16:02 +0200)]
Update release notes for 17.11.09 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoIncrement version for 17.11.09 release
Fridolin Somers [Tue, 28 Aug 2018 13:50:19 +0000 (15:50 +0200)]
Increment version for 17.11.09 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoMerge remote-tracking branch 'translate/17.11.09-translate-20180828' into sec_171109
Fridolin Somers [Tue, 28 Aug 2018 13:56:17 +0000 (15:56 +0200)]
Merge remote-tracking branch 'translate/17.11.09-translate-20180828' into sec_171109

6 years agoBug 21199: (QA follow-up) Add show_attributes to perldoc
Martin Renvoize [Mon, 13 Aug 2018 08:54:44 +0000 (09:54 +0100)]
Bug 21199: (QA follow-up) Add show_attributes to perldoc

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d555126d8f8fe8c9a4bdd6563c8fcd82b971fc84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21199: Hide patron's attributes from ILSDI if required
Jonathan Druart [Thu, 9 Aug 2018 22:34:58 +0000 (19:34 -0300)]
Bug 21199: Hide patron's attributes from ILSDI if required

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dabd86cf6eab70751cc1a476b47cdf9f1648788f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoTranslation updates for Koha 17.11.09
Koha translators [Tue, 28 Aug 2018 13:41:04 +0000 (10:41 -0300)]
Translation updates for Koha 17.11.09

6 years agoBug 21032: Fix using facet for searches made on specific index
Alex Arnaud [Tue, 3 Jul 2018 13:57:00 +0000 (13:57 +0000)]
Bug 21032: Fix using facet for searches made on specific index

Test plan:

  - Try a simple search (OPAC or staff) like "title:foo",
  - click on a facet: badaboum!
  - apply this patch,
  - retry

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96f253d5ed2f1770b42f06554ebb4c4e14b3afdf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8cfacd7e164178828b0e75743e78d1740ab414b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21018: Allow uris defined in the item
Jonathan Druart [Wed, 11 Jul 2018 14:29:15 +0000 (11:29 -0300)]
Bug 21018: Allow uris defined in the item

We need to search for uri defined for the itemnumber we passed in
parameter.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1d888c8d0e9ee2eda9c793cf75fd73a7afeaef16)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0971fed0b85834f20bc2450c7e68e1d252363b56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21018: Fix TrackClicks for 952$u
Jonathan Druart [Fri, 29 Jun 2018 13:29:30 +0000 (10:29 -0300)]
Bug 21018: Fix TrackClicks for 952$u

Caused by
  commit 51b6cf2aafbfb45b9fcb072403b986fe3c2add53
  Bug 19847: Track links within the records and 404 for others

We should also accept uri stored in items.uri (952$u)

Test plan:
- Turn on TrackClicks
- Defined uri for some items
- At the OPAC click on the link (from opac-detail.pl)
=> Without this patch you will get 404 (redirected from tracklinks.pl)
=> With this patch applied you will be redirected correctly and the
linktracker will be filled correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d14ed73744fa23d4ed649da6d847f4b37cdfce92)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20bfb6730f3d93d388a538871b94e83d867ac796)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 8604: Patron cards made for patrons which don't have patron images use preceding...
Chris Nighswonger [Wed, 4 Jul 2018 15:23:11 +0000 (11:23 -0400)]
Bug 8604: Patron cards made for patrons which don't have patron images use preceding card's image

This patch corrects referential problems which caused the script to
"re-use" images as well as other sorts of bad image behaviour.

To test:

1. Ensure that you can reproduce the original bug or some variation thereof
using the steps described in either of these two comments:

    https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8604#c0

    https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8604#c6

    NOTE: This is not an easy bug to reproduce.

2. Once you can reproduce the bug, apply this patch and follow the same steps
used to reproduce the bug.

3. Observe that the symptoms are corrected.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Reproduced the bug and resolved it with this patch.
Code is hard to read; exact cause of the problem was not fully uncovered.

Fixed spelling 'Destory' => 'Destroy'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5e60f15478a998f945ebc59b2c13ce9d37b8818)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97825af008ba57f7d7229ddb6ce9318e67e22e18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21122: Fix check-url-quick when utf8 characters in URL's
Liz Rea [Thu, 26 Jul 2018 04:26:15 +0000 (16:26 +1200)]
Bug 21122: Fix check-url-quick when utf8 characters in URL's

To test:

Make a record with a URL that has a UTF8 character, such as:
http://some.nonexistent.tld/MāoriWomenAotearoa.pdf
Run the check-url-quick.pl job, notice it dies at that URL
Apply this patch
Test again, it should work.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10720d2a5c50b82d565cab9ad70c8498164d81b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1c988ed7fb3ca7d018c9c7e7cea5f22415b95836)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20811: (RM follow-up) fix check for matching
Nick Clemens [Mon, 23 Jul 2018 12:23:07 +0000 (12:23 +0000)]
Bug 20811: (RM follow-up) fix check for matching

Notice should only be triggered if both settings are false

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12b505f2b797d77e800a17830f71a9c054cd076b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b1a07f712c23e62c830117d4c0ca1390044dc25c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc...
Marcel de Rooy [Fri, 20 Jul 2018 09:46:58 +0000 (11:46 +0200)]
Bug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc without biblionumber

If you use -update but do not find matches (or did not want to match), you
should not call those routines. We should warn and skip this record.

Adding a warn at the start that the choice of options may not be smart.
Note that this needs further attention somewhere else. You could mix
-update with -insert for instance and still see some problems. (May depend
on items with unique barcode etc.)

Test plan:
Run -update without match or isbn.
Or run -update -isbn with a non-matching ISBN.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 15b865c6ee558ef278f911ba3693c38c024c7f11)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8191625667162ac240a5d0e4d180632bcf100884)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20811: (QA follow-up) Make the isbn check work
Marcel de Rooy [Fri, 20 Jul 2018 09:21:11 +0000 (11:21 +0200)]
Bug 20811: (QA follow-up) Make the isbn check work

The following code was never reached, since $isbn was not filled.
    if (!$biblionumber && $isbn_check && $isbn) {
        $sth_isbn->execute($isbn);
        ($biblionumber,$biblioitemnumber) = $sth_isbn->fetchrow;
    }
Solution: Fix the code with two $isbn declarations. Move the checkisbn
condition a level deeper.

Test plan:
Run misc/migration_tools/bulkmarcimport.pl -file bib726.utf8 --update -isbn
Since you do not match on biblionumber, the ISBN should match.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a49a7f08d6dbaf992d70420dae744c75c2ad8aae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5094909140081b02c9688faa07fc630feab91f24)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20811: Fix wrong usage of ModBiblio
Jonathan Druart [Mon, 28 May 2018 18:19:09 +0000 (15:19 -0300)]
Bug 20811: Fix wrong usage of ModBiblio

Since
  commit cefa7c21e28b88351ee8ae0dfefb80a515323df9
  Bug 5635: bulkmarcimport new parameters & features

AddBiblio call has been replaced with ModBiblio, but the return values
are different. We should not replace the value of $biblionumber with
what returns this subroutine.

Test plan:
If you are familiar with bulkmarcimport.pl you should know what to test,
I am not.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d15185025a146656a1ad0d7d5a8eb261581c0f1e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c76d5b4b4a531e408fbaa5a9a7a523a749638764)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields
Katrin Fischer [Thu, 2 Aug 2018 13:56:11 +0000 (15:56 +0200)]
Bug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields

First patch deals with the problem on the item form, this
patch fixes the same problem on catalouging form for the
bibliographic record.

To test:
- Adapt your frameworks:
  - Make sure 942$c is mandatory
  - Link another field to an authorised value, for example: 942$n to YESNO
- Add a new record
  - Verify that the first value of each pull down is preselected,
    there is no way to trigger the 'required' error
- Apply patch
  - Add a record
    - Verify that classification source is preselected according to the
      DefaultClassificationSource system preference
    - Verify that 942$c now defaults to empty
    - Verify all your other mandatory subfields can be set to empty
    - Verify that you can't save before correctly setting them
  - Chane your frameworks
    - Add a default value for 942$c, for example: CF
  - Add another record
    - Verify the itemtype is now preset to your default itemtype
  - Edit an existing record, verify all values show correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 038e4011d4e4c1270592d476479062467a7a9be8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b0d692dcaaa38a5e4842b2c1466560f08fd2b0e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 14662: Add empty entries to pull downs on item form for mandatory subfields
Katrin Fischer [Tue, 31 Jul 2018 23:58:33 +0000 (23:58 +0000)]
Bug 14662: Add empty entries to pull downs on item form for mandatory subfields

The code assumed that if a subfield is marked as mandatory, there should be no
empty entry in the pull downs.

This assumption is not correct, as it leads to the first entry of the
pull down being preselected if there is no default set. Which means you
will never be alerted of any cataloguing errors and errors will be very
hard to find later on.

Correct behaviour would be to preselect the empty value when there is
no default. This means on saving the item an error message is triggered
and the cataloger is forced to set the value.

To test:
- Adapt your frameworks:
  - Make 942$c non-mandatory
  - In 952 make itemtype, classification source and some other pull downs
    like location or collection mandatory
- Add a new item
  - Verify that the first value of each pull down is preselected,
    there is no way to trigger the 'required' error
- Apply patch
  - Add a new item
    - Verify that classification source is preselected according to the
      DefaultClassificationSource system preference
    - Verify that the itemtype is preselected according to 942$c in
      the bibliographic record
    - Verify all mandatory fields can be set to empty
    - Verify that you can't save before correctly setting them
  - Change the 942$c in the record to empty
  - Add another item
    - Verify the itemtype is now empty
  - Change your frameworks and set a default for itemtype (Ex: BK)
  - Repeat default check with another pull down like collection or location

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We do not want empty values for branches (holdingbranch and homebranch
must be mandatory, see bug 21011)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 003a4439802bc4053ed9e5db7719434256788b29)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8f6c0490f3e21f661bad5734f330b914ea4817b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18947: LDAP - do not assume anonymous bind if no user or password
Nick Clemens [Wed, 13 Dec 2017 13:27:36 +0000 (13:27 +0000)]
Bug 18947: LDAP - do not assume anonymous bind if no user or password

To test:
Ideally tested on a working ldap server with bind by auth and no
anonymous bind
1  - Define an LDAP config with bind by auth
2  - Don't define user/pass
3  - Define anonymous_bind = 0
4  - Attempt bind by auth
5  - Error is something like:
LDAP search failed to return object : XXXXXXXXX: LdapErr: XXXX-XXXXXX,
     comment: In order to perform this operation a successful bind must
     be completed on the connection., data 0, v2580 at
     /usr/share/koha/lib/C4/Auth_with_ldap.pm line 102.
6  - Define user/pass
7  - Now bind by auth should work
8  - remove user/pass
9  - Apply patch
10 - Attempt again
11 - Bind by auth shoudl succeed

prove -v t/db_dependent/Auth_with_ldap.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8eed0466381435a0426fe9c2ea75fa295d906533)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2cb4bbd8baba9df1177fb965619df0328263541f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20014: Preselect item budget based on id not code
Nick Clemens [Wed, 17 Jan 2018 19:50:31 +0000 (19:50 +0000)]
Bug 20014: Preselect item budget based on id not code

To test:
1 - Have the same fund code in two budgets
2 - Have budget code defined in MarcItemFieldsToOrder
3 - Stage a file with some order items as defined above
4 - Inspect the fuinds drop down in the item, notice two lines are
marked selected
5 - Apply patch
6 - Repeat
7 - Only one field should be selected, with a preference for active
budget

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d1890533c8796873149338831c5de13d5b19cb9e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41b67901d2a6f46452d590916a0cb57f29a69496)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20773: DBRev 18.05.02.003
Nick Clemens [Tue, 21 Aug 2018 11:25:53 +0000 (11:25 +0000)]
Bug 20773: DBRev 18.05.02.003

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7dab4cd903f9623fb52592e65d57c93b6156d2aa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 31bf49b849a949c9f809d2ca2eaa1cecafb55036)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20773: (bug 20724 follow-up) Add a simple db revision
Marcel de Rooy [Wed, 16 May 2018 13:39:04 +0000 (15:39 +0200)]
Bug 20773: (bug 20724 follow-up) Add a simple db revision

We should correct bad data too.
This is a trivial, pragmatic approach. Instead of doing a complex
calculation with holidays etc. (as was done on 12063), we just add
MaxPickupDelay or 7 days to today probably resulting in a little bonus
time. Only for waiting holds. When the ReservesNeedReturns pref was not
Automatic, there should be no changes.

== Test plan ==
1. git checkout c585f1149770ec401f188e061211501897cec0bf~1
     This the commit before bug 20724's patches.
     We need that to be able to generate "corrupted data"
2. Set ReservesNeedReturns to "Automatically"
3. Place a hold on a specific item
4. The hold should have an *empty* expiration date
     record page → Hold → "Expiration" column
5. Apply this patch
6. Run updatedatabase.pl
7. Refresh the page
8. The hold should have an expiration date (not empty)
9. Celebrate! 🎉🎊🥳

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 20773: (followup) Remove MySQLism

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a4ec768e3787ff3ee426949c0f03188dd4d15e82)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6eb334e244a2cbaf84d8ac874348c1443252e656)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20724: (QA follow-up) Remove two obsolete comment lines
Marcel de Rooy [Wed, 16 May 2018 12:43:27 +0000 (14:43 +0200)]
Bug 20724: (QA follow-up) Remove two obsolete comment lines

No test plan :)

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 88ac8c499f878a1c0ac622d53742a3d9acea1f64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20724: Add tests for ReservesNeedReturns
Jonathan Druart [Thu, 10 May 2018 14:40:33 +0000 (11:40 -0300)]
Bug 20724: Add tests for ReservesNeedReturns

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
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 8b6dc6b23ccb26e18c437a578b4e20174ee1ea58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20724: Move the ReservesNeedReturns logic to AddReserve
Jonathan Druart [Thu, 10 May 2018 14:40:11 +0000 (11:40 -0300)]
Bug 20724: Move the ReservesNeedReturns logic to AddReserve

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
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 1798d22e764bebf46e2915e1c0b7c3360ea8dd51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20724: Correctly mark an hold as waiting - ReservesNeedReturns
Kyle M Hall [Thu, 10 May 2018 12:12:04 +0000 (08:12 -0400)]
Bug 20724: Correctly mark an hold as waiting - ReservesNeedReturns

We need to call Koha::Hold->set_waiting to correctly
calculate the expiration date.

It fixes a regression introduced by
  commit 26634151dbce0bf39ff6c9eda5b58bb993996a2d
  Bug 12063 - Fix QA failures

The expiration date has to be set for waiting holds

== Test plan (time to execute: less than 4min) ==
1. Set ReservesNeedReturns to "Don't automatically"
2. Place a hold on a specific item
3. Check it in and confirm hold
4. The hold should have an expiration date
     record page → Hold → "Expiration" column
5. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
6. Set ReservesNeedReturns to "Automatically"
7. Place a hold on a specific item
    (which should also behave like we check the item in to
    keep it for the patron)
8. The hold should have an *empty* expiration date
     record page → Hold → "Expiration" column
9. Holds awaiting pickup page should crash
     staff:/cgi-bin/koha/circ/waitingreserves.pl
10. Cancel the hold to remove the corrupted data
     record page → Hold → the red X
11. Apply this patch
12. Place a hold on a specific item
13. The hold should have an expiration date (not empty)
14. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
15. Celebrate!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
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 c585f1149770ec401f188e061211501897cec0bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20623: (QA follow-up) avoid fetch() calls in some cases
Victor Grousset [Fri, 11 May 2018 15:43:33 +0000 (17:43 +0200)]
Bug 20623: (QA follow-up) avoid fetch() calls in some cases

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35d887fece0634eb92d030b959aeb991f10a0239)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20623: (QA follow-up) Remove one find call
Marcel de Rooy [Fri, 11 May 2018 09:33:32 +0000 (11:33 +0200)]
Bug 20623: (QA follow-up) Remove one find call

Imo these somewhat weird lines ask for improvement, but I don't want to change
the exact conditions here. Just removing the need to call find twice.

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 1bc3bbfdc78bfd559fec841c6ca47ddcbeb0f179)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20623: Fix basket group PDF when itemtype not itemtype table
Victor Grousset [Fri, 20 Apr 2018 09:17:26 +0000 (11:17 +0200)]
Bug 20623: Fix basket group PDF when itemtype not itemtype table

When an item has an itemtype not in the itemtype table. Trying to fetch
it's description lead to an error.
Using authorized values like ccode to populate the itemtypes of the
biblioitems (instead of the itemtype table) can lead to such data.
Or importing records with invalid itemtype codes. Koha doesn't do enough
checks at import to at least warn about these issues.

== Test plan ==
1. first we need an item with an itype not in the item_types table
   1. download a record as MARCXML
   2. find it's item type in administration; and the related code
   3. open the MARCXML file and search for occurences of the code
        and replace them by some non-existing value like "FOOBAR"
   4. also change the barcode so it won't be ignored because
        it's a duplicate
   5. also change the title to easily find it later in the search
   6. tools → "Stage MARC records for import"
   7. upload your file
   8. "stage for import"
   9. click "Manage staged records"
        You should end on the page related to your staged record
   10. "Import this batch into the catalog"

2. now we need it in a basket group
   1. have/create a active budget
   2. have/create a fund
   3. have/create a vendor with minimal info
   4. create a basket with minimal info
   5. add our imported item to the basket
        for example search it by name
   6. go to the basket. URL should be
      /cgi-bin/koha/acqui/basket.pl?basketno=XXXXX
   7. close this basket
        and tick "Attach this basket to a new basket group with the same name"
   8. you will end up in the basket groups lists
   9. go to the "closed" tab
   11. go to the basket group
          your vendor page => Basket groups => Closed

3. export as PDF, it should fail (internal server error)
     this is the bug (no kidding ^_^)
4. apply this patch
5. reexport the basket as PDF
6. it should work
7. create an item type (in administration)
     that has the same code as the one that you put in the MARCXML
8. reexport the basket as PDF
9. check that in the PDF that the description is here:
     table at the bottom of the document → "Document" column

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 3811985c3a55b72900ba005c6867059776ee9281)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18822: Check if we have MARC::Record and convert if not when using ES
Nick Clemens [Fri, 25 May 2018 09:32:58 +0000 (09:32 +0000)]
Bug 18822: Check if we have MARC::Record and convert if not when using ES

The new_record_from_zebra subroutine assumes that when using ES we
always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or
internally. This adds a test to new_from_zebra to confirm we have a
record object and to convert it if not

To test:
1 - Perform an advanced search from the advanced editor, make sure to
select 'Local catalog' and a remote source
2 - Error 'Internal search error [Object object]'
3 - Apply patch
4 - Repeat search, success!
5 - Select and deselect various servers, search should still work

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49db39c060163c3d46de4eff283919cc9af30a97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18822: Better error response
Nick Clemens [Mon, 19 Jun 2017 15:21:41 +0000 (11:21 -0400)]
Bug 18822: Better error response

Apply this patch first to see a change in the error feedback - instead
of [Object object] you should get a text readable error

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e26419e30c88d8a9cd54660752fda89170ae3f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20900: Add CPL branch in t_Batch.t too
Marcel de Rooy [Mon, 2 Jul 2018 08:41:24 +0000 (10:41 +0200)]
Bug 20900: Add CPL branch in t_Batch.t too

Same fix as previous patch.

Test plan:
Run t/db_dependent/Labels/t_Batch.t (without CPL branch)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ad0724b804970fe9ca8e8333b1fb0b893c28cf4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20900: Add CPL test branch in rollingloans.t
Marcel de Rooy [Fri, 8 Jun 2018 08:56:10 +0000 (10:56 +0200)]
Bug 20900: Add CPL test branch in rollingloans.t

Trivial fix.

Test plan:
Without this patch and a CPL library, run rollingsloans.t. See warns.
With this patch, no warns.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e3f399867abdf506ff271c57d652d1b3cdf8a7e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21025: Add GetPreparedLetter to Koha::Patron::Discharge
Charles Farmer [Fri, 29 Jun 2018 20:12:59 +0000 (16:12 -0400)]
Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge

Test plan (shamelessly ripped from Bug20953):

1) Set system preference 'useDischarge' to 'Allow'
2) Choose a patron without checkouts nor fines nor restrictions
3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl
4) Click on 'ask for a discharge' tab
   => You see /cgi-bin/koha/opac-discharge.pl
      with text 'What is a discharge? ...'
5) Click on 'Ask for a discharge' link
   => You see /cgi-bin/koha/opac-discharge.pl?op=request
      with text 'Your discharge request has been sent ...'
6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl
   => You see one discharge requets for the patron
   => Click on 'allow' on patron discharge request
7) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
  => You see link 'Get your discharge'
8) Click on the link to get your generated PDF
  => An error message should appear informing you to contact your website's admin
9) Apply this patch
10) Click again on the link to get your generated PDF
  => This time, a download prompt should appear

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 654abf9966bd340689b1944a7e5266cde7127321)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20698: Remove obsolete template: transfer-slip.tt
Owen Leonard [Mon, 18 Jun 2018 15:29:37 +0000 (15:29 +0000)]
Bug 20698: Remove obsolete template: transfer-slip.tt

This patch removes an unused template file, circ/transfer-slip.tt. Its
use was removed by Bug 7001:

http://git.koha-community.org/gitweb/?p=koha.git;a=commitdiff;h=a9ded4fa008668df8c485fbbc76efa3cc9cc00d7#patch12

To test, apply the patch and confirm that the file has been removed.
Confirm that no references to the template exist in the codebase.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0536b99e6dfdf7e21dcf62963ed3f1449d434d3d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20332: Allow translating some grouped opac results texts
Pasi Kallinen [Mon, 5 Mar 2018 10:10:56 +0000 (12:10 +0200)]
Bug 20332: Allow translating some grouped opac results texts

The grouped OPAC results page has several untranslatable
javascript-added texts, including the selection modifiers "Clear all"
and "Select all" links, and the entries in the shelves/lists dropdown.

Compare to opac-results.tt

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 53e0523207738cd489d77007c8e642b88030d4c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20090: (RM follow-up) Add missing paren
Nick Clemens [Fri, 13 Jul 2018 11:48:42 +0000 (11:48 +0000)]
Bug 20090: (RM follow-up) Add missing paren

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 43f509b08e7d30bca6c88e094bbfa763d036bf67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20090: Missing script statement for Novelist Select on some record displays in...
David Kuhn [Thu, 25 Jan 2018 17:27:19 +0000 (09:27 -0800)]
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC

This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt

To test (note that you must subscribe to Novelist Select):

1. If your library does not use the raton ratings feature, activate it for the purposes of this test.

2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will

display as 5 radio buttons and a "rate it" button.

3. Apply the patch.

4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed.

Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in

inspectors in most newer browsers to check for script errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I couldn't check with Novelist Select, but read and checked changed made carefully.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7662f4873e97272c677f4912c22aeeec25097bc2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21023: Remove warning in t/db_dependent/Circulation/Chargelostitem.t
Tomas Cohen Arazi [Fri, 29 Jun 2018 14:52:16 +0000 (11:52 -0300)]
Bug 21023: Remove warning in t/db_dependent/Circulation/Chargelostitem.t

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation/Chargelostitem.t
=> FAIL: Warning is displayed
- Apply this patch
- Run:
 k$ prove t/db_dependent/Circulation/Chargelostitem.t
=> SUCCESS: Tests pass! No warning!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce63b26b476415f30cecd7be97b52b60c07341d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 14446: Workaround to resolve uninitialized value in goto warning
Marcel de Rooy [Wed, 4 Jul 2018 14:03:33 +0000 (16:03 +0200)]
Bug 14446: Workaround to resolve uninitialized value in goto warning

Forcing both GetTab calls to list context resolves the warning.
A workaround, not a real fix.

Test plan:
Search for something in the syspref text bar.
Without this patch, you will have a warn: Use of uninitialized value in goto
With this patch, you won't.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1d6760f01a674ff52d96a1a342d68a7e5c9a6c8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20919: Remove unecessary search calls on the biblio detail page
Jonathan Druart [Thu, 14 Jun 2018 14:31:02 +0000 (11:31 -0300)]
Bug 20919: Remove unecessary search calls on the biblio detail page

There is a countanalytics flag that is set for items used in analytical
biblio records. This flag is only used in the template when 'analyze'
has been passed to the script.
In order to avoid unecessary search calls (1 per item), $analyse must be
tested.

Test plan:
0. Do not apply the patch
1. tail -f /var/log/koha/kohadev/zebra-output.log
2. Hit a bibliographic record detail page with several items
3. Notice that the log has 1 line per item:
  11:30:36-14/06 zebrasrv(32) [warn] ir_session (exception)
4. Apply the patch
5. Hit the page again
6. There is nothing in the zebra log file

If you are familiar with analytic records, confirm that you are not
allowed to remove an item that is used in analytical biblio records.

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4b51adb9a46c72099b950b1976c155f3c7d41f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20953: Prevent several discharge requests on OPAC
Fridolin Somers [Mon, 18 Jun 2018 07:04:19 +0000 (09:04 +0200)]
Bug 20953: Prevent several discharge requests on OPAC

On OPAC, a user can requested a discharge even if one is already pending.
This generates several pending discharges in staff interface that can not be deleted.

This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request.

Perl code must check that operation is allowed.

Patch reoganised the code so that the following FIXME is obsolete :
  'FIXME looks like $available is not needed'
Patch also replaces 'op' arg test to also check undef : input->param("op") // ''

Test plan :
1) Set system preference 'useDischarge' to 'Allow'
2) Choose a patron without checkouts nor fines nor restrictions
3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl
4) Click on 'ask for a discharge' tab
   => You see /cgi-bin/koha/opac-discharge.pl
      with text 'What is a discharge? ...'
5) Click on 'Ask for a discharge' link
   => You see /cgi-bin/koha/opac-discharge.pl?op=request
      with text 'Your discharge request has been sent ...'
6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl
   => You see one discharge requets for the patron
7) Come back to OPAC and refresh page
   => You see /cgi-bin/koha/opac-discharge.pl
   with text 'Your discharge will be available on this page within a few days.'
8) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl
   => There is still one requets for the patron
9) Come back to OPAC and enter URL /cgi-bin/koha/opac-discharge.pl?op=get
   => You see /cgi-bin/koha/opac-discharge.pl
      with text 'Your discharge will be available on this page within a few days.'
10) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl
   => There is still one requets for the patron
11) Click on 'allow' on patron discharge request
12) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
    => You see link 'Get your discharge'
13) enter URL /cgi-bin/koha/opac-discharge.pl?op=request
    => You see same page and no new discharge requets is created
14) Come back to intranet on patron details page
15) Remove the discharge restriction
16) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
    => You see text 'What is a discharge?...'
17) enter URL /cgi-bin/koha/opac-discharge.pl?op=get
    => You see same page and no new discharge requets is created

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0c07cc533b4b46db8c633d65b72b249f98227acc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20949: (follow-up) debian/control
Mirko Tietgen [Fri, 15 Jun 2018 10:34:51 +0000 (12:34 +0200)]
Bug 20949: (follow-up) debian/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 00b732db48d209908bd1982bbb007678335e7593)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20949: Koha depends on Clone
Mirko Tietgen [Fri, 15 Jun 2018 10:10:19 +0000 (12:10 +0200)]
Bug 20949: Koha depends on Clone

Clone was not declared a dependency before. It used to be a dependency
of Hash::Merge but isn't in the recent version.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f1a54e09d99eea391b71ceafc291cbca8c838da2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19502: Add POD for max_result_window
Julian Maurice [Mon, 25 Jun 2018 12:14:43 +0000 (14:14 +0200)]
Bug 19502: Add POD for max_result_window

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3576b1adedc4dbcabb1eb833f33194f66db63bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19502: Remove debug warn
Julian Maurice [Mon, 25 Jun 2018 12:14:32 +0000 (14:14 +0200)]
Bug 19502: Remove debug warn

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1b01e7db0e19f69ab77660cd3a26b1636a7b01e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19502: Retrieve index.max_result_window from ES
Julian Maurice [Tue, 5 Jun 2018 13:11:34 +0000 (15:11 +0200)]
Bug 19502: Retrieve index.max_result_window from ES

This avoid hardcoding '10000' in two different places and allow users to
adjust this setting.

Also, this patch fixes a bug when the search return less than 10000
results

Test plan:
1. Do a search that returns 10000+ records.
2. Note the warning above the pagination buttons
3. Go to the last page, no error
4. Change the ES setting:
   curl -XPUT http://elasticsearch/koha_master_biblios/_settings -d \
     '{"index": {"max_result_window": 20000}}'
5. Do another search that returns more than 10000 but less than 20000
6. Note that the warning does not show up
7. Go to the last page, still no error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 619d693908b1eb5de3da0d1bb80cc6c3cbf51ab3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19502: (follow-up) Pass parameters to avoid making templates depend on search...
Nick Clemens [Thu, 19 Apr 2018 23:13:49 +0000 (23:13 +0000)]
Bug 19502: (follow-up) Pass parameters to avoid making templates depend on search engine

https://bugs.koha-community.org/show_bug.cgi?id=19502

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e98e913dc98ced7167e73932ce865a952db6b1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19502: Limit pagination to first 10000 results when using ES
Nick Clemens [Fri, 16 Mar 2018 11:10:37 +0000 (11:10 +0000)]
Bug 19502: Limit pagination to first 10000 results when using ES

This patch is to avoid hitting an error page. We should eventually make the
max number returned configurable for ES.

To test:
1 - Have Koha running ES with 10,000+ records
2 - Search for '*'
3 - Click 'Last' to view last page of results
4 - 'Cannot perform search' error
5 - Apply patch
6 - Search again
7 - View 'Last' page
8 - No error, you go to the last of 10000
9 - Note the warning above the pagination buttons

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7bff14830df7eab4b9a6c57d017846af4f79da5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21009: Fix max length of inputs on editing/adding items
Jonathan Druart [Fri, 29 Jun 2018 17:09:07 +0000 (14:09 -0300)]
Bug 21009: Fix max length of inputs on editing/adding items

There is a "max length" value you can define at framework level to
limit the size of the input. But it is not taken into account on the
add/edit item form.

It is a regression that has been introduced by
  commit 47d2de9c024bfb93d56184f298f334b20685cd86
  Bug 12176: Remove HTML from additem.pl

max_length vs maxlength

Test plan:
- Define a maximum length for an item subfield
- Add or edit an item
=> Without this patch the maxlength attribute of the inputs are not
defined (maxlength="")
=> With this fix you will see the maxlength attributes correctly set
with the value you defined in the framework

Note:
We could/should set this value to the size of the DB column when mapped
For instance 952$u is mapped with items.uri, which is a varchar(255).
This length restriction should done at framework level

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 73e9c077f6543a4b08f3d2e7394c1e667f0d24e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20710: Update MARC21 frameworks to Update 26 (April 2018)
Bernardo Gonzalez Kriegel [Fri, 4 May 2018 22:49:07 +0000 (19:49 -0300)]
Bug 20710: Update MARC21 frameworks to Update 26 (April 2018)

This bug add update 26 changes.

Update 26
http://www.loc.gov/marc/bibliographic/bdapndxg.html

New subfields 377$3, 380$3, 381$3, 383$3, 730$4

Codes
    Map 007/04 'x' new
    Map 007/06 'c' renamed

No auth changes

To test:
1) Apply Bug 19835
2) Apply this patch
3) Reload marc21 bibliografic frameworks, check loads ok
4) Clean your browser cache
5) Edit a new bib record, fire 007 plugin,
    for Map, 04 position, check new 'x'
    for Map, 06 position, check renamed 'c'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b056933a366c46e16d92d36ee3976fa647f31186)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12001: [17.11.X] correct ILSDI_Services.t UT
Fridolin Somers [Thu, 26 Jul 2018 11:26:16 +0000 (13:26 +0200)]
Bug 12001: [17.11.X] correct ILSDI_Services.t UT

extracted from commit in master :
6355791848 Bug 12001: Move GetMemberAccountBalance to Koha::Account->non_issues_charges

6 years agoBug 12001: [17.11.X] Remove simple calls to GetMemberAccountRecords
Nick Clemens [Wed, 18 Jul 2018 11:36:36 +0000 (11:36 +0000)]
Bug 12001: [17.11.X] Remove simple calls to GetMemberAccountRecords

I chose not to backport the main patchset as it was big and didn't apply
clean, however, this problem seems to be an issue in 17.11.x

This patchset removes the calls where only the total is fetched/used

Please consider for backport

To test:
1 - Have a patron with some fines
2 - View these pages and confirm fine amounts display:
    circ/circulation.pl
    opac/opac-main.pl
    opac/opac-reserve.pl
    opac/opac-user.pl
    reserve/request.pl
3 - Apply patch
4 - View pages again, confirm fines display correctly and no errors

6 years agoUpdate release notes for 17.11.08 release v17.11.08
Fridolin Somers [Thu, 26 Jul 2018 08:31:37 +0000 (10:31 +0200)]
Update release notes for 17.11.08 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoIncrement version for 17.11.08 release
Fridolin Somers [Thu, 26 Jul 2018 08:22:56 +0000 (10:22 +0200)]
Increment version for 17.11.08 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoTranslation updates for Koha 17.11.08
Koha translators [Thu, 26 Jul 2018 08:13:34 +0000 (05:13 -0300)]
Translation updates for Koha 17.11.08

6 years agoBug 20084: Fix Industrial2of5 and COOP2of5 patron card layouts
Victor Grousset [Thu, 25 Jan 2018 13:37:56 +0000 (14:37 +0100)]
Bug 20084: Fix Industrial2of5 and COOP2of5 patron card layouts

== Test plan ==
This is an oversimplification of a full patron card setup used in production.

1. Create a batch with 1 patron
2. Create a layout and set
     the name
     "Print card number as barcode"
     "Barcode type:" to "Code 39"
3. Create a card template without filling anything
4. Export the batch using the layout and template
5. You should have a white page with a barcode
     And no errors in the relevant log file
     This show that this setup isn't completely bogus
     (although Code 39 is the only type working...)
6. Layout: set "Barcode type:" to Industrial2of5
7. Export the batch
8. You should have a white page with no barcode
     And errors in the relevant log file
     "Invalid Characters"
     This is the bug.
9. Layout: set "Barcode type:" to COOP2of5
10. Export the batch
11. You should have a white page with no barcode
      And errors in the relevant log file
      "Invalid Characters"
      This is the bug.
12. Apply this patch
13. Retry with both non-working patches
    1. You should have a white page with a barcode
    2. And no errors in the relevant log file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e237ce6fb02d82fae9d1162bbcfaf9dc2f25bb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21054: Remove extraneous </body> tag from sco-main.tt
Nick Clemens [Mon, 9 Jul 2018 13:24:44 +0000 (13:24 +0000)]
Bug 21054: Remove extraneous </body> tag from sco-main.tt

To test:
1 - Enable sco and setup AutoSelfCheck
2 - Try to use self checkout and print receipt
3 - You shoudl be redirected to the login page
4 - Apply patch and restart all the things
5 - Try to use self checkout and print a receipt
6 - Success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d9a94cc7e5fbcf924a1368423179c7d05fa49c8b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20979: Fix confirm deletion popup when deleting a biblio
Jonathan Druart [Thu, 21 Jun 2018 21:06:00 +0000 (18:06 -0300)]
Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48cecf7935728420567f62214c672c30e5fdfd7a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21046: Return the correct borrowernumber when there is empty cardnumber(s)
Alex Arnaud [Fri, 6 Jul 2018 13:40:53 +0000 (13:40 +0000)]
Bug 21046: Return the correct borrowernumber when there is empty cardnumber(s)

Test plan:
  - Use a patron with an empty cardnumber to authenticate with ILSDI
    AuthenticatePatron
    (cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=userid&password=pass),
  - make sure you have other patron(s) with empty cardnumber and there
    borrowernumber is
    smaller than the one you authenticate with,
  - you should get a wrong borrowernumber,
  - apply this patch,
  - test again, you should get the right one

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e7501a92aa6b4ca91a55f984443cfcfbeb76a797)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19873: (QA follow-up) Prevent warnings
Julian Maurice [Fri, 20 Apr 2018 11:55:50 +0000 (13:55 +0200)]
Bug 19873: (QA follow-up) Prevent warnings

"Use of uninitialized value $operands[X] in string ne"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 268ba1d5ec7ef66790583c877d5641f007550ad2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19873: Add unit tests
Alex Arnaud [Thu, 1 Mar 2018 13:23:44 +0000 (13:23 +0000)]
Bug 19873: Add unit tests

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2fa350014905c43636c6bdf8df7eee54e1b7d901)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19873: Ability to search on 0 value
Alex Arnaud [Fri, 22 Dec 2017 14:18:44 +0000 (14:18 +0000)]
Bug 19873: Ability to search on 0 value

Test plan:
  - create a st-numeric index in zebra conf related to
    a numeric field
    i.e:
    yourindex 1=yourindex 4=109
  - fill a field with 0 in a biblio,
  - reindex your biblios,
  - search yourindex=0,
  - should not work,
  - apply this patch,
  - test again,
  - should work

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc41a490a1ecd14e31b36a4531ced1203c0ed608)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17373: Add mappings for unimarc authorities - Match index
Alex Arnaud [Mon, 12 Mar 2018 16:12:20 +0000 (16:12 +0000)]
Bug 17373: Add mappings for unimarc authorities - Match index

Test plan:

1. apply patches

2. switch  SearchEngine syspref to ElasticSearch

3. load new mapping
(admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1)

4. load some unimarc authorities like the sample attached to bug 17373

5. reindex authorities
(./misc/search_tools/rebuild_elastic_search.pl -d -a -v)

6. search entire notice for shalev or שלו

7. you should find stuff

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 199c2f33d93a33bb56d422a6abdeb334fd988faf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17373: Elasticsearch - Authority mappings for UNIMARC - patch1
Fridolin Somers [Thu, 13 Oct 2016 07:45:40 +0000 (09:45 +0200)]
Bug 17373: Elasticsearch - Authority mappings for UNIMARC - patch1

This patch starts the UNIMARC mapping for ES.
It is needed to test.
More patches will come.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6271f6c1374ac2dad573ae6784d1632d626b14be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20216: Correctly populate values in itemtype editor
Nick Clemens [Thu, 15 Feb 2018 17:05:29 +0000 (17:05 +0000)]
Bug 20216: Correctly populate values in itemtype editor

Caused by a bad merge conflict on bug 12768.

To test:
1 - Edit an item type, define a replacement cost,processing fee, and
remote image url
2 - Save the item type
3 - Values are correct in list
4 - Edit again
5 - note values in fields are not populated
6 - Save itemtype, values are lost
7 - Apply patch
8 - Repeat 1-4
9 - Values should be correctly populated and saved now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 20216: (follow-up) - Fix other use of remote_image

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e4301a52b83ca24876ff58fd78bee863df5ce398)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>