koha.git
5 years agoUpdate release notes for 17.11.07 release v17.11.07
Fridolin Somers [Mon, 25 Jun 2018 13:04:03 +0000]
Update release notes for 17.11.07 release

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

5 years agoIncrement version for 17.11.07 release
Fridolin Somers [Mon, 25 Jun 2018 12:22:08 +0000]
Increment version for 17.11.07 release

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

5 years agoTranslation updates for Koha 17.11.07
Koha translators [Mon, 25 Jun 2018 12:14:05 +0000]
Translation updates for Koha 17.11.07

5 years agoBug 17111 - Automatic debian/control updates (oldstable/17.11.x)
Nightly Build Bot [Fri, 15 Jun 2018 11:34:10 +0000]
Bug 17111 - Automatic debian/control updates (oldstable/17.11.x)

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

5 years agoBug 19970: (17.11.x) Revise change of bug 19413 to work better for translations
Owen Leonard [Mon, 18 Jun 2018 12:05:06 +0000]
Bug 19970: (17.11.x) Revise change of bug 19413 to work better for translations

This patch changes how the submit and cancel buttons appear in the MARC
008 plugin window. The controls are now displayed as buttons in a
floating toolbar.

To test you must have MARC tag 008 configured to use the
marc21_field_008.pl plugin.

- Apply the patch and open an existing or blank record in cataloging.
- Click the plugin link next to tag 008 to trigger the popup window.
- Confirm that "Save" and "Cancel" appear correctly in a toolbar.
- Scroll down the page to confirm that the toolbar "sticks" to the top
  of the window.
- Confirm that the "Save" and "Cancel" buttons work correctly.

5 years agoBug 20285: Lost item refund won't always pay down lost item fee first
Kyle M Hall [Fri, 23 Feb 2018 13:44:45 +0000]
Bug 20285: Lost item refund won't always pay down lost item fee first

Due to a simple typo, the accountline passed to Koha::Account::pay from _FixAccountForLostAndReturned is not used. That means that the credit for the lost item fee may be applied to other fees before it is used on the lost fee itself.

Test Plan:
1) Find a patron with existing fines
2) Ensure your settings will charge patrons for lost items
3) Check out an item to a patron with existing fees that need paid
4) Mark the item lost, charging the lost item fee
5) Return the item
6) Note the fee was refunded, but it paid down earlier fines first,
   and not the lost item fee first
7) Apply this patch set
8) Repeat steps 1 - 5
9) Note the lost item fee is the first fee to be paid off by the lost
   item fee refund

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

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

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

5 years agoBug 20285: Unit Test
Kyle M Hall [Fri, 23 Feb 2018 13:44:24 +0000]
Bug 20285: Unit Test

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

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

5 years agoBug 20760: Fill authorised values in svc framework
Jonathan Druart [Mon, 4 Jun 2018 16:02:33 +0000]
Bug 20760: Fill authorised values in svc framework

To test:
 1 - Map a marc field to an authorised value in the default framework -
say 300$c -> CCODE
 2 - Open the advanced cataloguing editor
 3 - Create a new field 300$c - note there is no dropdown
 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define
 5 - Note the many instance of
Koha::Schema::ResultSet::AuthorisedValueCategory->HASH...
 6 - Apply patch
 7 - Restart memcached and plack
 8 - reload/recreate record in rancor
 9 - Note that 300$c is now a dropdown as expected
10 - repeate 4
11 - note the authorised values look correct in response

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

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

5 years agoBug 20911: Use 'POST' to submit search history forms
Nick Clemens [Mon, 11 Jun 2018 15:28:19 +0000]
Bug 20911: Use 'POST' to submit search history forms

To test:
1 - Enable EnableOpacSearchHistory and EnableSearchHistory
2 - Do some searches
3 - View your search history in staff/opac
4 - Confirm you can delete single or multiple rows
5 - Confirm other page functionality has not changed

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>

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

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

5 years agoBug 20892: Correct basketgroup link in histsearch.pl
Fridolin Somers [Thu, 7 Jun 2018 13:59:39 +0000]
Bug 20892: Correct basketgroup link in histsearch.pl

When searching an order, histsearch.pl page, you see if exists the backetgroup as a link.
This link is composed of "basketgroup.pl?booksellerid=xxx", it must also contain "basketgroupid=xxx" and "opa=add".

See Bug 11429 for example.

Test plan :
1) Create an order in a basket and add it to a basketgroup
2) Search for this order, you get to page histsearch.pl
3) Check clicking on basketgroup id leads to basketgroup details page

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

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

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

5 years agoBug 20922: Remove use of Koha::Number::Price in updatedatabase.pl
Jonathan Druart [Tue, 12 Jun 2018 16:12:25 +0000]
Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl

Koha::Number::Format->round use Number::Format->round with a precision=2
We should use it directly instead of Koha::* modules. It will avoid the
DB entry to fail because schema changes.

From the koha-devel list:

http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html

16.06.00.042

Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching
feature equivalent to the aggressive ISBN matcher)
DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in
'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`,
`me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`,
`me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE (
`active` = ? )" with ParamValues: 0=1] at
/usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836.
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
'me.p_sep_by_space' in 'field list' at
/inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209

Basically, the update code uses Koha::Number::Price, which in full
modern object mode goes for its newly added *p_sep_by_space* _in the
18.05 code_.  But the DB doesn't have it yet (it comes with 17.12.00.022).

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

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

5 years agoBug 20851: Add module to circ/article-request-slip.pl
Marcel de Rooy [Fri, 1 Jun 2018 07:21:48 +0000]
Bug 20851: Add module to circ/article-request-slip.pl

See bug 20468, comment7.
Although the script seems to compile well, we better add the module here.
Trivial change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 84fd5b109e24e7c1ee67d7bb0c7ff1fb9776c8de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20829: Handle non-existent barcode when linking to host item
Jonathan Druart [Wed, 30 May 2018 15:10:58 +0000]
Bug 20829: Handle non-existent barcode when linking to host item

Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf
  Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem

$item is not defined if the barcode is invalid, we should not call
method on it in that case.

Test plan:
- Turn on EasyAnalyticalRecords
- Go to a detail page
- Edit > Link to host item
- Enter an invalid barcode
=> With the patch you get a friendly error message
=> Without this patch it explodes with
Can't call method "itemnumber" on an undefined value at
/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86.

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

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

5 years agoBug 19972: Make holds to pull list honors item-level_itypes syspref
Victor Grousset [Tue, 16 Jan 2018 09:06:20 +0000]
Bug 19972: Make holds to pull list honors item-level_itypes syspref

And reflect that in the UI strings + variable names

Test plan:
1. Set syspref "item-level_itypes" to "specific item"
2. Create a hold on a record with one item
3. Change the document type of the item
4. Check that the item edition page and the record page show 2 different
     types.
5. Go to /cgi-bin/koha/circ/pendingreserves.pl
6. Check that the displayed type is the item one
7. Set syspref "item-level_itypes" to "biblio record"
8. Go to /cgi-bin/koha/circ/pendingreserves.pl
9. See that the displayed type is the item one. When the sysopref says
     "record"
     This is the bug.
10. Apply this patch
11. Go to /cgi-bin/koha/circ/pendingreserves.pl
12. See that the displayed type now follows the syspref
13. Set syspref "item-level_itypes" to "specific item"
14. Go to /cgi-bin/koha/circ/pendingreserves.pl
15. See that the displayed type still follows the syspref

Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>

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

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

5 years agoBug 18821: (QA follow-up) Last tweaks for performance
Marcel de Rooy [Fri, 1 Jun 2018 09:00:57 +0000]
Bug 18821: (QA follow-up) Last tweaks for performance

[1] passing unsafe has no use since it is a scalar, removed it to unconfuse
[2] remove caching when pref is disabled
[3] caching userid removes the need for calling Patron->find each time
[4] subsequent changes in unit test
[5] cosmetic renames to move from session to daily basis (changed dev angle)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First call going thru Koha::Patron takes about 0.0150 sec.
Subsequent calls only use caching and take about 0.0006 sec.

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 2bae585fcd4d5a5e31c0503cc8ea1cd3ea0f29ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 18821: Convert to using cache with date checking
Kyle M Hall [Sat, 26 May 2018 06:40:24 +0000]
Bug 18821: Convert to using cache with date checking

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

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

5 years agoBug 18821: TrackLastPatronActivity is a performance killer
Kyle M Hall [Mon, 7 May 2018 17:29:12 +0000]
Bug 18821: TrackLastPatronActivity is a performance killer

Test Plan:
1) Apply this patch
2) Start a new session ( a private browser window works well )
3) Note the lastseen column in the borrowers table is updated
4) Browse a few pages, not the lastseen column is not updated again
5) Close the browser window and repeat steps 2-4
6) prove t/db_dependent/Auth.t

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

5 years agoBug 20546: Display shelving location on checkin
Magnus Enger [Mon, 9 Apr 2018 10:39:23 +0000]
Bug 20546: Display shelving location on checkin

Currently, the sehlving location is not being displayed in the table
of checked in items on <intranet>/cgi-bin/koha/circ/returns.pl

To test:
- Make sure you have a couple of books with a value for shelving location (952$c)
- Check the books out
- Check the books in
- Verify nothing is displayed in the "Shelving location" column
- Apply this patch
- Check the books out and in again
- Verify the shelving location is now being displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

5 years agoBug 20685: Escape letter template content in textarea
Jonathan Druart [Thu, 3 May 2018 18:40:11 +0000]
Bug 20685: Escape letter template content in textarea

Test plan:
enter the following text into the Email template for 'HOLD_SLIP'
in Home › Tools › Notices & Slips › Modify notice

<div style='max-width: 4in;'>
<h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br />
<<borrowers.streetnumber>> <<borrowers.address>><br />
<<borrowers.address2>><br />
<<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br />
<br />
<br />
<img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5&notext=1">

Edit it again
Without this patch you will get:
<img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1">

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>

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

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

5 years agoBug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in...
Nick Clemens [Wed, 30 May 2018 13:07:39 +0000]
Bug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in circulation

To test:
1 - Place two holds on a bib for a single patron
2 - Check in both items, confirm the screen message and slip are correct
3 - Checkout both items to another patron, confirm the screen message
and slip are correct

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

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

5 years agoBug 17561: (QA follow-up) Update existing unit tests
Kyle M Hall [Fri, 18 May 2018 12:00:03 +0000]
Bug 17561: (QA follow-up) Update existing unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

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

5 years agoBug 17561: (QA follow-up) Simplify new ReserveSlip code
Kyle M Hall [Fri, 18 May 2018 11:20:06 +0000]
Bug 17561: (QA follow-up) Simplify new ReserveSlip code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

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

5 years agoBug 17561: ReserveSlip needs itemnumber for item level holds on same biblio
Benjamin Rokseth [Thu, 15 Mar 2018 11:57:37 +0000]
Bug 17561: ReserveSlip needs itemnumber for item level holds on same biblio

This patch fixes a regression after bug 14695.
This patch adds itemnumber and barcode as optional params in ReserveSlip used
by hold-transfer-slip.pl to generate HOLD_SLIP. This is for ReserveSlip to be
able to generate correct slips when items in multi-item holds are checked in.

Test plan:

1) activate a circulation rule with multi-item holds
2) Place two holds on same biblio for patron
3) for debugging, either use browser console to observe POST request and responses
   or use info from reserves, e.g. reserve_id in the HOLD_SLIP
4) checkin two items from same biblio on pickup branch
5) note that both holds are effectuated, but reserve_id is the same on both slips
6) also note that there is no itemnumber or barcode in the requests from returns.pl
7) Apply this patch
8) repeat 2-4
9) note that reserve_id is now different on the two slips

and/or:
Run tests:
  t/db_dependent/Reserves/ReserveSlip.t

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

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

5 years agoBug 20861: Correct EDI permissions on EDI messsages
Katrin Fischer [Sun, 3 Jun 2018 08:09:23 +0000]
Bug 20861: Correct EDI permissions on EDI messsages

The permission for EDI is edi_manage, but 2 pages asked
for manage_edi, allowing users not to access those.

To test:
- Add edi_manage to your permissions
- Try to access the EDIFACT messages from the
  acq start page
- Verify it doesn't work
- Apply patch and try again
- You should be able to access the page now
- Try to access the other page directly (if you don't
  have EDI data):
  /cgi-bin/koha/acqui/edimsg.pl
- Verify you can access the page and don't get a
  permission error

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

5 years agoBug 20763: Remove unecessary Koha::Patron fetch
Jonathan Druart [Mon, 28 May 2018 19:36:54 +0000]
Bug 20763: Remove unecessary Koha::Patron fetch

If $borrowernumber is not set, there is no userenv.
So let's pick the library code set in the userenv instead of fetching
the Koha::Patron->branchcode from DB

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

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 7e025fde1ae976cb12d4593b33579e12f5b284ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl...
Kyle M Hall [Mon, 14 May 2018 12:45:00 +0000]
Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in

Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".

Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
   click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!

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

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

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

5 years agoBug 20798: Client side validation for for fund selection prevents adding only some...
Kyle M Hall [Mon, 21 May 2018 18:56:58 +0000]
Bug 20798: Client side validation for for fund selection prevents adding only some records to a basket

Bug 19453 "fixed" the fund validation that never actually worked. This validation should be removed altogether instead. It is overly simplistic and simply checks to see if each record in the batch has a fund selected regardless of whether that record will be imported or not.

In addition, the code completely ignores items generated by MarcItemFieldsToOrder such that even if items on that page have a fund selected, the javascript forces the librarian to make a selection from the left-hand fund pulldown even though it will not be used.

Considering this bad validation is basically 'new' as it never worked before, the most sensible course of action would be to 'undo' the change and remove the validation.

Test Plan:
1) Add records to a basket from an import batch
2) Select only some of those items in the batch
3) Note Koha will not let you import them unless you set funds for *all*
   records in the batch
4) Apply this patch
5) Note Koha no longer forces a budget to be selected in the pulldown

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

https://bugs.koha-community.org/show_bug.cgi?id=20789
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

5 years agoBug 20696: Fix a few ugly "eq undef" comparisons in Search.pm
Marcel de Rooy [Wed, 2 May 2018 14:13:20 +0000]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Passes test plan and QA tools. Searching works correctly.

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 66f5b793ed8e52372466122263cac0ddd84dea63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

5 years agoBug 20781: Set a minimum enrollemnt period 'in months' of 1
Nick Clemens [Fri, 18 May 2018 14:01:09 +0000]
Bug 20781: Set a minimum enrollemnt period 'in months' of 1

To test:
 1 - Browse to Admin->Patron Categories
 2 - Click '+ New category'
 3 - Enter data as required, however, enter 0 in 'Enrolment period' ->
'in months'
 4 - Save
 5 - View the list of categories, the new category has 'Enrolment period'
= 'until'
 6 - Create a patron in this category, note their dateexipry is
'0000-00-00'
 7 - Search for them
 8 - internal server error
 9 - Delete that patron
10 - Apply patch
11 - Edit the category, note you cannot save with 0 months
12 - Set 1 month and save
13 - Create a patron in this cateogry
14 - Note they have a valid dateexpiry
15 - Search for them
16 - All works
17 - Create a new category and verify you cannot add with 0 months

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

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

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

5 years agoBug 20191: (QA follow-up) Require Jessie's Test::MockTime
Tomas Cohen Arazi [Thu, 5 Apr 2018 13:06:37 +0000]
Bug 20191: (QA follow-up) Require Jessie's Test::MockTime

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

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

5 years agoBug 20191: Use Test::MockTime to hold time still
Mark Tompsett [Thu, 5 Apr 2018 01:31:38 +0000]
Bug 20191: Use Test::MockTime to hold time still

The problem is the calls to HTTP::OAI::Header, etc.
may reference gmtime which is continually changing by
the second. By forcing time to lock for all the tests,
except the last one, we can be assured things should
not fail.

TEST PLAN
---------
install libtest-mocktime-perl
apply the patch
restart_all
in kshell, prove t/db_dependent/OAI/Server.t
run koha qa test tools

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

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

5 years agoBug 20191: Use find with unique key combination
Jonathan Druart [Fri, 16 Feb 2018 15:12:00 +0000]
Bug 20191: Use find with unique key combination

To prevent unexpected issues later.

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

5 years agoBug 20191: Make OAI/Server.t tests use timestamps from the DB
Tomas Cohen Arazi [Thu, 15 Feb 2018 17:14:18 +0000]
Bug 20191: Make OAI/Server.t tests use timestamps from the DB

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

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

5 years agoBug 20767: Display a stack trace when a method is not covered by tests
Jonathan Druart [Mon, 14 May 2018 17:04:01 +0000]
Bug 20767: Display a stack trace when a method is not covered by tests

When a method is not allowed yet (not covered by tests), developers get
an error the is not really useful: "The method XXX is not covered by
tests!"
It would be more useful to have a stack trace in order to know where
this error come from.

Test plan:
Modify some code to display this stack trace and confirm it makes sense
to have it, i.e. it will make debug easier

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

5 years agoBug 3886: Fix mismatch of required permissions for printing slips
Katrin Fischer [Wed, 16 May 2018 00:45:02 +0000]
Bug 3886: Fix mismatch of required permissions for printing slips

- Print summary (summary-print.pl)
- Print quick slip (printslip.pl)
- Print slip (printslip.pl)
- Print overdues (print_overdues.pl)

Perl scripts all require circulate_remaining_permissions, while
in the template we were checking for edit_borrowers.

Now the print pull down will only be visible if the patron has
circulate or circulate_remaining_permissions.

To test:
- Verify that printing the listed slips works for staff users
  with either circulate or circulate_remaining_permissions
  and without edit_borrowers.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

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

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

5 years agoBug 20752: Fix capitalization on the files tab for patron files
Katrin Fischer [Thu, 10 May 2018 17:54:38 +0000]
Bug 20752: Fix capitalization on the files tab for patron files

- Activate EnableBorrowerFiles
- Go to any patron account in staff
- Go to the files tab
- Check that strings on the page ar all properly capitalized
  - button
  - legend on section

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

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

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

5 years agoBug 20791: Correct capitalization on 'Notices & slips' page
Katrin Fischer [Fri, 18 May 2018 05:39:19 +0000]
Bug 20791: Correct capitalization on 'Notices & slips' page

- Standardizes spelling to 'Notices & slips'

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

5 years agoBug 20827: Display Fund's owner name when selected
Jonathan Druart [Mon, 28 May 2018 14:40:20 +0000]
Bug 20827: Display Fund's owner name when selected

When a fund is created or edited and does not have a owner yet, the
name of the patron will not be displayed when selected.

The HTML element the JS code expects is not present in the DOM.

Test plan:
- Create a fund, set a owner
- remove the owner, edit, etc.
- Save
- Edit again
Make sure it works as expected.

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

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

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

5 years agoBug 20652: Fix result sorting after search on limit only
Jonathan Druart [Tue, 24 Apr 2018 18:38:41 +0000]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

5 years agoBug 20343: Put translatable strings in strings.tt
Julian Maurice [Wed, 18 Apr 2018 13:20:02 +0000]
Bug 20343: Put translatable strings in strings.tt

Also add a CSS class on <details> for easier styling and change the
list style so it take less space on screen

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

5 years agoBug 20343: Show number of checkouts by itemtype in circulation.pl
Julian Maurice [Tue, 6 Mar 2018 13:47:46 +0000]
Bug 20343: Show number of checkouts by itemtype in circulation.pl

It is sometimes useful to have the number of checkouts grouped by
itemtype (to see if we're approaching the maximum number of checkouts
allowed for instance).
This patch adds this information above the checkouts table, in
circ/circulation.pl

Test plan:
1. Check out some items with various item types to a patron
2. In circ/circulation.pl, click on 'Show checkouts' button to display
   the table
3. Notice the line "Number of checkouts by item type" above the table,
   click on it
4. See that the list of item types is displayed with a count in front of
   each one
5. Compare the numbers to the checkouts in the table and verify that the
   numbers are correct

Signed-off-by: claude <claude.brayer@cea.fr>

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

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

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

5 years agoBug 18799: XSLTresultsdisplay hides the icons
Owen Leonard [Thu, 15 Jun 2017 12:32:43 +0000]
Bug 18799: XSLTresultsdisplay hides the icons

If item-level_itypes is turned off and XSLTResultsDisplay is turned on,
biblio-level itemtype images are not shown in staff client search
results. This patch corrects the problem.

This patch also adds some markup and CSS to the itemtype image to make
it look a litte cleaner and work better in result sets in which some
titles have images and some don't.

To test, apply the patch and view the staff client search results page
with various settings:

- XSLT turned on and off
- item-level_itypes turned on and off
- noItemTypeImages turned on and off

Confirm that item type images are shown or not shown correctly according
to each setting.

The difference between this patch and the other patch currently on this
bug is that this patch continues the practice of hiding biblio-level
itemtype information when item-level_itypes is ON.

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

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

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

5 years agoBug 20722: Display search results when searching only by ITEMTYPECAT
Jonathan Druart [Mon, 7 May 2018 18:04:33 +0000]
Bug 20722: Display search results when searching only by ITEMTYPECAT

- Create an entry for the ITEMTYPECAT authorised value category.
  Make sure to fill in the OPAC description.
- Go to administration > itemtypes and add the new category to 2 item types.
- Go to the OPAC and check that the advanced search shows your new itemtype
  group instead of the individual itemtypes.
- Check the checkbox and Search.

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

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

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

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

5 years agoBug 20701: (17.11 follow-up) Move csrf token after checkauth and use v17.11.06
Nick Clemens [Wed, 23 May 2018 10:37:35 +0000]
Bug 20701: (17.11 follow-up) Move csrf token after checkauth and use
scalar

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

5 years agoUpdate release notes for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 12:06:47 +0000]
Update release notes for 17.11.06 release

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

5 years agoBug 20730: Move the authentication block before doing anything
Jonathan Druart [Tue, 8 May 2018 17:27:38 +0000]
Bug 20730: Move the authentication block before doing anything

No need to add more information here, it's self-explanatory...

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

5 years agoBug 20701: Add csrf protection to mancredit.pl
Jonathan Druart [Thu, 3 May 2018 12:09:19 +0000]
Bug 20701: Add csrf protection to mancredit.pl

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

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

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

5 years agoBug 20701: Add csrf protection to maninvoice.pl
Nick Clemens [Thu, 3 May 2018 11:52:24 +0000]
Bug 20701: Add csrf protection to maninvoice.pl

TO test:
1 - Be signed in to Koha
2 - Add a manual invoice to an account, works fine
3 - Now do it via url: http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=5&type=test&amount=5&add=Save
4 - Apply patches
5 - Test that everything continues to work as expected (but more securely)
6 - Try adding a new invoice via URL
7 - Should get 'internal server error' and wrong csrf token in logs

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

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

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

5 years agoIncrement version for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 11:52:58 +0000]
Increment version for 17.11.06 release

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

5 years agoTranslation updates for Koha 17.11.06
Koha translators [Tue, 22 May 2018 11:37:22 +0000]
Translation updates for Koha 17.11.06

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

5 years agoBug 11943: Add unit test for double accepts
Marcel de Rooy [Fri, 4 May 2018 07:54:30 +0000]
Bug 11943: Add unit test for double accepts

Test plan:
Run t/db_dependent/Virtualshelves.t

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 11943: Prevent double accepts in Koha::Virtualshelfshare
Marcel de Rooy [Fri, 4 May 2018 07:34:02 +0000]
Bug 11943: Prevent double accepts in Koha::Virtualshelfshare

This 'bug' existed long enough now to finally remove it ;)

We do so by deleting the invitation if the borrower already has a share
on this list. Actually not that hard.

We still need: a unit test and a db revision.

Test plan:
[1] Share a list. Let user B accept.
[2] Without this patch: Share again and let B accept again.
[3] Verify that you have two shares for this list in virtualshelfshares.
[4] With this patch: Share another list, let B accept.
[5] Share this other list again, let B accept again.
[6] Verify that virtualshelfshares does not contain double entries now.
    (Note: This pertains to the second list only.)

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 20687: (follow-up) Look for invitekey in show_accept and fix error codes
Marcel de Rooy [Fri, 4 May 2018 06:10:46 +0000]
Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes

We should check the invitekey in show_accept by passing it along in the
search call.
On the way I fixed some error checking: if the list number is invalid, or
the list is public or you are the owner, or if the key is not found, we
should set the right error code; the template contains those messages.

Test plan:
[1] Share a list and accept a correct invitation with another user.
[2] Try to accept some invalid proposals: wrong key, wrong list.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested invalid key, wrong list, owner, public list, expiry.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 20687: Check all share keys for a given list
Nick Clemens [Tue, 1 May 2018 13:47:18 +0000]
Bug 20687: Check all share keys for a given list

This patch gets all the shares for a list and iterates through to find
the correct one when accepting from a link

To test:
1 - Create a private list in the opac
2 - Invite 2 patrons to the list
3 - Try to accept from the patron you first shared to
4 - You will get a failure message about expiration of the link
5 - Apply patch
6 - Now try to accept the first share
7 - It works! Success!

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 19030: Preserve link between order and subscription when editing an order
Jonathan Druart [Mon, 16 Apr 2018 20:41:42 +0000]
Bug 19030: Preserve link between order and subscription when editing an order

The aqorders.subscriptionid info is not sent to the template when the
order is edited. Which means we lose this link.

Test plan:
Create an order from a subscription
Edit the order
=> Without this patch, the aqorders.subscriptionid value is set to NULL
and items are created when receiving serial.

=> With this patch applied the link is preserved and expected behaviors
are preserved during all the acquisition workflow

You should also try and create several orders from the same subscription

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

5 years agoBug 20556: Marking ILL request as complete..
Andrew Isherwood [Tue, 10 Apr 2018 15:50:56 +0000]
Bug 20556: Marking ILL request as complete..

When marking a request as complete, the status is updated internally
then the user to redirected to the view of the request.

Although the redirect header is sent, there is no exit to indicate that
the program flow should stop. As a result, an attempt is made to render
the template, which fails.

This patch simply adds the missing exit.

TEST PLAN
---------

- Create an ILL request
- "Manage request" > "Confirm request"
- "Mark completed"
- TEST: Ensure that no error is written to the error log upon clicking
"Mark completed"

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

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

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

5 years agoBug 20562: Fix Returns.t test
Jonathan Druart [Thu, 19 Apr 2018 19:21:57 +0000]
Bug 20562: Fix Returns.t test

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

5 years agoBug 20562: Pass the Koha::Checkout object to AddIssuingCharge
Jonathan Druart [Mon, 16 Apr 2018 16:48:54 +0000]
Bug 20562: Pass the Koha::Checkout object to AddIssuingCharge

We do not need to pass all those parameters, just the checkout object is
enough.

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

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

5 years agoBug 20562: issue_id is not stored in accountlines for rental fees
Kyle M Hall [Sun, 8 Apr 2018 07:11:11 +0000]
Bug 20562: issue_id is not stored in accountlines for rental fees

Test Plan:
1) Apply this patch
2) Assign a charge to an item type
3) Checkout an item of that type to a patron
4) View the accountlines table for that patron
SELECT * FROM accountlines WHERE accounttype='Rent' and borrowernumber=##;
5) Note there is an issue_id

Or

1) Apply this patch
2) prove t/db_dependent/Circulation/issue.t

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

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

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

5 years agoBug 18725: Test return values of make_column_dirty
Jonathan Druart [Mon, 16 Apr 2018 15:56:01 +0000]
Bug 18725: Test return values of make_column_dirty

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

5 years agoBug 18725: (QA follow-up) Use make_column_dirty instead of status change
Marcel de Rooy [Fri, 13 Apr 2018 07:38:50 +0000]
Bug 18725: (QA follow-up) Use make_column_dirty instead of status change

Moving the status to the invalid 'processing' might well have unwanted
side-effects. (The status column will be set to empty string and we have
a problem if it is not processed.)

This patch allows pass-through of DBIX's make_column_dirty in
Koha::Object (simple tests included) and uses it to force an update.
If the update does not return true, it still exits.

Test plan:
[1] Read the changes.
[2] Run t/db_dependent/Koha/Object.t

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

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

Conflicts:
Koha/Object.pm

5 years agoBug 18725: Prevent process_message_queue to send duplicate emails if message_queue...
Kyle M Hall [Thu, 26 Oct 2017 13:04:59 +0000]
Bug 18725: Prevent process_message_queue to send duplicate emails if message_queue is not writable.

Last week, we had a database server whose disk filled, causing database writes to fail.

This meant that messages in message_queue marked 'pending' were not marked as 'sent' when they were added to the postfix mail queue; messages were sent every 15 minutes (as specified in the cron job) until the disk space issues were cleared.

I would suggest adding a token write to the start of process_message_queue.pl as a 'canary in the coal mine'. If the database write fails, process_message_queue should stop, because it's not safe to proceed sending emails that may not be marked 'sent'.

Test Plan:
1) Apply this patch
2) Make the message_queue table unwriteable somehow
3) Run process_message_queue.pl
4) Script should die with error

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

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

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

5 years agoBug 20584: Prevent Koha/Patron/Categories.t to fail randomly
Jonathan Druart [Fri, 13 Apr 2018 18:09:53 +0000]
Bug 20584: Prevent Koha/Patron/Categories.t to fail randomly

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

5 years agoBug 19546: (QA follow-up) Make the returning cd more fool proof
Marcel de Rooy [Mon, 5 Mar 2018 09:27:33 +0000]
Bug 19546: (QA follow-up) Make the returning cd more fool proof

Trivial and hypothetical fix.
If you create /root/AA B (space in dirname), the quotes added here will
help you to get back where you came from.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

5 years agoBug 19546: Run starman from the instance's home dir
Tomas Cohen Arazi [Fri, 2 Mar 2018 13:36:34 +0000]
Bug 19546: Run starman from the instance's home dir

This patch makes koha-plack jump into the instance's home directory to
run.

It is required because Perl 5.18 introduced a breaking change that
makes perl die if @INC includes directories for which the user doesn't
have read permission, and need to be traversed when querying for a lib.
This is the case of '.', which is introduced automatically into @INC
until Perl 5.26 (which removes the 'feature').

The Mojolicious::Plugins lib prefixes the plugin names with
'Mojolicious::Plugin' so it first looks (for example) for
Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
the first one on the list). When it looks for it at '.' it dies (because
of Perl's behaviour) so it doesn't query for the right namespace (the
following to try).

I only reproduced it in koha-testing-docker. To test, you just need to
try this patched koha-plack and make sure it doesn't break due to this
permissions issue.

To test:
- In your koha-testing-docker clone, run:
  $ docker-compose up -p test
- Open a shell inside the container (on a separate terminal):
  $ docker exec -it test_koha_1 bash
- From within the /root directory, restart plack:
  $ cd /root
  $ koha-plack --restart kohadev
=> FAIL: Logs show plack is broken due to permissions problems trying to
    find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
- Use the patched script from this patch:
  $ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
=> SUCCESS: Plack runs fine, no error in the logs
- Sign off :-D

Note: people who has environments in which the problems is reproducible,
    please test this version of koha-plack and stamp your sign-off,
    PLEASE.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly
Jonathan Druart [Mon, 7 May 2018 16:15:34 +0000]
Bug 20721: (bug 19403 follow-up) Prevent Circulation.t to fail randomly

If items.restricted == 1, CanBookBeIssued will not returned what we are
testing.

The easiest and global fix is to define a default value at TestBuilder
package level

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

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

5 years agoBug 20426: Fix default fund value when adding orders from iso2709 file
Jonathan Druart [Mon, 2 Apr 2018 15:56:21 +0000]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

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

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

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt

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

5 years agoBug 20536: (ILL) authnotrequired should be explicitly unset on opac
Martin Renvoize [Fri, 6 Apr 2018 09:22:20 +0000]
Bug 20536: (ILL) authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired

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>

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

5 years agoBug 20552: Fix HTML tag for search facets
Claire Gravely [Tue, 10 Apr 2018 12:46:11 +0000]
Bug 20552: Fix HTML tag for search facets

The tags for home library and holding library in the 'refine your
search' list should be h5.

This patch changes the html tag for the availability, holding library and home library
facets.

To test:
- Search for an item in the OPAC where the relevant facet appears
- Use 'Inspect element' to check the tag
- Apply patch
- Confirm the facet now has the h5 tag
- Confirm spacing is improved

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

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>

5 years agoBug 3841: (follow-up) Add the ACQ framework for pl-PL
Jonathan Druart [Tue, 10 Apr 2018 15:04:59 +0000]
Bug 3841: (follow-up) Add the ACQ framework for pl-PL

No idea why I missed pl-PL!

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

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

5 years agoBug 19581: Fix Koha_Elasticsearch.t
Jonathan Druart [Mon, 9 Apr 2018 20:43:41 +0000]
Bug 19581: Fix Koha_Elasticsearch.t

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

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

5 years agoBug 19581: (follow-up) Fix handling of new and old arrays for auth compat
Nick Clemens [Fri, 16 Mar 2018 09:03:46 +0000]
Bug 19581: (follow-up) Fix handling of new and old arrays for auth compat

Stolen from bug 20244

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

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

5 years agoBug 19581: Remove unused comment and line
Nick Clemens [Tue, 13 Mar 2018 09:32:04 +0000]
Bug 19581: Remove unused comment and line

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

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

5 years agoBug 19581: Unit tests
Nick Clemens [Sun, 5 Nov 2017 01:47:49 +0000]
Bug 19581: Unit tests

This patch makes a few changes to the tests to take into account the
change to indexing.

To test:
prove t/db_dependent/Koha_Elasticsearch_Indexer.t
Should return green

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

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

5 years agoBug 19581: Remove 'split' option from Catmandu fixes for marc
Nick Clemens [Sun, 5 Nov 2017 01:51:39 +0000]
Bug 19581: Remove 'split' option from Catmandu fixes for marc

This option in combination with append seems to add null entries in the indexes
for fields that don't exist. These fields then affect sorting. Removing it solves
the issue

To test:
1 - Have an ES setup
2 - Catalog and index some records
3 - View a record in ES:
    curl 'localhost:9200/koha_kohadev_biblios/data/4?pretty=yes'
4 - Note there are 'null' entries in the indexes, save this result for
comparison
5 - Apply patch
6 - Reindex, amking sure to delete existing indexes
    perl misc/search_tools/rebuild_elastic_search.pl -d
7 - View the record again
8 - Note the null entries are removed
9 - Note indices are otherwise intact

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

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

5 years agoBug 20122: Explicitly set path to fix emptying cart functionality
Mark Tompsett [Fri, 6 Apr 2018 14:59:28 +0000]
Bug 20122: Explicitly set path to fix emptying cart functionality

This is caused by bib_list not being deleted.
The path was not explicitly set.
This patch adds path=/ explicitly to ensure it
does get deleted.

TEST PLAN
---------
1) search for 'the' in OPAC
2) add several items to cart.
3) look at your cart.
4) empty and close the cart, select all->remove
   -- either way window closes and it looks empty.
5) refresh the page
   -- cart comes back.
   -- in chromium inspecting the page, specifically
      the "Application" area, bib_list is shown as
      a cookie still.
6) apply patch
7) restart_all and empty cache forcing JS reload
8) repeat steps 1-5
   -- this time cart stays empty.
   -- and the bib_list cookie is gone

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> using firefox 59.0.2

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

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

5 years agoBug 20325: Remove warning, it is no longer true
Kyle M Hall [Thu, 5 Apr 2018 10:12:44 +0000]
Bug 20325: Remove warning, it is no longer true

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

5 years agoBug 20325: Do not remove accountlines between tests
Jonathan Druart [Wed, 4 Apr 2018 18:36:46 +0000]
Bug 20325: Do not remove accountlines between tests

This is part of the tests, to make sure they have not been deleted

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

Conflicts:
t/db_dependent/Accounts.t

5 years agoBug 20325: Move tests to a subtest
Jonathan Druart [Wed, 4 Apr 2018 18:19:54 +0000]
Bug 20325: Move tests to a subtest

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

Conflicts:
t/db_dependent/Accounts.t

5 years agoBug 20325: C4::Accounts::purge_zero_balance_fees does not check account_offsets
Kyle M Hall [Tue, 27 Mar 2018 19:16:16 +0000]
Bug 20325: C4::Accounts::purge_zero_balance_fees does not check account_offsets

purge_zero_balance_fees is used in cleanup_database.pl to determine which fees can be cleaned up.

It uses a simple SQL query to determine which rows in accountlines need to be removed:

463     my $sth = $dbh->prepare(
464         q{
465             DELETE FROM accountlines
466             WHERE date < date_sub(curdate(), INTERVAL ? DAY)
467               AND ( amountoutstanding = 0 or amountoutstanding IS NULL );
468         }

The function comes with the following warning:

451 B<Warning:> Because fines and payments are not linked in accountlines, it is
452 possible for a fine to be deleted without the accompanying payment,
453 or vise versa. This won't affect the account balance, but might be
454 confusing to staff.

This was a reasonable solution prior to the addition of account_offsets in 17.11. The problem now is that rows in accountlines which are linked as credits in accountlines will *always* have amountoutstanding marked as 0. These are linked to debits via account_offsets. purge_zero_balance_fees will delete credits and leave rows in account_offsets which link to deleted credits.

Sites using the --fees option cleanup_database.pl which upgrade to 17.11 may have all of their credits removed without warning.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t

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

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

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

Conflicts:
t/db_dependent/Accounts.t

5 years agoBug 19267: Rancor - Warn before leaving page if record modified
Jesse Weaver [Mon, 18 Jul 2016 22:31:20 +0000]
Bug 19267: Rancor - Warn before leaving page if record modified

To test:
1 - Open the advanced editor
2 - Make some changes to a record
3 - Click on 'Patrons' or leave the page in some way
4 - Note there is no warning and changes are not saved
5 - Apply patch
6 - Open the advanced editor
7 - Make some changes
8 - Leave the page
9 - Note you get a warning of unsaved changes and can stay on the page

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

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

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

5 years agoBug 19812: Fix confusing holds count values in "Already received" table
Kyle M Hall [Thu, 14 Dec 2017 12:03:39 +0000]
Bug 19812: Fix confusing holds count values in "Already received" table

In acqui/parcel.pl both the "Pending orders" and "Already received" tables show how many holds there are for the given record. However, the count of holds in the "Pending orders" table confuses librarians because it only lists holds for the particular items in the orderline. Due to that, the holds column may show 0 holds even if there are a dozen record level holds for that bib! This is not what librarians seem to expect, instead it seems that the same total holds in the "Pending orders" table would be preferred.

Test Plan:
1) Find an invoice with an item in the "Already received" table
2) Add one or more record level holds to the record
3) Note the holds column does not count those holds
4) Apply this patch
5) Note the holds column now shows total holds and holds for just those ordered items

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nancy Keener <nkeener@washoecounty.us>

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

Bug 19812: (QA follow-up) Swap sides for total and item holds

Bug 19812: (QA follow-up) If 0 holds show '0' not '0 / 0'

Bug 19812: (QA follow-up) Remove unnecessary line

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

5 years agoBug 19910: Use span to make translators happy
Jonathan Druart [Wed, 4 Apr 2018 18:54:58 +0000]
Bug 19910: Use span to make translators happy

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

5 years agoBug 19910: Use the delimiter syspref to name download link
Nick Clemens [Wed, 3 Jan 2018 14:07:17 +0000]
Bug 19910: Use the delimiter syspref to name download link

To test:
1 - Set delimiter syspref to anything but comma
2 - Download report results as comma separated text
3 - They actually follow the syspref
4 - Apply patch
5 - Download link should now match pref selection
6 - Change pref, note link changes
7 - Verify things still work as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

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

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

5 years agoBug 19578: Remove MARC punctuation in notices (TT syntax)
Jonathan Druart [Mon, 6 Nov 2017 18:35:50 +0000]
Bug 19578: Remove MARC punctuation in notices (TT syntax)

Jenkins fails (run 287) on a test in t/db_dependent/Letters/TemplateToolkit.t:

With the historical syntax:
        # Your request for an article from tQYRS (c3Av58O0P5xkkIGu) has been canceled for the following reason:

With the TT syntax:
        # Your request for an article from tQYRS_ (c3Av58O0P5xkkIGu) has been canceled for the following reason:

The last character of the biblio's title has been removed because it's a punctuation character.
It comes from: C4::Letters::_parseletter
 893         $val =~ s/\p{P}$// if $val && $table=~/biblio/;

The same replacement is done for patron's attributes too.

Test plan:
- Confirm that the new tests pass. That should be enough to confirm this change make sense.

Test plan (manual):
- Create a biblio with a title ending with a punctuation (like "with_punctuation_"), or any other fields of biblio/biblioitem
- Generate a notice which will display this field (CHECKIN for instance)

Use the historical syntax and the TT syntax, both should display the title without the punctuation character at the end

CHECKIN historical:
The following items have been checked in:
----
<<biblio.title>>
----

CHECKIN TT syntax:
The following items have been checked in:
----
[% biblio.title %]
----

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 19223: Add methods to correctly handle plugin-generated output
Tomas Cohen Arazi [Tue, 27 Mar 2018 18:56:57 +0000]
Bug 19223: Add methods to correctly handle plugin-generated output

This patch introduces two methods to be used by plugin authors:

->output
->output_html

They are basically wrappers for the helper methods from C4::Output
(output_html_with_http_headers and output_with_http_headers).

Plugin authors can use them, or keep the current flexibility of handling
the headers themselves in their code.

The KitchenSink plugin should be updated to highlight this.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: The methods are not implemented
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass, and they are meaningful
- Sign off :-D

Sponsored-by: ByWater Solutions

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 19223: Unit tests for output and output_html methods
Tomas Cohen Arazi [Tue, 27 Mar 2018 18:56:41 +0000]
Bug 19223: Unit tests for output and output_html methods

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 19892: (follow-up) Replace one more instance
Owen Leonard [Tue, 27 Mar 2018 16:46:16 +0000]
Bug 19892: (follow-up) Replace one more instance

This patch replaces one more instance of [% IF ( numbersphr ) %].

To test, apply the patch and view the source of the OPAC home page.

With the OPACNumbersPreferPhrase system preference set to 'use,' you
should find this in the HTML source:

<option value="callnum,phr">Call number</option>

With the preference set to 'don't use,' you should find this:

<option value="callnum">Call number</option>

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

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

5 years agoBug 19892: Replace numbersphr variable with Koha.Preference('OPACNumbersPreferPhrase...
Charlotte Cordwell [Thu, 18 Jan 2018 01:29:05 +0000]
Bug 19892: Replace numbersphr variable with Koha.Preference('OPACNumbersPreferPhrase') in OPAC

Test Case
1) Check that the following files have been changed properly.
opac/opac-search.pl
 opac/opac-main.pl
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt

2)Apply bug
3) Check that there are no differences in behaviour as a result of the patch.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

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

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

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

5 years agoBug 20282: Match course reserve on holdingbranch
Nick Clemens [Fri, 23 Feb 2018 10:58:27 +0000]
Bug 20282: Match course reserve on holdingbranch

To test:
1 - Add a course (Course Reserves)
2 - Add an item to the course
3 - Ensure to change the holding branch for the course reserve
4 - Modify the course item
5 - Note the dropdwn for holding branch is unset
6 - Apply patch
7 - Modify the course item
8 - Dropdown should be correctly populated

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

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

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

5 years agoBug 20369: Analytics search is broken with QueryAutoTruncate set to 'only if * is...
Kyle M Hall [Mon, 12 Mar 2018 11:15:12 +0000]
Bug 20369: Analytics search is broken with QueryAutoTruncate set to 'only if * is added'

Test Plan:
1) Enable EasyAnalytics
2) Disable QueryAutoTruncate
3) Create an analytic record, add some host items to it
4) Browser to the analytics tab for the record
5) Click the link in the 'used in' column of the table
6) No search results
7) Apply this patch
8) Reload the page, now you get the analytic record!

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

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

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

5 years agoBug 19907: Fix email validation in patron edit form
Josef Moravec [Wed, 3 Jan 2018 11:20:46 +0000]
Bug 19907: Fix email validation in patron edit form

Test plan:
0) Confirm that email validation is not working in add/edit patron form
1) Apply the patch
2) Edit/add patron, the e-mail validation should be working now
3) Ensure the password validation is still working (use test plan from
    bug 19908)

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

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

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

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

5 years agoBug 20462: Ensure batch item deletion will not delete the same item twice
Jonathan Druart [Mon, 26 Mar 2018 15:22:15 +0000]
Bug 20462: Ensure batch item deletion will not delete the same item twice

This has been done on bug 9509 when barcodes are scaned, but not when using a text file.

Test plan (stolen from Barton on the bug report):
1) Create a text file containing duplicate barcodes

Here's a quick way to do that, substitute INSTANCE for the instance name of your test server:

sudo koha-mysql INSTANCE <<< "select barcode from items where barcode is not null limit 3" | sed '1d;p' > /tmp/dup_barcodes.txt

2) Go to Home › Tools › Batch item deletion
3) Click 'Choose File', select the file you created in step 1.
4) Click 'Continue'
5) Note that duplicate items appear in the list of items to batch delete
6) Check 'Delete records if no items remain'
7) This will trigger a software error

Note that entering the barcodes via the 'scan items one by one' text box removes duplicates in the list, so this only causes problems when uploading a file.

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

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

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

5 years agoBug 20318: Add class 'required' to the label
Jonathan Druart [Mon, 2 Apr 2018 17:30:23 +0000]
Bug 20318: Add class 'required' to the label

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

5 years agoBug 20318: Merge invoices can lead to an merged invoice without Invoice number
Christophe Croullebois [Wed, 14 Mar 2018 14:28:28 +0000]
Bug 20318: Merge invoices can lead to an merged invoice without Invoice number

When you want to merge invoices you have a page with a non editable
field 'Invoice number:' it shows the content of the first invoice to be
merged.
But if you validate by clicking the 'merge' button you arrive on the
next page which says that 'Invoice has been modified' and if you quit
this page without saving you have now a merged invoice without Invoice
number.
This tiny patch just prevents this issue to occur.

Test plan :

1° go to the acqui/invoices.pl page and search invoices to merge.
You must have at least 2 invoices on the same vendor
2° check boxes to select invoices to merge and click on 'merge selected
invoices' button
3° next page you see the non editable field 'Invoice number:'
4° click on the 'merge' button
5° next page you see 'Invoice has been modified'
6° leave this page i.e click on the left link 'Invoices'
7° search invoices you'll see the merged invoice without invoice number.

Apply the patch, replay the steps 1 to 3
4° on this page you can enter your invoice number and click on the
'merge' button.
If you leave this field empty and click merge, a message informs you
that it is required and you can not merge.

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

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

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

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt

5 years agoBug 18474: (QA follow-up) Remove useless else in template
Kyle M Hall [Fri, 30 Mar 2018 11:08:30 +0000]
Bug 18474: (QA follow-up) Remove useless else in template

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 18474: Restore multiple holds when patron is searched for
Jonathan Druart [Thu, 21 Dec 2017 18:59:24 +0000]
Bug 18474: Restore multiple holds when patron is searched for

We lost the ability to place multiple holds when we are searching for
patrons. The multi_holds parameter is lost and not handled correctly in
the template.

Test plan:
- Make sure you can place multiple holds for a patron you will search for
- Same for simple hold

TODO the multiple holds view should not be displayed if only 1 record
has been selected from the search result.

Signed-off-by: claude brayer <claude.brayer@cea.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

5 years agoBug 20385: (follow-up) Assign blank instead of inappropraite value
Nick Clemens [Fri, 23 Mar 2018 17:12:13 +0000]
Bug 20385: (follow-up) Assign blank instead of inappropraite value

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

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

5 years agoBug 20385: Don't try to get info for bad authtypecodes
Nick Clemens [Tue, 13 Mar 2018 14:57:47 +0000]
Bug 20385: Don't try to get info for bad authtypecodes

TO test:
0 - Have a koha with ES enabled and some auth records
1 - backup your db
2 - sudo koha-mysql <<instance>>
3 - UPDATE auth_types SET authtypecode="PERSO_NAMB" WHERE
authtypecode="PERSO_NAME" (or adjust as necessary)
4 - Search for some authorities where a PERSO_NAME record will be
returned
5 - KA_BOOM!
6 - Apply patch
7 - Results are returned, they do not display a code, viewing record you
won't see code

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

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

5 years agoBug 20503: Prevent Borrower_PrevCheckout.t to fail randomly
Jonathan Druart [Fri, 30 Mar 2018 16:14:46 +0000]
Bug 20503: Prevent Borrower_PrevCheckout.t to fail randomly

category_type must be != "X"

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

Conflicts:
t/db_dependent/Patron/Borrower_PrevCheckout.t