koha.git
10 years agoBug 10641 - GetBooksellerWithLateOrders in C4::Bookseller.pm has some incoherences
root [Thu, 25 Jul 2013 08:49:21 +0000 (10:49 +0200)]
Bug 10641 - GetBooksellerWithLateOrders in C4::Bookseller.pm has some incoherences

This patch fixes some incoherences of the routine
GetBooksellerWithOrders().

Now it considers the field $estimateddeliverydateto and it replaces it
by now() only if it is undef.

Also, it doesn't test if $aqbookseller.deliverytime is not Null anymore
but if $deliverytime = null or undef, it replaces it by 0.

It also verifies if $delay is >= 0 and return undef if it is a negative
value.

To Test:
Before, this routine sorts out the BookSellerWithLateOrders. If a
bookseller did not specify a deliverytime, it would never appears in
the list of LateOrders.  Moreover, if the field "Estimated delivery
date to" was specified, it didn't take care of the value and it
returns the late order up to today's date.

Now, the returned list considers all the fields give and if the
delivery time of the bookseller is not specified, it calculates the
late orders as if the deliverytime is 0.  By default, all booksellers
which have orders in late until today are listed unless "estimated
delivery date to" is specified.

prove t/db_dependent/Bookseller.t
t/db_dependent/Bookseller.t ..
[Some warnings about uninitialized values]
WARNING: GetBooksellerWithLateOrders is called with a negative value at C4/Bookseller.pm line 135.
t/db_dependent/Bookseller.t .. ok
All tests successful.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10795: Improvements for GetOpenIssue in C4::Circulation
Kenza Zaki [Wed, 28 Aug 2013 08:46:07 +0000 (10:46 +0200)]
Bug 10795: Improvements for GetOpenIssue in C4::Circulation

This patch adds some improvements for the routine GetOpenIssue().
Now, it verifies if the parameter is given (if not it returns undef)
and it returns $sth->fetchrow_hashref() instead of a $issue.

To test:
prove t/db_dependent/Circulation_issue.t
t/db_dependent/Circulation_issue.t .. ok
All tests successful.
Files=1, Tests=16,  2 wallclock secs ( 0.06 usr  0.01 sys +  1.09 cusr  0.07 csys =  1.23 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Same situation as the one noted in comment of
Bug 10683, test fails unless there is an issuingrule
All, All with 1 as renewals allowed.

With that condition, it succeeds

No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10683: (follow-up) improvements to the unit tests
Jonathan Druart [Thu, 19 Sep 2013 14:20:28 +0000 (16:20 +0200)]
Bug 10683: (follow-up) improvements to the unit tests

The borrowers table needs to be cleared after the items table
(last_returned_by column).

Some checks were missing for GetRenewCount and AddRenewal.

Now the tests simulated a renewal for a item and check that the renews
left is decremented.

Moreover the issuingrules tables should be cleared and filled with known
values.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10683: add unit tests for CRUD routines in C4::Circulation
Kenza Zaki [Wed, 28 Aug 2013 08:08:10 +0000 (10:08 +0200)]
Bug 10683: add unit tests for CRUD routines in C4::Circulation

This patch adds some unit tests wrapped in a transaction for
C4::Circulation.pm.

Circulation_Branch.t adds tests for routines which deal with
branch_item_rules,branch_borrower_circ_rules,
default_branch_circ_rules, default_circ_rules, and
 default_branch_item_rules in the database.

Circulation_issue.t adds tests for routines which deal with accountline
and issues in the database.

NOTE: Some commented tests have to be fixed, and some tests can be added.
More, other routines of Circulation.pm are tested in the patches:

10692 UT: Routines about transfers in Circulation.pm need unit tests
10710 UT : OfflineOperation's routines in C4/Circulation.t need unit tests
10767   UT: Routines which interact with the table issuingrules in C4/Circulation need unit test

Test plan:
prove t/db_dependent/Circulation_issue.t
t/db_dependent/Circulation_issue.t .. ok
All tests successful.
Files=1, Tests=16,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.40 cusr  0.02 csys =  0.44 CPU)
Result: PASS

prove t/db_dependent/Circulation_Branch.t
t/db_dependent/Circulation_Branch.t .. ok
All tests successful.
Files=1, Tests=10,  2 wallclock secs ( 0.06 usr  0.00 sys +  1.02 cusr  0.06 csys =  1.14 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Well, I don't know exactly what to do with this, so
I left it to QA

a) prove t/db_dependent/Circulation_Branch.t works well and without erros

b) prove t/db_dependent/Circulation_issue.t works without errors for me
ONLY if I have a issuingrule for All, All with 1 as renewals allowed, in
other cases it fails.

No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10698: (follow-up) remove now-superfluous FIXME comment
Galen Charlton [Wed, 9 Oct 2013 03:48:02 +0000 (03:48 +0000)]
Bug 10698: (follow-up) remove now-superfluous FIXME comment

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10698: give C4::Circulation::DeleteTransfer() a return value
Kenza Zaki [Thu, 8 Aug 2013 08:39:26 +0000 (10:39 +0200)]
Bug 10698: give C4::Circulation::DeleteTransfer() a return value

This patch adds return values to DeleteTransfer:
Undef if no parameters are given
1 if a Transfer is deleted
0E0 if a wrong parameter is given

It also fixes some unit tests in t/db_dependent/Circulation_transfers.t

To test:
prove t/db_dependent/Circulation_transfers.t
t/db_dependent/Circulation_transfers.t .. ok
All tests successful.
Files=1, Tests=14, 20 wallclock secs ( 0.03 usr  0.00 sys +  0.39 cusr  0.02 csys =  0.44 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Applied 10681 and 10692 before 10698
Run prove t/db_dependent/Circulation_transfers.t without errors
No koha-qa errors on all 3 patches

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10711: (follow-up) removing tabs
Bernardo Gonzalez Kriegel [Sun, 25 Aug 2013 22:53:29 +0000 (19:53 -0300)]
Bug 10711: (follow-up) removing tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10711: make GetOfflineOperation() return $sth->fetchrow_hashref instead of $result
Kenza Zaki [Mon, 12 Aug 2013 12:40:50 +0000 (14:40 +0200)]
Bug 10711: make GetOfflineOperation() return $sth->fetchrow_hashref instead of $result

To test :
prove t/db_dependent/Circulation_OfflineOperation.t
t/db_dependent/Circulation_OfflineOperation.t .. ok
All tests successful.
Files=1, Tests=7, 19 wallclock secs ( 0.02 usr  0.01 sys +  0.24 cusr  0.02 csys =  0.29 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: applied 10681 and 10710 before 10711
prove t/db_dependent/Circulation_OfflineOperation.t run without errors
koha-qa reports only 2 tabulations, fixed in a follow-up

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10681: remove inappropriate uses of finish() from C4::Circulation
Kenza Zaki [Mon, 5 Aug 2013 09:28:03 +0000 (11:28 +0200)]
Bug 10681: remove inappropriate uses of finish() from C4::Circulation

This patch gets rid of finish().

From the man page

finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10682: remove inappropriate uses of finish() from C4::Reserves
Kenza Zaki [Mon, 5 Aug 2013 09:50:40 +0000 (11:50 +0200)]
Bug 10682: remove inappropriate uses of finish() from C4::Reserves

This patch gets rid of finish.

From the man page

finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Similar to other patches from the same author
I run prove t/db_dependent/Reserves.t without errors
don't know if more tests are needed.
No koha-qa errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10685: remove inappropriate uses of finish in C4::Accounts.pm
Kenza Zaki [Mon, 5 Aug 2013 13:55:40 +0000 (15:55 +0200)]
Bug 10685: remove inappropriate uses of finish in C4::Accounts.pm

This patch gets rid of finish.

From the man page

finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Similar to other patches from the same author.
Run prove t/db_dependent/Accounts.t without errors
No koha-qa errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: (follow-up) move new password hashing routines to separate module
Galen Charlton [Wed, 9 Oct 2013 03:29:22 +0000 (03:29 +0000)]
Bug 9611: (follow-up) move new password hashing routines to separate module

The move avoids a problem where many modules would gain
a dependency on C4::Auth just because C4::Members needs access
to hash_password().

This patch also adds a couple unit tests for the new password
hashing code.

To test:

[1] Verify that there are no regressions on the test plan for bug
    9611.
[2] Verify that t/AuthUtils.t and t/db_dependent/Auth.t pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10917: allow staff to update hold pickup location without modify_holds_priority
Kyle M Hall [Thu, 19 Sep 2013 16:18:11 +0000 (12:18 -0400)]
Bug 10917: allow staff to update hold pickup location without modify_holds_priority

A librarian cannot modify a hold's pickup location unless he or she has
the permission modify_holds_priority. This appears to be a bug and not
by design. The reason the update fails is due to the priority not being
passed to ModReserve. The priority is not displayed when a librarian
does not have the modify_holds_priority permission.

Test Plan:
1) Remove the modify_holds_priority from your logged in user
   * User cannot be a superlibrarian
2) Attempt to change the pickup location for a hold
3) Note the change fails
4) Apply this patch
5) Repeat step 2
6) Note the change succeeds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only.
Passes all tests and QA script.

Tested:
- Confirmed that changing the pickup location is not
  possible in master without the modify_holds_priority
  permission
- Confirmed that the patch fixes the problem - pickup
  location can now be changed with and without the
  permission
- Pickup location can still not be changed, when
  IndependentBranches is activated

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7764: (follow-up) editorial tweaks
Galen Charlton [Fri, 4 Oct 2013 16:27:55 +0000 (16:27 +0000)]
Bug 7764: (follow-up) editorial tweaks

Besides some grammar and capitalization corrections, this patch
adds a link to the wiki page for installation Koha on Ubuntu
from packages.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7764: rework the INSTALL.ubuntu instructions
Mark Tompsett [Tue, 27 Aug 2013 21:29:20 +0000 (17:29 -0400)]
Bug 7764: rework the INSTALL.ubuntu instructions

This is a major rework. Key improvements include:
- Removed confusing multiple versions for Ubuntu leaving only one set
  of instructions.
- The packages koha-deps and koha-perldeps are used.
- License has been updated to reflect GPL3.
- More wiki reference links have been included.
- It is aimed to be based on source, not just tarball or just git.
- Sample output has been cut as much as possible.
- Almost cut-and-paste easy, making it friendlier than INSTALL.debian.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a tiny typo: seperate
Makes all sense to me - only wondering a bit about the recommendation
of using lynx for the web installer.
Quite an improvement, so passing QA.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5544: (follow-up) avoid warning if notice is not directed at a patron
Kyle M Hall [Thu, 5 Sep 2013 16:46:06 +0000 (12:46 -0400)]
Bug 5544: (follow-up) avoid warning if notice is not directed at a patron

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5544: prefer library email address over admin address as notice sender
Kyle M Hall [Wed, 9 May 2012 16:47:19 +0000 (12:47 -0400)]
Bug 5544: prefer library email address over admin address as notice sender

Right now overdues come from the branch, but the
others come from the admin email address - this
is a problem in multi-branch systems because they
have to come up with one email address that all
branches have access to.

C4::Letters::_send_message_by_email currently sets
the from address in the following order:
1) Address specified in message
2) Koha admin email address

The order will now be:
1) Address specified in message
2) Borrower's home library email address
3) Koha admin email address

Test Plan:
1) Set your library email addresses, and the KohaAdminEmailAddress
   Make sure each of them are unqiue
2) Choose a borrower, enable the enhanced messaging and enable the
   checkout and checkin email notices. Use your email address for
   the borrower's email so you can recieve the emails.
3) Check out an item, check the from address of the email,
   it should be the email addres set in KohaAdminEmailAddress
4) Apply the patch
5) Return the item, check the from address of the email,
   it should match the email address set for the borrower's
   home library.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10856: Fix cover display in shelf browser
Julian Maurice [Fri, 27 Sep 2013 09:48:01 +0000 (11:48 +0200)]
Bug 10856: Fix cover display in shelf browser

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I was able to reproduce the problem with local covers and
the patch fixes it in my tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10856: (Follow-up) improve behavior of the "close shelf browser" link
Owen Leonard [Tue, 17 Sep 2013 12:33:01 +0000 (08:33 -0400)]
Bug 10856: (Follow-up) improve behavior of the "close shelf browser" link

In Firefox at least, the shelf browser cannot be reopened after
hiding it with the "close shelf browser" link. This followup improves
the behavior of the "close shelf browser" link so that the shelf browser
can be redisplayed.

To test, open a bibliographic detail page in the OPAC and click a
"browse shelf" link. Click the "close shelf browser" link--the shelf
browser should be hidden. Click the original "browse shelf" link and the
shelf browser should reappear without reloading the page.

Test with Firefox and Chrome (at least).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Testing notes:
- New unit tests in t/db_dependent/ShelfBrowser.t pass.
- System preference  OPACShelfBrowser still works as expected.
- Closing and opening the shelf browser works as expected.
- Next and Previous links show new and nicer behaviour.
- Logs are clean.

Tested with Firefox and Chromium under Ubuntu.

Notes: The currently displayed record could maybe be highlighted
a bit better.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10856: (follow-up) if callnumbers are equal, order should be on itemnumber
Jonathan Druart [Fri, 13 Sep 2013 07:55:51 +0000 (09:55 +0200)]
Bug 10856: (follow-up) if callnumbers are equal, order should be on itemnumber

If a lot of items has the same callnumber, the order should be on the
itemnumbers. Otherwise the left side is always filled with the same
items.

+ Fix a bad c/p for the next link (when js is disabled).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10856: Improve the previous and next items on the shelf browser
Jonathan Druart [Tue, 14 May 2013 13:11:11 +0000 (15:11 +0200)]
Bug 10856: Improve the previous and next items on the shelf browser

The next and previous links should completely refresh the shelf.

For example:
[<] [1] [2] [3] [4] [5] [6] [>]
Before this patch, the next and previous links were the same as the 1
and 6.
With this patch, after clicking on next, we will get:
[<] [7] [8] [9] [10] [11] [12] [13] [>]

This patch adds a new AJAX script to get the shelf browser block.

Test plan:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
  get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10096: (follow-up) rename button on authorities toolbar
Galen Charlton [Fri, 4 Oct 2013 15:06:15 +0000 (15:06 +0000)]
Bug 10096: (follow-up) rename button on authorities toolbar

Change to "New from Z39.50" to be consistent with the
cataloging toolbar.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10096: (follow-up) add LC authority Z39.50 targets to 'en' sample data
Galen Charlton [Fri, 4 Oct 2013 14:59:29 +0000 (14:59 +0000)]
Bug 10096: (follow-up) add LC authority Z39.50 targets to 'en' sample data

The LC NAF and SAF authority Z39.50 database are indeed production
services, so we may as well showcase the new authority Z39.50 search
functionality.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 10096: (follow-up) use datatables.inc
Galen Charlton [Fri, 4 Oct 2013 14:52:32 +0000 (14:52 +0000)]
bug 10096: (follow-up) use datatables.inc

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10096: DBRev 3.13.00.024
Galen Charlton [Fri, 4 Oct 2013 14:37:37 +0000 (14:37 +0000)]
Bug 10096: DBRev 3.13.00.024

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10096 - (follow-up) various QA improvements
David Cook [Tue, 10 Sep 2013 02:41:36 +0000 (12:41 +1000)]
Bug 10096 - (follow-up) various QA improvements

- improve POD
- remove extraneous comments
- correct license statement in new files
- remove backticks in database update SQL

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10096 - Add a Z39.50 interface for authority searching
David Cook [Tue, 7 May 2013 07:06:33 +0000 (17:06 +1000)]
Bug 10096 - Add a Z39.50 interface for authority searching

This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.

These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.

To test this patch:

1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.

2) Go to the Authorities module

3) Click on the new "Z39.50 search button"

4) Select your authority search targets from the list.

5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)

6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".

7) Click on "MARC" next to the results of interest to review the MARC
authority record.

8) When you're satisfied with a record, click on "Import".

9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).

10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)

11) When you're satisfied, click save.

12) Presto! You've imported your first authority record via Z39.50!

--

Here is the info for the LibrariesAustralia test Z39.50 authority
database:

Z39.50 server: LibrariesAustralia Authorities
Hostname: z3950-test.librariesaustralia.nla.gov.au
Port: 210
Database: AuthTraining
Userid: ANLEZ
Password: z39.50
Syntax: MARC21/USMARC
Encoding: utf8

-

The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).

Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8

Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8

(N.B. Both of these databases also include title authorities.)

-

For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.

To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:

unix:/zebra/koha/var/run/zebradb/authoritysocket

(N.B. You might be using a different scheme than unix sockets...)

To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".

To set up this Z39.50 client target in Koha...

Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8

Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching

This patch adds the "recordtype" column to the "z3950servers" table.

The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).

I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.

Test Plan:

1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch

N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9735: Unit tests for get_template_and_user (cookies handling)
Tomas Cohen Arazi [Mon, 9 Sep 2013 14:02:01 +0000 (11:02 -0300)]
Bug 9735: Unit tests for get_template_and_user (cookies handling)

Galen found a case where the cookies array was not built flat. I add a
unit test for that (check the cookie array is flat) and also test the
cookies output of get_template_and_user so we are sure the &language=
parameter is correctly handled.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Tests in t/db_dependent/Auth.t pass
- Tested in intranet, OPAC logged in, OPAC logged out
  * Adding a valid language code to the URL switches the language
    as expected
  * Adding an invalid language code causes no change

Nice feature!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9735 - Build the cookie array correctly
Tomas Cohen Arazi [Wed, 5 Jun 2013 17:56:38 +0000 (14:56 -0300)]
Bug 9735 - Build the cookie array correctly

The current implementation didn't build the cookie array correctly,
yielding login problems in some scenarios.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9735 - Let the language be selected through URL parameters
Tomas Cohen Arazi [Sun, 3 Mar 2013 00:25:23 +0000 (21:25 -0300)]
Bug 9735 - Let the language be selected through URL parameters

Passing language=<valid_language_code> as a parameter in any Koha's URL
can be used to set the desired language.
This patch touches
 - C4::Templates
 - C4::Auth

Adds a new method getlanguagecookie that does exactly that, for use in
get_template_and_user.
Also modifies getlanguage so it checks (a) if there's a 'language'
parameter in the CGI object and (b) checks if its valid and enabled for
the desired interface.

To test:
* Without the patch
  - access any koha page
  - add ?language=code to the end of the URL (change code for a valid language code
    it needs to be installed using perl translate install code, and enabled either for
    the staff or opac interface, depending where are you testing)
  - Nothing happens with the language parameter
* With the patch
  - access any koha page
  - add ?language=code (the same as before) and hit enter
  - the language should be changed to the one you chose
  - if you browse through some links, you will see
    koha 'remembers' the language you passed as a parameter
    (i.e. the language cookie has been updated).

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Brendan <brendan@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works very well. No errors.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
More comments on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10668 - Improve suggestion detail page - QA Followup
Kyle M Hall [Fri, 2 Aug 2013 16:52:04 +0000 (12:52 -0400)]
Bug 10668 - Improve suggestion detail page - QA Followup

Simplify an expression in the JavaScript

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10668 - Improve suggestion detail page
Owen Leonard [Wed, 31 Jul 2013 19:36:12 +0000 (15:36 -0400)]
Bug 10668 - Improve suggestion detail page

This patch makes several improvements to the suggestions template:

- Improved breadcrumbs and page title.
- Fixed a JavaScript error which appeared when viewing or editing a
  suggestion.
- Added an 'Edit' and a 'Delete' button to the suggestion detail page.
- Corrected capitalization.

To test:
- Perform various operations with suggestions management and
  confirm that page titles and breadcrumbs are correct.
- View the detail page for an individual suggestion and confirm that
  the edit and delete buttons work correctly.
- Confirm that there are no JavaScript errors when viewing or editing a
  suggestion, in particular when changing Acquisition information
  (quantity, currency, price).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, nice improvement.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: (follow-up) add libcrypt-eksblowfish-perl to debian/control
Galen Charlton [Thu, 3 Oct 2013 23:41:17 +0000 (23:41 +0000)]
Bug 9611: (follow-up) add libcrypt-eksblowfish-perl to debian/control

(Not strictly necessary, but since we haven't removed
 debian/control yet...)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: DBRev 3.13.00.023
Galen Charlton [Thu, 3 Oct 2013 22:31:45 +0000 (22:31 +0000)]
Bug 9611: DBRev 3.13.00.023

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9611: (follow-up) add reference to Crypt::Eksblowfish::Bcrypt in POD
Galen Charlton [Thu, 3 Oct 2013 22:24:04 +0000 (22:24 +0000)]
bug 9611: (follow-up) add reference to Crypt::Eksblowfish::Bcrypt in POD

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: (follow-up) fix POD
Bernardo Gonzalez Kriegel [Sat, 28 Sep 2013 23:45:04 +0000 (20:45 -0300)]
Bug 9611: (follow-up) fix POD

Small patch to make koha-qa happy.
Fixes small POD error

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: Database update, changing password from varchar(30) to varchar(60)
Chris Cormack [Sat, 16 Feb 2013 19:22:07 +0000 (08:22 +1300)]
Bug 9611: Database update, changing password from varchar(30) to varchar(60)

This is necessary because Bcrypt hashes are longer than MD5 hashes.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9611: use checkpw_hash() instead of md5 hash for SIP2 logins
Srdjan [Mon, 26 Aug 2013 05:01:20 +0000 (17:01 +1200)]
bug 9611: use checkpw_hash() instead of md5 hash for SIP2 logins

Test:

* SIP: Have an old user and create a new user
- use either tenet sip test or
  C4/SIP/interactive_patron_check_password.pl to check old
  userid/password
- do the same for the new user

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described

Test
1) using perl C4/SIP/interactive_patron_check_password.pl
can check current (short) and new (long) passwords

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9611: use hash_password() and checkpw_* for LDAP logins instead of md5 hash
Srdjan [Fri, 23 Aug 2013 08:02:53 +0000 (20:02 +1200)]
bug 9611: use hash_password() and checkpw_* for LDAP logins instead of md5 hash

Test:

* LDAP:
- Turn on LDAP auth in koha-config.xml. Set "update" in your server config to 1
- Change user's password on LDAP
- Login to Koha using LDAP - Koha password should be updated, to check
- Turn off LDAP auth in koha-config.xml
- You should be ble to log in with the new password

I do not have a LDAP facility, so I cheated. I ran
perl -e 'use C4::Auth_with_ldap; C4::Auth_with_ldap::_do_changepassword("srdjan", 1000022259, "srdjan");'
and was able to change the password.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described.

Test
1) change <useldapserver> to 1
2) copy/paste sample <ldapserver> config from perldoc C4/Auth_with_ldap
3) using sample script was able to change password,
use (userid, borrowernumber, newpass) as arguments
4) checked with OPAC and in database

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9611: (follow-up) remove md5_base64 from imports - not used
Srdjan [Mon, 26 Aug 2013 05:05:07 +0000 (17:05 +1200)]
bug 9611: (follow-up) remove md5_base64 from imports - not used

RM note: Digest::MD5 is used in C4::ImportExportFramework as part
of an unnecessary reimplementation of functionality supplied by
File::Temp.  See bug 10991 for a proposal to remove it.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9611: Extract checkpw_internal() and checkpw_hash() from checkpw()
Srdjan [Mon, 26 Aug 2013 04:29:10 +0000 (16:29 +1200)]
bug 9611: Extract checkpw_internal() and checkpw_hash() from checkpw()

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: add Crypt::Eksblowfish::Bcrypt to list of Perl dependencies
Chris Cormack [Sat, 16 Feb 2013 19:32:46 +0000 (08:32 +1300)]
Bug 9611: add Crypt::Eksblowfish::Bcrypt to list of Perl dependencies

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9611: Change the password hashing algorithm from MD5 to Bcrypt
Srikanth Dhondi [Wed, 13 Feb 2013 01:40:02 +0000 (14:40 +1300)]
Bug 9611: Change the password hashing algorithm from MD5 to Bcrypt

What this patch aims to accomplish?

 * All new passwords are stored as Bcrypt-hashes
 * For password verification:
     - If the user was created before this patch was applied then use
        MD5 to hash the entered password <-- backwards compatibility
     - If the user was created after this patch was applied then use
       Bcrypt to hash the entered password
 * Any password change made via the staff interface or the OPAC will
   be automatically Bcrypt-hashed; this applies to old users whose
   passwords were stored as MD5 hashes previously

Test plan:
  1) Add new users and check whether their passwords are stored as
     Bcrypt hashes or not.
  2) To test that authentication works for both old as well as new
     users:
       a) Login as an existing user whose password is stored as a
          MD5 hash
       b) Login as an existing user whose password is stored as a
          Bcrypt hash
  3) In the staff interface, change the password of an existing user
     whose password is stored as an MD5 hash
a) Check the new password is stored as a Bcrypt-hash in the database
b) Try to login with the new password
  4) In the OPAC, verify that
    a) Old user with old pass can change password, new format
    b) New user with new pass can change password
    c) Old and new user with self-updated pass can login

Whitespace cleanup was contributed by  Bernardo Gonzalez Kriegel.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 10419: (follow-up) improvements to the usage text
Galen Charlton [Thu, 3 Oct 2013 22:13:40 +0000 (22:13 +0000)]
bug 10419: (follow-up) improvements to the usage text

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (follow-up) patrons with fines should not be deleted
Jonathan Druart [Mon, 30 Sep 2013 12:14:15 +0000 (14:14 +0200)]
Bug 10419: (follow-up) patrons with fines should not be deleted

Test plan:
- add a fine for a patron
- verify the script does not delete this patron.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, script do not delete a patron with fines.
No koha-qa errors with all patches applied

Test
1) Added a fine to a patron
2) run script
3) reports condition
Trying to delete patron 5... Failed to delete patron 5: patron has 10.00 in fines
4) Patron is not deleted

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Tested various combinations of options:
./delete_patrons.pl
  Gives a helpful message about the use of the script.
./delete_patrons.pl -h
  Outputs useful information about the use of the script
  and its various options.
./delete_patrons.pl --category_code ST --library CPL
  Gives the correct results in numbers and deletion was done
  properly.

Also tested:
  --expired_before
  --not_borrowed_since
  -v

Testing various conditions where a delete should not occur:
- Patron has checkouts
  Patron is not in list of patrons to delete (x patrons to delete)
- Patron has fines
  Patron is still in list of patrons to delete (x patrons to delete)

Checked deleted patrons had been moved to deletedborrowers.

Notes about possible enhancements:
- only print the success message 'x patrons deleted' when confirm
  flag was set
- patrons with current checkouts are silently excluded from the number
  of patrons to be deleted. Printing the number with current checkouts
  might be helpful.

Changes made:
  Fixed a small error in the documentation: expired_date is expired_before.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (follow-up) fix hardcoded records and pod
Jonathan Druart [Tue, 13 Aug 2013 10:47:14 +0000 (12:47 +0200)]
Bug 10419: (follow-up) fix hardcoded records and pod

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Missing a sign. Removes harcoded values

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (follow-up) functional improvements
Galen Charlton [Tue, 6 Aug 2013 15:38:24 +0000 (15:38 +0000)]
Bug 10419: (follow-up) functional improvements

[1] Patron deletion now happens atomically; if one part
    of the process fails, the record isn't left in a
    partially deleted state.
[2] The routine for handling lists properly during patron
    deletion is now invoked.
[3] The script now prints an indication if it's run
    without --confirm; otherwise, one might think that
    patron records were actually being deleted.
[4] --verbose now actually does something.

Without --verbose, the script will print the dry-run
warning (if applicable), the number of patrons to be
deleted, and error messages.

With --verbose, the script will also print a line with
the borrowernumber of each patron to be deleted.

To test:

[1] Run the script with and without --verbose and compare
    the, well, verbosity.
[2] Run the script without --confirm and note that the script
    prints a message saying that it's running in dry-run mode.
[3] Use the script to try to delete one or more patrons that have
    loans.  Confirm that error messages are printed reporting
    foreign constraints preventing the deletion.  Also confirm that
    no new rows are added to deletedborrowers for those patrons that
    could not be completely deleted.
[4] Use the script to delete a patron that has a public list.  Verify
    that after the deletion, the public list still exists but now
    has a null owner.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (follow-up) tidy names of command-line switches
Galen Charlton [Tue, 6 Aug 2013 15:05:26 +0000 (15:05 +0000)]
Bug 10419: (follow-up) tidy names of command-line switches

[1] Use --library instead of --branchcode to be consistent
    with other scripts and user-facing Koha terminology.
[2] Use --not_borrowed_since instead of --not_borrowered_since;
    no need to expose typos in the API to the user.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (followup) fix license statement
Chris Cormack [Mon, 5 Aug 2013 22:45:44 +0000 (10:45 +1200)]
Bug 10419: (followup) fix license statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (follow-up) add branchcode parameter to patron deletion script
Jonathan Druart [Mon, 15 Jul 2013 07:28:40 +0000 (09:28 +0200)]
Bug 10419: (follow-up) add branchcode parameter to patron deletion script

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: (followup) - tidy up cronjob for deleting patrons
Jonathan Druart [Fri, 7 Jun 2013 13:51:43 +0000 (15:51 +0200)]
Bug 10419: (followup) - tidy up cronjob for deleting patrons

This followup adds:
- execute flag (+x) for the cronjob script.
- replaces --dry-run with --confirm (according with existing scripts).
- changes output text (remove 'first person' style).
- updates the doc and simplifies the dates parameters.
- changes flags PrintError and RaiseError for the dbh in order to catch
  something if an error occurs...

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10419: new cronjob for deleting patrons
Jonathan Druart [Wed, 5 Jun 2013 14:26:31 +0000 (16:26 +0200)]
Bug 10419: new cronjob for deleting patrons

This patch provides a cronjob script for deleting patrons.

It takes 3 options:

--not_borrowed_since
--expired_date
--category_code

See the perldoc misc/cronjobs/delete_patrons.pl.
Use the -v flag for a verbose mode.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10927: remove disused C4::Utils module
Jonathan Druart [Fri, 20 Sep 2013 15:38:49 +0000 (17:38 +0200)]
Bug 10927: remove disused C4::Utils module

Bug 10925 removes the last call to C4::Utils.
The module becomes useless and can be deleted.

Verify that t/db_dependent/Context.t still successfully passes.
git grep hashdump
git grep maxwidth

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, no subs from the module are used anywhere

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10806: make the staff benchmark script check authentication failure.
Jonathan Druart [Thu, 29 Aug 2013 15:49:39 +0000 (17:49 +0200)]
Bug 10806: make the staff benchmark script check authentication failure.

Currently, if you launch the script
misc/load_testing/benchmark_staff.pl, it always displays
"Authentication successful" or continue to execute the script even if
nothing is done.

This patch checks if the url is right and if the authentication is
correctly done.

Test plan:
Suppose that a correct login/pwd is koha/koha
1/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
  Authentication successful
  ...
  Step 1
  ...

2/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="KOHA" --user="KOHA"
should produce:
Authentication failure: bad login/password

3/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.kobe.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
Authentication failure:
    500 Can't connect to admin.kobe.local:80 (Bad
    hostname)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described, detects bad url and user credentials.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and gives better error messages.
There are some warnings output when running the script before
and after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10948: make reference labels translatable in OPAC auth results
Jared Camins-Esakov [Wed, 25 Sep 2013 15:50:07 +0000 (11:50 -0400)]
Bug 10948: make reference labels translatable in OPAC auth results

For some reason the translator script was not picking up the see also
and used for/see from labels on the OPAC. This patch fixes the problem.

To test:
1) Apply patch.
2) Generate PO files.
3) Note that "see from" and "used for/see from" appear.
4) Sign off.

Signed-off-by: Nuño López Ansótegui <nunyo@masmedios.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, thx for the fix.
Tested by updating the German po files, translating the
strings and installing the templates.
Verified strings show up in German in the authority
result list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5645: improve converting simple search to Z39.50 search
Galen Charlton [Sat, 7 Sep 2013 18:42:32 +0000 (18:42 +0000)]
Bug 5645: improve converting simple search to Z39.50 search

This patch builds on the patch for bug 10742 by ensuring
that when a search initiated from the staff interface simple
search returns results, if you click on the Z39.50 search
button, the search form is populated with the search string
without "kw,wrdl".

To test:

[1] Perform a search in the staff interface that will return
    results.
[2] Click the Z39.50 search button.
[3] Observe that the search string appears in the title
    field in the Z39.50 search form, but with a prefix of
    "kw,wrdl".
[4] Apply the patch.
[5] Repeat steps 1-2.  This time, the search string appears
    without the index prefix.  This will make the Z39.50 search
    much more likely to work.
[6] Repeat steps 1-2, but with a search that does *not* return
    any hits in the Koha database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10967: fix minor POD error
Ketan Kulkarni [Sun, 29 Sep 2013 05:07:54 +0000 (10:37 +0530)]
Bug 10967: fix minor POD error

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors.
Fixes problem, but I think is better to remove
=back than to add nother =over 4, but I'm not
a POD expert

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10949: restore ability to successfully print hold slips
Galen Charlton [Wed, 25 Sep 2013 16:15:07 +0000 (16:15 +0000)]
Bug 10949: restore ability to successfully print hold slips

This fixes a regression introduced by the patch for bug
9394 -- when printing a hold slip using the 'print and confirm'
button, the slip would contain only the text 'reserve not found',
not a full hold slip.

This patch also adds a regression test.

To test:

[1] Check in an item that would fill a hold.  Use the 'print
    and confirm button' to confirm the hold.
[2] The printout will only contain text to the effect of
    'reserve not found'.
[3] Apply the patch.
[4] Repeat step 1.  This time, a full hold slip should be printed.
[5] Verify that prove -v t/db_dependent/Reserves.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Pass all tests, new and old, and QA script.
Verified wrong and corrected behaviour.

Note: Sometimes there will not be the message 'reserve not found'
showing up, but hold information for a different record. This happens
when there exists a reserve_id with the borrowernumber of the patron
in question in your database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10965: fix breakage when loading sample itemtypes during install
Bernardo Gonzalez Kriegel [Sat, 28 Sep 2013 19:24:50 +0000 (16:24 -0300)]
Bug 10965: fix breakage when loading sample itemtypes during install

Bug 10513 added two columns to table itemtypes,
but sample_itemtypes can't be loaded because
it relies on old structure.

This patch rewrites sample_itemtypes.sql, stating
explicitly columns, removing backticks and consolidates
all in one insertion.

To test:
1) On master with current DB structure, delete item types

2) try loading sample_itemtyes.sql
It fails with "ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1"

3) apply patch

4) try again, this time it will load and itemtypes created

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
SQL change only.
Tested by running the web installer on an empty database.
All sample data loads without errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10925: fix LDAP auth failing if DEBUG is enabled
Jonathan Druart [Fri, 20 Sep 2013 15:21:40 +0000 (17:21 +0200)]
Bug 10925: fix LDAP auth failing if DEBUG is enabled

To reproduce:
1/ Edit your apache virtual host and set the DEBUG environment variable
(SetEnv DEBUG 1).
2/ Try to login with an ldap user
3/ You will be redirected to the 500 error page.
The Koha logs contains:
malformed header from script. Bad header=------------------------------: mainpage.pl

The hashdump routine directly prints to STDOUT (!) and breaks the
headers.
It appears Net::LDAP::?->dump does the same thing.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Maybe we can kill C4::Utils after getting rid of this

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10901: (follow-up) add space between 'Edit in host' and 'Delink'
Galen Charlton [Fri, 27 Sep 2013 17:00:35 +0000 (17:00 +0000)]
Bug 10901: (follow-up) add space between 'Edit in host' and 'Delink'

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10901: (follow-up) make the withdrawn column sortable
Jonathan Druart [Mon, 23 Sep 2013 07:56:28 +0000 (09:56 +0200)]
Bug 10901: (follow-up) make the withdrawn column sortable

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10901: Add datatables to the add item page
Jonathan Druart [Tue, 17 Sep 2013 14:31:46 +0000 (16:31 +0200)]
Bug 10901: Add datatables to the add item page

For a biblio with a lot of items, it is not easy to find the one you
want to edit.

Test plan:
Try to edit/delete item from the add item page.
Verify there is no regression on this page.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Adding, editing and deleting items still works.
Search provides useful help for locating the correct items.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10836: (follow-up) improve display toggles on the OPAC hold request form
Galen Charlton [Fri, 27 Sep 2013 15:55:29 +0000 (15:55 +0000)]
Bug 10836: (follow-up) improve display toggles on the OPAC hold request form

This patch improves the the toggles for displaying and hiding the hold
options div and the toggles for displaying the table of specific copies
to request.  It also moves the copy table into the hold options div.

To test:

[1] Select a single title in the OPAC and click on the place hold
    button.
[2] Click 'Show more options', and select a specific copy to request.
[3] Click 'Hide options'.  Verify that the hold options, including the
    copy table, are hidden.
[4] Click 'Show more options'.  Verify that the specific copy radio
    button is still selected and that the copy selected in step to is
    selected.
[5] Enable DisplayMultiPlaceHold and select several titles to
    request.
[6] Do steps 2, 3, and 4 on various titles on the request form.  Verify
    that toggling the options link for one title on the form affects
    the visibility only for that title.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
While signing off I removed one <br /> tag and corrected a float in the
CSS. This helps keep the border between individual hold listings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10836 - New layout for placing holds in the OPAC
Owen Leonard [Wed, 21 Aug 2013 19:24:19 +0000 (15:24 -0400)]
Bug 10836 - New layout for placing holds in the OPAC

This patch changes the layout of the OPAC's place hold screen,
eliminating the table in favor of a more flexible, open display.

To test, place single and multiple holds under various conditions:

- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled

Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9299: fix LDAP login breakage when ExtendedPatronAttributes is on
Srdjan [Wed, 5 Jun 2013 04:34:29 +0000 (16:34 +1200)]
Bug 9299: fix LDAP login breakage when ExtendedPatronAttributes is on

To test:
- Configure an LDAP server and $KOHA_CONF, etc.
- Make sure ExtendedPatronAttributes is defined and that
  there is no attribute defined that is specified to be
  a unique ID.
- Try to log in using an account originating from the
  LDAP directory.
- You will got a software error:
  Can't use an undefined value as an ARRAY reference at
  /home/koha/src/C4/Auth_with_ldap.pm line 183.
- Apply the patch.
- Try to log in again; this time it should work.

Signed-off-by: Nuño López Ansótegui <nunyo@masmedios.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10730: (follow-up) restore background color for cells
Jonathan Druart [Tue, 24 Sep 2013 12:57:11 +0000 (14:57 +0200)]
Bug 10730: (follow-up) restore background color for cells

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10730: Use DataTables on the tag review page
Owen Leonard [Mon, 12 Aug 2013 16:31:52 +0000 (12:31 -0400)]
Bug 10730: Use DataTables on the tag review page

This patch enhances the tags review page in the staff client by adding
DataTables sorting to the table of tags.

It also converts the tag list page (list.tt) to use the new DataTables
include introduced by Bug 10649.

To test, apply the patch and view the tags review page for various
categories: Pending, approved, rejected, all. The table should be
sortable by status, term, weight, and date. Sorting by date should work
correctly regardless of date format preference. Title sorting on the tag
list page should work correctly.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Replace tab with 4 spaces

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10687: DBRev 3.13.00.022
Galen Charlton [Wed, 25 Sep 2013 15:11:56 +0000 (15:11 +0000)]
Bug 10687: DBRev 3.13.00.022

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10687: (follow-up) remove authority 68a/68b tags from translated MARC21 framework...
Galen Charlton [Wed, 25 Sep 2013 15:10:40 +0000 (15:10 +0000)]
Bug 10687: (follow-up) remove authority 68a/68b tags from translated MARC21 framework scripts

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10687: Delete erroneous tags 68a and 68b on default MARC21 auth framework
Bernardo Gonzalez Kriegel [Fri, 2 Aug 2013 14:25:56 +0000 (11:25 -0300)]
Bug 10687: Delete erroneous tags 68a and 68b on default MARC21 auth framework

This patch deletes information for default
MARC21 auth framework on tags 68a and 68b.
Also added update for current installs.

RM note: The 68a and 68b fields were defined in an attempt to include
both MARC21 classification and MARC21 authority records in the same
default framework, but I don't think this has turned out to be useful,
as to my knowledge nobody tries to use MARC21 classification records
in Koha, and if one were to want to, a distinct record type (or at
least auth_type) would be a better way to do it.

To test with current authorities_normal_marc21.sql loaded

1) apply the patch
2) run updatedatabase
3) check on database that there are no more
references to tags 68a and 68b

To test for new installs
1) remove auth frameworks
2) load authorities_normal_marc21.sql
3) check that load without problem
4) check on database that there are no more
references to tags 68a and 68b

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: DBRev 3.13.00.021
Galen Charlton [Wed, 25 Sep 2013 00:33:23 +0000 (00:33 +0000)]
Bug 9761: DBRev 3.13.00.021
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: Unit tests for ConfirmFutureHolds changes
Marcel de Rooy [Wed, 18 Sep 2013 15:06:29 +0000 (17:06 +0200)]
Bug 9761: Unit tests for ConfirmFutureHolds changes

Adds tests for CheckReserves with lookahead parameter.
Adds tests for AddReturn with regard to future reserve messages.
The following test cases are added, resulting in 8 new tests:
a) Add a reserve without date, CheckReserve should return it
b) Add a reserve with future date, CheckReserve should not return it
c) Add a reserve with future date, CheckReserve should return it if lookahead
   is high enough
d) Check ResFound message of AddReturn for future hold

Test plan:
Run the test. No fails?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: Preliminary measures for adding a unit test
Marcel de Rooy [Wed, 18 Sep 2013 14:12:09 +0000 (16:12 +0200)]
Bug 9761: Preliminary measures for adding a unit test

Optionally add some branches and categories that may not exist.

Test plan:
Run the test with or without CPL branch or S (staff) category.
Verify that the test does not fail.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: Reformulating the preference description
Marcel de Rooy [Thu, 7 Mar 2013 17:46:04 +0000 (18:46 +0100)]
Bug 9761: Reformulating the preference description

After some thought, I had to reformulate what this pref does.
No code changes here.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: dbrev for ConfirmFutureHolds
Marcel de Rooy [Thu, 7 Mar 2013 13:57:25 +0000 (14:57 +0100)]
Bug 9761: dbrev for ConfirmFutureHolds

Db rev for new pref ConfirmFutureHolds.

Test plan:
Run [your server]/cgi-bin/koha/installer/install.pl?step=3&op=updatestructure
Optionally, run a new install to test sysprefs.sql.
Or:
Edit sysprefs.sql, leave at least the last few lines including the new one.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9761: Make it possible to confirm future hold requests at checkin time
Marcel de Rooy [Mon, 4 Mar 2013 13:47:57 +0000 (14:47 +0100)]
Bug 9761: Make it possible to confirm future hold requests at checkin time

Description:

A new pref ConfirmFutureHolds is added. When confirming a hold at checkin time,
the number of days in this pref is taken into account when looking for reserves.
Note that this pref does not interfere with renewing, issuing or transferring
a book. For report Holds to pull, the default end date is calculated with this
new preference.
The use of ConfirmFutureHolds is useful only when future holds are allowed.

Test plan:
1) Enable future holds. Add a number of days into ConfirmFutureHolds.
2) Place a future hold within this number of days.
3) Run holds to pull report. Check default startdate and enddate.
4) Check this book in. Can you confirm the hold? Do not confirm.
5) Issue the book to another patron. You should not see a warning.
6) Renew the book for this patron via opac or staff. No warning either.
7) Check in again. Warning pops up again.
8) Transfer book. Switch branch. Check in. Hold found pops up. Do not confirm.
9) Back to first branch. Check in (with popup). Remove the hold. Add new future
hold past the number of days. Check in (no warn).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10803: make "Make payment" in circ easier to translate
Katrin Fischer [Thu, 29 Aug 2013 20:26:50 +0000 (22:26 +0200)]
Bug 10803: make "Make payment" in circ easier to translate

To test:
- Choose a patron account
- Add a fine to it
- Switch to the checkout tab of the patron account
- Check for the "Make payment" link. Make is not a link, but payment is.
- Apply patch
- Check again, now both words are linked.

In translation this string is divided into:
. %s Make
payment

Because of this it's difficult to translate it grammatically.
The patch moves 'Make' into the link text, so that both words
will show up together in translation.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.
Not only improves translatability,
also corrects capitalization.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10924: fix updating contact note from OPAC
Owen Leonard [Fri, 20 Sep 2013 15:31:57 +0000 (11:31 -0400)]
Bug 10924: fix updating contact note from OPAC

If you update your "Contact note" via the OPAC that change doesn't
appear in the staff client's "Update patron records" interface. The
field is missing from members-update.tt

To test, log in to the OPAC and update your details
(opac-memberentry.pl), modifying the "Contact note" in the "Alternate
address" section.

In the staff client, view "Patrons requesting modifications"
(members/memgers-update.pl). The changed contact note field should
appear in the list of field awaiting approval for that patron.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line change - contact note now updates perfectly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10911: fix invalid links when displaying records that have 880 fields
Kyle M Hall [Wed, 18 Sep 2013 19:24:08 +0000 (15:24 -0400)]
Bug 10911: fix invalid links when displaying records that have 880 fields

Koha intranet search results using XSLT for records with 880 fields have
the details link created by a code path that incorrectly links to some
opac pages.

Test Plan:
1) Enable XSLT for intranet search results
2) Upload or create a record with at least one 880 field
3) Search for the item ( must have multiple hits to avoid redirection )
4) Click the title link, note it is broken
5) Apply this patch
6) Click the title link, note it is correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no koha-qa errors.

Test
1) imported two times sample record
2) reindex
3) search, find example record, broken links
4) applied patch
5) refresh, good links

NOTE: A similar (invalid references) problem is present on
UNIMARC and NORMAC files
I'll file a new bug for those cases.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested with a different set of sample
records with Hebrew 880 fields.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10465: remove useless reference to fields 780 and 785 in UNIMARC XSLT files
Mathieu Saby [Sun, 8 Sep 2013 17:38:35 +0000 (19:38 +0200)]
Bug 10465: remove useless reference to fields 780 and 785 in UNIMARC XSLT files

UNIMARCslim2OPACDetail.xsl and UNIMARCslim2intranetDetail.xsl contained
references to 780 and 785 fields, that exist in MARC21 but not in UNIMARC.

This patch remove the code related to 780 and 785 fields. No effect should
be visible.

To test : in a UNIMARC Koha
1. Be sure that OPACXSLTDetailsDisplay, OPACXSLTResultsDisplay,
   XSLTDetailsDisplay and XSLTResultsDisplay sysprefs are set to "default"
2. Apply the patch
3. Search some records in staff interface : the list view and the detail
   view must be exacty the same as before you apply the patch.
4. search some records in OPAC : the list view and the detail view must
   be exactly the same as before you apply the patch.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No diplay change, no koha-qa errors.
Removes what can't be displayed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked detail pages in OPAC and intranet still display correctly
and without errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10847: Open link to vendor's website in new window
Katrin Fischer [Tue, 10 Sep 2013 19:18:13 +0000 (21:18 +0200)]
Bug 10847: Open link to vendor's website in new window

To test:
- Create a new vendor or edit an existing one
- Make sure you have entered a valid URL for the website
- Click the link from the vendor summary page and verify it opens
  in a new window/tab (depending on your browser configuration)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10305 - _increment_barcode is called twice
Kyle M Hall [Tue, 21 May 2013 19:58:44 +0000 (15:58 -0400)]
Bug 10305 - _increment_barcode is called twice

For some reason, _increment_barcode is called twice in succession in
cataloguing/additem.pl

Test Plan:
1) Enable autobarcode = incremental
2) Catalog an item, not the barcode
3) Apply this patch
4) Catalog another item, the barcode should be the next in line
   as previously. No change should be noted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
10 years agoBug 10651 - (follow-up) add DataTables include to admin/aqbudgets.tt
Jonathan Druart [Fri, 20 Sep 2013 08:42:47 +0000 (10:42 +0200)]
Bug 10651 - (follow-up) add DataTables include to admin/aqbudgets.tt

The aqbudgets.tt needs to use the include file too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10651 - Use new DataTables include in administration templates
Owen Leonard [Tue, 10 Sep 2013 12:25:44 +0000 (08:25 -0400)]
Bug 10651 - Use new DataTables include in administration templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
administration-related pages which use DataTables.

To test, view the following pages and confirm that table sorting is
still working correctly:

- Administration -> Budgets
- Administration -> Authority types -> MARC structure
- Administration -> Authorized values
- Administration -> Library transfer limits
- Administration -> Libraries and groups
- Administration -> Patron types and categories
- Administration -> Cities and towns
- Administration -> Item types
- Administration -> MARC bibliographic framework -> MARC structure
- Administration -> System preferences
- Administration -> System preferences -> Local use
- Administration -> Z39.50 client targets

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10868 - Use new DataTables include in catalog templates
Owen Leonard [Tue, 10 Sep 2013 16:18:32 +0000 (12:18 -0400)]
Bug 10868 - Use new DataTables include in catalog templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
catalog-related pages which use DataTables.

The checkout history script has been altered to send unformatted dates
to the template, and the template now uses the "title-string" sorting
filter to enable sorting on unformatted dates.

To test, view the following pages and confirm that table sorting is
still working correctly:

Catalog -> Biblio detail page
Catalog -> Biblio detail page -> Checkout history

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: On the issue history page:
1/ If the checkin on is empty (the item is currently checked out), the line
is sorted in last.
2/ The Renewed column is not sorted by date.
Before this patch, the sort was worse.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7813: (follow-up) use descriptive text for delete link
Galen Charlton [Sat, 21 Sep 2013 19:16:56 +0000 (19:16 +0000)]
Bug 7813: (follow-up) use descriptive text for delete link

This patch replaces the "times" symbol for the local cover image
deletion link with more descriptive text.  This was done because
the original "X" was small, is not necessarily going to be universally
understood to signify the deletion action, and because "&times;"
does not give much context to translators.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7813: (follow-up) improvements for deleting local cover images
Jonathan Druart [Fri, 20 Sep 2013 11:06:48 +0000 (13:06 +0200)]
Bug 7813: (follow-up) improvements for deleting local cover images

This patch:
- displays a js alert if a problem occurred on deleting the
  image on the server.
- adds a class for the new span (in order to avoid future problem, if
  someone adds a new span).
- adds a title for the [X] link.
- deal with the upload_local_cover_images permission (don't display the
  delete link if the logged in user does not have it).
- changes the license version.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I like the ehancements to the original patch and work as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7813: Ability to delete local cover images
Tomas Cohen Arazi [Fri, 30 Aug 2013 19:43:30 +0000 (16:43 -0300)]
Bug 7813: Ability to delete local cover images

This patch adds the ability to delete local cover images from the
detail page. It adds an 'X' button to trigger the deletion. It occurs
using a new SVC script called cover_images that accepts the following
parameters:

 - action
 - biblionumber (used for checking imagenumber validity)
 - imagenumber (repeatable)

It then deletes all valid images passed and returns a JSON object
containing the imagenumbers and the deletion status (1/0). The operation
is triggered using jQuery.ajax, and with the response the corresponding
images get deleted.

Note: currently one image is deleted at a time, but the code is there to
be used.

To test:
- Open the detail page fr a biblionumber containing one or more cover
  images, go to its images tab.
- Apply the patch, reload the page, go to the images tab.
- Thumbnails should look better than before ;-)
- An 'X' button should show below each cover.
- Clicking the 'X' button should trigger an alert message asking for
  confirmation.
 a) Cancel: nothing happens, reload the page and check nothing got
    deleted.
 b) Accept: the deleted image should be gone, reload the page to check
    it doesn't exist anymore and is not a browser/DOM manipulation trick.
- Signoff

Note: check having more cover images than those that fit the width and
see it wraps fine.

P.S. I chose not to implement every possible action on the svc script, but
another bug could be filled for more improvements.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10888: Don't hide authorities module from users who lack permission to edit autho...
Owen Leonard [Fri, 13 Sep 2013 18:45:50 +0000 (14:45 -0400)]
Bug 10888: Don't hide authorities module from users who lack permission to edit authorities

It should be possible for staff client users to search and view
authority records even if they don't have permission to edit them.

To test, apply the patch and view the staff client as a user with and
without "editauthorities" permission.

With "editauthorities" permission, authority search results should show
both an edit and delete link. Viewing the details of an authority
record, one should see a toolbar with edit/delete/new options.

The detail view has been altered to use the term "record" in place of
"biblio" ("Used in X record(s)).

Without "editauthorities" permission, authority search results should
show no edit or delete link. Viewing the details of an authority, the
only option shown in the toolbar should be "Save."

On the staff client home page and in the header's "More" menu the link
to the authorities module should now appear with and without permission
to edit authorities.

This patch also corrects the permissions in the authority export script
to allow saving of authority records by users who do not have permission
to edit.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10622: (follow-up) uppercase "SIP" in documentation and help text
Galen Charlton [Sat, 21 Sep 2013 17:47:54 +0000 (17:47 +0000)]
Bug 10622: (follow-up) uppercase "SIP" in documentation and help text

"SIP" is an acronym and should be capitalized.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10622 - [SIGNED OFF] Followup: Add --sip, --nosip and --help to man page
Magnus Enger [Fri, 9 Aug 2013 08:05:23 +0000 (10:05 +0200)]
Bug 10622 - [SIGNED OFF] Followup: Add --sip, --nosip and --help to man page

The original patch for bug 10622 added the --sip, --nosip and
--help switches to the koha-list command, but did not update the
manpage for the command. This patch does.

To test:

Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-list.xml
$ man -l koha-list.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Forgot the docs this time, good catch Magnus

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10622: add --sip and --nosip switches to koha-list
Tomas Cohen Arazi [Mon, 22 Jul 2013 14:30:27 +0000 (11:30 -0300)]
Bug 10622: add --sip and --nosip switches to koha-list

Just added those switches.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I applied the patch on my local dev install, and then copied the
patched koha-list script to a couple of servers with actual
instances running off the packages, to test the script.
- It seems that the -h switch did not work before this patch, now
  both -h and --help works nicely
- --sip and --nosip work as expected, also in combination with
  --email and --noemail

The patch does not add --sip and --nosip to the man page for
koha-list, but I will do a followup for that.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10617 - koha-common init script cleanup
Tomas Cohen Arazi [Fri, 19 Jul 2013 20:51:30 +0000 (17:51 -0300)]
Bug 10617 - koha-common init script cleanup

Removed unused stuff, added a new config file /etc/default/koha-common
to control the init script behaviour. Currently is only a stub. The config
file could be put on /etc/sysconfig on RedHat and friends. The init script
should work them too. Added a TODO comment regarding the 'status' switch.

To test:
- Apply the patch on master, build your own packages and install.
- The init script should continue to work as expected.
(it can be tested replacing the /etc/init.d/koha-common file with
debian/koha-common.init on a packages install).
- The absence of the /etc/default/koha-common file should not prevent
the init script from working.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10871: Make confirmation message for deleting news translatable
Katrin Fischer [Tue, 10 Sep 2013 19:10:28 +0000 (21:10 +0200)]
Bug 10871: Make confirmation message for deleting news translatable

To test:
- Create a news entry in tools > news
- Delete the news entry or multiple entries by selecting them
  using the checkboxes to the left and the delete button at the
  bottom of the page.

Verify confirmation message shows up correctly with patch applied.

Bonus:
- Update one of the po files and make sure the new strings shows up
  there.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10915: (QA followup) warn if cannot read history.txt
Tomas Cohen Arazi [Thu, 19 Sep 2013 15:40:03 +0000 (12:40 -0300)]
Bug 10915: (QA followup) warn if cannot read history.txt

This patch makes about.pl test if success opening history.txt, and
shows a convenient warning to the end user. No more warnings in the logs
(about.pl: readline() on closed filehandle $file at /usr/share/koha/intranet/cgi-bin/about.pl line 166)
and better problem solving information for the end user.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10915: fix About->timeline breakage on incompletely upgraded Koha
Mason James [Thu, 19 Sep 2013 12:06:20 +0000 (00:06 +1200)]
Bug 10915: fix About->timeline breakage on incompletely upgraded Koha

This patch supplies a default value for the koha-conf.xml
setting docdir to handle the case where the user neglects
to set it upon upgrade.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixes dev and standard installs without docdic tag in koha-conf.xml.
Doesn't break when docdir present either. Warning still present
on packages install that didn't add the docdir definition in koha-conf.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10894: Add ID to main address in member entry form
David Roberts [Mon, 16 Sep 2013 15:51:33 +0000 (16:51 +0100)]
Bug 10894: Add ID to main address in member entry form

Add an ID to ease customization via jQuery; an ID is already present
on alt address but was missing from main address

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10601: (follow-up) improvements to ->set() and ->get()
Galen Charlton [Wed, 18 Sep 2013 17:23:44 +0000 (17:23 +0000)]
Bug 10601: (follow-up) improvements to ->set() and ->get()

This patch improves the POD for C4::BackgroundJob->get().  It also
fixes ->set() so that it cannot scribble over values that are properly
internal to the object.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10601: (follow-up) unit tests for new ->set() and ->get()
Galen Charlton [Wed, 18 Sep 2013 17:21:47 +0000 (17:21 +0000)]
Bug 10601: (follow-up) unit tests for new ->set() and ->get()

This adds unit test for the new methods in C4::BackgroundJob.  One
of the tests verfies that setting extra values does not scribble over
data that is mean to be internal to the C4::BackgroundJob object.

To test:

Verify that prove -v t/db_dependent/BackgroundJob.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>