]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 11431: (QA followup) Typo in help file / variable name
Katrin Fischer [Sat, 24 Oct 2015 10:01:52 +0000 (12:01 +0200)]
Bug 11431: (QA followup) Typo in help file / variable name

Fixes the variable name to avoid a double-up that made it
impossible to turn off the sounds in general. If AudioAlerts
are turned off, they will only work on the audio administration
page now so you can set up and test the different sounds there.

Also fixes a little typo in the help file.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11431: (QA followup) Add ability to edit audio alerts
Kyle M Hall [Fri, 23 Oct 2015 11:55:18 +0000 (07:55 -0400)]
Bug 11431: (QA followup) Add ability to edit audio alerts

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Update help
Kyle M Hall [Fri, 23 Oct 2015 12:15:45 +0000 (08:15 -0400)]
Bug 11431: (QA followup) Update help

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Always allow audio alerts for audio alerts editor page
Kyle M Hall [Fri, 23 Oct 2015 11:05:23 +0000 (07:05 -0400)]
Bug 11431: (QA followup) Always allow audio alerts for audio alerts editor page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Fix alter precedences on delete
Kyle M Hall [Fri, 18 Sep 2015 10:36:10 +0000 (06:36 -0400)]
Bug 11431: (QA followup) Fix alter precedences on delete

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Hard code list of sounds for security
Kyle M Hall [Thu, 17 Sep 2015 15:04:09 +0000 (11:04 -0400)]
Bug 11431: (QA followup) Hard code list of sounds for security

The sounds directory is no longer available for listing for security.
It is better and safer to hard code the list of sounds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Move AudioAlerts to a separate plugin
Kyle M Hall [Thu, 17 Sep 2015 14:48:24 +0000 (10:48 -0400)]
Bug 11431: (QA followup) Move AudioAlerts to a separate plugin

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Simplify audio_alert_id to just id
Kyle M Hall [Wed, 19 Aug 2015 11:57:17 +0000 (07:57 -0400)]
Bug 11431: (QA followup) Simplify audio_alert_id to just id

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Unit Tests
Kyle M Hall [Wed, 19 Aug 2015 11:55:31 +0000 (07:55 -0400)]
Bug 11431: (QA followup) Unit Tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Fix js error
Kyle M Hall [Tue, 18 Aug 2015 18:23:12 +0000 (14:23 -0400)]
Bug 11431: (QA followup) Fix js error

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: Update UsageStats.pm
Kyle M Hall [Tue, 30 Jun 2015 11:12:36 +0000 (07:12 -0400)]
Bug 11431: Update UsageStats.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Fix POD
Kyle M Hall [Mon, 27 Apr 2015 11:53:25 +0000 (07:53 -0400)]
Bug 11431: (QA followup) Fix POD

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: (QA followup) Allow https in sound URLs
Kyle M Hall [Mon, 27 Apr 2015 11:49:50 +0000 (07:49 -0400)]
Bug 11431: (QA followup) Allow https in sound URLs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: Add additional sound options
Kyle M Hall [Mon, 22 Dec 2014 10:58:48 +0000 (05:58 -0500)]
Bug 11431: Add additional sound options

This patch set replaces and extends Koha's current sound options.
This is implemented be removing the existing sound system, and
re-engineering using a table of selector/sound combinations such that
the highest precedence selector that is found in the DOM will trigger
and audio alert. The existing audio behaviors are implemented as a set
of default audio alerts.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Enable the AudioAlerts system preference
4) Test existing sounds
5) Enter the new alerts editor in the admin section
6) Add a new audo alert with the following selector:
    "body:contains('Check in message')",
   choose any sound alert you wish, make sure it's not one of the 3
   sounds already used! Make this selector precedence 1
4) Browse to the checkins page, you should hear the default sound
5) Attempt to return an invalid barcode, you should hear your custom sound!

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: DBIC update schema
Kyle M Hall [Mon, 22 Dec 2014 10:58:09 +0000 (05:58 -0500)]
Bug 11431: DBIC update schema

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: Add audio alerts to installer
Kyle M Hall [Mon, 22 Dec 2014 10:57:21 +0000 (05:57 -0500)]
Bug 11431: Add audio alerts to installer

http://bugs.koha-community.org/show_bug.cgi?id=11431
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 11431: Update database
Kyle M Hall [Mon, 22 Dec 2014 10:56:33 +0000 (05:56 -0500)]
Bug 11431: Update database

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t
Kyle M Hall [Wed, 4 Nov 2015 14:34:11 +0000 (09:34 -0500)]
Bug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15081: (followup) Make test files using TestBuilder handle their transactions
Tomas Cohen Arazi [Sun, 1 Nov 2015 19:39:37 +0000 (16:39 -0300)]
Bug 15081: (followup) Make test files using TestBuilder handle their transactions

This trivial patch introduces the code needed on the test files so they handle
the DB transaction instead of relying on the (removed) transaction started/rolled back
by TestBuilder.

Tested all of the files before and after applying the patch, resultes are the same.
(Pass exept of t/db_dependent/Barcodes_ValueBuilder.t, this has the same error).
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15081: Take transaction handling out from TestBuilder
Tomas Cohen Arazi [Sat, 31 Oct 2015 15:29:09 +0000 (12:29 -0300)]
Bug 15081: Take transaction handling out from TestBuilder

This patch removes transaction handling code from TestBuilder.
It fixes the TestBuilder.t to handle the transaction on its own.

Verify that t/db_dependent/TestBuilder.t passes.

Followed test plan, TestBuilder.t passes
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14978: (RM followup) DBIx update
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:09:06 +0000 (12:09 -0300)]
Bug 14978: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14805: Replace generic 'items' with the specific ones
Jonathan Druart [Mon, 21 Sep 2015 14:56:49 +0000 (15:56 +0100)]
Bug 14805: Replace generic 'items' with the specific ones

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14805: (follow-up) fix a bug in previous code and change msg string
Joonas Kylmälä [Thu, 17 Sep 2015 11:35:32 +0000 (11:35 +0000)]
Bug 14805: (follow-up) fix a bug in previous code and change msg string

Previously the code didn't work if there was only one batch available for selection.
This fixes that now. Also there was a bug with wrong string showing now it's
changed to a general one, "items". I choosed the string "items" because there was
difficulties adding the plural part of the word. One cannot add just s to the end
of the word batch like you can in the case of profile.

Sponsored-by: Vaara-kirjastot
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14805: QA follow-up
Jonathan Druart [Thu, 17 Sep 2015 08:40:46 +0000 (09:40 +0100)]
Bug 14805: QA follow-up

This patches remove a trailing whitespace and simplify 2 parts of code.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14805: Allow the user to delete multiple batches
Joonas Kylmälä [Fri, 11 Sep 2015 13:55:07 +0000 (13:55 +0000)]
Bug 14805: Allow the user to delete multiple batches

Allows the user to delete multiple patron card batches.

Test plan:

1. Add first some 20 batches
2. Go to the edit page of some X batch by first selecting from the
   batch list the batch you want to edit and then after that by clicking
   edit.
3. Delete one batch by selecting one batch and then clicking delete.
4. Select 0 batches and click delete, notice you cannot delete.
5. Select 0 batches and click edit, notice you cannot edit.
6. Select 2 batches and click edit, notice you cannot edit.
7. Apply patch
8. Check that steps from 2-6 work like they worked before.
   (and add more batches so that you have ~20 of them)
9. Select 2 batches and click delete. Make sure they are deleted.
10. Try to figure out some anomalies this patch might have caused.

Sponsored-by: Vaara-kirjastot
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8438: Users can only claim for serials related to their branch.
Jonathan Druart [Thu, 23 Aug 2012 11:53:21 +0000 (13:53 +0200)]
Bug 8438: Users can only claim for serials related to their branch.

Only superlibrarian users and users with superserials permission
can override this limitation.

This patch adds a new subroutine C4::Serials::can_claim_subscription.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
The upgrading of the DB was as required:
for each [PT/S] patron with the permission "claim_serials" ON,
the permission "superserials" became[/was kept to] ON.

Then, after having checked the DB upgrading, to test the currently
adding limitation:
> Users can only claim for serials related to their branch
, I reset 2 PT/S patrons-users to:
permission claim_serials: YES
permission superserials: NO
and I set the syspref "IndependendeBranches" to "Prevent".

For:
> Only superlibrarian users can override this limitation.
the S patron-user could list AND claim:
A) subscriptions of his own branch,
B) subscriptions of other branch,
C) subscriptions without branch.

For:
> Only users with superserials permission can override this limitation.
the PT patron-user could list:
A) subscriptions of his own branch,
B) subscriptions of other branch,
C) subscriptions without branch,
and could claim only:
A) subscriptions of his own branch,
C) subscriptions without branch.

NB: a subscription is selected to be claimed.

Then I set the syspref "IndependendeBranches" to "Don't prevent".
The behaviour was [exactly the same as in master] without the added
limitation.

On [S/PT] patrons, if permission claim_serials was NO, no Claims
link was available on Serials' page, either under "Prevent" or under
"Don't prevent".

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added the results of Paola's testing to the commit message
as test plan.

Note to RM: Maybe we could add a note to the release notes, that
Koha now enforces superserials with independent branches better,
so people might have to adapt permissions in order to claim
for other branches.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8436: QA Follow-up: Add Library to result list
Katrin Fischer [Tue, 20 Oct 2015 14:46:15 +0000 (16:46 +0200)]
Bug 8436: QA Follow-up: Add Library to result list

If we offer a library filter, we should also show the
library in the result list, so that search options
and result list match.

Otherwise, for libraries with multiple branches, there
is no way to see, which is the subscription of a
specific branch in the list.

- Add a Library column in the result list
- Rename branch to library in the template

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off
Katrin Fischer [Tue, 20 Oct 2015 14:36:06 +0000 (16:36 +0200)]
Bug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off

The superserials permission is only in use in combination with
IndependentBranches - so it makes sense to also show the branch
filter when IndependentBranches is off.

Permission description:
 superserials Manage subscriptions from any branch
 (only applies when IndependentBranches is used)

Also adds a missing check for superlibraian.

Note: the duplicated permission check in the code is not really nice
- would be good to rewrite this to be more clean.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8436: Use C4::Context->IsSuperLibrarian()
Julian Maurice [Tue, 25 Aug 2015 11:15:41 +0000 (13:15 +0200)]
Bug 8436: Use C4::Context->IsSuperLibrarian()

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8436: Replace GetBranches with GetBranchesLoop
Jonathan Druart [Fri, 20 Feb 2015 09:57:52 +0000 (10:57 +0100)]
Bug 8436: Replace GetBranches with GetBranchesLoop

The branch selection logic still exists in GetBranchesLoop, it should be
used here.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8436: Add limit on branch in checkexpiration.pl
Julian Maurice [Wed, 22 Aug 2012 12:35:37 +0000 (14:35 +0200)]
Bug 8436: Add limit on branch in checkexpiration.pl

This limit is only available for superlibrarians and patrons that have
superserials permission. Other patrons will only see subscriptions of
their branch.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11678: QA follow-up - Fixing some typos in the documentation
Katrin Fischer [Sat, 24 Oct 2015 22:21:59 +0000 (00:21 +0200)]
Bug 11678: QA follow-up - Fixing some typos in the documentation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11678: Improve documentation of new parameter
Julian Maurice [Mon, 19 Oct 2015 08:49:32 +0000 (10:49 +0200)]
Bug 11678: Improve documentation of new parameter

Say --email is repeatable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11678: Gather print notices: add --email parameter
Jonathan Druart [Thu, 23 Jan 2014 12:12:30 +0000 (13:12 +0100)]
Bug 11678: Gather print notices: add --email parameter

This patch add the ability to send generated files by email.

You can specify several emails.

Test plan:
- same as Bug 11603
- call the script misc/cronjobs/gather_print_notices.pl with the
  following parameters:

perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv --ods --html
--letter_code=CHECKIN -d=: --email="email_one@example.org"
--email="email_two@example.org"

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  - Works as desribed. Rebased upon bug-11603.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15059: Line break in html attribute in branchoverdues.tt
Fridolin Somers [Mon, 26 Oct 2015 07:44:17 +0000 (08:44 +0100)]
Bug 15059: Line break in html attribute in branchoverdues.tt

In circ/branchoverdues.tt, there is a line break inside href attribute.
This generates an attribute with a lot of spaces %20.

Test plan :
- at intranet go to ciculation module
- click on "Overdues with fines"
- look at links "Phone", "Notice" and "Considered lost"
=> Without patch the URL contains a lot of spaces
=> With patch the URL is correct

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15035: Anti-spam for opac-suggestions - FOLLOW-UP
Mason James [Wed, 16 Sep 2015 01:56:23 +0000 (13:56 +1200)]
Bug 15035: Anti-spam for opac-suggestions - FOLLOW-UP

to test this patch...

1/ enable 'suggestion' and 'AnonSuggestions' sysprefs

2/ edit the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt file,
    to reveal the hidden 'negcap' field

   replace line 87 opac-suggestions.tt, from...
     <li id="negcap" style="position: absolute; left: -2000px;">
   to ...
     <li id="negcap">

3/ attempt to add another suggestion, and populate the 'negcap' field
   adding the suggestion is supposed to fail, but actually succeeds!?  :/

4/ apply patch

5/ repeat step 3, suggestion attempt should fail as expected

modified:   opac-suggestions.pl

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed insertion with negcap before patch.
With negcap value suggestion fails silently
Without negcap suggestion is inserted
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15061: Can't add item to rotating collection
Bernardo Gonzalez Kriegel [Tue, 3 Nov 2015 15:16:08 +0000 (12:16 -0300)]
Bug 15061: Can't add item to rotating collection

This patch prevents adding items to invalid (empty)
rotating collection id

To test:
1) Go to /cgi-bin/koha/rotating_collections/addItems.pl
2) Try to add an item, you get error show in attached pictures
3) Apply the patch
4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl
5) Can't add any items

I don't know if this is a real problem

Followed test plan, 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 15068: Get rid of warnings in members/summary-print.pl
Marc Véron [Tue, 27 Oct 2015 11:38:32 +0000 (12:38 +0100)]
Bug 15068: Get rid of warnings in members/summary-print.pl

This patch removes warnings when printing a summary from a member's
detail page, like:

- use of uninitialized value in sprintf
  at /usr/share/kohaclone/members/summary-print.pl line 47

- Use of uninitialized value $roadtype in concatenation (.) or string
  at /usr/share/kohaclone/members/summary-print.pl line 61

- Use of uninitialized value in addition (+)
  at /usr/share/kohaclone/members/summary-print.pl line 87

- Argument "2015-11-03 23:59:00" isn't numeric in numeric comparison
  (<=>) at /usr/share/kohaclone/members/summary-print.pl line 103

To test:
- Apply patch
- Go to a detail page with a member who has a lot of fines
- Print summary
- Verify that warnings like the ones above do no longer appear.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Have been able to see those warnings in Apache log file, and notice
  their disappearance after applying this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14821: Do not list not returned items
Jonathan Druart [Tue, 15 Sep 2015 07:24:07 +0000 (08:24 +0100)]
Bug 14821: Do not list not returned items

On the checkin page, the table is always filled with info of the scanned
barcode, even if the checkin has failed.
When the checkin fails, there is already an error displayed, so there is
no need to keep a row for fails.

Test plan:
Confirm that the failed checkins don't appear anymore in the checkin
table.
- checkin an item which is not issued;
- BlockReturnOfWithdrawnItems is set and item is withdrawn;
- Not returned at the right place;
- privacy=2 and AnonymousPatron not correctly set;

Before this patch this behavior existed only for bad barcode.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm that the checkin table hasn't to be populated with info on items
  which haven't been checked in.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14978: (obsessive followup) fix upgrade text
Tomas Cohen Arazi [Tue, 3 Nov 2015 14:07:22 +0000 (11:07 -0300)]
Bug 14978: (obsessive followup) fix upgrade text

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14978: DBRev 3.21.00.048
Tomas Cohen Arazi [Mon, 2 Nov 2015 16:00:37 +0000 (13:00 -0300)]
Bug 14978: DBRev 3.21.00.048

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14978: Add unique key constraint on issues.itemnumber
Jonathan Druart [Thu, 8 Oct 2015 08:15:57 +0000 (09:15 +0100)]
Bug 14978: Add unique key constraint on issues.itemnumber

The constraint might have existed before bug 14069.
For these DB, this patch will restore it, for others, it will add it :)

Test plan:
> show create table issues;
should not return "unique key itemnumber"
Execute the updatedb entry twice
> show create table issues;
should return only one "unique key itemnumber"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14589: Adjust authorities_merge_ajax and replace some indirect syntax
Marcel de Rooy [Wed, 22 Jul 2015 12:41:42 +0000 (14:41 +0200)]
Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax

This patch does the following:
[1] Adjust authorities_merge_ajax just as in bug 14588.
[2] Replace some indirect syntax for fetch GGI::Cookie.
[3] Along the way replace some new CGI's. Note that I am not aiming to
    replace them Koha wide. The "fetch class" variant is less readable.

NOTE: The changes to tools/upload-file.pl and upload-file-progress.pl
are moved to report 14321.

Test plan:
[1] Run the URL authorities/merge_ajax.pl in staff.
[2] Upload a file with Stage MARC records for import.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
[1] It runs, but also before patch
[2] File uploads without problem
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We could certainly remove 1 or 2 call to CGI->new in tools/background-job-progress.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10904: DBRev 3.21.00.047
Tomas Cohen Arazi [Mon, 2 Nov 2015 15:39:52 +0000 (12:39 -0300)]
Bug 10904: DBRev 3.21.00.047

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10904: (QA followup) Use branch limit if either IndependentBranches or Independen...
Kyle M Hall [Thu, 17 Apr 2014 14:18:26 +0000 (10:18 -0400)]
Bug 10904: (QA followup) Use branch limit if either IndependentBranches or IndependentBranchesPatronModifications is enabled

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

Behaviour now is:
IndependentBranches = Prevent
or
IndependentBranches = Don't prevent,
IndependentBranchesPatronModifications = Prevent:
You will always only see the modification requests of your branch's patrons.

IndependentBrnaches = Don't prevent,
IndependentBranchesPatronModifications = Don't prevent
All modification requests are shown.

Link to patron record works and cardnumber is shown.

IndependentBranches = OFF - use the new preference.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10904: (QA followup) would like to limit patron update request management by...
Kyle M Hall [Fri, 22 Nov 2013 18:50:38 +0000 (13:50 -0500)]
Bug 10904: (QA followup) would like to limit patron update request management by branch

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 10904: Limit patron update request management by branch
Kyle M Hall [Thu, 10 Oct 2013 14:46:17 +0000 (10:46 -0400)]
Bug 10904: Limit patron update request management by branch

By not limiting the patron modification lists by branch, it can quickly
become overwhelming for a librarian. This patch makes the following
modifications:

* Only superlibrians will see the full list of borrowers with pending
  modifications.
* Adds the patron cardnumber after the patrons name on the modification
  list.
* Adds a link to the patron's record from the modification list.

Test Plan:
1) Apply this patch
2) Set up some pending modifications for two branches
3) Log in to the staff intranet as one of those branches
4) You should note the number of pending modifications counts
   only your logged in branch's patrons
5) Click the link, you should only see your logged in branches
   patrons in the pending modifications list.
6) You should note the cardnumber is displayed next to the patron name
7) You should note the "View record" link below each patron's name

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14198: RDA: Indexing 264 field (Zebra)
Hector Eduardo Castro Avalos [Mon, 1 Jun 2015 02:54:58 +0000 (20:54 -0600)]
Bug 14198: RDA: Indexing 264 field (Zebra)

This patch add zebra indexes to RDA 264 field.
The new Provider index is added too.
QA comments corrected.

To test:
1) Download RDA records with 264 fields from this attachment <http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36825>. Import the file and re-index/rebuild zebra. These records contain 260 and 264 fields per record.
2) Do a search with pb:Bethany two records will appear with title The guardian. Search with pl:Minneapolis too, the two records will appear.
3) Select one record of both records and delete the 260 field keeping the 264 field and save, rebuild your zebra.
4) Search again with pb:Bethany and just one record will appear. Thats mean 264 is not indexed.
5) Apply patches.
6) Rebuild your zebra but this time all biblio records.
7) Search again with pv:Bethany or Provider:Bethany, this time will appear the two records, 264 is indexed. Note that if you search again with pb only one record appear. This is because the suggestion of LOC.
10) Search with copydate:2013 only launch records with 260 fields and pv:2013 show both fields, i.e., 260 and 264.
11) Apply QA Test Tools

Sponsored-by: Universidad de El Salvador
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14773: Move help link back out of the dropdown menu
Joonas Kylmälä [Tue, 8 Sep 2015 10:23:37 +0000 (10:23 +0000)]
Bug 14773: Move help link back out of the dropdown menu

This moves the help link back out of the dropdown menu
like it used to be.

To test:

1. Notice that in intra the help link is inside the dropdown
   menu.
2. Apply the patch
3. Notice that the help link is now clearly visible in the
   top right corner of the page.

Sponsored-by: Vaara-kirjastot
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 15073: Move FeeOnChangePatronCategory
Nicole C. Engard [Wed, 28 Oct 2015 14:30:06 +0000 (09:30 -0500)]
Bug 15073: Move FeeOnChangePatronCategory

This patch moves the FeeOnChangePatronCategory system
preference so that it's in a more logical place. Also
a few typos were fixed.

To test:

* Go to System Preferences
* Go to Patrons
* Find FeeOnChangePatronCategory and confirm

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed. No errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15090: Fix date filter for Suggestions management
Marc Véron [Fri, 30 Oct 2015 14:23:30 +0000 (15:23 +0100)]
Bug 15090: Fix date filter for Suggestions management

Home > Acquisitions > Suggestions management:
Before 13813 the "from" date in filters was 0000-00-00 if not
filled, afer 13813 it's today.

This patch re-introduces 0000-00-00.

See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13813#c172

To test:
- Go to Home > Acquisitions > Suggestions management
- Verify that date filters work as expected
- Verify that start dates in sql query are 0000-00-00 if no start
  dates are given
- Note: Line 185 outputs the start dates as warn if $debug is set.

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 10799: Limit the SCO user to the SCO module
Jonathan Druart [Wed, 2 Sep 2015 16:13:41 +0000 (17:13 +0100)]
Bug 10799: Limit the SCO user to the SCO module

The SCO user should only be allowed to access to the SCO module.

This patch make the session ends if the user tries to access another
page after the SCO module.

Test plan:
0/ Configure the SCO module correctly
1/ Go on the sco main page (sco/sco-main.pl)
2/ Try to go somewhere else: you should not be logged in

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15087: hardduedate should not be inserted as 0000-00-00 but NULL
Jonathan Druart [Fri, 30 Oct 2015 11:49:40 +0000 (11:49 +0000)]
Bug 15087: hardduedate should not be inserted as 0000-00-00 but NULL

This has been introduced by bug 14949, recently pushed.
So I don't think we need to update the DB, only devs will face this
problem.

The hardduedate was inserted as 0000-00-00 because was en empty string.
To be inserted as NULL, the value should be undef.

Test plan:
0/ Don't apply this patch
1/ Edit a circ rules and don't fill the hard due date
2/ Look at the DB, the value is 0000-00-00
3/ Apply this patch and confirm that the value is now NULL

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed
+--------------+----------+-------------+
| categorycode | itemtype | hardduedate |
+--------------+----------+-------------+
| *            | *        | NULL        |
+--------------+----------+-------------+

No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15094: Update link to Windows Offline Circ
Nicole C. Engard [Fri, 30 Oct 2015 20:28:09 +0000 (15:28 -0500)]
Bug 15094: Update link to Windows Offline Circ

This patch updates the link on the main circulation
page to point to the newest release of the offline
circulation tool.

To test:

* Go to Circulation
* Click 'Get desktop application'
* Confirm the link goes to github

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Link Ok
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14333: followup 2 - split line to ease translation
Bernardo Gonzalez Kriegel [Mon, 26 Oct 2015 12:22:02 +0000 (09:22 -0300)]
Bug 14333: followup 2 - split line to ease translation

This patch only put in its own line inserted values.
This is necessary in order to translate this files.

To test:
1) Just check that files load normally.

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

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14333: followup - Fix labels
Bernardo Gonzalez Kriegel [Thu, 22 Oct 2015 17:02:27 +0000 (14:02 -0300)]
Bug 14333: followup - Fix labels

This patch fixes same labels on bibliographic and
authority frameworks, and one typo.

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check fixed labels

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14333: Update MARC21 frameworks to Update No. 20 and 21
Bernardo Gonzalez Kriegel [Thu, 22 Oct 2015 15:34:47 +0000 (12:34 -0300)]
Bug 14333: Update MARC21 frameworks to Update No. 20 and 21

Default frameworks updated to update 20 (April 2015) and
21 (September 2015)

Update No. 20
Bibliographic
New field 884
New subfields 037$3, 037$5 and 382$e

Authority
New field 884
New subfields 046$q, 046$r and 382$e

Update No. 21
Bibliographic
New tag 348
New subfields 336$0, 337$0 and 338$0

Authority
New field 348
New sufields 336$0 and 670$w

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15093: Load/show saved item type group and hideinopac
Bernardo Gonzalez Kriegel [Fri, 30 Oct 2015 19:25:15 +0000 (16:25 -0300)]
Bug 15093: Load/show saved item type group and hideinopac

This patch adds loading of hideinopac and searchgroup
when showing/editing itemtypes

To test:
1) Put some values in ITEMTYPCAT auth value
2) Edit an item type, select a value for
search category & check 'Hide in OPAC'
Save
3) Results do no show on list of item types
4) Edit same item type, values are default/empty
5) Apply the patch
6) Edit again, change again, save
Now values shows in list
7) Edit again, values are now correct

Values were saved on db, but not loaded from it
How this happen?

Side note: searching for searchcategory I found

installer/data/mysql/kohastructure.sql:  searchcategory varchar(80) default NULL, -- Group this item type with others w
installer/data/mysql/updatedatabase.pl:            ADD searchcategory VARCHAR(20) DEFAULT NULL

Its varchar(80) in kohastructure and varchar(20) in updatedatabase

We need more eyes :)

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>
9 years agoBug 15063: Update MARC21 es-ES frameworks to Update 21 (September 2015)
Bernardo Gonzalez Kriegel [Mon, 26 Oct 2015 13:11:12 +0000 (10:11 -0300)]
Bug 15063: Update MARC21 es-ES frameworks to Update 21 (September 2015)

This patch put in sync es-ES marc21 fields/subfields with
english ones.

To test:
1) Apply the patch
2) Remove all bib/auth frameworks
3) Load all files, check they load without errors

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15092: item type descriptions not showing in OPAC advsearch
Bernardo Gonzalez Kriegel [Sat, 31 Oct 2015 14:03:55 +0000 (11:03 -0300)]
Bug 15092: item type descriptions not showing in OPAC advsearch

Go to OPAC > Advanced Search
Tab 'Item type' only shows itemtype icons,
no descriptions. Descriptions must be shown
always

To test:
1) Go to OPAC > Advanced search
2) Check no descriptions for item types
Also check that, reloading the page, item types
shows in random order
3) Apply the patch
4) Check there are descriptions now
and order is by description

Followed test plan, 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>
9 years agoBug 10937: (QA followup) updatedatabase.pl vs. kohastructure.sql field size missmatch
Tomas Cohen Arazi [Sat, 31 Oct 2015 13:22:25 +0000 (10:22 -0300)]
Bug 10937: (QA followup) updatedatabase.pl vs. kohastructure.sql field size missmatch

The bug included a discussion about this field size. And it got corrected in
kohastructure.sql to match the authorized values, but the updatedabase.pl entry
was missed on hte fix.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15010: Import patron tool creates 'duplicate' restrictions ( debarments )
Kyle M Hall [Wed, 14 Oct 2015 12:48:30 +0000 (08:48 -0400)]
Bug 15010: Import patron tool creates 'duplicate' restrictions ( debarments )

If a patron has restrictions and a CSV file of patrons to be overwritten
is uploaded but has no debarred / debarredcomment columns, the a new
restriction will be added that combines all the existing restrictions (
i.e. a new debarment based on the existing borrowers.debarred
and borrowers.debarredcomment fields ).

Test Plan:
1) Create a patron with one or more restrictions
2) Import a CSV file that updates that patron, but with no debarred columns
3) Note a new restrictions is created
4) Delete the new restriction
5) Apply this patch
6) Re-import the CSV file again
7) Note that no new restriction is created
8) Add debarred and debarredcomment columns to the CSV file with a test
   date and description
9) Re-import the CSV file again
10) Note the new restriction is added to the patron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Grobani <dgrobani@samuelmerritt.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15077: Fix Fast Add framework to pass test
Bernardo Gonzalez Kriegel [Thu, 29 Oct 2015 11:44:54 +0000 (08:44 -0300)]
Bug 15077: Fix Fast Add framework to pass test

This patch fixes tab location for FA frameworks.
Not all subfields belongs to tab 0.

To test:
1) On current master, with default and fasadd fw loaded,
go to Home > Administration > MARC bibliographic framework test
it fails

2) Apply the patch
3) Delete all fw, reload all, or just default (bib & auth) and
fast add
4) Repeat 1, now test must pass

This is only on master, so no need to database update.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. MARC bibliographic framework test passed Ok.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15072: (followup) fix spaces and consistency
Bernardo Gonzalez Kriegel [Thu, 29 Oct 2015 16:48:20 +0000 (13:48 -0300)]
Bug 15072: (followup) fix spaces and consistency

This patch add a few spaces when required and
adds layout_id on title and breadcrumbs (for patroncards)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15072: (followup) Use 'New' on Patron card creator too
Tomas Cohen Arazi [Tue, 27 Oct 2015 18:22:09 +0000 (15:22 -0300)]
Bug 15072: (followup) Use 'New' on Patron card creator too

This patch makes the change on the patron cards creator tool too.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All patches without errors.
More consistent view.
A few spaces and a little fix in followup

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15072: (followup) We use 'New' instead of 'Create' on the UI
Tomas Cohen Arazi [Tue, 27 Oct 2015 18:20:19 +0000 (15:20 -0300)]
Bug 15072: (followup) We use 'New' instead of 'Create' on the UI

This patch makes the UI show 'New' instead of 'Create' so it matches
the buttons, and the common practice on the UI.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15072: Breadcrumbs and titles inconsistent in Label creator
Tomas Cohen Arazi [Tue, 27 Oct 2015 18:15:16 +0000 (15:15 -0300)]
Bug 15072: Breadcrumbs and titles inconsistent in Label creator

This patch makes the page title and breadcrumbs more consistent.
It does so by removing some text (Manage...) and using Edit (id) and Create
on building both the breadcrumbs and titles.

To test:
- Traverse all the Label creator options
=> FAIL: the texts are not consistent and don't match what we use in the patron card creator.
- Apply the patch
=> SUCCESS: Terminology is consistent, titles and breadcrumbs show the same information
- Sign off :-D

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data
Bernardo Gonzalez Kriegel [Mon, 26 Oct 2015 15:01:51 +0000 (12:01 -0300)]
Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data

Fixes other sample creators data

To test:
1 ) Apply the patch
2) Remove sample creator date
delete from creator_layouts; delete from creator_templates; delete from printers_profile
3) Load fr-FR/2-Optionel/sample_labels.sql
or ru-RU/optional/print_labels.sql
or uk-UA/optional/print_labels.sql

Without the patch this files can't be loaded
Test all of them

In case of ru and uk I removed a patron card layout

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15053: sample_creator_data.sql now fails during a fresh install
Kyle M Hall [Fri, 23 Oct 2015 14:10:38 +0000 (10:10 -0400)]
Bug 15053: sample_creator_data.sql now fails during a fresh install

ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1

Test Plan:
1) Start fresh install
2) Install all test data
3) Note the SQL error
4) Apply this patch
5) Repeat steps 1 and 2
6) Note no error

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All fixed files loads without problem.
No errors found
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 11881: QA follow-up - rename class
Katrin Fischer [Sun, 25 Oct 2015 10:52:46 +0000 (11:52 +0100)]
Bug 11881: QA follow-up - rename class

A suggestion for renaming the class to be a bit more "content" then "appearance".
Strictly optional.

.ItemSummary {
    display: block; # block - line breaks, inline - all one line
}

.LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 11881: Small improvements for Items available for reference
genevieve [Fri, 11 Sep 2015 18:54:14 +0000 (14:54 -0400)]
Bug 11881: Small improvements for Items available for reference

As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
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>
9 years agoBug 11881: Small improvements for the availability informations in the search results...
simith [Wed, 4 Mar 2015 19:09:56 +0000 (14:09 -0500)]
Bug 11881: Small improvements for the availability informations in the search results list on the OPAC

This patch contains small modifications to the template of OPAC search results.
Theses modifications affect the "Availability" line :
* Add a linebreak after each location.
* Add the text "Call Number:" before call numbers.

To test:

I) Apply the patch

II) Include the following test in the OPACUserCSS preference:

.searchresults .CommasWithLinebreaks {
    display: block; # block - line breaks, inline - all one line
}

.searchresults .LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

III) Do a search on the OPAC

IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text).

Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
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>
9 years agoBug 15082: t/db_dependent/Search.t shouldn't mock the DB connection
Tomas Cohen Arazi [Thu, 29 Oct 2015 14:20:06 +0000 (11:20 -0300)]
Bug 15082: t/db_dependent/Search.t shouldn't mock the DB connection

This patch makes the t/db_dependent/Search.t tests use a real DB instead of
mocking the DB handler (which is not actually used and generates unnecesary
warnings when running the tests).

It does so by grabbing the DB configuration data using C4::Context->config()
and passing it (writing %ENV) to rewrite-config.PL, all is done in zebra_config.pl
which is only used on the Search.t file.

To test:
- Run
  $ prove t/db_dependent/Search.t
=> FAIL: Warnings are raised about DB being mocked and DBIC not recognising 'Mock'
         as a valid DB driver.
- Apply the patch
- Run
  $ prove r/db_dependent/Search.t
=> SUCCESS: Same tests results, no warning about DBIC driver.
- Sign off :-D

Disclamer: As of writing this patch, the Search.t tests pass. The patch is not dealing
with tests results, but how they use the DB.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass before & after, a 'little' less noisy
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14931: (qa followu-up) small improvements
Jonathan Druart [Wed, 28 Oct 2015 08:41:19 +0000 (08:41 +0000)]
Bug 14931: (qa followu-up) small improvements

- Avoid 1 call to dt_from_string in some cases
- Do not use $_

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14931: (Follow-up) Validate date entry in contracts
Marc Véron [Thu, 15 Oct 2015 11:01:50 +0000 (13:01 +0200)]
Bug 14931: (Follow-up) Validate date entry in contracts

 Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Amended for comment #7  25.10.2015 / mv

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14931: Remove C4::Dates from files admin/aq*.pl
Marc Véron [Wed, 30 Sep 2015 16:50:42 +0000 (18:50 +0200)]
Bug 14931: Remove C4::Dates from files admin/aq*.pl

This patch removes C4::Dates from:

- admin/aqbudgets.pl
- admin/aqplan.pl
- admin/aqcontract.pl

To test:

- Apply patch

- Go to Home > Adminstration > Budgets > All funds
  (admin/aqbudgets.pl)
- Verify that everything displays as before

- Edit one of the funds and click on 'Planning - Plan by months'
  (admin/aqplan.pl)
- Verify that planning works as before

- Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref
Dates in planning by months not needed to be on iso format, aqplan.pl
uses instead Date::Calc

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14977: Followup to fix issue with NewsChannels.t
Marc Véron [Tue, 27 Oct 2015 19:06:11 +0000 (20:06 +0100)]
Bug 14977: Followup to fix issue with NewsChannels.t

The problem was that get_opac_new returns dates already syspref-formatted.

To test:
- Apply patch
- Verify that t/db_dependent/NewsChannels.t does not fail.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14977: Remove C4::Dates from files t/db_dependent/*.t
Marc Véron [Wed, 7 Oct 2015 22:13:01 +0000 (00:13 +0200)]
Bug 14977: Remove C4::Dates from files t/db_dependent/*.t

This patch removes C4::Dates from following files:

-  t/db_dependent/Budgets.t
-  t/db_dependent/Holds.t
-  t/db_dependent/Koha_template_plugin_KohaDates.t
-  t/db_dependent/Log.t
-  t/db_dependent/NewsChannels.t

To test:
- First run all tests above
- Apply patch
- Then run tests again. The results should be the same.
  (Note: I get 2 fails with NewsChannels.t, they are the same with
   and without patch).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
NewsChanell pass for me before patch, no after.
Followup follows :)
Rest of tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14903: (followup)Remove C4::Dates from circ/circulation.pl
Marc Véron [Tue, 27 Oct 2015 16:50:21 +0000 (17:50 +0100)]
Bug 14903: (followup)Remove C4::Dates from circ/circulation.pl

Follow up to fix QA issues from comment #15
...and amended for comment #18

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14903: Remove C4::Dates from circ/circulation.pl (and more)
Marc Véron [Fri, 9 Oct 2015 16:48:30 +0000 (18:48 +0200)]
Bug 14903: Remove C4::Dates from circ/circulation.pl (and more)

Patch to remove deprectated C4::Dates from:
- circ/circulation.pl
- C4/Circulation.pm
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

To test:
- Apply patch
- Go to the checkout site (Home > Circulation > Checkouts)
- Verify that data displays properly (including for users with a card
  that expires in the  near future, see syspref 'NotifyBorrowerDeparture')
- Search for regressions
- prove -v t/db_dependent/Circulation.t

(Amended following comment #9 / #11  25.10.2015 /mv)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14100: (QA followup) add missing mocked sysprefs
Tomas Cohen Arazi [Thu, 29 Oct 2015 13:52:08 +0000 (10:52 -0300)]
Bug 14100: (QA followup) add missing mocked sysprefs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14100: Fix Search.t tests
Jonathan Druart [Wed, 28 Oct 2015 10:43:55 +0000 (10:43 +0000)]
Bug 14100: Fix Search.t tests

So, this one is VERY weird, let me try to explain what I have
understood.

Bisecting using run prove t/db_dependent/Search.t, I have found that the
following commit make the test fail:
  commit 0f63f89f66e40cc01ef02da3654fcfb404c9001d
    Bug 14100: Generic solution for language overlay - Item types
The error is
  DBI bind_columns: invalid number of arguments: got handle + 0, expected handle + between 1 and -1
  Usage: $h->bind_columns(\$var1 [, \$var2, ...]) at /usr/lib/i386-linux-gnu/perl5/5.20/DBI.pm line 2065.

Note that the interface (admin/itemtypes.pl) which calls the same
subroutine with the same parameter (style => 'array') works great.

The problem comes from the change in C4::Search::searchResults, if I
only apply the change done to this subroutine on 0f63f89f^1, I reproduce
the issue.

Looking closely at how %itemtypes is built, we could actually call
GetItemTypes with the style => 'hash' to get exactly what we want.
The following piece prove it for you:
    use Test::More;
    use C4::Koha;
    my $i = GetItemTypes;
    my $j = GetItemTypes(style => 'array');
    my %itemtypes;
    for my $itemtype ( @$j ) {
        $itemtypes{ $itemtype->{itemtype} } = $itemtype;
    }
    is_deeply( \%itemtypes, $i);

So changing the code accordingly and just forget this last hour...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14100: Fix t/db_dependent/Items.t
Jonathan Druart [Wed, 28 Oct 2015 09:11:54 +0000 (09:11 +0000)]
Bug 14100: Fix t/db_dependent/Items.t

prove t/db_dependent/Items.t
Undefined subroutine &C4::Languages::getlanguage called at C4/Items.pm line 1304.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14100: Fix test xt/author/valid_templates complaining on opac-topissues.tt
Jonathan Druart [Wed, 28 Oct 2015 08:58:15 +0000 (08:58 +0000)]
Bug 14100: Fix test xt/author/valid_templates complaining on opac-topissues.tt

undef error - Undefined subroutine &C4::Languages::getlanguage called at C4/Koha.pm line 250.

Test plan:
    prove xt/author/valid-templates.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14722: CSV is only available for biblio records
Jonathan Druart [Mon, 19 Oct 2015 08:28:16 +0000 (09:28 +0100)]
Bug 14722: CSV is only available for biblio records

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 14722: Add POD for some options
Jonathan Druart [Mon, 19 Oct 2015 08:20:41 +0000 (09:20 +0100)]
Bug 14722: Add POD for some options

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 14722: rename the script
Jonathan Druart [Mon, 19 Oct 2015 08:11:48 +0000 (09:11 +0100)]
Bug 14722: rename the script

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 14722: Refactor the export tool
Jonathan Druart [Fri, 21 Aug 2015 16:26:44 +0000 (17:26 +0100)]
Bug 14722: Refactor the export tool

Why a refactoring was need for this script?
The export tool (tools/export.pl) can be called from the command line
and some parts of code were unnecessarity complicated (just look at the
code, you will understand).

Worse still, the script does not provide the same options for both
interface. For instance you cannot export records given a range of
biblionumbers, authids, callnumbers, etc. from the commandline.

What does this patch?
1/ Important: The script tools/export.pl does not work anymore if called from
the command line (should be in the release notes).
2/ The code used to generated a file (csv, iso2709 or xml) has been moved to a new
module (Koha::Exporter::Record) and tests have been provided.
3/ No change is done on the web interface
4/ Some new options have been added to the commandline script
(misc/export.pl):
    - starting_authid
    - ending_authid
    - authtype
    - starting_biblionumber
    - ending_biblionumber
    - itemtype
    - starting_callnumber
    - ending_callnumber
    - start_accession
    - end_accession
5/ There is a change in the behavior if an error occurs:
Can't call method "as_usmarc" on an undefined value at Koha/Exporter/Record.pm line 114.
record (number 5530) is invalid and therefore not exported because its reopening generates warnings above at Koha/Exporter/Record.pm line 117.

Before this patch, they were not displayed (using the command line).

What does not do this patch?
It does not provide the 'clean', 'timestamp' and 'deleted_barcodes' options to
the web interface (same as before).

What about the perfs?
With a DB with ~800 biblios (MARC21)
Before: perl tools/export.pl 14.79s user 0.83s system 71% cpu 21.905 total
After:  perl misc/export.pl  17.19s user 0.84s system 75% cpu 24.018 total

With a DB with ~6400 biblios (UNIMARC)
Before: perl tools/export.pl 26.55s user 0.76s system 76% cpu 35.498 total
After:  perl misc/export.pl  26.78s user 0.84s system 80% cpu 34.494 total

How to test this patch?
Test plan:
A. Web interface:
1/ On the current master, export some records, biblios and authorities (with
the 3 differents exports) playing with the different filters (item type,
libraries, callnumber, accession date, don't export items, remove
non-local items, don't export fields, etc.).
2/ Apply this patch, export again the same records, and compare the
generated files. They must be identical!
3/ Confirm that the export features on the checkout list
(circ/circulation.pl) works as before this patch.

B. The command line
1/ On the current master, export some records, biblios and authorities (with
the 2 differents exports) playing with the different options (date,
deleted_barcodes, clean).
2/ Apply this patch, export again the same records, and compare the
generated files. They must be identical!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14722: Add Koha::Biblioitem[s]
Jonathan Druart [Mon, 24 Aug 2015 08:18:07 +0000 (09:18 +0100)]
Bug 14722: Add Koha::Biblioitem[s]

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14190: Scale search boxes in staff head
Eivin Giske Skaaren [Sun, 18 Oct 2015 14:21:01 +0000 (14:21 +0000)]
Bug 14190: Scale search boxes in staff head

In this simple patch the width gets controlled by CSS and it becomes
easy to set it in just one place.

The exact width may need to be discussed but I thought 30em made it look ok on my screen.
With this patch we get the wider search boxes with a very small change and another bug may
be created if needed to do a bigger refactor and remove stuff not needed in the html and
perhaps do this in a modern/responsive way. (Preferrably a UX/GUI developer will do this)

To test:

Apply the patch and reload the staff client. Now the search box is a bit wider and the border
etc has changed with it.

Some places with more than one search box like "Serials" will not be affected.

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>
9 years agoBug 12428: QA Follow-up: Wrap borrower's title in a span to make it possible to hide
Katrin Fischer [Sat, 24 Oct 2015 11:09:41 +0000 (13:09 +0200)]
Bug 12428: QA Follow-up: Wrap borrower's title in a span to make it possible to hide

I think showing the title with the user name is quite unusual for
Koha. Wrapping the title in a span with a unique class makes it
possible to hide it.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14248: Regression tests
Mark Tompsett [Thu, 22 Oct 2015 12:52:33 +0000 (08:52 -0400)]
Bug 14248: Regression tests

TEST PLAN
---------
1) apply patch
2) prove -v t/db_dependent/NewsChannels.t
3) run koha qa test tools.

Signed-off-by: Martin Persson <xarragon@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14248: Optionally display authorship for news
Martin Persson [Fri, 2 Oct 2015 06:06:06 +0000 (08:06 +0200)]
Bug 14248: Optionally display authorship for news

Test plan:

* Apply dependant patches 14246 and 14247.
* Apply current patch.
* Log into the Staff client, go to
 'Administration' -> 'Global Preferences' -> 'Tools',
  a new section titled 'News' should appear with a single option named 'NewsAuthorDisplay'.
  Available values should be 'Not at all', 'OPAC only', 'Staff client only' and
  Both OPAC and staff client'. By default the value should be 'Not at all'
  (to mimic existing behaviour, important!).

* Change the value to something different and save the changes.
* Go to 'Tools' -> 'News' and add some news items (at least 2).
* Use the MySQL command line tool to edit the opac_news table,
  removing the user id from one of the news items:
  $ mysql -u kohaadmin -p -D koha
  > SELECT `idnew`, `title`, `borrowernumber` FROM `opac_news`;
  * Make a mental note of one of the 'newid' numbers to change.
  > UPDATE `opac_news` SET `borrowernumber` = NULL WHERE `idnew` = <your-id-here>;
  * Now one of the news items will have no user id, and no author should be shown for it.
* Go to OPAC and Staff client and make sure the display modes works as intended.
  * Repeat for all values, making sure that the settings works as intended.
  * The changed news item should have no author info shown at any time.
  * The unchanged news item should show your own user name if the
    settings match the section where it is displayed.

Sponsored-By: Halland County Library
Tested on top of Bugs 1246 and 1247, works as advertised.
Note: Some whitespaces changed / removed in koha-news.tt to pass qa tools.
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>
9 years agoBug 14247: DBRev 3.21.00.046
Tomas Cohen Arazi [Tue, 27 Oct 2015 19:12:51 +0000 (16:12 -0300)]
Bug 14247: DBRev 3.21.00.046

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14247: Rename sysprefs atomic update file
Martin Persson [Tue, 26 May 2015 13:58:45 +0000 (15:58 +0200)]
Bug 14247: Rename sysprefs atomic update file

This trivial patch changes the name of the SQL update
file to match the guidelines on the wiki.

Sponsored-by: Halland County Library
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14247: Add system preference for news display
Martin Persson [Mon, 25 May 2015 12:33:13 +0000 (14:33 +0200)]
Bug 14247: Add system preference for news display

Test plan:

* Apply dependant patch 14246 (if not done already).
* Apply current patch.
* Log into the Staff client, go to 'Administration' -> 'Global Preferences' -> 'Tools', a new section titled 'News' should appear with a single option named 'NewsAuthorDisplay'. Available values should be 'Not at all', 'OPAC only', 'Staff client only' and 'Both OPAC and staff client'. By default the value should be 'Not at all' (to mimic existing behaviour, important!).
* Change the value to something different and save the changes.
* Use the mysql command line client to connect to the Koha database:
  $ mysql -u kohaadmin -p -D koha
* Enter the following query:
  SELECT * FROM systempreferences WHERE variable = 'NewsAuthorDisplay';
* Check to make sure that the 'value' column has changed to reflect the choice you made in the above step.

Separate SQL testing (clean installation of Koha):
* Koha$ mysql -u root < create_koha_test_db.sql
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/kohastructure.sql
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/sysprefs.sql

Testing the update script works the same way:
* Koha$ echo "DELETE FROM systempreferences WHERE variable = 'NewsAuthorDisplay';" | mysql -u koha_test -D koha_test
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/atomicupdate/add_news_prefs.sql

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14246: DBRev 3.21.00.045
Tomas Cohen Arazi [Tue, 27 Oct 2015 19:02:33 +0000 (16:02 -0300)]
Bug 14246: DBRev 3.21.00.045

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14246: Adding Koha::Schema::Result differences
Mark Tompsett [Wed, 21 Oct 2015 23:55:08 +0000 (19:55 -0400)]
Bug 14246: Adding Koha::Schema::Result differences

Ran misc/devel/update_dbix_class_files.pl as shown on
wiki/Database_updates#updatedatabase.pl
However, only git added Borrower and Opacnews, since
those were the two affected by this patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14246: (fix) correct ALTER TABLE mysql syntax
Indranil Das Gupta [Sun, 14 Jun 2015 12:09:52 +0000 (17:39 +0530)]
Bug 14246: (fix) correct ALTER TABLE mysql syntax

Address bug 14246 comment 13 remark - correcting MySQL ALTER TABLE
syntax.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14246: Update NewsChannel tests
Martin Persson [Mon, 1 Jun 2015 11:56:56 +0000 (13:56 +0200)]
Bug 14246: Update NewsChannel tests

This commit adds the new 'borrowernumber' field to the existing
test framework to make it pass. It does not include new tests.

Sponsored-by: Halland County Library
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>