]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 24120: (follow-up) input_name too
Nick Clemens [Tue, 26 Nov 2019 14:12:01 +0000 (14:12 +0000)]
Bug 24120: (follow-up) input_name too

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04fab26ccc25d70a3b94b3bd2ceea22752b8714e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24120: URI filter search terms in sort dropdowns
Nick Clemens [Tue, 26 Nov 2019 13:19:28 +0000 (13:19 +0000)]
Bug 24120: URI filter search terms in sort dropdowns

To test:
1 - Search for C++
2 - Sort your results
3 - Note search is now for "C  "
4 - Apply patch
5 - Search for C++
6 - Reorder results
7 - Still searching for C++

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 59ea9b3cc27c27d16880fc238f4a173a9e38b479)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24024: Invert names on halds waiting report
Nick Clemens [Tue, 12 Nov 2019 18:29:58 +0000 (18:29 +0000)]
Bug 24024: Invert names on halds waiting report

Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5cd071d66e2bba70f712b4fa4347648a51e1ed1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoMaintanence team template corrections
Martin Renvoize [Thu, 28 Nov 2019 18:23:44 +0000 (18:23 +0000)]
Maintanence team template corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 019eff289ba9db77096b9d38dd5e8d0428b6772a)

4 years agoUpdate release notes for 19.05.05 release v19.05.05-1
Fridolin Somers [Fri, 22 Nov 2019 12:50:12 +0000 (13:50 +0100)]
Update release notes for 19.05.05 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoUpdate teams for 20.05 cycle
Martin Renvoize [Thu, 28 Nov 2019 18:55:52 +0000 (18:55 +0000)]
Update teams for 20.05 cycle

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24075: Unit tests
Kyle M Hall [Thu, 21 Nov 2019 11:34:11 +0000 (06:34 -0500)]
Bug 24075: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ca7b6c40cfc78bbeaf0c9d5bebeeb2e3b5ce611)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 24075: Backdating a return to the exact due date and time results in the fine...
Martin Renvoize [Fri, 22 Nov 2019 12:31:09 +0000 (12:31 +0000)]
Bug 24075: Backdating a return to the exact due date and time results in the fine not being refunded

When you use the date picker or book drop mode and check in an item that is due on that date, a fine is assessed and not refunded.

For example: item 12345 is due on 11/19/2109 23:59.  On 11/20/2019 I check the item in using date picker/book drop setting the check in date to 11/19/2019 23:59, the patron is charged a fine, and the fine is not cleared as would be expected, since the item is being checked in before it is overdue.

Test Plan:
1) Back date a checkout so it is overdue
2) Run fines.pl to generate the fine
3) Return the item, backdating to the same date/time is was due
4) Note the fine was not removed
5) Apply this patch
6) Repeat steps 1-3
7) Fine should be zeroed out now!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 39cc13d070e1613b4a903ec5e0e2513ebd561285)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoMerge remote-tracking branch 'translate/19.05.05-translate-20191122' into new/securit...
Fridolin Somers [Fri, 22 Nov 2019 11:09:15 +0000 (12:09 +0100)]
Merge remote-tracking branch 'translate/19.05.05-translate-20191122' into new/security-release-19.05.06

4 years agoIncrement version for 19.05.05 release
Fridolin Somers [Fri, 22 Nov 2019 11:08:10 +0000 (12:08 +0100)]
Increment version for 19.05.05 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoTranslation updates for Koha 19.05.05
Koha translators [Fri, 22 Nov 2019 11:06:19 +0000 (08:06 -0300)]
Translation updates for Koha 19.05.05

4 years agoBug 23042: Correct shib param escaping
Jonathan Druart [Wed, 19 Jun 2019 17:12:15 +0000 (12:12 -0500)]
Bug 23042: Correct shib param escaping

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23042: Only include GET params in return URL for Shibboleth
Martin Renvoize [Thu, 13 Jun 2019 16:02:33 +0000 (17:02 +0100)]
Bug 23042: Only include GET params in return URL for Shibboleth

The shibboleth return target included POST parameters in the URL string,
this meant that a failed local login POST would include the username and
password used in the attemtped login in plaintext in the redirect URL
that is appended to the shibboleth login URL.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23042: Add tests to catch POST params in return URL
Martin Renvoize [Wed, 19 Jun 2019 09:56:30 +0000 (10:56 +0100)]
Bug 23042: Add tests to catch POST params in return URL

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23836: exit after output_error
Jonathan Druart [Wed, 30 Oct 2019 12:15:38 +0000 (13:15 +0100)]
Bug 23836: exit after output_error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23836: Don't forward form tracklinks if not tracking
Nick [Thu, 17 Oct 2019 15:26:18 +0000 (15:26 +0000)]
Bug 23836: Don't forward form tracklinks if not tracking

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: (RM follow-up) Restore DB after test
Martin Renvoize [Thu, 15 Aug 2019 07:54:59 +0000 (08:54 +0100)]
Bug 23329: (RM follow-up) Restore DB after test

Test plan:
1) Dump your DB before the tests is run
2) Run the test
3) Dumper your DB again and compare to the first dump
Success if there are no differences (other than the timestamp of the
dump)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: Fix tests
Jonathan Druart [Wed, 14 Aug 2019 18:56:48 +0000 (14:56 -0400)]
Bug 23329: Fix tests

- www.google.com vs https://www.google.com
- Remove transaction otherwise data are not available from webserver
- Use new C4::Output::output_error to avoid 302 (redirect)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: Move error page to its own subroutine
Jonathan Druart [Wed, 14 Aug 2019 18:56:46 +0000 (14:56 -0400)]
Bug 23329: Move error page to its own subroutine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: (RM follow-up) Add regression tests
Martin Renvoize [Wed, 14 Aug 2019 10:34:47 +0000 (11:34 +0100)]
Bug 23329: (RM follow-up) Add regression tests

Test plan:

Run the new tests and they should all pass once we've caught all cases

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: (QA follow-up) Resolve warning on wrong biblionumber
Marcel de Rooy [Fri, 9 Aug 2019 09:27:18 +0000 (09:27 +0000)]
Bug 23329: (QA follow-up) Resolve warning on wrong biblionumber

Passing a wrong biblionumber generates a warning:
    GetMarcUrls called on undefined record at opac/tracklinks.pl line 58.

Test plan:
[1] Try it again with a wrong biblionumber and check the logs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: (follow-up) Allow item URI with a biblionumber parameter
Marcel de Rooy [Fri, 9 Aug 2019 09:18:13 +0000 (09:18 +0000)]
Bug 23329: (follow-up) Allow item URI with a biblionumber parameter

If you pass a URI with a biblionumber without specifying the itemnumber,
tracklinks did not redirect an item URI.

Test plan:
[1] Add URI in an item.
[2] Pass this URI with the itemnumber to tracklinks. Should pass.
[3] Pass this URI with the biblionumber to tracklinks. Should pass now too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: (follow-up) Use any instead of grep
Tomas Cohen Arazi [Tue, 23 Jul 2019 19:39:18 +0000 (16:39 -0300)]
Bug 23329: (follow-up) Use any instead of grep

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23329: Only redirect tracklinks.pl to urls contained in records
Nick Clemens [Wed, 17 Jul 2019 11:01:01 +0000 (11:01 +0000)]
Bug 23329: Only redirect tracklinks.pl to urls contained in records

Bug 19487 limited redirection to urls contained in a record/item if we were tracking.
We should probably limit forwarding if not tracking as well.
Additionally, if we don't have a soucre, let's not forward

To test:
 0 - Set TrackClicks syspref to 'Don't track'
 1 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
 2 - You get forwarded to google
 3 - Set TrackClicks to 'Track anonymously'
 4 - You get a 404
 5 - Apply patch
 6 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
 7 - You get a 404
 8 - Set TrackClicks syspref to 'Don't track'
 9 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
     Choose a biblionumber that exists
10 - You get a 404
11 - Add http://www.google.com to the 856$u of the record used above
12 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
13 - You are redirected
14 - Confirm redirection and 404 as expected with other settings of TrackClicks

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23451: Fix other similar wrong filterings
Jonathan Druart [Fri, 22 Nov 2019 10:09:42 +0000 (10:09 +0000)]
Bug 23451: Fix other similar wrong filterings

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23451: Prevent XSS vulnerabilities in opac-imageviewer.pl
Jonathan Druart [Wed, 14 Aug 2019 17:31:53 +0000 (13:31 -0400)]
Bug 23451: Prevent XSS vulnerabilities in opac-imageviewer.pl

And certainly in other sripts as it is in opac-bottom.inc

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22543: Prevent "back and refresh attack"
Magnus Enger [Fri, 6 Sep 2019 07:54:04 +0000 (09:54 +0200)]
Bug 22543: Prevent "back and refresh attack"

To reproduce and test:
- Log into the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click "Back", you are taken to /cgi-bin/koha/opac-user.pl
- Reload the page, you see an error like "Confirm new submission
  of form"
- Reload the page again and confirm the submission of the form
- You are now logged in to the OPAC again!
- Log out again
- Apply this patch
- Log in to the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click back, you are taken to /cgi-bin/koha/opac-user.pl
- No matter how many times you reload /cgi-bin/koha/opac-user.pl,
  you should not see anything other than the login form.
- Check that Self Check Out still works as it should, by making
  sure you have a user with self_check permissions, then setting
  WebBasedSelfCheck, AutoSelfCheckAllowed, AutoSelfCheckID and
  AutoSelfCheckPass appropriately. Then visit
  /cgi-bin/koha/sco/sco-main.pl and verify everything works as
  expected.

The messages and errors pages you see related to resubmitting the
form might differ from the ones described here, depending on what
browser you use. I tested in Chromium 76.0.x.

This fix was originally proposed by LMSCloud:
https://github.com/LMSCloud/Koha-LMSCloud/commit/74a7fe0f0c5b2ce0d65bd26452c6dcaf0a7f65ad

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24060: Use patron object to load club tab
Nick Clemens [Mon, 18 Nov 2019 16:19:02 +0000 (16:19 +0000)]
Bug 24060: Use patron object to load club tab

To recreate:
1 - Be using 19.05
2 - Create a club template and a club
3 - Go to a patron's checkout page
4 - Note the club tab will load
5 - Go to a patron's details page
6 - Note the club tab says 'Loading'
7 - Apply patch
8 - It loads!

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23827: Correction for missed 'F' and 'FU' case
Martin Renvoize [Wed, 16 Oct 2019 14:58:36 +0000 (15:58 +0100)]
Bug 23827: Correction for missed 'F' and 'FU' case

When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed
the cases inside the cash_register_stats template. This patch should
correct that mistake.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23822: Fix deletion of patrons with credit
Jonathan Druart [Mon, 11 Nov 2019 11:35:30 +0000 (12:35 +0100)]
Bug 23822: Fix deletion of patrons with credit

There are bugs in both master and 19.05, but different.

Anyway we should have this check to make sure a negative value will have
the same behavior: trigger the confirmation message (instead of a blank
page).

If we want to reject the deletion of a patron with credit we should
handle it on a separate bug report (behavior change)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d23e50f0b239603a05ddbb62591e80657f5f6cae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23765: Do not display localized templates if TranslateNotices is off
Jonathan Druart [Thu, 7 Nov 2019 10:41:29 +0000 (11:41 +0100)]
Bug 23765: Do not display localized templates if TranslateNotices is off

To test:
1. Enable multi-languages
2. Set the preference 'TranslateNotices' on  'Allow'
3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual
email templates.
4. Set the preference TranslateNotices on 'Don't allow'.
5. Go to: tools==>Notices & slips==>Edit, the template shows several tab
for the same transport type.
6. Apply the patch.
7. Repeat the steps 4 and 5
8. Success. It only shows the default template when TranslateNotices is
'Dont allow'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 86f999812e1fb281742d79757964227ea0f5d330)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23854: Fix failure on dates when editing a suggestion
Jonathan Druart [Tue, 22 Oct 2019 09:10:59 +0000 (11:10 +0200)]
Bug 23854: Fix failure on dates when editing a suggestion

- Watch plack-error-log
- Change an accepted suggestion to 'No Status'
- Verify error in the logs (use strict mode, depending on DBMS version)
- Status changed was not saved
- Apply patch
- Verify the error is gone, change is saved now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 73198bc4bdafa6817c916c777a51a73d937ba2aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23985: (bug 21206 follow-up) Fix checkout list when "Hold pickup library match...
Jonathan Druart [Tue, 12 Nov 2019 17:00:02 +0000 (18:00 +0100)]
Bug 23985: (bug 21206 follow-up) Fix checkout list when "Hold pickup library match" not set

This patch restores the behavior prior to bug 21206.
If "Hold pickup library match" is "Not set", then
hold_fulfillment_policy equals an empty string.

Test plan:
1. Go to "Circulation and fines rules"
2. Under "Default checkout, hold and return policy", unset "Hold pickup
library match" and Save
3. Place a hold on one item for one patron
4. Try to checkout the same item with another patron

=> Without this patch you the checkout list do not show, and the logs
contain "The method Koha::Item-> is not covered by tests!"
=> With this patch applied you see the checkout list

QA will take care of comparing the statement with the one before bug 21206
and make sure they are equivalent

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17d221144605875b6efb1569093b76f412f8aea5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23846: Handle exception gracefully at the OPAC
Jonathan Druart [Tue, 12 Nov 2019 17:18:23 +0000 (18:18 +0100)]
Bug 23846: Handle exception gracefully at the OPAC

I do not think we should have the same trick as the intranet, and
display a message. This should be enough.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce358f9af5ee9761a875816f603344873838359)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23846: Add a check to the data inconsistencies script
Jonathan Druart [Tue, 12 Nov 2019 10:15:46 +0000 (11:15 +0100)]
Bug 23846: Add a check to the data inconsistencies script

This may be quite long for big catalogue, but I think it is a good one
to have.

Test plan:
Same as first patch, then execute search_for_data_inconsistencies.pl
Notice the error.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1e1c5d17a268c6d493c2c71d4b456da7749655c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23846: Display degraded view when MARCXML is invalid (staff detail)
Jonathan Druart [Tue, 12 Nov 2019 10:04:42 +0000 (11:04 +0100)]
Bug 23846: Display degraded view when MARCXML is invalid (staff detail)

When an invalid bibliographic record is imported into the catalogue
there is not warning or error. However the bibliographic record detail
page will explode (Koha::Biblio::Metadata->record will raise an
exception).

This patch proposes to catch the exception on this view and display a
warning about the situation.
Note that editing/saving the record will fix the MARCXML data and so
removes the warning (some black magic we should get rid of I suspect).

Test plan:
- Import a bibliographic record with invalid XML, you can add non
printable characters, like 0x1F (CTRL-V 1F with vim)
- Go to the detail page
=> Without this patch you get a 500
=> With this patch applied you get a "degraded view" with a warning
message, telling you what the error is.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 068943f18d60edc231b59b6232fecabaf1c799ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23986: Pass strings to Catmandu for deletion
Nick Clemens [Thu, 7 Nov 2019 19:38:24 +0000 (19:38 +0000)]
Bug 23986: Pass strings to Catmandu for deletion

The deletion subroutine expects to get a string, this is fine in most places, but when
we sort our records for batch deletion they are cast to numbers and the delete is not processed.

This patch quotes the biblionumbers as strings before passing them to Catmandu

To aid in detecting orphaned records you can use the patches on bug 22831

To test:
 1 - Have or create a bib
 2 - Go to Tools->Batch record deletion
 3 - Click 'Enter a list of record numbers'
 4 - Enter the biblionumber'
 5 - Confirm deletion
 6 - Search for the record, it still appears
 7 - Apply patch, restart all the things
 8 - Repeat 1-6
 9 - This time the record is deleted
10 - Test other methods of record deletion to confirm the record is removed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cdea121ddb5c3e609ce698171a8dc319593a7780)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23851: Add the homebranch prefix to the barcode when adding multiple copies of...
Jonathan Druart [Tue, 22 Oct 2019 09:36:28 +0000 (11:36 +0200)]
Bug 23851: Add the homebranch prefix to the barcode when adding multiple copies of an items

See the comment in the code for more information.

Test plan:
- Set autoBarcode to hbyymmincr
- Create an item and click on the barcode field
- A barcode prefixed by the homebranch is generated
- Click the "Add multiple copies of this item" and enter 4
- Save
=> Without this patch only the first item has the homebranch prefix
=> With this patch applied they all have a barcode in the same format

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aae3dfe1232d8df452c7e677c6fa443017fb0417)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23933: (bug 10132 follow-up) Fix commit_file.pl
Jonathan Druart [Mon, 4 Nov 2019 11:25:33 +0000 (12:25 +0100)]
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0eb9edbf229bdbde02ff65e5f955fb18cf0cc7db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22857: (QA follow-up) Cosmetic changes: typo, whitespace
Marcel de Rooy [Fri, 8 Nov 2019 09:00:32 +0000 (09:00 +0000)]
Bug 22857: (QA follow-up) Cosmetic changes: typo, whitespace

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bd30a17d3bc0040460543ced27140690f50d27f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22857: Sync koha-conf.xml files
Jonathan Druart [Tue, 5 Nov 2019 10:23:04 +0000 (11:23 +0100)]
Bug 22857: Sync koha-conf.xml files

Missing entries are added to those files.

Test plan:
Search for typos
Compare the two files and comfirm the entries are the same in both.
Exception: supportdir exists in etc/koha-conf.xml only, but I think it's
obsolete.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eaf4b79c32a6f173db8177b8ee365ec10f4532a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23529: (QA follow-up) Fix closing bracket, add label
Nick Clemens [Fri, 25 Oct 2019 11:31:46 +0000 (11:31 +0000)]
Bug 23529: (QA follow-up) Fix closing bracket, add label

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 70a59fc694866154fce74eeaf08ee2126f34947f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23529: (follow-up) Fix syntax error
Andrew Isherwood [Thu, 24 Oct 2019 11:26:44 +0000 (12:26 +0100)]
Bug 23529: (follow-up) Fix syntax error

As mentioned by Magnus in comment #8

Sorry Magnus, definitely fixed this time!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 370ee3203e2325f6f5db6771775ac4b55d82c874)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23529: Narrow scope of changed
Andrew Isherwood [Mon, 2 Sep 2019 08:29:14 +0000 (09:29 +0100)]
Bug 23529: Narrow scope of changed

Whilst working on something else, it came to light that the previous fix
in bug 23229 was waaaaay too heavy handed and basically kills all ILL
related JS :( This is obviously a big problem, this patch fixes that.

The main problem is that all the ILL related JS is in a single file,
which isn't ideal as bits of it are used on different pages. Ideally,
we'd refactor it out into more manageable chunks which can be included
as required. Until such a time, this patch will do, it just prevents the
"get all requests" AJAX request unless you're on the ILL list page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04e9885c0f18fda2363818d4b0f2453a3aff4923)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23963: Revert bug 21987 to restore image quality
Martin Renvoize [Mon, 4 Nov 2019 13:25:19 +0000 (13:25 +0000)]
Bug 23963: Revert bug 21987 to restore image quality

Bug 21987 had unexpected effects upon image quality for thumbnails.
Currently, we are working to resolve those issues but have not managed
to correct them inside the release window for this cycle. As such, I
have chosen to revert the original bug whilst we work on a resolution.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35670b0495e0333f57773b0375ea7aa1122d5372)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoRevert "Bug 21987: Add tests"
Fridolin Somers [Fri, 15 Nov 2019 10:13:15 +0000 (11:13 +0100)]
Revert "Bug 21987: Add tests"

This reverts commit afb39b132b10b74efec31cd8191cdcd72a61d8d3.

4 years agoRevert "Bug 21987: Do not generate true color thumbnails if not needed"
Fridolin Somers [Fri, 15 Nov 2019 10:13:14 +0000 (11:13 +0100)]
Revert "Bug 21987: Do not generate true color thumbnails if not needed"

This reverts commit 5c41d584cb654efbfd8c854bac0d30d87a054ab5.

4 years agoRevert "Bug 21987: (RM follow-up) Add text for simple tests"
Fridolin Somers [Fri, 15 Nov 2019 10:13:14 +0000 (11:13 +0100)]
Revert "Bug 21987: (RM follow-up) Add text for simple tests"

This reverts commit 1464328718619a673f233406fdb238f0391b0785.

4 years agoBug 23467: Exit after output_html - opac-reserve.pl
Jonathan Druart [Wed, 6 Nov 2019 09:59:26 +0000 (10:59 +0100)]
Bug 23467: Exit after output_html - opac-reserve.pl

To avoid double screen

There are several ways to recreate the issue, the easiest is:
  /cgi-bin/koha/opac-reserve.pl?biblionumber=

You should see "ERROR: No record id specified."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a4f2ad76f98e023489dec44f481f290302f44c78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23774: Server-side confirmation for hold pickup location in OPAC
Lari Taskula [Mon, 4 Nov 2019 16:32:58 +0000 (16:32 +0000)]
Bug 23774: Server-side confirmation for hold pickup location in OPAC

While placing a hold on a book, if a user opens up Inspect Element on the
Pick up location drop down box they can change the pick up location in
the code to a library that is not listed as a pick up location.

How to replicate:
Search for a book
Select book
Click Place Hold

On the screen Home > Placing a hold

Right click on Pick up location
Select 'Inspect Element'

Under
<!-- HOLDABLE -->

<li class="Branch">
<select name="Branch ******"> Pick Up location:</label>=$0

Option values are listed that relate to the pick up location, this value
can be changed to another new location and when the hold is placed
the hold will be placed for this new location instead of the listed options
in the Pick up location drop down list.

To test:
1. Apply patch
2. Repeat "How to replicate"
3. Observe it is no longer possible to place holds on libraries not defined
   as pickup location by changing option value via Inspect Element tool

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45a89f47090e783513841a087256c76fff84b29f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 17359: Use a unicode character in tests
Jonathan Druart [Tue, 5 Nov 2019 09:25:50 +0000 (10:25 +0100)]
Bug 17359: Use a unicode character in tests

And remove an unused variable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b920cb708b8acacbf2075b00c0c68e70b6d5a29b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 17359: Correct encoding when displaying patron import summary
Jonathan Druart [Wed, 16 Oct 2019 08:47:28 +0000 (10:47 +0200)]
Bug 17359: Correct encoding when displaying patron import summary

There is an encoding issue when the patron import summry, the string
must be UTF8 decoded before being sent to the template.

Test plan:
- Create a patron import CSV file with import issues. Use UTF8 characters.
See file attached to the bug report 'patron_import.csv'
=> The screen should display the line correctly
- Correct the import issue (add a surname for Chloé)
=> The imported patrons should contain the correct values.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5b03d4be39497be0dbdce17ef26867ca80affec1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 17359: Add tests
Jonathan Druart [Wed, 16 Oct 2019 08:22:38 +0000 (10:22 +0200)]
Bug 17359: Add tests

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c58fc50128eff5d23ac7e9c71b6f78da3bba3c71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23234: Mock DateTime->now using the time zone
Jonathan Druart [Thu, 24 Oct 2019 10:29:23 +0000 (12:29 +0200)]
Bug 23234: Mock DateTime->now using the time zone

The timezone of the two dt was different, one was UTC, the other one was
my local one.
When we mocked DateTime->now we did not use the time zone, we must use
dt_from_string instead

Test plan:
Make sure your environment has a different time zone than UTC
`prove t/db_dependent/Circulation.t` should fail without this patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 549a09c52178937af28cc11c5bfa7f00cbced1b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Kyle M Hall [Fri, 21 Jun 2019 12:51:15 +0000 (08:51 -0400)]
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices

Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.

Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4466e7d714d32808ee2e553320431005ec7cc69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23181: Extend unit tests
Katrin Fischer [Sat, 2 Nov 2019 01:05:06 +0000 (01:05 +0000)]
Bug 23181: Extend unit tests

Run t/db_dependent/Accounts.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88db3b587e319f97f47e6699c1af1ac2acd0ae6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propa...
Jonathan Druart [Wed, 13 Nov 2019 11:35:45 +0000 (12:35 +0100)]
Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones)

See bug 22847. We should never call ->Get in this template, we want
to display the values in the DB, not the calculated ones

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4ca7bff689a37debc7aa850fdd42bfc5a19386e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 24026: (bug 22847 follow-up) Remove c/p issues
Jonathan Druart [Wed, 13 Nov 2019 11:35:39 +0000 (12:35 +0100)]
Bug 24026: (bug 22847 follow-up) Remove c/p issues

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4ad2bedb97712b4d574d6779ceff9753558c1db0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23713: (follow-up) Add missing semicolon
Katrin Fischer [Wed, 2 Oct 2019 07:41:45 +0000 (07:41 +0000)]
Bug 23713: (follow-up) Add missing semicolon

Adds a missing semicolon to one of the lines with translated
messages.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 660a5b6ebc4eb35bfcca54ef3bde5e00c304c446)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23713: Subscription add form broken for translations
Owen Leonard [Tue, 1 Oct 2019 15:55:19 +0000 (15:55 +0000)]
Bug 23713: Subscription add form broken for translations

This patch makes a change to the subscription entry template as a
workaround to a translation bug which is causing JavaScript errors when
using translated templates.

To test, apply the patch and update and install the de-DE template:

> cd misc/translator
> perl translate update de-DE
> perl translate install de-DE

 - Go to Administration -> System preferences and enable the "Deutsch
   (de-DE)" language under I18N/L10N preferences -> language.
 - Switch to the "Deutsch" translation.
 - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription)
   and open the browser console. There should be no errors.
 - Links which trigger JavaScript events should work correctly:
   "Lieferant suchen," "Nach Datensatz suchen," etc.

Reported-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Thanks-to: Michael Hoffert and Alexander Arlt from koha-de for reporting
 it initially and figuring out the root of the issue
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0dd2d6883d1e98bed92b25c321110b37da739e88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23398: Disable the XML import/export format for biblio framework
Jonathan Druart [Thu, 24 Oct 2019 16:21:04 +0000 (18:21 +0200)]
Bug 23398: Disable the XML import/export format for biblio framework

It gives incomplete results and not sure it ever worked.
To prevent data loss it is better to remove this option.

Note that the code in C4/ImportExportFramework.pm is too complex to
attach with this patch to deletion of the code related to the XML
import/export. Safer to keep it for a separate bug report.

Test plan:
Import/export biblio frameworks and confirm that there is no more
reference to the xml format.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ed45a4f333fb9f6569d150410ef99d8ffe13f54c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23813: (bug 18925 follow-up) Remove invalid circ rules to avoid FK constraints...
Jonathan Druart [Tue, 22 Oct 2019 10:42:09 +0000 (12:42 +0200)]
Bug 23813: (bug 18925 follow-up) Remove invalid circ rules to avoid FK constraints to fail

There is not FK constraints on the itemtype, categorycode and branchcode
columns of the issuingrules table, because of the '*' value we use for
default.
We created the new table circulation_rules with those constraints, and
when we moved the rules for maxissueqty, the INSERT failed.

To avoid the FK constraints to fail we are going to delete the invalid
rows before.

It could lead to data lost, but this situation certainly comes from a
bad data manipulation at some point of the history of the installation.

Test plan:
git reset --hard 1e4f442442844cfaf17f5b06f122f6259d5fee92 # before 18.12.00.020
reset_all

insert into branches(branchcode, branchname) values('rmme', 'rmme');
insert into categories (categorycode, description) values ('rmme', 'rmme');
insert into itemtypes (itemtype, description) values('rmme', 'rmme');

Go to http://pro.kohadev.org/cgi-bin/koha/admin/smart-rules.pl
Create a new rule for the patron category
Create a new rule for the item type
Copy all the default rule to the new library
Create other rules for "Default checkout, hold policy by patron category" and "Default holds policy by item type" using this patron's category and itemtype.
Same for patrons' categories and itemtypes you will not delete.

delete from branches where branchcode="rmme";
delete from categories where categorycode="rmme";
delete from itemtypes where itemtype="rmme";

git checkout master
and execute the DB process.

=> With this patch applied you will not get the error and the rules will
be moved correctly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff3d7b9f8e27a1c8547012f062daccc33b12dc27)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22280: Add a unit test
Magnus Enger [Tue, 1 Oct 2019 08:54:41 +0000 (10:54 +0200)]
Bug 22280: Add a unit test

This patch adds a unit test to t/db_dependent/Illrequests.t, where
a new node without any next_actions or prev_actions is added to the
core status graph.

Running the tests show a lot of warnings about "no query in
themelanguage", but that should not be related to the current bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 291bb7bacfdf68e6bc8e99d5c1e258fbcbf2344b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22280: (RM follow-up) Correction to POD
Martin Renvoize [Mon, 23 Sep 2019 15:49:35 +0000 (16:49 +0100)]
Bug 22280: (RM follow-up) Correction to POD

Minor correction to mislabled POD section for private method.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ceeebd5244d8e05342a905e52c43747b1778c68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22280: Fix typo in _status_graph_union
Tomas Cohen Arazi [Wed, 3 Jul 2019 18:34:48 +0000 (15:34 -0300)]
Bug 22280: Fix typo in _status_graph_union

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 633800120840384374fef3da091800a6d989e723)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoRevert "Bug 23484: Update pendingreserves.pl to use circulation_rules"
Fridolin Somers [Fri, 15 Nov 2019 07:34:29 +0000 (08:34 +0100)]
Revert "Bug 23484: Update pendingreserves.pl to use circulation_rules"

This reverts commit 39762da92f45856fa4e46764494b64b045e30010.

4 years agoRevert "Bug 23484: (follow-up) add parenthesis in JOIN"
Fridolin Somers [Fri, 15 Nov 2019 07:34:27 +0000 (08:34 +0100)]
Revert "Bug 23484: (follow-up) add parenthesis in JOIN"

This reverts commit c70ad1cbccfd1121901622840715894e095f90d3.

4 years agoBug 23589: Discharge notice does not show non-latin characters
Dobrica Pavlinusic [Wed, 2 Oct 2019 09:32:17 +0000 (11:32 +0200)]
Bug 23589: Discharge notice does not show non-latin characters

It seems that discarge notices never got support for truetype
fonts, so notices are missing non-latin characters.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e909494ac90b2c473815795e9256ecd2f967b223)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23680: Incorrect conversion of Perl boolean to js
David Gustafsson [Thu, 26 Sep 2019 09:50:14 +0000 (11:50 +0200)]
Bug 23680: Incorrect conversion of Perl boolean to js

A Perl boolean value is on the server side converted
to a JS string (resulting in the values '0' or '1).
Since the string '0' is a truthy value in JS this
incorrectly triggers window.close() on the client
in many instances, for example when adding a new item.

To test:

1. Go to a bibliographic record in the staff client.
2. Expand the "New" menu and open "New item" in new tab.
3. The new tab will immediately close.
4. Apply the patch.
5. Perform steps 1-2 again.
6. The tab should now remain open.

Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b488527ebeb3b335854f2290aa1c6cf80f464eb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23938: Restore title display in last checked out box
Nick Clemens [Thu, 31 Oct 2019 19:03:59 +0000 (19:03 +0000)]
Bug 23938: Restore title display in last checked out box

To test:
1 - Check out to a patron
2 - Note the display under the checkotu box does not have title
3 - Apply patch
4 - Checkout another item
5 - Note the title displays

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dfdf3a74454d3844b6ed82f549d67f25c7001ded)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23630: (QA follow-up) Fix tests
Nick Clemens [Thu, 31 Oct 2019 13:19:24 +0000 (13:19 +0000)]
Bug 23630: (QA follow-up) Fix tests

marc_records_to_documents is now an arrayref of hashes, not an arrayref of arrays

_sanitise_records has been removed, we don't need those tests anymore

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bc8b8a7a6b08d602bf4e98255461d3b849d78a05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23630: Do not remove field 999 in Elasticsearch indexing
Fridolin Somers [Thu, 19 Sep 2019 14:55:51 +0000 (16:55 +0200)]
Bug 23630: Do not remove field 999 in Elasticsearch indexing

Elasticsearch indexing uses 999$c to store record id by deleting the all field first !
So you can not store anything in field 999, even in UNIMARC and even in authorities records.

Looks like it is quick fix code added to start Elasticsearch use.

This behavior is disturbing and very strange for UNIMARC flavour.

This patch corrects by defining record ids mandatory in Koha::SearchEngine::Elasticsearch::Indexer::update_index().
This ids array is actually always given (except in UT).
I think it is useless to allow adding a record without its id.

Test plan :
1) Use Elasticsearch as SearchEngine
2) Create a subfield 999$z in default framework
3) Create a record with default framework
4) Enter a random string (never used in catalog) like "tototata" in 999$z
5) In Search engine configuration, define search field "subject" for 999$z
6) Rebuild record : misc/search_tools/rebuild_elasticsearch.pl -b -bn <biblionumber> -v
7) Search for the random string => You get a result
8) Optionnaly look at records in ES : <es server>:9200/<es index name>/data/<biblionumber>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb083813a8237691f0b9d419d826fdea58096cd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23626: (follow-up) Fix JS when not viewing results
Nick [Thu, 10 Oct 2019 16:40:55 +0000 (16:40 +0000)]
Bug 23626: (follow-up) Fix JS when not viewing results

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 85b5abcc4e8a0d41c0e286d1b9f7deba4905636c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23626: Add missing TT failure
Kyle M Hall [Wed, 9 Oct 2019 12:28:32 +0000 (08:28 -0400)]
Bug 23626: Add missing TT failure

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90e2882568375bce956d0cb50edfa070c42cafce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23626: [alternate] Default to including all rows
Kyle M Hall [Mon, 7 Oct 2019 16:34:07 +0000 (12:34 -0400)]
Bug 23626: [alternate] Default to including all rows

If a person is fetching all data, it seems most likely that that person wants
to see all the data in the chart. We should default to that behavior.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afa1106782d794b98efa90200ac793d7078a2686)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23626: Only fetch full chart data if requested
Nick [Wed, 2 Oct 2019 09:58:59 +0000 (09:58 +0000)]
Bug 23626: Only fetch full chart data if requested

This patchset prevents the full return of report data unless explicitly requested by the user for charting purposes
Additionally the user is warned if requesting more than 1000 rows of data

To test:
 1 - Create a report that returns over 1000 rows of data
 2 - Run the report
 3 - Note you have two buttons now 'Chart data' and 'Fetch all data for chart'
 4 - Click chart data
 5 - Note the note that you are only charting visible data
 6 - Create the chart and confirm it works
 7 - Close the chart
 8 - Click 'Fetch all data'
 9 - Note the confirm window
10 - Click 'cancel', note there is no change
11 - Repeat and click ok
12 - Fetch all data button is gone
13 - Page to next data, note fetch all does not return
14 - Click 'Chart data'
15 - Note you now have checkbox option to use all data in report
16 - Click it
17 - Create chart
18 - Confirm it works as expected

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 83a545d8318560eb2ee385289ff8c291f07f6716)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23867: Resolve "truncated incorrect double" for empty string
Marcel de Rooy [Tue, 22 Oct 2019 12:29:40 +0000 (12:29 +0000)]
Bug 23867: Resolve "truncated incorrect double" for empty string

Updatedatabase, rev. 18.12.00.051
Solved by testing the value of the pref first.
Tested by copying the change in a new atomic update with XXX.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6d1b3cf2120fbd2c9beb4317797c260d9b647f79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17140: DBRev 19.05.04.001
Martin Renvoize [Fri, 11 Oct 2019 09:57:30 +0000 (10:57 +0100)]
Bug 17140: DBRev 19.05.04.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9d9bb45865c9d6c88952f47f52f0e92ddcce0054)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17140: Atomic update file
Nick [Fri, 4 Oct 2019 08:15:43 +0000 (08:15 +0000)]
Bug 17140: Atomic update file

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bc6e5902898fc3fbaa69b0fcc99359eadd6a8c76)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17140: Make rounding syspref controlled
Nick [Thu, 3 Oct 2019 11:06:47 +0000 (11:06 +0000)]
Bug 17140: Make rounding syspref controlled

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ae075fded2a4ef8fb2f241e4cf9bb90d7587b02c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17140: fix rounding errors when paying fines
Blou [Fri, 21 Dec 2018 15:33:29 +0000 (10:33 -0500)]
Bug 17140: fix rounding errors when paying fines

Whenever a fine (accountlines in DB) has a precision longer than two floating points, it becomes very hard for a user to clear it.
Ex: 1.035 will be displayed as 1.04 or 1.03 depending on the screen.  But entering any of those value in Pay Fine will not clear it.
The user has no way to know the exact value to enter.

This fix makes sure that the intent of the user is met, by matching the EXACT needed sum when the difference is less than 0.01.

TEST
1) Create a 1.035 fine
  - Go to a Patron screen
  - Fines tab on the left
  - Create manual invoice
2) go to Pay fines, click Pay amount on bottom left.
3) It will show 1.03 as Total, and as Collect from patron.  Click confirm.
4) An error message will appear.
5) Apply patch, do again.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2df905bfef771415d47aeba7db6ea445a33f1e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 18743: Correct number of pending suggestions (acq home page)
Jonathan Druart [Sun, 20 Oct 2019 08:16:51 +0000 (10:16 +0200)]
Bug 18743: Correct number of pending suggestions (acq home page)

This patch could be moved to its own bug report if we want to adjust
tests.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4274a2f51dcf0e7ee0dfebc805036ddbc7f3e4fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 18743: Fix suggestion listing when organized by library
Jonathan Druart [Wed, 16 Oct 2019 14:43:46 +0000 (16:43 +0200)]
Bug 18743: Fix suggestion listing when organized by library

There are some weird behaviors happening when using the "Organize by:
library" dropdown along with the library filter (in the "Acquisition
information" box).

I am suggesting the following test plan:
0. Create several suggestion from different libraries

A. You are superlibrarian and IndependentBranches is not set (=No)
1. Hit /suggestion/suggestion.pl
=> Default view shows the suggestions from your library
2. Filter by another library
=> You see the suggestions from this library
3. Filter by "Any" libraries
=> You see all the suggestions
4. "Organize by library"
=> You see all the suggestions, organized by library
5. Filter by a specific library
=> You see the suggestion from your library, all in one tab

B. You are not superlibrarian and IndependentBranches is not set (=No)
Same as A.

C. You are superlibrarian and IndependentBranches is set
Same as A.

D. You are not superlibrarian and IndependentBranches is set
You will never see suggestions coming from outside your library

QA: To be clear: the whole script needs a rewrite, but here we are just
trying to fix weird behaviors.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f16ab9e758aeb1a9e64bde03c6c8dcfb7f6e094)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23579: (RM follow-up) Fix failing tests
Martin Renvoize [Fri, 25 Oct 2019 12:12:38 +0000 (13:12 +0100)]
Bug 23579: (RM follow-up) Fix failing tests

Removing the default on changed_fields leads to the requirement for
tests to specify data to add to said field when mocking data.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14e5d38773027cd424d7bb3385804d06740097ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields
Jonathan Druart [Fri, 25 Oct 2019 08:15:42 +0000 (10:15 +0200)]
Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields

Installation under Ubuntu 18.04 is blocked:
install.pl: DBD::mysql::st execute failed: BLOB, TEXT, GEOMETRY or JSON
column 'changed_fields' can't have a default value at
/usr/local/share/perl5/DBIx/RunSQL.pm line 273.

https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html
"""
 The BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a
 default value.
"""

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1d64b1b63df406508bdcde6164b179833f712aeb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23551: Fix AddRenewal call in circ/renew.pl
Martin Renvoize [Fri, 4 Oct 2019 13:06:27 +0000 (14:06 +0100)]
Bug 23551: Fix AddRenewal call in circ/renew.pl

Without the patch, renewing from the renewal tab/page
led to wrong renewal/due dates.

To test:
- Check an item out to your patron account
- Renew it from the patron account
- Note the due date
- Return the item
- Check the item out again
- Renew it using the renewal tab
- Verify a different due date was calculated
- Apply patch
- Repeat test - due dates now should be the same

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a24c17a2aa2053da1317c29e47a3946af2962afb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23863: Add signoff line for recognition
Martin Renvoize [Thu, 24 Oct 2019 12:50:35 +0000 (13:50 +0100)]
Bug 23863: Add signoff line for recognition

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e428c5a4b0aea4779f743abbf8a61abe90b20dbc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23863: (QA follow-up) Add missing html filter
Katrin Fischer [Mon, 21 Oct 2019 22:08:45 +0000 (22:08 +0000)]
Bug 23863: (QA follow-up) Add missing html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 346f8b163a45a15b522c05ab6da532f922588559)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23863: Editing a basket clears create_items value
Kyle M Hall [Tue, 22 Oct 2019 18:07:46 +0000 (14:07 -0400)]
Bug 23863: Editing a basket clears create_items value

Test Plan:
1) Create a basket with a non-default value for aqbasket.create_items
2) Click Edit from basket.pl
3) Click Save without changing anything
4) Note that aqbasket.create_items is no longer set
5) Apply this patch
6) Restart all the things!
7) Repeat steps 1-3
8) Note create_items is unchanged!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2f315139e213ca9241d385dfea0aa747999c8464)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23855: Fix "Mark selected suggestion as" status
Jonathan Druart [Mon, 21 Oct 2019 15:55:17 +0000 (17:55 +0200)]
Bug 23855: Fix "Mark selected suggestion as" status

On the suggestions management page (suggestion/suggestion.pl) you can
select suggestions and change their status.
But it only works for "ACCEPTED" or "REJECTED".

Maybe caused by bug 22905.

Test plan:
Select at least one suggestion on the screen and select the "Pending"
status.
=> The status of the selected suggestions must have been updated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 030eb694a87029e3220e8f930f509556c9e816ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23826: Correction for missing "F" -> "OVERDUE" change
Martin Renvoize [Wed, 16 Oct 2019 15:21:46 +0000 (16:21 +0100)]
Bug 23826: Correction for missing "F" -> "OVERDUE" change

When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed
the cases inside the maninvoice template. This patch should correct
that mistake.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9d33b82fe8ada8aee4e62bed5e147fe15f72e2e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23809: Correction to selectall_arrayref call.
Martin Renvoize [Mon, 14 Oct 2019 08:56:18 +0000 (09:56 +0100)]
Bug 23809: Correction to selectall_arrayref call.

This patch adds the missing `{ Slice => {} }` attribute to the database
call introduced in bug 23265 to fix the use of Koha::Objects introduced
originally in bug 12063.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea1f6986692d3658bcd7ea72f3c27ee2cdde1727)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23771: Don't look for patrons if we don't have a userid
Nick [Mon, 7 Oct 2019 20:09:04 +0000 (20:09 +0000)]
Bug 23771: Don't look for patrons if we don't have a userid

While the code requires external auth to test, the change is simple enough I
think a good read would suffice

To test:
1 - You either need Shib or CAS enabled and setup
2 - Add two users with blank.null cardnumbers
3 - Lock those user accounts
    Set failedloginattempts to 1
    Try a bad login with the userid
    Or set via the DB
4 - Try a good login via the external auth
5 - Note it fails
6 - Apply patch
7 - Login now succeeds

Signed-off-by: Mike Somers - Bridgewater State University <msomers@bridgew.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c9c6dd10167bc4c60cb384651f4dc802944c4228)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22997: Unit test
Fridolin Somers [Fri, 9 Aug 2019 11:51:46 +0000 (13:51 +0200)]
Bug 22997: Unit test

Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce8896f17d99cbbc663b8cc59110ce01d8e70afd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22997: Searching gives no results in auth_finder.pl
Fridolin Somers [Tue, 28 May 2019 13:48:54 +0000 (15:48 +0200)]
Bug 22997: Searching gives no results in auth_finder.pl

During cataloguing of an existing biblio, on an heading field,
the use of tag editor fills authorities finder with existing value :
  Search main heading ($a only)
  Search main heading
Default operator beeing 'contains'.

Actually with Elasticsearch those search give no results.

Example with heading :
200
  $a Casaubon
  $b Isaac
  $f 1559-1614

Call to Elasticsearch :
    "query" : {
        "bool" : {
           "must" : [
              {
             "query_string" : {
                  "query" : "Casaubon*",
                  "default_field" : "heading-main",
                   }
              },
              {
             "query_string" : {
                  "query" : "(Isaac*) AND (1559-1614*)",
                  "default_field" : "heading"
                   }
              }
            ]
         }
      },
    "sort" : [
       {
      "heading__sort.phrase" : "asc"
       }
     ]
  }

Patch adds to "query_string" :
  analyze_wildcard : true.

Test plan :
1) Use Elasticsearch
2) Edit an existing biblio record
3) Use tag editor on a heading
4) Click search => You get correct results
5) Check also search in authorities-home.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a94e863c3ed17c177c9ce5d284616791fd5cd380)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23723: using exit inside eval to stop sending output to browser doesn't work...
Dobrica Pavlinusic [Thu, 3 Oct 2019 07:34:17 +0000 (09:34 +0200)]
Bug 23723: using exit inside eval to stop sending output to browser doesn't work under plack

When fixing Bug 23589 Theodoros Theodoropoulos noticed that we are sending
headers and html after pdf output to browser.

Using exit inside eval block doesn't stop plack from generating
headers and html page after exit since CGI::Compile will catch
exit but doesn't stop emiting output. Example is:

eval {
warn "in eval";
exit;
};
warn "after eval";

Under CGI, this would print just "in eval", but under plack we get both lines
and thus generate additional header and html after we already sent pdf data.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 43d999cc7c7edc54e3df7482b3ab3607755e4b6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23252: Adds noEnterSubmit class in ajax context
Christophe Croullebois [Thu, 29 Aug 2019 13:23:01 +0000 (15:23 +0200)]
Bug 23252: Adds noEnterSubmit class in ajax context

In cataloging.js $(document).ready adds noEnterSubmit class.
This does not work in ajax context, it works with $(document).ajaxSuccess.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify 952$z exists in ACQ framework
2)
2.1) Verify system preference "AcqCreateItem" is on "placing an order"
2.2) Go to an acquisition basket
2.3) Click "Add to basket" and "From a new (empty) record"
2.4) Go to "Item" block
2.5) Verify that $z has "noEnterSubmit" class
2.6) Verify that typing enter in $z does not submit the form
3)
3.1) Change system preference "AcqCreateItem" to "receiving an order"
3.2) Go to "Receive shipment"
3.3) Receive an order
3.4) Go to "Item" block
3.5) Verify that $z has "noEnterSubmit" class
3.6) Verify that typing enter in $z does not submit the form

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c66cebf744778dbfc15597079549c161a7836d63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23252: Add missing input_marceditor class in item editor
Fridolin Somers [Tue, 2 Jul 2019 13:57:09 +0000 (15:57 +0200)]
Bug 23252: Add missing input_marceditor class in item editor

In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class.
They are also missing tabindex and id.

The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify system preference "AcqCreateItem" is on "placing an order"
2)
2.2) Go to cataloguing module and edit an item
2.3) Verify that $z has an id, tabindex and "input_marceditor" class.
2.4) Verify that typing enter in $z does not submit the form
3)
3.1) Go to a serial with items creation, click on receive
3.2) Change status to "Arrived"
3.3) Verify that $z has an id, tabindex and "input_marceditor" class.
3.4) Verify that typing enter in $z does not submit the form
4)
4.1) Go to an acquisition basket
4.2) Click "Add to basket" and "From a staged file"
4.3) Click "Add orders" on a staged file
4.4) Go in tab "Item information"
4.5) Verify that $z has an id, tabindex and "input_marceditor" class.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c855b1ca287758b535fe5ba885949accac4e474a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21985: Fix further occurences
Nick [Mon, 30 Sep 2019 13:37:19 +0000 (13:37 +0000)]
Bug 21985: Fix further occurences

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b63b55cda70604041c9f04f5f1e302540bff29eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21985: Trying to fix the next failure
Jonathan Druart [Thu, 14 Mar 2019 22:19:45 +0000 (19:19 -0300)]
Bug 21985: Trying to fix the next failure

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95a2ffc542c2c93dfbc5c09d7c06186a1f58f458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>