koha.git
5 years agoUpdate release notes for 17.11.10 release v17.11.10
Fridolin Somers [Mon, 24 Sep 2018 14:15:04 +0000]
Update release notes for 17.11.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoIncrement version for 17.11.10 release
Fridolin Somers [Mon, 24 Sep 2018 14:10:00 +0000]
Increment version for 17.11.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoMerge remote-tracking branch 'translate/17.11.10-translate-20180924' into 17.11.x
Fridolin Somers [Mon, 24 Sep 2018 14:08:49 +0000]
Merge remote-tracking branch 'translate/17.11.10-translate-20180924' into 17.11.x

5 years agoBug 21288: correct DBRev 17.11.09.003
Fridolin Somers [Mon, 24 Sep 2018 14:05:35 +0000]
Bug 21288: correct DBRev 17.11.09.003

5 years agoTranslation updates for Koha 17.11.10
Koha translators [Mon, 24 Sep 2018 14:02:25 +0000]
Translation updates for Koha 17.11.10

5 years agoBug 13692: series link is taking you to just 800a instead of whole 800
Owen Leonard [Fri, 3 Aug 2018 15:13:57 +0000]
Bug 13692: series link is taking you to just 800a instead of whole 800

This patch modifies the OPAC and staff client's XSL template for the
detail page so that series links based on a traced 490 tag use both
author and series title from the 800 tag.

To test you should have multiple titles in the same series with matching
490 and 800 tags in each record. Apply the patch and restart Plack if
necessary.

View the detail page for one of the series' titles. The "Series:" link
should link to a search which uses both series title and author.
Clicking the link should return the correct results.

Test both the OPAC and staff client.

Signed-off-by: John Sterbenz <jsterben@umich.edu>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

5 years agoBug 21262: Do not format numbers for editing if too big
Nick Clemens [Thu, 23 Aug 2018 14:44:31 +0000]
Bug 21262: Do not format numbers for editing if too big

This patch copies the code from bug 15770 to the format_for_editing
sub.

It also corrects schema issue, listing the purpose for two acq columns
instead of claing unused

To test:
1 - Edit a fund
2 - Set warning at amount to: 100000000000000
3 - Save budget
4 - Try to edit - internal server error
5 - Apply patch
6 - Should be able to edit budget
7 - Number should appear unformatted

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 quick notes:
1. Code must be moved to a subroutine if reused later
2. It would have prefered to have the comment of the 2 DB columns on a separate patch
(even separate bug report). As it's minor and that the patch will certainly backported
I will not block it.

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

5 years agoBug 21360: Prevent IssueSlip.t to fail when run at 23:59
Jonathan Druart [Sun, 16 Sep 2018 16:49:46 +0000]
Bug 21360: Prevent IssueSlip.t to fail when run at 23:59

Not sure what happened on bug 15029 (Make the IssueSlip tests pass even if
launched after 23:00) but we should have tested with 23:59, not 23:50...

koha_1       |     # Looks like you planned 3 tests but ran 2.
koha_1       |
koha_1       | #   Failed test 'Issue slip'
koha_1       | #   at t/db_dependent/Members/IssueSlip.t line 294.
koha_1       | Label not found for "last SKIP" at /usr/share/perl5/Test/More.pm line 1370.
koha_1       | # Looks like your test exited with 255 just after 1.
koha_1       | [23:59:10] t/db_dependent/Members/IssueSlip.t
koha_1       | Dubious, test returned 255 (wstat 65280, 0xff00)
koha_1       | Failed 3/3 subtests

Test plan:
0/ Don't apply this patch
1/ sudo date -s "2018-09-15 23:59:00";prove t/db_dependent/Members/IssueSlip.t
=> You should get the error
2/ Apply this patch and repeat 1.
=> Tests should pass now!

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

5 years agoBug 21288: DBRev 18.05.03.002
Nick Clemens [Sat, 15 Sep 2018 21:44:05 +0000]
Bug 21288: DBRev 18.05.03.002

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

5 years agoBug 21288: Slowness in acquisition caused by GetInvoices
Pasi Kallinen [Thu, 30 Aug 2018 08:29:54 +0000]
Bug 21288: Slowness in acquisition caused by GetInvoices

The SQL query done by GetInvoices is quite slow on our production server,
taking about a minute.

In the query, there's this join:

  LEFT JOIN subscription ON biblio.biblionumber = subscription.biblionumber

but there's no index on subscription.biblionumber. Adding the index speeds
up the query so it only takes up about 3 seconds.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

5 years agoBug 20765: Fix search for items by acqdate in label batch
Fridolin Somers [Mon, 14 May 2018 14:18:29 +0000]
Bug 20765: Fix search for items by acqdate in label batch

In Tools >  Label creator, when creating a batch you can add items using a search.

This search has filters on acquisition date.
Actually those filters does not work.
The create a search using CCL syntaxe to query Zebra search engine.

The cause is that operator "ge" or "le" must be before "st-date-normalized" in CCL query.
Looks like it is because of "st-date-normalized" uses "r=o" in ccl.properties.

Test plan :
1) Check in advance search you have indexed acquisition date
2) Go to Tools > Label creator
3) Click on New > Label batch
4) Click on Add item(s)
5) Enter a relevent date in "Added on or after date" and in "Added on or before date"
6) Click on "Search"
=> SUCCESS: You get results
7) Apply the patch
8) Retry the 'Add item(s)' step
=> SUCCESS: Patch doesn't change behaviour for old Zebra
9) Get rid of the patch on your working branch
10) Use the latest Zebra:
- /etc/apt/sources.list.d/indexdata.list:
deb http://ftp.indexdata.dk/debian jessie main
- Add the repo key:
  $ wget http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add -
- Upgrade:
  $ sudo apt update; sudo apt dist-upgrade
  $ sudo koha-rebuild-zebra -f -a -b -v kohadev
  $ restart_all
11) Retry the 'Add item(s)' step
=> FAIL: No results!
9) Apply the patch, retry
=> SUCCESS: Search results!
- Sign off :-D

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It doesn't break with 2.0.59-1 (stretch/jessie), and fixes the problem
for 2.1.X.

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

5 years agoBug 19179: (QA follow-up) Replace second E-mail
Marcel de Rooy [Fri, 14 Sep 2018 09:53:37 +0000]
Bug 19179: (QA follow-up) Replace second E-mail

Better write here exactly what we need to type in the pref text box.
Since E-mail will not work and Email will :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 19179: Email option for SMSSendDriver is not documented
Charlotte Cordwell [Fri, 7 Sep 2018 03:35:36 +0000]
Bug 19179: Email option for SMSSendDriver is not documented

'Email' is not documented as a valid setting.

1) Apply patch.
2) Go to Administration --> search SMSSendDriver
3) Check if SMSSendDriver has this message is at the end of the box:
   "If you would prefer to receive SMS via E-mail set SMSSendDriver to Email"

Signed-off-by: Michal Denar <black23@gmail.coml>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21127: Remove jqTransform jQuery plugin from the OPAC
Owen Leonard [Fri, 27 Jul 2018 12:43:50 +0000]
Bug 21127: Remove jqTransform jQuery plugin from the OPAC

This patch removes the jqTransform jQuery plugin from the OPAC. It was
added for the CCSR theme, which no longer exists.

http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=c7c2e9efbde273f2b77786316b7502a8847072bd

There will be no visible changes to the OPAC after applying the patch.
Search the Koha codebase for references to jqTransform and confirm that
none exist.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21248: Fix COinS carp in MARC details page on unknown record
Pasi Kallinen [Mon, 20 Aug 2018 04:30:45 +0000]
Bug 21248: Fix COinS carp in MARC details page on unknown record

Looking up a nonexistent record in the MARC details -page causes
the COinS to carp. The fix is trivial, just move the COinS call
couple lines, after the record existence check.

TEST PLAN
---------
1) reset_all for kohadevbox
2) log in to staff client - admin/admin
3) search catalogue for green
4) tweak the top URL to have a bad biblionumber (eg. 9999)
5) cat /var/log/koha/kohadev/plack-err.log
   -- floody! with errors.
6) echo | sudo tee /var/log/koha/kohadev/plack-err.log
7) restart_all
8) repeat steps 2 through 5.
   -- just nice starting messages, not floody.
9) run koha qa test tools

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

(cherry picked from commit 030047da428521c248868e3ee5d655afd3bed05b)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

(cherry picked from commit 7fe692bf0ec4dd6744c81c068c400927ccc0c54d)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 13779: (QA follow-up) Correct checkauth call in offline_circ/download.pl
Marcel de Rooy [Fri, 7 Sep 2018 07:50:40 +0000]
Bug 13779: (QA follow-up) Correct checkauth call in offline_circ/download.pl

Script offline_circ/download.pl does not use the return values of
checkauth. So should not assign them to bad chosen variables that do
not correspond with checkauth but with get_template_and_user.

Test plan:
Look for $template, $loggedinuser, $cookie, $flags in the code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 13779: sessionID declared twice in C4::Auth::checkauth()
David Cook [Thu, 19 Jul 2018 06:57:22 +0000]
Bug 13779: sessionID declared twice in C4::Auth::checkauth()

The bug is that $sessionID is declared twice in C4::Auth::checkauth().
At the moment, this doesn't actually create a problem, because no
one seems to be using the $sessionID which is returned by checkauth(),
except in the case of opac/external/overdrive/auth.pl which skips
the second declartion as it doesn't require auth.

This patch removes the redefining of the $sessionID variable.

In terms of testing, try logging in with a username and password
and see if it works. The only risk this patch would pose is breaking
auth I would think, since nothing is actually using the return value
from checkauth() for $sessionID.

NOTE:
It was initially defined near the top of the function (~line 791).
I believe the scoping would mean the correct version of $sessionID
would be used in the latter lines for the unset'ing.
I have skimmed code to see if the sessionID return value is used.
I did not test overdrive, as I do not know how. However, this is
the only area, I think this could possibly break. This change makes
sense to me.

QA: Please test overdrive.
opac/external/overdrive/auth.pl only checks if the value is set, so
   this patch might fix/break something there?
opac/svc/overdrive same kind of check.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is a (tiny) code improvement. Now we consistently return the session
id that is also stored in the returned cookie. (Which can be an 'anon'
session.)
Fact is that Koha almost everywhere ignores the returned session id and
sometimes gets the session from the cookie (obviously). The session id is
also passed to the template by get_template_and_user but never used in
templates.
As mentioned, the two overdrive scripts are the exception. But since both
test on both $user && $sessionID, they will not choke on an anynonomous
session id without userid. So theoretically fine, but not tested.

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

5 years agoBug 20776: Add Selenium::Remote::Driver to the dependency list
Tomas Cohen Arazi [Thu, 17 May 2018 13:33:32 +0000]
Bug 20776: Add Selenium::Remote::Driver to the dependency list

This dependency is missing from the PerlDependencies.pm file.
This patch adds it.

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21267: Set X-FORWARDED-PROTO https if required
Tomas Cohen Arazi [Fri, 24 Aug 2018 13:45:52 +0000]
Bug 21267: Set X-FORWARDED-PROTO https if required

This patch makes the apache configuration for the reverse proxy
(required for Plack) so it sets the X-FORWARDED-PROTO header correctly
for Plack::Middleware::ReverseProxy to use it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Since we actually resolve 19799 now (Changing language on OPAC redirects
back to homepage), I will move that code to a new enh report.

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

5 years agoBug 21168: Handle deleted checked-in items on checking in
Jonathan Druart [Fri, 10 Aug 2018 20:02:38 +0000]
Bug 21168: Handle deleted checked-in items on checking in

circ/returns.pl generates a server error when attempting to checkin an item while
the list of previously-returned items contains an item that has been deleted.
Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

Test plan:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
=> No error appears

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

5 years agoBug 21231: BlockReturnofLostItems does not prevent lost items being found
Kyle M Hall [Thu, 16 Aug 2018 11:11:17 +0000]
Bug 21231: BlockReturnofLostItems does not prevent lost items being found

When the syspref BlockReturnOfLostItems is set to Block, the item is blocked from being returned, but is still considered found -- it's set to lost=0 and a refund is applied to the patron (if circ rules allow). The item can then be checked in a second time and returned as it is no longer lost.

Test Plan:
1) Set an item to lost
2) Set BlockReturnOfLostItems to Block
3) Check the lost item in
4) Checkin  message should say item is lost and cannot be returned
5) Check lost status of item, it should remain unchanged

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

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

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

5 years agoBug 21231: Add Unit Test
Kyle M Hall [Thu, 16 Aug 2018 11:10:43 +0000]
Bug 21231: Add Unit Test

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

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

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

5 years agoBug 20984: Add 300$f to display
Joy Nelson [Fri, 22 Jun 2018 20:48:25 +0000]
Bug 20984: Add 300$f to display

Adding Type of Unit (300$f) to the Opac details and staff side searches results and details display

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

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

5 years agoBug 17625: adding subfields f and g to XSLT display
Joy Nelson [Fri, 22 Jun 2018 18:56:11 +0000]
Bug 17625: adding subfields f and g to XSLT display

Adding 245$f and 245$g to the Results and Detail pages on OPAC and staff side

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Cab Vinton <bibliwho@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

5 years agoBug 21150: add the biblionumber to the output
Jonathan Druart [Tue, 7 Aug 2018 14:14:54 +0000]
Bug 21150: add the biblionumber to the output

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 76141a352ed5ff8c9541c0d4b1c99e22e5339add)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bacb859d1c637b7d9d32b2205c97cc00557e9888)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21150: Search for item types inconsistencies
Jonathan Druart [Fri, 3 Aug 2018 17:59:33 +0000]
Bug 21150: Search for item types inconsistencies

search_for_data_inconsistencies.pl will now display errors if:
1.item-level_itypes is set to "specific item" and items.itype is not set
or not set to an item type defined in the system (itemtypes.itemtype)
2.item-level_itypes is set to "biblio record" and biblioitems.itemtype is not set
or not set to an item type defined in the system (itemtypes.itemtype)

Test plan:
Use the script and the different possible combinations to display the
errors

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 6fd1a8c11484e8c1cd771aea0c6ac98a2ab18f40)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41b06b411c3ad2a5006980507c344c568357c752)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20509: Add to script documentation
Katrin Fischer [Tue, 31 Jul 2018 16:23:43 +0000]
Bug 20509: Add to script documentation

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

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

5 years agoBug 20509: Search for not defined authority codes
Jonathan Druart [Wed, 27 Jun 2018 18:35:57 +0000]
Bug 20509: Search for not defined authority codes

This patch adds a new check in
misc/maintenance/search_for_data_inconsistencies.pl to search for not
defined authority codes.

Test plan:
Set some auth_header.authtypecode to not defined authority codes in Koha
(UPDATE auth_header SET authtypecode="XXX" WHERE authid=42;)
Then run `misc/maintenance/search_for_data_inconsistencies.pl`

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

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

5 years agoBug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to...
Josef Moravec [Wed, 27 Jun 2018 20:27:09 +0000]
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

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

5 years agoBug 21011: Search for items with not defined homebranch and/or holdingbranch
Jonathan Druart [Wed, 27 Jun 2018 18:32:56 +0000]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

From bug 5789: scripts can fail if items.homebranch and/or
items.holdingbranch is not defined

This script will help people catching these migration issues.

Test plan:
Update your items table to set some homebranch or holdingbranch to NULL
Run this script
It will display the different items with not defined values in these
fields.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

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

5 years agoBug 20631: Remove unused RemoveLostItem from C4::Accounts
Katrin Fischer [Wed, 8 Aug 2018 20:34:32 +0000]
Bug 20631: Remove unused RemoveLostItem from C4::Accounts

RemoveLostItem was 'used' in C4::Accounts, but is not
actually used there.

Call has been removed by
  commit ed9cf81c3aa8fd82f9347556364e9d2e6cef8a82
  Bug 15896 - Use Koha::Account::pay internally for makepayment

To test:
- Verify that the routine was actually not used!

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

5 years agoBug 20504: Fix lang attribute in html tag on systempreferences page
Katrin Fischer [Thu, 9 Aug 2018 17:46:09 +0000]
Bug 20504: Fix lang attribute in html tag on systempreferences page

On the system preferences page the lang attribute of the
html tag is always empty.

To test:
- Go to systempreferences
- Check the html source and look at the html tag,
  it should read: <html lang="">
- Apply patch
- Check the html source again: <html lang="en">
  Verify the language code shown matches the currently
  selected language in the staff interface
- Verify the language system preferences work correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The problem was actually that
  $lang = $template->param( 'lang' );
should certainly be $lang = $input->param( 'lang' );
and, as it, it overrides the value of 'lang' passed from C4::Auth

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

5 years agoBug 7996: (QA follow-up) Remove unnecessary permission check view logs template
Katrin Fischer [Mon, 20 Aug 2018 07:04:37 +0000]
Bug 7996: (QA follow-up) Remove unnecessary permission check view logs template

Permission is checked in the perl file, no need to check again
in the template.

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

5 years agoBug 7996: Correct wrong permissions for modification log
Nick Clemens [Fri, 17 Aug 2018 11:07:41 +0000]
Bug 7996: Correct wrong permissions for modification log

To test:
 1 - Create a staff patron with catalogue,borrowers,and view_system_logs
     permissions
 2 - Log in using that patron
 3 - Go to tools
 4 - Click 'Log viewer'
 5 - You get a blank page
 6 - View borrower circ screen, note you do not see 'Modification log'
 7 - Edit a borrower, note you do not see 'Modification log'
 8 - Apply patch
 9 - 'Log Viewer' should now load correctly
10 - You should see 'Modification log' tab during circ
11 - You should see 'Modification log' tab when editing patron

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 a750ebdbd994ef2a793e632eea4e35bbc7f1ec6d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8b3095f7d533bd2151d710085259f29349faf5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 19511: Local cover images not centered in table column in staff client search...
Owen Leonard [Thu, 26 Jul 2018 15:36:24 +0000]
Bug 19511: Local cover images not centered in table column in staff client search results

This patch modifies the JavaScript which embeds local cover images in
staff client catalog search results. It now adds the "thumbail" class to
the image, matching Amazon cover images.

To test you should have one or more titles with local cover images
attached. Apply the patch and clear your browser cache if necessary.

Enable both the AmazonCoverImages and LocalCoverImages system
preferences and perform a search which will return titles with local
cover images. Confirm that local covers are styled like Amazon covers.

Tested and confirmed local cover images are appearing quite nicely now.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

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

5 years agoBug 21144: DBRev 17.11.09.002
Nick Clemens [Tue, 21 Aug 2018 11:49:55 +0000]
Bug 21144: DBRev 17.11.09.002

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

5 years agoBug 21144: Add ROADTYPE to default authorised values categories
Katrin Fischer [Thu, 2 Aug 2018 00:19:42 +0000]
Bug 21144: Add ROADTYPE to default authorised values categories

The ROADTYPE category was missing from the default list of
authorised value categories available.

To test:
- Verify ROADTYPE is not listed as authorised value category
- Apply patch and run database update
- Verify ROADTYPE is now listed
- Add an entry, for example: AV = Avenue
- Add or edit a patron, verify a pull down with your entry
  shows on the form.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21142: Open uploaded files in utf-8 - batch mod/del
Jonathan Druart [Fri, 17 Aug 2018 15:07:55 +0000]
Bug 21142: Open uploaded files in utf-8 - batch mod/del

Batch item/record modification/deletion tools does not open uploaded
files in utf-8

Test plan:
Edit and delete records and items using a file which will contain:
valid and invalid barcodes with and without utf-8 chars (💕)

You should see the warning message:
 "The *** 39999000💕001679 does not exist in the database."

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

5 years agoBug 21238: Prevent TemplateToolkit.t to fail on slow servers
Jonathan Druart [Thu, 16 Aug 2018 15:29:43 +0000]
Bug 21238: Prevent TemplateToolkit.t to fail on slow servers

It failed 3x in the last 6 runs (on node 1), we should mock
DateTime->now to prevent it to fail again.

The error is:
koha_1       |         #   Failed test at
t/db_dependent/Letters/TemplateToolkit.t line 724.

When comparing <<today>> replacement:
koha_1       |         # 08/16/2018 14:25<br />
[...]
koha_1       |         # 08/16/2018 14:24<br />

Let's mock DateTime->now to prevent it to fail again.

Test plan:
0. Do not apply this patch
1. Add "sleep(60);" at line ~715, before "# Add a second checkout"
2. Run the tests
=> Fail!
3. Apply this patch
4. Run the tests again
=> Pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoBug 21230: Prevent Reserves.t to fail randomly
Jonathan Druart [Wed, 15 Aug 2018 15:21:38 +0000]
Bug 21230: Prevent Reserves.t to fail randomly

The following test can fail if the hold has been generated with found => 'W':
 #   Failed test 'No tests run for subtest "_koha_notify_reserve() tests"'
 #   at t/db_dependent/Reserves.t line 675.
Can't call method "to_address" on an undefined value at
t/db_dependent/Reserves.t line 661.
 # Looks like your test exited with 255 just after 56.

We should call AddReserve instead.

Test plan:
0. Do not apply this patch
1. Do the following change:
    my $hold = $builder->build({
            source => 'Reserve',
            value => {
               borrowernumber=>$hold_borrower,
               found => 'W', # This line is added, do not forget the comma above
            }
        });
2. Prove it makes the test fail
3. stash the changes and apply this patch
4. Make sure the tests pass

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 c957b52ef8bba734043157445470bedc36feae5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c359d56f25a0b346b71a3fd8700b07e4713640d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20795: Inform the user about this change, add to pod
Jonathan Druart [Wed, 1 Aug 2018 14:22:14 +0000]
Bug 20795: Inform the user about this change, add to pod

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

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

5 years agoBug 20795: Pass incrreased verbosity to zebra rebuild script
Nick Clemens [Sun, 20 May 2018 14:44:45 +0000]
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 1dfb177d3fff713185bcb0aa86517ef40629fedc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dbdd2b56303be0fab287d861dbd9007bf554f9d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21164: Fix alignment on new basket form in acquisitions
Owen Leonard [Mon, 6 Aug 2018 18:15:10 +0000]
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 2280877fdd9685aecff0b144319ca3bffc39b78a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5fe28bf39877440025e2a7ee1b2db1054be47852)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21185: Incorrect title tag on tags review page
Owen Leonard [Wed, 8 Aug 2018 16:45:28 +0000]
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 ad0f90b797c77b853ff61501310892282f582988)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 718af573c158412e1dc24308d2e1129b70cef861)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab
Katrin Fischer [Fri, 10 Aug 2018 17:18:39 +0000]
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 880afc9035c752bb6fbea0ad5505d8730462ce2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bed533eb345b91cb9e0e019a37ebb201dcb94726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 18635: Koha::Patron->guarantees() should return results alphabetically
Nick Clemens [Fri, 19 May 2017 01:08:22 +0000]
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 fe6cb85c5580b582a0047769d88be23757df0ef5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 74a2565c99dc92e390950c7ce340202efba2161c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21033: Remove few warns in acqui/basket.pl
Marcel de Rooy [Tue, 3 Jul 2018 13:52:05 +0000]
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 af82a1d59709d02b767613539146b59fa10c3ab3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a6ed1c852c00644349597e59a369bef5a19d9a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21035: Handle new lines when running reports
Jonathan Druart [Wed, 4 Jul 2018 18:05:25 +0000]
Bug 21035: Handle new lines when running reports

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

Test plan:

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

Line1
Line2

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

Public note has one and only one line.

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

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

Let's say that this is report number 10.

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

=> You should see both lines

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

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

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

5 years agoBug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour
David Cook [Mon, 30 Jul 2018 04:35:40 +0000]
Bug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour

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

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

__TEST PLAN__

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

_Apply the patch_

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 19291: Make breadcrumbs for OPAC search history consistent with other patron...
Owen Leonard [Fri, 27 Jul 2018 17:22:54 +0000]
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages

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

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

- Home ->  Search history

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

- Home -> Owen Leonard -> Your search history

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

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

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

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

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

5 years agoBug 21056: Add another flush later
Jonathan Druart [Tue, 31 Jul 2018 15:14:54 +0000]
Bug 21056: Add another flush later

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

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

5 years agoBug 21056: Changing the logged in library can fail sporadically
Kyle M Hall [Mon, 9 Jul 2018 18:05:29 +0000]
Bug 21056: Changing the logged in library can fail sporadically

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

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

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

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

5 years agoBug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required...
Owen Leonard [Thu, 2 Aug 2018 13:46:31 +0000]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

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

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

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

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

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

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

5 years agoBug 21075: Unit tests
Nick Clemens [Fri, 13 Jul 2018 15:13:31 +0000]
Bug 21075: Unit tests

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

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>

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

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

5 years agoBug 21075: AutoUnsuspendHolds should unsuspend holds <= today
Nick Clemens [Fri, 13 Jul 2018 14:45:55 +0000]
Bug 21075: AutoUnsuspendHolds should unsuspend holds <= today

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

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

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

5 years agoBug 21139: (follow-up) Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 15 Aug 2018 17:21:47 +0000]
Bug 21139: (follow-up) Floating toolbars - Remove unecessary height

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

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

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

5 years agoBug 21139: No table in toolbar
Jonathan Druart [Wed, 1 Aug 2018 16:18:47 +0000]
Bug 21139: No table in toolbar

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21139: Floating toolbar - Resize toolbar on window resize
Jonathan Druart [Wed, 1 Aug 2018 15:34:29 +0000]
Bug 21139: Floating toolbar - Resize toolbar on window resize

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21139: Floating toolbar - Remove horizontal scrollbar on resize
Jonathan Druart [Wed, 1 Aug 2018 15:31:01 +0000]
Bug 21139: Floating toolbar - Remove horizontal scrollbar on resize

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21139: Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 1 Aug 2018 15:28:54 +0000]
Bug 21139: Floating toolbars - Remove unecessary height

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21139: Floating toolbar - Remove dup id
Jonathan Druart [Wed, 1 Aug 2018 15:28:37 +0000]
Bug 21139: Floating toolbar - Remove dup id

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 21099: Reposition floating toolbars earlier
Jonathan Druart [Fri, 20 Jul 2018 15:59:16 +0000]
Bug 21099: Reposition floating toolbars earlier

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

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

The toolbar should have been repositioned earlier

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

You should notice the difference with and without this patch

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>

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

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

5 years agoBug 21048: (QA follow-up) Fix authorized value statuses in filter
Marcel de Rooy [Fri, 27 Jul 2018 07:42:06 +0000]
Bug 21048: (QA follow-up) Fix authorized value statuses in filter

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21048: Fix display of suggestion's status (SUGGEST_STATUS)
Jonathan Druart [Wed, 11 Jul 2018 21:23:49 +0000]
Bug 21048: Fix display of suggestion's status (SUGGEST_STATUS)

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

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

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21031: Apache Rewrite rules don't work for API when using anything but Debian...
David Cook [Tue, 3 Jul 2018 09:04:50 +0000]
Bug 21031: Apache Rewrite rules don't work for API when using anything but Debian package Plack configuration

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

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

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

__APPLY PATCH__

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

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA with few notes posted separately to Bugzilla.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6b50f0bac092779f93033c8a3f002cb8722d7d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11b6ad197ab279aca89944001a9751a492bdb573)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21094: Syndetics: always use https instead of http
Owen Leonard [Thu, 19 Jul 2018 16:57:42 +0000]
Bug 21094: Syndetics: always use https instead of http

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

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

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

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

Signed-off-by: John Doe <you@example.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e0548cc1a7a924731bd414fec2f7917f044040a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40cf253a0df46613340b301a8ce600de2e680a1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21077: Fix database documentation for statistics.type
Katrin Fischer [Sun, 15 Jul 2018 17:27:03 +0000]
Bug 21077: Fix database documentation for statistics.type

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b89cbf6a473e71597bc051d88c2152531648ad8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc490f7d86c182047a55f875d0db9081fe974996)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21134: Correctly throw the exception in Koha::Patron::Modification->approve
Jonathan Druart [Tue, 31 Jul 2018 15:43:54 +0000]
Bug 21134: Correctly throw the exception in Koha::Patron::Modification->approve

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

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e99cfbca7e904b7664163838a334c487c94e462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6133753ed661902a9ec3cce14190c7d3d683ef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21097: Missing optgroup closing tag in orderreceive.tt
David Cook [Fri, 20 Jul 2018 08:13:49 +0000]
Bug 21097: Missing optgroup closing tag in orderreceive.tt

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoBug 20974: Remove files left behind after removing Solr
Owen Leonard [Thu, 21 Jun 2018 13:37:35 +0000]
Bug 20974: Remove files left behind after removing Solr

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

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

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 21064: Use undefined instead of undef
Nick Clemens [Thu, 12 Jul 2018 10:18:10 +0000]
Bug 21064: Use undefined instead of undef

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

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>

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

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

5 years agoBug 21053: Encode URI characters in plugin 008
Jonathan Druart [Wed, 11 Jul 2018 21:55:06 +0000]
Bug 21053: Encode URI characters in plugin 008

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

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

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

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

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

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

5 years agoBug 21076: Don't call autocomplete code after patron found
Nick Clemens [Fri, 13 Jul 2018 17:49:14 +0000]
Bug 21076: Don't call autocomplete code after patron found

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

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

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

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

5 years agoBug 20564: Don't use system to unzip files
Nick Clemens [Tue, 10 Jul 2018 13:48:07 +0000]
Bug 20564: Don't use system to unzip files

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

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

5 years agoBug 21285: Add missing select2x2.png file
Tomas Cohen Arazi [Wed, 29 Aug 2018 16:46:39 +0000]
Bug 21285: Add missing select2x2.png file

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

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

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

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

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

5 years agoBug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl
Mirko Tietgen [Tue, 22 May 2018 10:32:19 +0000]
Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl

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

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

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

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

5 years agoBug 20437: Update debian/control
Mirko Tietgen [Tue, 15 May 2018 17:23:25 +0000]
Bug 20437: Update debian/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

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

5 years agoBug 20437: Force the dependency on HTTP::OAI < 4.0
Tomas Cohen Arazi [Fri, 16 Mar 2018 18:22:47 +0000]
Bug 20437: Force the dependency on HTTP::OAI < 4.0

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

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

This patch makes Koha require a version lower than 4.0.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

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

5 years agoBug 20770: ILL loans OPAC form notes field allow arbitrary input
Andrew Isherwood [Tue, 15 May 2018 15:00:02 +0000]
Bug 20770: ILL loans OPAC form notes field allow arbitrary input

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

To test:

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

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

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

    Hello
    TESTING

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

    Hello
    TESTING

- TEST: Observe that no Javascript alert is displayed

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 552873f7d466abee6919414b8d2f5e6c99f9a44f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc81442349cb07afe242607f2c40acb62e4e76fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21226: DBRev 17.11.09.001
Nick Clemens [Thu, 16 Aug 2018 14:03:28 +0000]
Bug 21226: DBRev 17.11.09.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21226: Remove xISBN services
Jonathan Druart [Wed, 15 Aug 2018 14:58:12 +0000]
Bug 21226: Remove xISBN services

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

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

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

Make sure there are no regressions introduced by this patchset.

QA Note: C4/XISBN.pm should be renammed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoBug 21226: DB Changes
Jonathan Druart [Wed, 15 Aug 2018 14:36:21 +0000]
Bug 21226: DB Changes

Remove prefs OCLCAffiliateID, XISBN and XISBNDailyLimit

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoUpdate release notes for 17.11.09 release v17.11.09
Fridolin Somers [Tue, 28 Aug 2018 14:02:04 +0000]
Update release notes for 17.11.09 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoIncrement version for 17.11.09 release
Fridolin Somers [Tue, 28 Aug 2018 13:50:19 +0000]
Increment version for 17.11.09 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoMerge remote-tracking branch 'translate/17.11.09-translate-20180828' into sec_171109
Fridolin Somers [Tue, 28 Aug 2018 13:56:17 +0000]
Merge remote-tracking branch 'translate/17.11.09-translate-20180828' into sec_171109

5 years agoBug 21199: (QA follow-up) Add show_attributes to perldoc
Martin Renvoize [Mon, 13 Aug 2018 08:54:44 +0000]
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>

5 years agoBug 21199: Hide patron's attributes from ILSDI if required
Jonathan Druart [Thu, 9 Aug 2018 22:34:58 +0000]
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>

5 years agoTranslation updates for Koha 17.11.09
Koha translators [Tue, 28 Aug 2018 13:41:04 +0000]
Translation updates for Koha 17.11.09

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

Test plan:

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96f253d5ed2f1770b42f06554ebb4c4e14b3afdf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8cfacd7e164178828b0e75743e78d1740ab414b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 21018: Allow uris defined in the item
Jonathan Druart [Wed, 11 Jul 2018 14:29:15 +0000]
Bug 21018: Allow uris defined in the item

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoBug 21018: Fix TrackClicks for 952$u
Jonathan Druart [Fri, 29 Jun 2018 13:29:30 +0000]
Bug 21018: Fix TrackClicks for 952$u

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

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

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

5 years agoBug 8604: Patron cards made for patrons which don't have patron images use preceding...
Chris Nighswonger [Wed, 4 Jul 2018 15:23:11 +0000]
Bug 8604: Patron cards made for patrons which don't have patron images use preceding card's image

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

To test:

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

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

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

    NOTE: This is not an easy bug to reproduce.

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

3. Observe that the symptoms are corrected.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Reproduced the bug and resolved it with this patch.
Code is hard to read; exact cause of the problem was not fully uncovered.

Fixed spelling 'Destory' => 'Destroy'

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

5 years agoBug 21122: Fix check-url-quick when utf8 characters in URL's
Liz Rea [Thu, 26 Jul 2018 04:26:15 +0000]
Bug 21122: Fix check-url-quick when utf8 characters in URL's

To test:

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10720d2a5c50b82d565cab9ad70c8498164d81b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1c988ed7fb3ca7d018c9c7e7cea5f22415b95836)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20811: (RM follow-up) fix check for matching
Nick Clemens [Mon, 23 Jul 2018 12:23:07 +0000]
Bug 20811: (RM follow-up) fix check for matching

Notice should only be triggered if both settings are false

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

5 years agoBug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc...
Marcel de Rooy [Fri, 20 Jul 2018 09:46:58 +0000]
Bug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc without biblionumber

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 20811: (QA follow-up) Make the isbn check work
Marcel de Rooy [Fri, 20 Jul 2018 09:21:11 +0000]
Bug 20811: (QA follow-up) Make the isbn check work

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 20811: Fix wrong usage of ModBiblio
Jonathan Druart [Mon, 28 May 2018 18:19:09 +0000]
Bug 20811: Fix wrong usage of ModBiblio

Since
  commit cefa7c21e28b88351ee8ae0dfefb80a515323df9
  Bug 5635: bulkmarcimport new parameters & features

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields
Katrin Fischer [Thu, 2 Aug 2018 13:56:11 +0000]
Bug 14662: Add empty entries to pull downs in cataloguing form for mandatory subfields

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 14662: Add empty entries to pull downs on item form for mandatory subfields
Katrin Fischer [Tue, 31 Jul 2018 23:58:33 +0000]
Bug 14662: Add empty entries to pull downs on item form for mandatory subfields

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

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

5 years agoBug 18947: LDAP - do not assume anonymous bind if no user or password
Nick Clemens [Wed, 13 Dec 2017 13:27:36 +0000]
Bug 18947: LDAP - do not assume anonymous bind if no user or password

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

prove -v t/db_dependent/Auth_with_ldap.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>

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