]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 15223 - fix buttons on patron lists
Liz Rea [Fri, 20 Nov 2015 02:08:25 +0000 (15:08 +1300)]
Bug 15223 - fix buttons on patron lists

To test:
go to tools -> patron lists
notice that the buttons are not misaligned anymore

You may need to force refresh the page to see the original issue, and to see it fixed.

With patch buttons display nicely.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dba72d903deb525250bfb8b633b88e2aa7b1b962)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15230: Remove unused file circ/stats.pl and stats.tt from system
Marc Véron [Fri, 20 Nov 2015 18:05:02 +0000 (19:05 +0100)]
Bug 15230: Remove unused file circ/stats.pl and stats.tt from system

This patch removes stats.pl and stats.tt from system.

To test:
- Verify that both files are not used and that the only reference in
  koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
  is commented out.
- Apply patch
- Verify that the files are deleted and the reference is removed.
- git grep 'stats.pl', verify that there are no more references to
  this file.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
See the following commit for more info on this script:
  commit 60105bd692a07639f275543365acfca4f464c1a2
  Date:   Tue Jul 8 20:02:34 2008 -0500
    fix for 2008: Daily reconciliation report broken

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 186b4b7e091a60a8914eca2a6a7550b12c430c69)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13838 - Redirect to 'expired holds' tab after cancelling a hold
Kyle M Hall [Mon, 20 Apr 2015 19:31:11 +0000 (12:31 -0700)]
Bug 13838 - Redirect to 'expired holds' tab after cancelling a hold

When canceling a hold from the holds over tab, you are redirected back to the holds waiting tab. Instead, we should the librarian should continue to see the list of holds past the waiting length.

Test Plan:
1) Apply this patch
2) Cancel a hold from the "Holds over" tab on circ/waitingreserves.pl
3) Note you are redirected back to the holds over tab

Signed-off-by: Tom Misilo <misilot@fit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 353e30d73e261a96077917004036c2c01e32c623)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15193 - Perl scripts missing exec permission
Fridolin Somers [Mon, 16 Nov 2015 12:07:07 +0000 (13:07 +0100)]
Bug 15193 - Perl scripts missing exec permission

Some perl scripts have 644 permissions instead of 755.

I think some are special like install-CPAN.pl.

This patch corrects some common perl scripts.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3410608b66fe0dd6e4c94fdcc185c7fb89b619c1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14971: fix RIS export
Bernardo Gonzalez Kriegel [Thu, 3 Dec 2015 12:19:17 +0000 (09:19 -0300)]
Bug 14971: fix RIS export

This patch removes a limit in RIS.pm print_isbn sub.

To test:
1) Find in opac a book with an isbn with length(isbn) > 10
(with dashes or isbn13)
2) Export record to RIS format, check truncated SN field
in exported file
3) Apply the patch
4) Export again, no more truncation

Signed-off-by: jvr <jvr@fct.unl.pt>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 906d2108b9054a68168219136d69e6d783f156fb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15202: Fix date display when transferring an order
Katrin Fischer [Sun, 22 Nov 2015 01:31:10 +0000 (02:31 +0100)]
Bug 15202: Fix date display when transferring an order

The date a basket was created was not displayed
according to the dateformat system preference.

Also fixes wording of the message shown when there
are no baskets for a chosen vendor.

To test:
- Create an order with an order line
- Click on the "Transfer" link on the basket
  summary page
- Search for a vendor without open baskets
- Verify change of message shown:
  "There are no open baskets for this vendor."
- Choose another vendor with open baskets
- Verify the creation date of the basket is
  displayed correctly formatted.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f4b8c4ede9c83b1b78eb87c7fb31214299cbf2f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14846 - Items with no holdingbranch causes svc/holds to crash
Blou [Thu, 17 Sep 2015 15:33:38 +0000 (11:33 -0400)]
Bug 14846 - Items with no holdingbranch causes svc/holds to crash

When trying to display the holds for a user, if an item has no
holdingbranch, it causes the svc/holds service to crash and the display
to freeze.

Tentative steps to reproduce on any DB:
1) put 1 or more items on hold for a given user.
2) go into the database and set the item.holdingbranch to NULL
3) In the user's page, in checkouts (circulation.pl), click the tab that
   should be written 1 Hold(s)
4) It will be "Processing" indefinitely.

The cause is the svc/holds code that crashes.  The fix will validate
that there's an holdingbranch before proceding with the code.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6f7496422a593fdfe4dd2633aed4b190703d03d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15325: Fix --table option of rebuild_zebra.pl
Julian Maurice [Mon, 7 Dec 2015 14:25:25 +0000 (15:25 +0100)]
Bug 15325: Fix --table option of rebuild_zebra.pl

Option's value given on command line was never used and 'biblioitems'
was used instead.

Test plan:
1. git checkout master
2. perl misc/migration_tools/rebuild_zebra.pl -b -t items --where "price = 42"
3. You should see errors printed on screen about an unknown column
4. Apply patch
5. perl misc/migration_tools/rebuild_zebra.pl -b -t items --where "price = 42"
6. No errors \o/

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 48df0b8a2d50a0a4b9a17efd5e0711425ed5e09e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15244: t/db_dependent/Reserves.t depends on external data/configuration
Marc Véron [Tue, 1 Dec 2015 19:22:27 +0000 (20:22 +0100)]
Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration

Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is
set to "[Give] priority for filling holds to patrons whose...

To verify:
- Set syspref as above and run test. Test 14 fails.
- Set syspref to [Don't give] and run test agein, it passes OK.

To test:
- Apply patch
- Run test again with syspref set / not set
Expected result: In both cases test should pass

(AMended to change bug title)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ae5962cab435fe5119cf743a2ea0b9e501985ff9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15216: Returns - Show collection description
Katrin Fischer [Wed, 25 Nov 2015 23:29:34 +0000 (00:29 +0100)]
Bug 15216: Returns - Show collection description

The table of returns displays the collection code
instead of the description. This patch fixes that.

Same as first patch:

To test:
- Check out some items
- Return the items
- Verify the changes in the table of returned items

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a102ccd48f72327d8d84d3782259b1417b75336b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15216: Returns - Show branch names and item type description
Katrin Fischer [Sun, 22 Nov 2015 01:23:11 +0000 (02:23 +0100)]
Bug 15216: Returns - Show branch names and item type description

Changes the table with returned items to display the branch
names for home and holding branch and the itemtype description
instead of the codes.

To test:
- Check out some items
- Return the items
- Verify the changes in the table of returned items

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 84a0f1acf6ef052cc83eb4c0f6c07127b4cfaae2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11038: Enable use of IntranetUserCSS on staff client login page
Bernardo Gonzalez Kriegel [Sat, 28 Nov 2015 14:33:37 +0000 (11:33 -0300)]
Bug 11038: Enable use of IntranetUserCSS on staff client login page

This patch enable use of IntranetUserCss on staff client
login page.

To test:
1) Add something to IntranetUserCSS to modify login page,
for example

 #login h1 a {
   height:30px;
 }

2) Logout from staff client, no changes on login page.
3) Apply the patch
4) Reload, now logo is cut in half :)
Bonus) Login again an try changing image, add

 #login h1 {
  background: url(http://example.com/img/other-logo.png) no-repeat top center;
 }

and fix height. Logout and check

This also affects 3.20 and perhaps earlier versions.
Re-upload to fix examples

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11e4c42e05090a25bf9fa03275f708d1f1c4fde7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 9184: Acq - Don't show authority batches when ordering from staged file
Katrin Fischer [Sun, 22 Nov 2015 00:18:04 +0000 (01:18 +0100)]
Bug 9184: Acq - Don't show authority batches when ordering from staged file

When ordering from a staged file, the list of files
should only include imports of bilbiographic and
no authority data.

To test - start without the patch:
1) Stage an authority file
2) Stage a bilbiographic file
3) Create a new basked in acquisitions
4) Create a new order line selecting "From a staged file"
5) Verify that both files are shown
6) Apply patch
7) Verify that only the bibliographc file shows
   in the list now

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 169015af947e52895e784375c4c654c110c7f1a9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14599 - Saved auth login and password are used in patron creation from
Fridolin Somers [Mon, 23 Nov 2015 08:19:06 +0000 (09:19 +0100)]
Bug 14599 - Saved auth login and password are used in patron creation from

If one save the login and password used to authenticate in staff interface, when creating a new patron, those login and password are filled in the corresponding inputs in the form.
This behaviour is awkward from web browser.

A trick is provided by http://stackoverflow.com/questions/10738090/why-firefox-autocomplete-even-with-different-input-name

I found that the best way is to use an hidden disabled input between userid and password.

Test plan :

- Log into Koha
- Allow the browser to save the userid/password
- Be sure that you have only one userid/password for this Koha
- Loggout
- Re log to check the browser autocomplets the authentication form
- Create a new patron
=> Without patch your saved userid/password have been added to the form
=> With patch your saved userid/password have not been added to the form

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This is not elegant but it works.
Note that the problem does not exist with Chromium

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f4870f6666127f0f0b2c49cc4f89cadd0241a8b9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14349: Checkouts and Fines tab missing category description on the left
Katrin Fischer [Sun, 22 Nov 2015 02:25:58 +0000 (03:25 +0100)]
Bug 14349: Checkouts and Fines tab missing category description on the left

When navigating the tabs in the patron account, for 2 tabs the
patron category description is missing above the tabs.

To test:
- Go to a patron account in staff
- Click through the tabs
- Verify that for Checkouts and Fines the category description
  is missing above the tabs
- Apply patch
- Verify the description is now shown

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9e518de90f3baafc5d44eefd423e3ee2a491c60d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15290: (follow-up)SQL reports headers encoding problem
Hector Castro [Thu, 3 Dec 2015 19:20:40 +0000 (13:20 -0600)]
Bug 15290: (follow-up)SQL reports headers encoding problem

Fix SQL row data and headers enconding problem

To test:
-Apply patches
-Follow previous test plan
-Notice the headers and row data is displayed in UTF-8
 without double encoding
-Save in Comma separated text, Tab seprated text, and Open Document.
-Verify in the three options the file exported is Ok

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4f6bcc5cc9c3fff9e009277f20790b6005be005c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15290: SQL reports headers encoding problem
Tomas Cohen Arazi [Thu, 3 Dec 2015 14:23:54 +0000 (11:23 -0300)]
Bug 15290: SQL reports headers encoding problem

To test:

- Create an SQL report with column names containing UTF characters
- Run the report
=> FAIL: The column names are double encoded
- Export the report
=> FAIL: The column names are double encoded in the exported file
- Apply the patch
- Re-run the report (reload works)
=> SUCCESS: Encoding correct
- Export the report
=> SUCCESS: Encoding correct
- Sign off :-D

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 879b1386ff3a274d0884dc0b48afa6064c35eed7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12152: Holds to pull report - Display location descriptions
Jonathan Druart [Wed, 25 Nov 2015 16:40:37 +0000 (16:40 +0000)]
Bug 12152: Holds to pull report - Display location descriptions

...instead of their code

Test plan:
Same as before, confirm the the location codes are replaced with their
descriptions.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a901ed155a56a2c4ab95bb7bc951e2a0a7d04277)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12152: Holds to pull report - Show branch names and item type descriptions
Katrin Fischer [Sun, 22 Nov 2015 02:38:30 +0000 (03:38 +0100)]
Bug 12152: Holds to pull report - Show branch names and item type descriptions

The 'Holds to pull' report shows branch and itemtype codes without
this patch. With the patch, names and descriptions should display.

To test:
- Make sure there are some holds for available items in your system
- Go to Circulation > Holds to pull
- Verify changes mentioned above in the list of holds shown

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described, although as Magnus mentioned, Locations
still use codes instead of descriptions.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0f7f6a5cb32cd2e68bc39e8464147852347be310)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBUG 11602: [ENH] Fix localcover display
Nicholas van Oudtshoorn [Thu, 15 May 2014 05:27:48 +0000 (13:27 +0800)]
BUG 11602: [ENH] Fix localcover display

Adds a css class of thumbnail to local covers.
Don't show the 1px "No image found" image
(since we'll ususally try another image provider)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Box with "No cover image availabe" fixed when syspref OPACLocalCoverImages
set to display

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a06793dc584212dde20f985740691b7e49074c76)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13024 [QA Followup] - Add nonpublic note to relatives' checkouts
Kyle M Hall [Tue, 1 Dec 2015 17:49:55 +0000 (17:49 +0000)]
Bug 13024 [QA Followup] - Add nonpublic note to relatives' checkouts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fc050984699e6831fdb354c77d065a08567beb9f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13024 - Nonpublic note not appearing in the staff client
Kyle M Hall [Fri, 24 Apr 2015 14:41:58 +0000 (10:41 -0400)]
Bug 13024 - Nonpublic note not appearing in the staff client

The nonpublic note for items is not displayed in the staff client. It
should be displayed in the following areas:
1) Checkouts (circulation.pl)
2) Checkins (returns.pl)
3) Record details ( moredetail.pl )

Test Plan:
1) Ensure your non-public note field is mapped to the
   items.itemnotes_nonpublic database column
2) Edit an item, add a test nonpublic note
3) Check out the item, verify the note is visible in the checkouts table
4) Check in the item, verify the note is visible in the checkins table
5) View the item details, verify the note is visible and editable
   if your account has the rights to edit items

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 717878982f985b9f40f9eedec5e576efd62976ff)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15250: Fix Perl error on acqisition stats page
Katrin Fischer [Wed, 25 Nov 2015 17:18:04 +0000 (18:18 +0100)]
Bug 15250: Fix Perl error on acqisition stats page

To test:
- Go to reports -> Acquisitions statistics
- Populate with the following values:

   Acquisitions statistics
      Received on.
         Row:    checked
         Column: checked
         From:   01/01/2015
         To:     Un-selected

    Cell value
       Count items

    Output: To screen into the browser: checked

- Running the report will trigger the following error:

   Software error:
   Can't locate object method "field" via package "aqorders.datereceived" (perhaps you forgot to load "aqorders.datereceived"?) at /usr/share/koha/intranet/cgi-bin/reports/acquisitions_stats.pl line 293.

- Apply the patch and repeat test
- Verify the report now works correctly

Note: Patch was created from notes and suggested
      fix on the bug report, written by Barton Chittenden.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d9cef35b75770104494c2f4a01d975f367b515bf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15256: Fix items table display on the detail page
Jonathan Druart [Wed, 25 Nov 2015 17:08:43 +0000 (17:08 +0000)]
Bug 15256: Fix items table display on the detail page

Bug 14966 fixed a bug but introduced another one: With
IndependentBranches set to 'prevent', if the librarian (without the
superlibrarian permission) can edit items but not all, the table is
broken.  DataTables raises the following warning: "DataTables warning:
table id=DataTables_Table_1 - Requested unknown parameter '8' for row0."
And does not display correctly.

Test plan:
1/ Create a biblio record with 1+ items located in different places.
2/ Create/use a patron with the permission to edit items
3/ Set the IndependentBranches pref to 'prevent'
4/ With this patron logged in, go on the record detail page.
Without this patch, the display is broken (only 1 edit link and 1 td
missing, DataTables raises a warning).
With this patch, the display is correct.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  See the warning, and the broken table. Solved by this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d456acc7bfd2507ac7eaaf32bd6da1f023655886)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agonew Debian package maintainer
Galen Charlton [Sat, 5 Dec 2015 01:26:11 +0000 (01:26 +0000)]
new Debian package maintainer

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
8 years agoKoha 3.22 and beyond v3.22.00
Tomas Cohen Arazi [Thu, 26 Nov 2015 14:57:54 +0000 (11:57 -0300)]
Koha 3.22 and beyond

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoRelease notes for 3.22
Tomas Cohen Arazi [Thu, 26 Nov 2015 14:51:24 +0000 (11:51 -0300)]
Release notes for 3.22

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoTranslation updates for Koha 3.22.0 release
Bernardo Gonzalez Kriegel [Thu, 26 Nov 2015 01:05:34 +0000 (22:05 -0300)]
Translation updates for Koha 3.22.0 release

Two new languages: Occitan and Malayalam

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15242: Missing subroutine in overdue_notices.pl
Nick Clemens [Tue, 24 Nov 2015 19:23:53 +0000 (19:23 +0000)]
Bug 15242: Missing subroutine in overdue_notices.pl

This patch changes the call to parse_overdues_letter to use the full
namespace to ensure the subroutine can be found.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15207: Avoid warnings when adding constraint course_reserves_ibfk_2
Jonathan Druart [Wed, 25 Nov 2015 13:49:51 +0000 (13:49 +0000)]
Bug 15207: Avoid warnings when adding constraint course_reserves_ibfk_2

Bug 14205 added a new foreign key on the course_reserve table.
As this dbrev has been backported to the stable version (3.20.x), the
next dbrev should take care of this existing constraint to avoid
warnings.

Test plan:
1/ replace the modified dbrev with 3.21.00.XXX to make sure it will be
executed
2/ Make sure you have the KEY and the FK on the course_reserves table:
sql> alter table course_reserves add CONSTRAINT `course_reserves_ibfk_2`
FOREIGN KEY (`ci_id`) REFERENCES `course_items` (`ci_id`) ON DELETE
CASCADE ON UPDATE CASCADE;
sql> alter table course_reserves ADD KEY `course_reserves_ibfk_2` (`ci_id`);

3/ SHOW CREATE TABLE course_reserves
should show that the table is not in sync with the kohastructure.sql file
4/ Execute the dbrev
5/ SHOW CREATE TABLE course_reserves
should show that the table is in sync with the kohastructure.sql file

Repeat 4 and 5, confirm you don't get any error.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: Do not insert the permission if already exists.
Jonathan Druart [Wed, 25 Nov 2015 13:29:05 +0000 (13:29 +0000)]
Bug 14298: Do not insert the permission if already exists.

To avoid a warning on updating from 3.20.x to 3.22, use "insert ignore
into".

This patch is not useful for 3.20.x.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11431: (follow-up) Update database
Jonathan Druart [Wed, 25 Nov 2015 13:17:52 +0000 (13:17 +0000)]
Bug 11431: (follow-up) Update database

This patch specifies the collate for the new audio_alerts table to the updatedb entry.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15062: Holds queue with Transport Cost Matrix will transfer item even if transfer...
Kyle M Hall [Mon, 26 Oct 2015 12:30:57 +0000 (08:30 -0400)]
Bug 15062: Holds queue with Transport Cost Matrix will transfer item even if transfers disabled

If the transfer of an item from Library A to Library B is disabled in
the Transport Cost Matrix, but the only item on a record is from Library
A, the holds queue will request a transfer of that item from Library A
to Library B even though the rules state such a transfer is not allowed!

Test Plan:
1) Enable the transport cost matrix
2) For simplicity, leave all cells disabled on it, save this state.
   This state means that only items at each location should fill
   holds where the pickup library is that same location.
3) Create a record with one item, set its home and holding branch
   to Library A
4) Create a hold for pickup at Library B
5) Rebuild the holds queue
6) Note the transfer request for the item to Library B
7) Apply this patch
8) Rebuild the holds queue
9) Note the transfer request is gone

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15062: Regression tests
Kyle M Hall [Thu, 19 Nov 2015 12:50:45 +0000 (12:50 +0000)]
Bug 15062: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15198: Change wording of OpacSuppression system preference
David Cook [Tue, 17 Nov 2015 06:18:05 +0000 (17:18 +1100)]
Bug 15198: Change wording of OpacSuppression system preference

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Paragraph rewording successfully

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15198: Make OpacSuppression work even if there are no records suppressed
David Cook [Tue, 17 Nov 2015 02:03:59 +0000 (13:03 +1100)]
Bug 15198: Make OpacSuppression work even if there are no records suppressed

This patch adds the Zebra special attribute 14 to ccl.properties and
opac-search.pl, so that we can turn on OpacSuppression and still return
results even if there are no records in Zebra for the Suppress index.

_TEST PLAN_

Before applying:

1) Make sure that you have no suppressed records indexed in Zebra
2) Turn on OpacSuppression system preference

3) Search using a keyword which should bring up records
4) Note that no records are returned in the results
5) Change UseQueryParser system preference to "Try"
6) Repeat steps 3-4

Apply the patch.

After applying:

7) Repeat step 3 (ie search using a keyword which should bring up records)
8) Confirm that records are appearing in the results!
9) Change UseQueryParser system preference to "Do not try"
10) Repeat step 3
11) Confirm that records are appearing in the results!

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. No more, won't need to have at least one record with the
value "1" in the field mapped with this index. All records in OPAC returned.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14264: Fix export of late orders when translated
Jonathan Druart [Sun, 24 May 2015 15:52:25 +0000 (17:52 +0200)]
Bug 14264: Fix export of late orders when translated

Bug 7298 tried to fix this issue, but it was not correct.
We have 3 files in acqui/csv:
basketgroup.tt, basket.tt and lateorders.tt
The first 2 don't contain translatable string, and are not modified on
translating the templates (`translate install`)
On the contrary, lateorders.tt has some strings to translate ('Author:',
'Published by:', etc.). After being translated, all carriage returns
between TT tags are removed.

Test plan:
1/ choose a language and update + translate the templates
for instance:
  cd misc/translate;
  ./translate update es-ES; ./translate install es-ES
2/ Go to acqui/lateorders.pl using this language
3/ Generate a csv for 1+ late orders and confirm the first line only
contains the headers.

Signed-off-by: Laurence Lefaucheur <laurence.lefaucheur@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15218: (QA followup) Fix wording of comment
Kyle M Hall [Fri, 20 Nov 2015 14:12:54 +0000 (14:12 +0000)]
Bug 15218: (QA followup) Fix wording of comment

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15218: (Plack) Make processes that rely on background jobs run in CGI mode
Tomas Cohen Arazi [Fri, 20 Nov 2015 03:08:45 +0000 (00:08 -0300)]
Bug 15218: (Plack) Make processes that rely on background jobs run in CGI mode

This patch adds an entry to the plack-related apache configuration so the
problematic scripts (that fail under plack/starman) are not processed through
Plack but in CGI mode instead.

To test:
- Follow the setup steps from bug 15032
- Add the line from this patch to /etc/koha/apache-shared-intranet-plack.conf
 (if you are on kohadevbox you should probably change the filesystem path to
  /home/vagrant/kohaclone/tools/background-job-process.pl)
- Do the full import process of MARC data.
=> SUCCESS: It works as expected.
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15215: Remove warning due to misuse of UNIVERSAL
Colin Campbell [Thu, 19 Nov 2015 12:15:34 +0000 (12:15 +0000)]
Bug 15215: Remove warning due to misuse of UNIVERSAL

Calling UNIVERSAL's internal methods will cause a depreciation
warning in perls less that 5.22 as of 5.22 the warning is a fatal
error causing compilation to abort

Replace the use UNIVERSAL with UNIVERSAL::can to work around the
buggy construct perldoc UNIVERSAL::can for more info

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more worning/error
No qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14101: Unit tests
Holger Meißner [Tue, 22 Sep 2015 12:03:33 +0000 (14:03 +0200)]
Bug 14101: Unit tests

This patch adds new test cases to check if CanBookBeRenewed provides
correct return values and error codes for premature renewals. Both manual
and automatic renewals and different settings for 'No renewal before'
are tested.

To test:
1) prove t/db_dependent/Circulation.t

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14101: Automatic renewals exactly on due date
Holger Meißner [Tue, 2 Jun 2015 13:39:21 +0000 (15:39 +0200)]
Bug 14101: Automatic renewals exactly on due date

If no value for 'no renewal before' is specified, automatic renewal now
falls back on the due date. Also 'no renewal before' can now be zero, so
both automatic and manual renewals can be delayed until due date.

Test plan:

1) Create some circulation rules with different settings for 'No renewal
   before' and 'Automatic renewal'. Both daily and hourly loans should
   work.

2) Try to renew both manually and automatically before and after a renewal
   should be possible. You can run misc/cronjobs/automatic_renewals.pl for
   automatic renewal.

3) Confirm that:
   * Both automatic and manual renewal with 'No renewal before' set
     to 0 do not happen before the due date (exact DateTime).
   * Manual renewal with 'No renewal before' set to undef (enter empty
     string) is unrestricted.
   * Automatic renewal with 'No renewal before' set to undef does not
     happen before the due date.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 4502: Changing wording again...
Jonathan Druart [Tue, 22 Sep 2015 11:11:34 +0000 (12:11 +0100)]
Bug 4502: Changing wording again...

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Just a string patch, others are signed.
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 4502: An attempt to make things more sensible.
Mark Tompsett [Mon, 6 Apr 2015 23:50:30 +0000 (19:50 -0400)]
Bug 4502: An attempt to make things more sensible.

The reason the budget_period_id was not defined was because in
two cases it was not passed! This patch adds those missing
parameters. And as a result, cuts out the attempt to default the
authcat to '' unless the budget_period_id is defined.

Additionally, the start and end months don't seem to be passed,
so rather than have it blow up, checking them forces the else
case logic.

budget_period_id is the budget id. If you have two budgets,
you can craft a URL to work with budget_period_id matching
those two ids. Anything else should trigger the new error which
was modified to reflect more of what the problem is.

Follow the test plan in comment #6. Feel free to also to attempt
crafting URLs and triggering errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Well, works and does not explode any more
No errors

To trigger the new message simply put /cgi-bin/koha/admin/aqplan.pl
on your staff page, an intriguing 'Planning for by Asort1' appears :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 4502: Catch software error if no active budget defined
Jonathan Druart [Tue, 24 Mar 2015 14:54:37 +0000 (15:54 +0100)]
Bug 4502: Catch software error if no active budget defined

TEST PLAN
---------
0) Back up your database.
1) In mysql client:
   > DROP DATABASE {your koha database name};
   > CREATE DATABASE {your koha database name};
   > QUIT;
2) Go to the staff client, and install all the default
   and optional things -- except patrons. :)
3) Log into staff client.
4) Create a patron -> New Patron -> Staff
5) Enter data and Save
6) More -> Set Permissions
7) Make superlibrarian
8) Log out
9) Log in as new superlibrarian
10) Acquisitions -> Budgets -> New Budget
11) Enter a non-active budget with some funds.
    -- Once saved, it should list in the inactive budgets.
12) Click on the name.
13) Click on one of the Planning submenu options.
14) Click the 'Submit' button in the Filter area.
    -- This should trigger the blow up.
15) Apply the patch
16) Repeat steps 12-15
    -- The kaboom is avoided and a nice message given.

NOTE: This does not solve all the problems in this ugly, ugly
      module area. It does solve the one thing it is meant to:
      that nasty kaboom.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15047: 655 URL not clickable in opac-detail.
Winona Salesky [Thu, 22 Oct 2015 13:22:47 +0000 (09:22 -0400)]
Bug 15047: 655 URL not clickable in opac-detail.

Test Plan:

1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac  record details
3) Find or create a record with MARC tags 655
4) Perform an opac search and select records with 655 field, select record and review details page.
5) Check that 655 field is clickable.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. 655 field clickable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15091: DEBT is IMPOSSIBLE, not NEEDSCONFIRMATION
Jonathan Druart [Thu, 5 Nov 2015 12:10:19 +0000 (12:10 +0000)]
Bug 15091: DEBT is IMPOSSIBLE, not NEEDSCONFIRMATION

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15091: Do not allow to use batch checkout if checkout is not allowed
Jonathan Druart [Thu, 5 Nov 2015 09:58:34 +0000 (09:58 +0000)]
Bug 15091: Do not allow to use batch checkout if checkout is not allowed

If the noissue param is passed to the template, the batch checkout
should not be allowed.

This patch globally fixes the problem raised by bug 15091.
A generic message "cannot check out" is displayed and some more specific
ones could be added later.
For now it only trigger the "fine balance is over the limit" message.

Test plan:
Confirm there is no regression on the original behavior and that the
issue raised on bug 15091 is fixed.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15091: Batch Checkout: Set titles above result tables
Marc Véron [Tue, 3 Nov 2015 19:06:25 +0000 (20:06 +0100)]
Bug 15091: Batch Checkout: Set titles above result tables

This patch is to clarify the results that are displayed while performing
a batch checkout.

It is not the full solution for what is described in the video in
comment #2, but it tells the user what the information in the table
is about.

A second patch is planned to address the case where the issues are confirmed
but not can be fulfilled because the user's fines reach the threshold while
checking out the items.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13411: (QA followup) Add logging
Kyle M Hall [Mon, 2 Mar 2015 14:06:58 +0000 (06:06 -0800)]
Bug 13411: (QA followup) Add logging

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13411: Koha's SIP server returns not ok for checking in items that are not checke...
Kyle M Hall [Thu, 27 Aug 2015 14:56:22 +0000 (10:56 -0400)]
Bug 13411: Koha's SIP server returns not ok for checking in items that are not checked out

If an item is not checked out when a checkin via SIP2 is attempted,
Koha's SIP server sends back an "ok" of 0, and the AF message "Item
not checked out". I am not entirely sure this is good and correct
behavior by the SIP2 protocol.

In particular, this will cause SIP2 book sorting devices to fail on
all items that are not checked out, causing them all to be put into
the "special handling" been that should be reserved for things like
items checked in at the wrong library and items on hold.

Test Plan:
1) Apply the patch for bug 13159 so you can use the new enhanced
   SIP2 command line emulator
2) Use a command similar to the following to check in an item:
   sip_cli_emulator.pl -a localhost -su <sip user> -sp <sip password> -l <instituation id> --item <barcode> -m checkin
3) Note the 3rd character is 0, and there is an AF field saying the item is not checked out
4) Apply this patch
5) Restart the SIP server
6) Repeat steps 2-3, note that nothing has changed
7) In the SIP config file, Add the parameter checked_in_ok="1" to the SIP account you are using.
8) Restart the SIP server
9) Repeat steps 2-3, note that this time the 3rd character is 1, and you do not recieve the item not checked out message.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12072: DBRev 3.21.00.056
Tomas Cohen Arazi [Thu, 19 Nov 2015 23:15:03 +0000 (20:15 -0300)]
Bug 12072: DBRev 3.21.00.056

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12072: Make datepicker and templates to be aware of dmydot format
Marc Véron [Wed, 18 Nov 2015 16:33:33 +0000 (17:33 +0100)]
Bug 12072: Make datepicker and templates to be aware of dmydot format

This patch is to display corrextly the new dmydot date format e.g. after
using the datepicker or in messages for the user, in following files:

- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
- koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc
- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
- koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt
- koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc
- tools/holidays.pl

To test:
- Apply patch
- Make sure that you have syspref dateformat set to dmydot
- Use datepicker in OPAC (modify birth date), verify that after
  choosing a date, it is displayed correctly in the datepicker
- Use datepicker at several places in OPAC, verify that after choosing
  a date the date displays properly in datepicker and that the dater format
  is properly indicated (e.g. near birth date or near "Specify due date").
- Verify that datepicker works well with hoiday editing and that "From date:"
  displays properly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12072: Add system preference for New dateformat dd.mm.yyyy (dmydot)
Marc Véron [Sat, 7 Mar 2015 07:38:04 +0000 (08:38 +0100)]
Bug 12072: Add system preference for New dateformat dd.mm.yyyy (dmydot)

Note: This feature depends on Bug 14870 'Delete C4/Dates from system'

System preferences:
To test:
- apply the patch
- run updatedatabase.pl
- go to Admin > Sysprefs > I18N, change dateformat to dd.mm.yyyy, save
- verify that the value was saved

Date handling:
- go through the staff client and verify that dates behave as expected.
- go through Opac and verify that dates behave as expected.

  The Bugs where Bug 14870 depends on contain test plans that can be
  used for the overall testing.

Note: Make sure that you reset the dateformat to the former value after
      testing.

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

Amended to apply on top of Bug 15166 11.11.2015/mv

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: QA follow-up - fixing tiny typo
Katrin Fischer [Thu, 19 Nov 2015 13:47:43 +0000 (14:47 +0100)]
Bug 14870: QA follow-up - fixing tiny typo

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: (followup) Remove superfluous C4::Dates from fix_accountlines_rmdupfines_b...
Marc Véron [Wed, 18 Nov 2015 10:48:09 +0000 (11:48 +0100)]
Bug 14870: (followup) Remove superfluous C4::Dates from fix_accountlines_rmdupfines_bug8253.pl

This patch removes C4::Dates from fix_accountlines_rmdupfines_bug8253.pl

To test:
- Apply patch
- Check code for uses of C4::Dates (date_format)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: (followup) Remove stray C4::Dates
Marc Véron [Wed, 18 Nov 2015 07:57:27 +0000 (08:57 +0100)]
Bug 14870: (followup) Remove stray C4::Dates

(See comment #23)

This patch removes stray C4::Dates (date_fromat...) from
C4/Items.pm
C4/Log.pm
C4/Serials.pm
serials/acqui-search-result.pl
t/DateUtils.t
t/db_dependent/Items/GetItemsForInventory.t
tools/koha-news.pl

Some of them were inside comments etc.

To test:
- git grep 'C4::Dates' should give no result
- git grep 'format_d' should give no result
  Exception: in one cron job there exists an own sub format_date, and occurences not
             related to C4::Dates
- Search for regressions

http://bugs.koha-community.org/show_bug.cgi?id=14870
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
serials/acqui-search-results.pl looks like it should be revisited,
containing code that might not be needed. Searching a vendor
in serials still works witout a problem.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: (followup) Remove mention of C4::Dates from C4/Debug.pm
Marc Véron [Sun, 8 Nov 2015 22:26:25 +0000 (23:26 +0100)]
Bug 14870: (followup) Remove mention of C4::Dates from C4/Debug.pm

C4::Dates is mentioned as example in C4/Debug.pm. This patch removes it.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: (followup) Remove stray C4::Dates from reports files
Marc Véron [Sun, 8 Nov 2015 22:09:10 +0000 (23:09 +0100)]
Bug 14870: (followup) Remove stray C4::Dates from reports files

This patch removes stray C4::Dates from following files:

reports/borrowers_stats.pl
To test: Verify that C4::Dates is not used in the file

reports/guided_reports.pl:
To test:
- Run a saved report with date input and with date range input, e.g.
- Verify that you are asked for date range or date and that the results
  are the same as without patch

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: (followup) Remove stray C4::Dates from circ/returns.pl
Marc Véron [Sun, 8 Nov 2015 21:14:59 +0000 (22:14 +0100)]
Bug 14870: (followup) Remove stray C4::Dates from circ/returns.pl

This patch removes 1 remaining / stray occurence of C4::Dates from
circ/returns.pl

To test:
- Apply patch
- Go to Home > Circulation > Check in
- Verfiy that check-ins with overriding return dates work as before.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: Remove C4::Dates from plack.psgi and koha.psgi
Hector Castro [Sun, 8 Nov 2015 03:43:56 +0000 (21:43 -0600)]
Bug 14870: Remove C4::Dates from plack.psgi and koha.psgi

Remove C4::Dates from .psgi files from preloaded modules, placing
Koha::DateUtils instead

http://bugs.koha-community.org/show_bug.cgi?id=14870
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: Remove t/Dates.t from Koha
Hector Castro [Sat, 7 Nov 2015 16:56:23 +0000 (10:56 -0600)]
Bug 14870: Remove t/Dates.t from Koha

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14870: Remove C4/Dates.pm from Koha
Hector Castro [Fri, 6 Nov 2015 16:42:53 +0000 (10:42 -0600)]
Bug 14870: Remove C4/Dates.pm from Koha

http://bugs.koha-community.org/show_bug.cgi?id=14870
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15208: Followup to reorder words
Bernardo Gonzalez Kriegel [Wed, 18 Nov 2015 13:44:03 +0000 (10:44 -0300)]
Bug 15208: Followup to reorder words

It think it's better to put the shelf name first

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15208: Ease translation for shelves messages
Bernardo Gonzalez Kriegel [Wed, 18 Nov 2015 13:18:14 +0000 (10:18 -0300)]
Bug 15208: Ease translation for shelves messages

This string patch only puts <span>...</span>
around shelves messages. It split a monster
translation string into its components.
This kind of string to translate is error-prone.

Also fixed a typo on opac, 'deleteing'

To test:
1) Search for 'An error occurred when updating this list'
on your preferred language translation file for staff
or opac
(xx-YY-staff-prog.po or xx-YY-opac-bootstrap.po)
You will see a 'big' string to translate

2) Apply the patch

3) Update translation files for your language

4) Search again, big one is gone and there are
new individual strings to translate.

Sorry for not spotting this before string freeze

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15199: t/db_dependent/Review.t should not depend on existing data
Tomas Cohen Arazi [Tue, 17 Nov 2015 13:20:39 +0000 (10:20 -0300)]
Bug 15199: t/db_dependent/Review.t should not depend on existing data

This patch makes the tests create a branch and a patron category instead
of searching for them on the DB.

To test:
- Apply the patch on current master
- Run
  $ prove t/db_dependent/Review.t
=> SUCCESS: Tests pass
- Sign off

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All test pass successful

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14954: Remove unused C4::Calendar::addDate subroutine
Jonathan Druart [Wed, 11 Nov 2015 12:59:44 +0000 (12:59 +0000)]
Bug 14954: Remove unused C4::Calendar::addDate subroutine

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14954: (followup) Display exceptions in syspref format
Marc Véron [Wed, 4 Nov 2015 15:05:59 +0000 (16:05 +0100)]
Bug 14954: (followup) Display exceptions in syspref format

This patch fixes the display of exceptions (was iso, is now syspref).
See comment #14 and attachment #15

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14954: (followup) Remove C4::Dates from holiday related files
Marc Véron [Wed, 28 Oct 2015 22:51:45 +0000 (23:51 +0100)]
Bug 14954: (followup) Remove C4::Dates from holiday related files

Followup for comment #10

To test:
- Go to Home > Tools > Calendar
- Add, edit, delete the different types of holidays and exceptions
- git grep 'C4::Calendar' and test such files
- git grep daysBetween to make sure that this sub is not used
- prove t/Calendar.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14954: Remove C4::Dates from holiday related files in folder tools
Marc Véron [Sun, 4 Oct 2015 20:31:40 +0000 (22:31 +0200)]
Bug 14954: Remove C4::Dates from holiday related files in folder tools

This patch removes C4::Dates from:
Remove C4::Dates from:

- tools/exceptionHolidays.pl
- tools/holidays.pl
- tools/newHolidays.pl
- C4/Calendar.pm

To test:
- Go to Home > Tools > Calendar
- Add, edit, delete the different types of holidays and exceptions
- git grep 'C4::Calendar' and test such files
- prove t/Calendar.t

(Amended following comments #3 and #4 / mv)
(Amended following comment #7 / 25.10.2015 / mv

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
http://bugs.koha-community.org/show_bug.cgi?id=14945
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14946: Remove C4::Dates from acqui/* files
Jonathan Druart [Tue, 10 Nov 2015 17:42:44 +0000 (17:42 +0000)]
Bug 14946: Remove C4::Dates from acqui/* files

This patch replaces all use of C4::Dates with Koha::DateUtils, which is
the best practice to follow.

It also fixes a bug on the invoice search, the shipment date (from and
to) were not passed correctly from one page to the other.

Test plan:
1/ Search for orders using the different filters
2/ Create an invoice, try with setting and leaving empty the date
fields.
Default should be an undefined value (not today)
3/ Search for invoices and use the 4 different filters.
Close and reopen invoices.
The filters should be kept from one page to the other (not that it does
not work with shipment date before this patch).
4/ Receive an order, on creating the invoice, the default date should be
today.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoChangelog update for 3.22.00~beta
Robin Sheat [Wed, 18 Nov 2015 02:33:41 +0000 (15:33 +1300)]
Changelog update for 3.22.00~beta

8 years agoBug 15168: (followup) remove useless diags
Tomas Cohen Arazi [Tue, 17 Nov 2015 18:47:46 +0000 (15:47 -0300)]
Bug 15168: (followup) remove useless diags

While testing this bug I noticed the tests printed useless diags.
This patch removes them for good.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14960: Simplify the date management in staticfines
Jonathan Druart [Wed, 11 Nov 2015 12:31:12 +0000 (12:31 +0000)]
Bug 14960: Simplify the date management in staticfines

There is no need to create a DT objcet, then display in string/iso
then recreate a DT object from this string.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14960: Remove C4::Dates from files in misc/cronjobs
Marc Véron [Mon, 5 Oct 2015 16:20:57 +0000 (18:20 +0200)]
Bug 14960: Remove C4::Dates from files in misc/cronjobs

This patch removes C4::Dates from following files:

- misc/cronjobs/batch_anonymise.pl
- misc/cronjobs/cleanup_database.pl
- misc/cronjobs/gather_print_notices.pl
- misc/cronjobs/serialsUpdate.pl
- misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl
- misc/cronjobs/overdue_notices.pl
- misc/cronjobs/staticfines.pl

To test:
- Carefully review code changes.
- Verify that the cronjobs behave as before.

Amended to make patch apply and follwoing comments on IRC by putti
http://irc.koha-community.org/koha/2015-11-06#i_1752803
(misc/cronjobs/gather_print_notices.pl is using still C4::Dates, line 84)
6.11.2015 /mv

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14969: (followup) Today's date withoute time when receiving
Marc Véron [Thu, 12 Nov 2015 09:47:09 +0000 (10:47 +0100)]
Bug 14969: (followup) Today's date withoute time when receiving

To test: Change status of a serial from Expected to Received,
         today's date in column "Expected" should appear without time.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14969: Remove C4::Dates from serials/*.pl files
Jonathan Druart [Wed, 11 Nov 2015 10:48:36 +0000 (10:48 +0000)]
Bug 14969: Remove C4::Dates from serials/*.pl files

Warning: This area is a mess, especially with date management.

For the same reasons as other "Remove C4::Dates from*" patches, this one
will deal with the serials module.

Note that this patch add the datepicker on 3 input fields (on
serials/subscription-detail.tt and serials/subscription-renew.tt).
There was also weird behavior when the dates were invalid. Now default
to undefined. But with the datepicker it will reduce the number of
cases even if the user is still allowed to fill invalid dates.

Test plan:
1/ Create a subscription, fill the first issue pub date and the
subscription start date.
You can fill or not the end date.
Play with the numbering pattern and confirm that there are generated as
before this patch.
2/ On the check expiration page, confirm that the dates are correctly
displayed.
3/ Renew the subscription and confirm that the behavior is correct.
4/ Go on the subscription history page and confirm you have now the
datepicker plugin set on the 2 date fields.

QA notes: The startdate, histstartdate and enddate are not used in
the serials-collection template, this patch removes them from the pl
script.

Tested on top of 15166 15168 15171, full browser reload for date pickers.
Note for 4/: It is the link in tab planning on subscription
detail page, near "Manual history" (if manual history is enabled).
Works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15168: Remove C4:Serials::ItemizeSerials
Jonathan Druart [Wed, 11 Nov 2015 08:54:12 +0000 (08:54 +0000)]
Bug 15168: Remove C4:Serials::ItemizeSerials

This subroutine has been introduced in 2006, when C4::Serials has been
added to the codebase.
If you checkout this commit
commit 18d2cd099085e443d713a1546e029faa81481814
Date:   Fri Jul 7 08:45:47 2006 +0000
    this file replace C4/Bull.pm

You won't find any occurrences of this subroutine neither.

Interesting module's name by the way.

Test plan:
  git grep ItemizeSerials
should not return any result

Followed test plan, no results found.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15159: TestBuilder behaviour on AI values should be tested
Tomas Cohen Arazi [Mon, 9 Nov 2015 14:15:36 +0000 (11:15 -0300)]
Bug 15159: TestBuilder behaviour on AI values should be tested

This patch introduces a test for t::lib::TestBuilder to check it
doesn't mess with AI values. As it is generating random values based
on the defined column type, chances are that it is creating the
AI values on its own, instead of letting the DB handle it.

This could be problematic of course. This test uses the 'biblio' table
by creating two values and checking their biblionumbers are consecutive.

To test:
- Apply the patch
- Run:
  $ prove t/db_dependent/TestBuilder.t -v
=> SUCCESS: The new tests are run and:
   - biblio.biblionumber is detected as an auto-increment column
   - generated biblionumbers are consecutive
- Sign off

Regards

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All tests successful.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15185: Remove Check*Holidays subroutines in C4::Circulation
Jonathan Druart [Fri, 13 Nov 2015 11:43:36 +0000 (11:43 +0000)]
Bug 15185: Remove Check*Holidays subroutines in C4::Circulation

These 3 subroutines are not used anymore:
- CheckRepeatableHolidays
- CheckSpecialHolidays
- CheckRepeatableSpecialHolidays

Moreover we have subroutines in Koha::Calendar to do this job.

Test plan:
  git grep CheckRepeatableHolidays
  git grep CheckSpecialHolidays
  git grep CheckRepeatableSpecialHolidays
should not return any results.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Subroutines removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10067: decreaseLoanHighHolds messes with specify due date
Eivin Giske Skaaren [Mon, 25 May 2015 17:10:54 +0000 (17:10 +0000)]
Bug 10067: decreaseLoanHighHolds messes with specify due date

To test:

1. On a branch up to date with master: apply the patch.

2. Try to check out items both with and without holds.
(The decreaseLoanHighHolds function should be configured and kick in when testing an item.

3. Expected results are:
The due date date field should be cleared after checkout if "Remember for session"
is not selected. If it is selected then the chosen date should stay in the field even
if the warning about reduced loan time for an item with too many holds is displayed.
Also the correct due dates are shown in the table after a checkout.

Known limitation: Does not work too well when jumping between different parts
of the system as it relies on the values sent to the circulation.pl script.

Sponsored-by: Halland County Library
Refactored to both fix specific issue where date is changed
and still have the old behaviour with date kept intact.

Rebase
Remove code whitespace cleanup

Remove one more code whitespace cleanup

Removed duplicate tag

Refactored stickyduedate session parameter

Fix datefield set by highholds if blanc

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15175: Respect IntranetBiblioDefaultView syspref
Frédéric Demians [Wed, 11 Nov 2015 17:59:35 +0000 (18:59 +0100)]
Bug 15175: Respect IntranetBiblioDefaultView syspref

Respect IntranetBiblioDefaultView on intra search result page, on cover image
link, when XSLTResultsDisplay is empty.

TO TEST:

1. Empty XSLTResultsDisplay
2. Activate intranet local and Amazon cover images
3. Play changing IntranetBiblioDefault, and observe the links respectively on
   biblio record title and cover image. Title's link is OK, cover image
   link goes to detail.pl page independently of IntranetBiblioDefault.
4. Apply the patch.
5. Repeat 3.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Link to right display according with IntranetBiblioDefaultView is fixed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
http://bugs.koha-community.org/show_bug.cgi?id=14175
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15070: Update MARC21 it-IT frameworks to Update 21 (September 2015)
Zeno Tajoli [Wed, 11 Nov 2015 14:00:36 +0000 (15:00 +0100)]
Bug 15070: Update MARC21 it-IT frameworks to Update 21 (September 2015)

To test it:

- drop and recrate Koha DB
- Run the Koha web installer for it-IT
- Run MARC bibliographic framework test

http://bugs.koha-community.org/show_bug.cgi?id=15070

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with it-IT installer
All files load without problem, save for FastAdd (see Bug 15181)
but the file loads Ok

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15171: Display subscriptions which will expire in the future
Jonathan Druart [Wed, 11 Nov 2015 09:36:16 +0000 (09:36 +0000)]
Bug 15171: Display subscriptions which will expire in the future

Since the form on the subscription check expiration page let the user choose an
expiration date > today, there is no sense to hide subscriptions which will expire in the future.

Test plan:
0/ Make sure you have at least subscription with an expiration date > today
1/ Start a seach on the check expiration page (serials/checkexpiration.pl)
with a date < today, = today and > today
=> The subscription won't never be displayed without this patch.
With this patch, it will.

Note that you will get a "No results for your query" message only if you
have search for something.

Followed testplan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15114: Fix typo in opac-suggestion template
Jonathan Druart [Fri, 13 Nov 2015 15:45:04 +0000 (15:45 +0000)]
Bug 15114: Fix typo in opac-suggestion template

There is a $ in front of the loggedinusername variable, which is
obviously not what is expected here.

It fixes the wrong warning message "You are not authorized to see
pending purchase suggestions." when it should be "There are no pending
purchase suggestions."

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15189: Do not close STDERR when running in background mode
Jonathan Druart [Fri, 13 Nov 2015 16:22:03 +0000 (16:22 +0000)]
Bug 15189: Do not close STDERR when running in background mode

The batch records modification tool close STDERR, it's useless and hide
warnings/errors.

Like the other processes using the BackgroundJob module, this one should
let it open.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15109: Make name the default sort order for all patron searches
Jonathan Druart [Fri, 13 Nov 2015 09:18:43 +0000 (09:18 +0000)]
Bug 15109: Make name the default sort order for all patron searches

Find another place where there is a patron search (add user to a basket,
add users to a fund or edit owner of a fund, set a guarantor to a child,
etc.).
Do a search a confirm that the results are now sorted by name instead of
cardnumber.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15109 - Regression in patron search results ordering
Jonathan Druart [Fri, 13 Nov 2015 09:17:49 +0000 (09:17 +0000)]
Bug 15109 - Regression in patron search results ordering

In Koha 3.16 or earlier, before the introduction of the ajax datatable
for patron searching, the search results were ordered by name. In
master, the results are currently ordered by cardnumber, which is not
very useful.

Test Plan:
1) Do a "browse by last name" or a patron search
2) Note the results are sorted by card number
3) Apply this patch
4) Reload the page, start a new search
5) Note the results are sorted by name

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15197: In Rancor, multiple &/</" characters not escaped on saving
Jesse Weaver [Tue, 10 Nov 2015 19:12:43 +0000 (12:12 -0700)]
Bug 15197: In Rancor, multiple &/</" characters not escaped on saving

Test plan:

  1) On current master, create a record in Rancor containing multiple &, < or " characters ("A & B & C", for example).
  2) Try to save the record, it will silently fail.
  3) Apply this patch.
  4) The record should now save correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, record saved
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15182: Conditionally load Koha::NorwegianPatronDB
David Cook [Tue, 17 Nov 2015 01:36:16 +0000 (12:36 +1100)]
Bug 15182: Conditionally load Koha::NorwegianPatronDB

This patch loads Koha::NorwegianPatronDB if it can, or adds a warning
to the log if it can't load it.

Since the Koha::NorwegianPatronDB functionality in C4::Members is
wrapped in system preferences, the loading of the module is
irrelevant unless one actually wants to use the module and its
associated functionality.

NOTE:

This patch fixes a problem where we were getting errors saying
Crypt::GCrypt couldn't be loaded even though it's not a required
dependency.

This patch will likely only affect people not using Debian-based
systems where libcrypt-gcrypt-perl is available. The current
version of Crypt::GCrypt doesn't build so it's not an option
for most non-Debian users to install this not required
dependency in order to work around this issue...

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised for Debian-based systems

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15152: t/db_dependent/Reports_Guided.t should not depend on existing data
Tomas Cohen Arazi [Mon, 16 Nov 2015 18:25:26 +0000 (15:25 -0300)]
Bug 15152: t/db_dependent/Reports_Guided.t should not depend on existing data

The current implementation relies on existing borrowers on the DB.
Even when the DB itself doesn't have a FK constraint, the function
that retrieves the reports from the DB relies on get_saved_reports_base_query
which creates a query that JOINs the full query with the 'borrowers' table, on
the borrowernumber. So it is doomed to fail on some scenarios.
Specially because the current tests expect specific borrowernumber values
to be present (1, 2 and 3).

To test:
[To set the failure scenario]
 $ vagrant up jessie
 $ vagrant ssh jessie
 $ wget https://theke.io/static/reports_guided_sequence.txt -O /vagrant/reports_guided_sequence.txt
 $ wget https://theke.io/static/koha_3_20_00.sql.gz -O /vagrant/koha_3_20_00.sql.gz
 $ sudo -s
 $ mysql
 > DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev; \q
 $ zcat /vagrant/koha_3_20_00.sql.gz | mysql koha_kohadev
 $ exit
 $ sudo koha-shell kohadev
 $ cd kohaclone
 $ cat /vagrant/reports_guided_sequence.txt | xargs prove

- now run the tests:
 $ prove t/db_dependent/Reports_Guided.t
=> FAIL: The tests fail

- Apply the patch
- [re create the scenario]
- Run the test:
  $ prove t/db_dependent/Reports_Guided.t
=> SUCCESS: Tests now pass
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15133: encode correctly email generated by runreport.pl
Frédéric Demians [Thu, 5 Nov 2015 07:45:25 +0000 (08:45 +0100)]
Bug 15133: encode correctly email generated by runreport.pl

/misc/cronjobs/runreport.pl send badly encoded email in text/csv
(partially ok in HTML).

TEST:

1. Send by email a report containing a subject with accented characters
   and resultset with accented characters. For example:

   ./runreport.pl --subject="éèà" --to=me@home.org  1
   ./runreport.pl --format=html --subject="éèà" --to=me@home.org  1

   The first email contains badly encoded subject & message. The second email
   contains badly encoded subject, but correct message.

2. Apply the patch

3. Repeat 1 => No more strange characters.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Characters are correctly encoded now, thanks for that good spot.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15120: runreport.pl cronjob doesn't allow custom subjects anymore
Liz Rea [Wed, 4 Nov 2015 02:33:40 +0000 (15:33 +1300)]
Bug 15120: runreport.pl cronjob doesn't allow custom subjects anymore

To test, well do something like

misc/cronjobs/runreport.pl --subject="My fancy subject!" --to=you@youraddress.com 1
where 1 is the number of your favourite saved report.

Success is your email arrives with the subject "My fancy subject!" Failure is
(with --subject defined) you get either the description of the report, or "Koha
saved report" as the subject. This is success without --subject defined.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Bug repeatable and fixed by this patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14542: Transliterate rule for all single quote forms
Fridolin Somers [Thu, 16 Jul 2015 15:48:14 +0000 (17:48 +0200)]
Bug 14542: Transliterate rule for all single quote forms

Single quotes in common language (not in programming) are usually ', but
there is also the form known as &rsquo; in HTML.  See
https://fr.wikipedia.org/wiki/Apostrophe_%28typographie%29

This bug proposes to transliterate all forms into a space.

Test plan :
(I'll use the code &rsquo; instead of the unicode character)
- Without the patch
- Create a record with title : L&rsquo;avion d&rsquo;argile
- Index this record
- Search for "L&rsquo;avion d&rsquo;argile" => You find the record
- Search for "L'avion d'argile" => You do not find the record
- Apply patch
- Search for "L&rsquo;avion d&rsquo;argile" => You find the record
- Search for "L'avion d'argile" => You find the record
- Search for "L avion d argile" => You find the record

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14544: Fix regression on sending an email from staff
Jonathan Druart [Fri, 13 Nov 2015 16:49:53 +0000 (16:49 +0000)]
Bug 14544: Fix regression on sending an email from staff

The shelfnumber was not filled and result in a software error
Can't call method "get_contents" on an undefined value at
/home/koha/src/virtualshelves/sendshelf.pl line 74.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Whith patch mail is sent.
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15116: Show menu at the top of batch circ page
Martin Stenberg [Thu, 5 Nov 2015 12:58:55 +0000 (13:58 +0100)]
Bug 15116: Show menu at the top of batch circ page

This patch adds the user interaction menu to the top of the batch
checkout page.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14078: (followup) converting from ISO5426 is not complete
Fridolin Somers [Wed, 29 Apr 2015 10:35:00 +0000 (12:35 +0200)]
Bug 14078: (followup) converting from ISO5426 is not complete

Conversion of MARC from ISO5426 is defined in C4::Charset::char_decode5426().
Each character or combined characters conversion is defined in a map.

This patch adds missing conversions.

See http://www.gymel.com/charsets/MAB2.html

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14078: converting from ISO5426 is not complete
Fridolin Somers [Wed, 29 Apr 2015 10:24:23 +0000 (12:24 +0200)]
Bug 14078: converting from ISO5426 is not complete

Conversion of MARC from ISO5426 is defined in C4::Charset::char_decode5426().
Each character or combined characters conversion is defined in a map.

This patch changes some odd actual conversions.

In char_decode5426(), only characters between 0xC0 and 0xDF will be used for combining with following charater :
  ($char >= 0xC0 && $char <= 0xDF)
So conversion like "$chars{0x81d1}=0x00b0" will never be used.
Rules for "h with breve below" use combining with 0xf9 but looks like the correct caracter is 0xd5.

See http://www.gymel.com/charsets/MAB2.html

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15154: Allow correct translation for upload local cover image
Hector Castro [Sat, 7 Nov 2015 06:16:02 +0000 (00:16 -0600)]
Bug 15154: Allow correct translation for upload local cover image

To test:
-Set syspref LocalCoverImages and OPACLocalCoverImages to Allow
-A new tab 'Images' appear in bib record detail on Intranet.
-Notice about the phrase "Please upload one"
-Apply the patch and reload the page.
-New phrase appear "Select the image file to upload" with button Upload
-Update translation files : cd misc/translator; perl translate update es-ES
-You will see in es-ES-staff-prog.po the new entry
"Select the image file to upload. %sUpload%s"
-You can see the result installing the translation
cd misc/translator ; perl translate install es-ES

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  A native English speaker could confirm that the wording is ok: Please select
  the image file to upload

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15137: Display ISBN and author info when sending list by email
Jonathan Druart [Fri, 13 Nov 2015 15:18:56 +0000 (15:18 +0000)]
Bug 15137: Display ISBN and author info when sending list by email

Disclaimer: this is not caused by bug 14544 :)
And can be backported!

Both isbn and author information are missing when a list is sent by
email.
Emails sent from OPAC and staff should be (almost) the same.

Test plan:
1/ Sent a list by email (Button "Send list")
2/ The email you will receive should contain the isbn and author info

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
On top of last patch of Bug 14544
Works ok, mail with authors and ISBN
No errors

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