Commit Graph

30804 Commits

Author SHA1 Message Date
Nick Clemens f45a8fa715 Bug 20795: Pass incrreased verbosity to zebra rebuild script
To test:
1 - Run koha-rebuild-zebra with multiple '-v'
2 - Note no increased verbosity
3 - Apply patch
4 - Run the updated koha-rebuild-zebra script with multiple '-v'
5 - Note increased verbosity

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1dfb177d3f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dbdd2b5630)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:43:41 +02:00
Owen Leonard 055127e9e8 Bug 21164: Fix alignment on new basket form in acquisitions
This patch removes some unnecessary "&nbsp;"'s from the template for
creating a new basket in acquisitions. This fixes the alignment on the
form fields.

To test, apply the patch and go to Acquisitions -> Vendor -> New basket.
All the form fields should be correctly left-aligned with each other.

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 2280877fdd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5fe28bf398)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:41:17 +02:00
Owen Leonard a28cc6108b Bug 21185: Incorrect title tag on tags review page
This patch corrects the title tag on the tags review page.

To test, apply the patch and go to Tools -> Tags. The page title
(probably shown in the browser tab) should start with "Koha ->" instead
of "Home ->".

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad0f90b797)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 718af573c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:40:18 +02:00
Katrin Fischer 5c34ec5664 Bug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab
The OPAC view link in the staff result list already had a target="_blank",
but it didn't work, because of the JavaScript for the result list browser
in staff.

The JavaSript code was looking for the links to the detail page in staff
and this also selected the link to the detail page in OPAC. By changing
detail.pl to \detail.pl opac-detail.pl will no longer be selected.

To test:
- Search in the staff interface
- Click "OPAC view" links in staff result lists
- Click "OPAC view' links in detai page
- Verify both now open in a new tab
- Click other links and test that navigation (previous, next,
  return to results) works as expected
- Inside the staff client, you should see something like
  searchid=scs_1533922927978 added to the URLs

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 880afc9035)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bed533eb34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:37:43 +02:00
Nick Clemens 784b7d7af2 Bug 18635: Koha::Patron->guarantees() should return results alphabetically
To test:
1 - Add the same guarantor to a number of patrons, ensuring random order
alphabetically
2 - View the guarantors record, note unordered list of guarantees
3 - Apply patch
4 - Guarantees are alphabetical

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe6cb85c55)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 74a2565c99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:32:12 +02:00
Marcel de Rooy 3f24a07a7e Bug 21033: Remove few warns in acqui/basket.pl
Resolve (line numbers based on 16.11.x):
Use of uninitialized value in hash element at acqui/basket.pl line 337.
Use of uninitialized value in hash element at acqui/basket.pl line 338.
Use of uninitialized value in hash element at acqui/basket.pl line 340.
Use of uninitialized value in hash element at acqui/basket.pl line 342.
Use of uninitialized value in hash element at acqui/basket.pl line 344.

Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 486.
Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 591.

Test plan:
If you have older acq data, you may have records in aqorders with field
tax_rate_on_ordering is NULL. These orders will trigger the above warns.
If you do not have, you could simulate by setting this field to NULL.

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 af82a1d597)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a6ed1c852)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:18:02 +02:00
Jonathan Druart fc0841f554 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 f16fb888f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4fd18a7df7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:10:59 +02:00
David Cook 68828e1a53 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 f4cf075fbe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1dfa431826)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:05:17 +02:00
Owen Leonard 0afb31f619 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 ff3987c023)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fe9888e1ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 14:02:09 +02:00
Jonathan Druart a981f630dd 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 5abcd3312a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88a2c8886c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:35:48 +02:00
Kyle M Hall b7ca04b769 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 76a06a7050)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a5dabc271)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:35:34 +02:00
Owen Leonard 4a0708dd37 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 62aacb5865)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9bb74effa3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:32:18 +02:00
Nick Clemens fe4d3d5006 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 6e5865ee4f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77f2da8fb2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:25:00 +02:00
Nick Clemens 3908248f58 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 c0f7aed84d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e67cff276)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:24:45 +02:00
Jonathan Druart ac56eda00a 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 592905a4d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 514939a804)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:39 +02:00
Jonathan Druart 06a44d405d 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 40577065b6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 71adb4380c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:33 +02:00
Jonathan Druart 80a38c96ea 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 5ecf4da7d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5eecc789af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:28 +02:00
Jonathan Druart 08213ef3e3 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 b5520f3e01)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 106ad2d6f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:24 +02:00
Jonathan Druart 60355e2253 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 2588811ef2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d0d2a3558)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:20 +02:00
Jonathan Druart 6842bc0c47 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 77196e9140)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit af2ccb13e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:22:15 +02:00
Jonathan Druart bc0cfb7d58 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 68e735b101)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0d349fba89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:20:38 +02:00
Marcel de Rooy 6af5e209a0 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 b1e8193a84)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f5121183d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:14:19 +02:00
Jonathan Druart 45cca9d1f2 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 b25c063f95)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e81fdb07c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 12:13:47 +02:00
David Cook 0df11d446c 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 c6b50f0bac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11b6ad197a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:57:55 +02:00
Owen Leonard d38fbd4c87 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 6e0548cc1a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40cf253a0d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:55:14 +02:00
Katrin Fischer 34f6507185 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 0b89cbf6a4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc490f7d86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:54:30 +02:00
Jonathan Druart c110912af3 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 6e99cfbca7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6133753ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:46:26 +02:00
David Cook d802bf6722 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 12e18f91be)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 881781240c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:35:59 +02:00
Owen Leonard 711f65a689 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 ad34ef74cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 517827fb9c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:34:38 +02:00
Nick Clemens 3725ca1be9 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 367f47c416)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f60c611972)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:32:20 +02:00
Jonathan Druart 7a75e0b963 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 bfdf896111)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 512ee5d576)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:30:18 +02:00
Nick Clemens 990b133fa7 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 5a9bad7874)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 50f4e86350)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-21 11:09:02 +02:00
Nick Clemens 1293b0a05b 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 8b806227c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f45f3afdf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-20 16:10:18 +02:00
Tomas Cohen Arazi 452d61c3e1 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 235654a3cf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 637469974c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-20 16:05:19 +02:00
Mirko Tietgen 2d3aca1b6d 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 56813f5c90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-11 16:23:45 +02:00
Mirko Tietgen 492af5173b 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 9b31bc2d27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-11 16:23:11 +02:00
Tomas Cohen Arazi 82c5cef3ce 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 05ebfaf0c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-09-11 16:23:02 +02:00
Andrew Isherwood cdcfce4c6c 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 552873f7d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc81442349)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-30 09:18:10 +02:00
Nick Clemens a641c83cab Bug 21226: DBRev 17.11.09.001
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-30 09:14:09 +02:00
Jonathan Druart 42a4c281cd 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 bce549bc4c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7cacd4ddb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-30 09:12:12 +02:00
Jonathan Druart 28ee71e684 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 b19090c450)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8111e0c380)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-30 09:10:36 +02:00
Fridolin Somers c0de9a7a3e Update release notes for 17.11.09 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-28 16:02:07 +02:00
Fridolin Somers d95f04926d Increment version for 17.11.09 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-28 15:56:34 +02:00
Fridolin Somers 455c2ba39c Merge remote-tracking branch 'translate/17.11.09-translate-20180828' into sec_171109 2018-08-28 15:56:17 +02:00
Martin Renvoize 7ab3f8ba72 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>
2018-08-28 15:56:10 +02:00
Jonathan Druart 0d588160cf 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>
2018-08-28 15:55:57 +02:00
Koha translators c53f512ae0 Translation updates for Koha 17.11.09 2018-08-28 10:41:04 -03:00
Alex Arnaud 863efa5d71 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 96f253d5ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8cfacd7e16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-28 15:26:41 +02:00
Jonathan Druart 99b6a69aef 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 1d888c8d0e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0971fed0b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-28 15:17:48 +02:00
Jonathan Druart 84f5ae669c Bug 21018: Fix TrackClicks for 952$u
Caused by
  commit 51b6cf2aaf
  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 d14ed73744)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20bfb6730f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-08-28 15:17:02 +02:00