koha.git
10 years agoBug 2720 - Overdues which debar automatically should undebar automatically when returned
Kyle M Hall [Tue, 29 Jan 2013 14:34:13 +0000 (09:34 -0500)]
Bug 2720 - Overdues which debar automatically should undebar automatically when returned

This patch adds a more extensible and flexible debarments system to Koha. The fields
borrowers.debarred and borrowers.debarredcomment are retained for compatibility and
speed.

This system supports having debarments for multiple reasons. There are currently
three types of debarments:
OVERDUES    - Generated by overdue_notices.pl if the notice should debar a patron
SUSPENSION  - A punative debarment generated on checkin via an issuing rule
MANUAL      - A debarment created manually by a librarian

OVERDUE debarments are cleared automatically when all overdue items have been returned,
if the new system preference AutoRemoveOverduesRestrictions is enabled. It is disabled
by default to retain current default functionality.

Whenever a borrowers debarments are modified, the system updates the borrowers debarment
fields with the highest expiration from all the borrowers debarments, and concatenates
the comments from the debarments together.

Test plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Verify the borrower_debarments table has been created and
    populated with the pre-existing debarments
 4) Run t/db_dependent/Borrower_Debarments.t
 5) Manually debar a patron, with an expiration date
 6) Verify the patron cannot be issued to
 7) Add another manual debarment with a different expiration date
 8) Verify the 'restricted' message lists the date farthest into the future
 9) Add another manual debarment with no expiration date
10) Verify the borrower is now debarred indefinitely
11) Delete the indefinite debarment
12) Verify the debarment message lists an expiration date dagain
13) Enable the new system preference AutoRemoveOverduesRestrictions
14) Set an overdue notice to debar after 1 day of being overdue
15) Check out an item to a patron and backdate the due date to yesterday
16) Run overdue_notices.pl
17) Verify the OVERDUES debarment was created
18) Return the item
19) Verify the OVERDUES debarment was removed
20) Disable AutoRemoveOverduesRestrictions
21) Repeat steps 15 though 18, verify the OVERDUES debarment was *not* removed
22) Add issuing rules so that an overdue item causes a temporary debarment
23) Check out an item to a patron and backdate the due date by a year
24) Return the item
25) Verify the SUSPENSION debarment was added to the patron

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 9822: Alert on adding an order to a basket if budget s exceeded
Jonathan Druart [Fri, 15 Mar 2013 10:20:45 +0000 (11:20 +0100)]
Bug 9822: Alert on adding an order to a basket if budget s exceeded

2 DB fields are not used: aqbudgets.encumb and aqbudgets.expend.

This patch uses these fields in order to show a warning message if the
budget selected for an order has exceeded.

Test plan:
- Create a new active fund with at least 1 of both warning fields
  ('Warning at (%)' and 'Warning at (amount)').
- Create a new order for a basket with this new fund and a cost >
  warning amount defined for the fund (or using %).
- Save and check that a warning message appears
- Retry playing with all combinations of warning fields

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10725: Add filters on the pending orders table
Jonathan Druart [Thu, 25 Apr 2013 14:57:07 +0000 (16:57 +0200)]
Bug 10725: Add filters on the pending orders table

Since the parcel.pl script get *all* pending orders, there is no reason
not to display all of them.

Like that, DataTable manages pagination and sorting correctly (on all
data).
This patch adds filters on the table header (using columnFilter).

Test plan:
Try filters on the left of the screen and filters on the table header.

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.
Searching and sorting the table works correctly.
Larger result sets are a performance problem on this page,
I have filed bug 10595 for that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10078: (follow-up) add regression test
Galen Charlton [Wed, 30 Oct 2013 05:02:45 +0000 (05:02 +0000)]
Bug 10078: (follow-up) add regression test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10078: show location facet regardless of singleBranchMode setting
David Cook [Tue, 2 Jul 2013 06:40:43 +0000 (16:40 +1000)]
Bug 10078: show location facet regardless of singleBranchMode setting

Currently, the location facet only shows if you have singlebranch
mode enabled. In other words, you can either see the library branch
or the shelving location.

This patch simply changes the location facet so that it will always
show the shelving location (if one is available), regardless of the
singlebranch system preference.

Test Plan:

BEFORE APPLYING:

0) Disable singlebranch mode if it is on
1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you can see the library branch facet under Libraries
but no shelving locations.
3) Enable singlebranch mode
4) Repeat your search
5) Note that you can no longer see the library branch facet under
Libraries. However, you can see the shelving location under Location

N.B. If you don't have more than one branch or the search results
are all from one branch, you might not get a library branch facet.

If this is the case, create additional branches and/or change the
branch for items in your search results so that you have multiple
branches to prompt the appearance of a library branch facet.

AFTER APPLYING

1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you see a facet under Location on the left sidebar,
regardless of there being a singlebranch mode or the number of branches
there are being represented in the search results.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) update the command-line import tools
Galen Charlton [Wed, 30 Oct 2013 04:22:39 +0000 (04:22 +0000)]
Bug 7131: (follow-up) update the command-line import tools

misc/commit_file.pl now properly displays the number
of replaced and ignored items.

misc/stage_file.pl now has a new command-line switch --item-action:

  --item-action       action to take if --add-items is specifed;
                      choices are 'always_add',
                      'add_only_for_matches', 'add_only_for_new',
                      'ignore', or 'replace'

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) update DBIx::Class schema classes
Galen Charlton [Wed, 30 Oct 2013 03:47:15 +0000 (03:47 +0000)]
Bug 7131: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: DBRev 3.13.00.034
Galen Charlton [Wed, 30 Oct 2013 03:45:42 +0000 (03:45 +0000)]
Bug 7131: DBRev 3.13.00.034

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) initialized some variables properly
Kyle M Hall [Thu, 3 Oct 2013 17:22:53 +0000 (13:22 -0400)]
Bug 7131: (follow-up) initialized some variables properly

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) allow overlaying by barcode
Kyle M Hall [Fri, 5 Apr 2013 11:53:47 +0000 (07:53 -0400)]
Bug 7131: (follow-up) allow overlaying by barcode

This patch adds the ability to overlay by either itemnumber,
or barcode. Itemnumbers take precendence over barcodes, which
allows us to batch update item barcodes with an overlay.

Test Plan:
1) Create a new record with 2 items, make sure to give it a unique ISBN
2) Download the record as MARCXML
3) Edit the MARC XML
   a) Delete one of the two items
   b) Change the barcode in the barcode field to something unused
4) Transform the xml file into marc with xml2marc
5) Browse to 'Stage MARC records for import'
6) Upload the binary marc file
7) Choose the following options:
    Record matching rule: ISBN
    Action if matching record found: Ignore incoming record
    Action if no match is found: Ignore incoming record
    Check for embedded item record data: Yes
    How to process items: Replace items if matching bib was found
8) Click 'Stage for import' button
9) Verify a matching record was found, then click 'Manage staged records' link
10) Verify the rules are still set correctly
11) Click 'Import this batch into the catalog'
12) The import should tell you:
    1 record was ignored
    1 item was replaced
13) View the record details and verify the item's barcode was replaced
    with your updated barcode value
14) Download the record as MARCXML
15) Edit the MARC XML
    a) Delete one of the two items
    b) Delete the itemnumber field for the remaining item
    c) Alter the item's callnumber to a new value
16) Repeat steps 4 through 12
17) View the record details and verify the item's callnumber was replace
    with your updated callnumber value

Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) perltidy BatchCommitItems
Kyle M Hall [Fri, 5 Apr 2013 11:26:43 +0000 (07:26 -0400)]
Bug 7131: (follow-up) perltidy BatchCommitItems

Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: teach MARC import how to overlay items
Elliott Davis [Wed, 10 Oct 2012 19:21:22 +0000 (14:21 -0500)]
Bug 7131: teach MARC import how to overlay items

When staging biblios with items attached you previously had only two
options, add or don't add.

This patch adds a third option to replace an item record if a match is
found on itemnumber or barcode, else it adds the item.

Test Plan:
1) Stage a file of biblios with items attached.
2) Import the batch into the catalog.
3) Run the indexer so the matcher will match
4) Modify the item data for at least one bib in the file
5) Re-stage the file with the item matching option set to "Replace
   items if matching bib was found"
6) Let the indexer run again
7) You should see updated item information after the overlay

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10733: Follow up - unset variables from koha-sites.conf if USE_MEMCACHED=no
Tomas Cohen Arazi [Fri, 13 Sep 2013 13:14:30 +0000 (10:14 -0300)]
Bug 10733: Follow up - unset variables from koha-sites.conf if USE_MEMCACHED=no

As configuration variables from koha-sites.conf overwrite the ones in the
koha-create script we need to unset them in case we have USE_MEMCACHED="no".

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10733: Memcached on package installs
Tomas Cohen Arazi [Fri, 31 May 2013 18:56:59 +0000 (15:56 -0300)]
Bug 10733: Memcached on package installs

This patch makes the koha-create script adjust the koha-conf.xml file
with the proper string substitutions to enable the use of memcached
for the created Koha instance.

It adds three option switches that control this:

 --use-memcached (defaults to "no")
 --memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211')
 --memcached-prefix "desired_namespace prefix" (defaults to 'koha_')

It respects the current schema configuration schema, where configuration
values are pondered like this:

hardcoded < koha-sites.conf < koha-create option switches

koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and
MEMCACHED_PREFIX.

Note: the docs discourage setting user's own namespace prefix.

Using memcached is off as the default. The relevant configuration
variables will remain empty if the user doesn't pass --use-memcached
to the command. It matches the current behaviour.

To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
 $ koha-create --create-db memctest
 - Check that /etc/koha/sites/memctest/koha-conf.xml contains:
   * Empty <memcached_servers> tag.
   * Empty <memcached_namespace> tag.

b) Play with the possible combination of option switches
(Note that the code defaults to empty and will remain like that if
--use-memcached is not used, so less tests...)

 $ koha-create --create-db --use-memcached memctest
 $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest
 $ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest
 $ koha-create --create-db --use-memcached --memcached-prefix "something" memctest

 - Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest
   file reflect the chosen options.

c) Run
 $ koha-create --help
 - It should advertise this addition accordingly.

d) Run
 $ man koha-create
 - Man page for koha-create should provide good information on the new
   switches behaviour

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10733: add 'memcached' as suggested dependency
Tomas Cohen Arazi [Wed, 14 Aug 2013 22:26:08 +0000 (19:26 -0300)]
Bug 10733: add 'memcached' as suggested dependency

Adds 'memcached' to the control.in file so the user is suggested by apt
to install it.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10962 - Update MARC21 frameworks to Update Nr. 17 (September 2013)
Bernardo Gonzalez Kriegel [Fri, 27 Sep 2013 21:55:02 +0000 (18:55 -0300)]
Bug 10962 - Update MARC21 frameworks to Update Nr. 17 (September 2013)

This patch updates MARC21 default bibliografic
framework and authorities frameworks to
Update Nr. 17 (September 2013)

Source

Bibliographic: http://www.loc.gov/marc/bibliographic/bdapndxg.html
Authorities: http://www.loc.gov/marc/authority/adapndxf.html

Only to new installs.

To test
1) Remove default MARC21 framework
2) Load marc21_framework_DEFAULT.sql
3) Verify new subtags

    015_q 020_q 024_q 027_q 800_7 810_7 811_7 830_7

4) Remove authorities frameworks
5) Load authorities_normal_marc21.sql
6) Verify new subtags

    020_q 024_q

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10243: (follow-up) prevent TransportCostMatrix from overriding library holds...
Kyle M Hall [Wed, 9 Oct 2013 18:02:23 +0000 (14:02 -0400)]
Bug 10243: (follow-up) prevent TransportCostMatrix from overriding library holds policy

Using the TransportCostMatrix can cause the same issue. Removing the
last ditch use of the first item causes the the subroutine to continue
with the traditional matching, which will respect the hold policies.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10243: (follow-up) add unit tests
Kyle M Hall [Mon, 16 Sep 2013 15:31:22 +0000 (11:31 -0400)]
Bug 10243: (follow-up) add unit tests

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10243: prevent holds queue from making transfer requests that contradict library...
Kyle M Hall [Tue, 14 May 2013 19:59:07 +0000 (14:59 -0500)]
Bug 10243: prevent holds queue from making transfer requests that contradict library holds policy

For some reason MapItemsToHoldRequests will, as a last ditch effort,
grab what seems to be an arbitrary available item to fill a hold request,
even if it will violate the circulation rules for holds.

In other words, even if an item matches a "Holds policy by item type"
that says "From home library", a request to transfer that item to
another library will be added to the holds queue!

Test Plan:
1) Create a record with a an item at BranchA of item type BOOK
2) Set the holds policy such that itemtype BOOK for BranchA is set
   to "From home library"
3) Place a bib-level hold request for a patron with a pickup at BranchB
4) Run build_holds_queue.pl
5) You should now see a request for that item to be transfered to
   BranchB, even though the rules should not allow this.
6) Apply this patch
7) Run build_holds_queue.pl again
8) View the holds queue again, that request should no longer exist

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) update license statements
Galen Charlton [Wed, 30 Oct 2013 02:56:32 +0000 (02:56 +0000)]
Bug 7688: (follow-up) update license statements

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 7688: (follow-up) add authentication checking
Galen Charlton [Wed, 30 Oct 2013 02:51:11 +0000 (02:51 +0000)]
bug 7688: (follow-up) add authentication checking

A couple web services introduced in the patch series
lacked authentication checks.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) update DBIx::Class schema classes
Galen Charlton [Wed, 30 Oct 2013 02:42:40 +0000 (02:42 +0000)]
Bug 7688: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) correct SQL to create the subscription table
Galen Charlton [Wed, 30 Oct 2013 02:40:14 +0000 (02:40 +0000)]
Bug 7688: (follow-up) correct SQL to create the subscription table

Columns referring to a foreign key must have matching
types.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) update test cases to reflect change in NewSubscription()
Galen Charlton [Wed, 30 Oct 2013 02:27:20 +0000 (02:27 +0000)]
Bug 7688: (follow-up) update test cases to reflect change in NewSubscription()

This patch also corrects an error in the description of
NewSubscription().

Named parameters for this function cannot come soon enough.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) fix typo
Galen Charlton [Wed, 30 Oct 2013 00:28:40 +0000 (00:28 +0000)]
Bug 7688: (follow-up) fix typo

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: DBRev 3.13.00.033
Galen Charlton [Tue, 29 Oct 2013 23:57:44 +0000 (23:57 +0000)]
Bug 7688: DBRev 3.13.00.033

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) rewrite 'for' loop in unit tests
Julian Maurice [Thu, 4 Jul 2013 10:00:10 +0000 (12:00 +0200)]
Bug 7688: (follow-up) rewrite 'for' loop in unit tests

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) add unit tests for C4::Serials::GetNextSeq()
Julian Maurice [Thu, 4 Jul 2013 09:32:06 +0000 (11:32 +0200)]
Bug 7688: (follow-up) add unit tests for C4::Serials::GetNextSeq()

These tests are split in two parts: "db dependent" and "db
independent".
GetNextSeq requires DB only when checking for irregularities.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) add unit tests for C4::Serials::GetNextDate()
Julian Maurice [Wed, 3 Jul 2013 13:56:46 +0000 (15:56 +0200)]
Bug 7688: (follow-up) add unit tests for C4::Serials::GetNextDate()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) add unit tests for C4::Serials::Numberpattern
Julian Maurice [Wed, 3 Jul 2013 12:19:13 +0000 (12:19 +0000)]
Bug 7688: (follow-up) add unit tests for C4::Serials::Numberpattern

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) add unit tests for C4::Serials::Frequency
Julian Maurice [Wed, 3 Jul 2013 11:57:32 +0000 (11:57 +0000)]
Bug 7688: (follow-up) add unit tests for C4::Serials::Frequency

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) rewrite t/db_dependant/Serials.t
Julian Maurice [Mon, 8 Apr 2013 12:04:45 +0000 (12:04 +0000)]
Bug 7688: (follow-up) rewrite t/db_dependant/Serials.t

A lot of tests were just a call to a funtion without any arguments,
whereas the function expect at least one argument.
These tests were kept, but all return values are now undef when a
mandatory argument is missing, so return values are consistent.

The part where subscription periodicity is changed could not work
because of ',' appended to each key in ModSubscription call. So it's
rewritten, taking into account the new API for subscription frequencies.
This script should leave your database intact because it revert any
modification made.

Also fix some warnings in C4::Serials and in C4::Items.
And fix a typo in koha-tmpl/.../subscription-numberpatterns.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No errors
Tested, again, without trouble.
With a suscription, tests successful.
No koha-qa errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) set firstacquidate in updatedatabase if it's not set
Julian Maurice [Fri, 22 Mar 2013 09:53:51 +0000 (09:53 +0000)]
Bug 7688: (follow-up) set firstacquidate in updatedatabase if it's not set

firstacquidate is now a mandatory field, so it must be set.

The updatedatabase process set firstacquidate value to one of:
- the planned date of the first serial for this subscription, or if not
  found,
- the subscription start date.

+ auto-select the numbering pattern when modifying a subscription.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: Change subscription numbering pattern and frequencies
Julian Maurice [Thu, 8 Mar 2012 16:12:55 +0000 (17:12 +0100)]
Bug 7688: Change subscription numbering pattern and frequencies

Serials numbering pattern and frequencies are no longer hard-coded. Now
it's possible to create, edit and delete numbering patterns (and
frequencies). This patch adds two new sql tables
(subscription_numberpatterns and subscription_frequencies)

Numbering patterns behave almost as before, there are still the same
values to configure (addX, everyX, settoX, whenmorethanX). lastvalueX
and innerloopX remain in subscription tables.

There is a new value in numbering patterns: numberingX. For each
"column" (X, Y or Z) you can tell how to format the number. Actually
numberingX can be set to:
 - 'dayname' (name of the day) (0-6 or 1-7 depending on which day is the
   first of the week)
 - 'monthname' (name of the month) (0-11)
 - 'season' (name of the season) (0-3) (0 is Spring)

These names are localized by using POSIX::setlocale and POSIX::strftime
and setting a 'locale' value to the subscription. Locale have to be
installed on the system.

Note that season names are not localized using POSIX::strftime (it can't
do this), so names are hardcoded into the code (available languages: en,
fr). This could be fixed in the future by using a Perl localization
framework.

Frequencies can be configured using 3 parameters:
 - 'unit': one of 'day', 'week', 'month', 'year'
 - 'issuesperunit': integer >= 1, the number of received issues per
   'unit'
 - 'unitsperissue': integer >= 1, the number of 'unit' between two
   issues
One of 'issuesperunit' and 'unitsperissue' must be equal to 1.
Examples:
  unit = 'day', issuesperunit=3, unitsperissue=1 => 3 issues per day
  unit = 'week', issuesperunit=1, unitsperissue=3 => 1 issue each 3
  weeks

Prediction pattern is now computed server-side and is more consistent
with what Koha will do. The publication date is displayed alongside the
serial number.

Irregularities can now be checked one by one, in the prediction pattern
table, or if frequency is 'day-based' (unit is 'day'), there is the
possibility to check all issues for a week day at once.

When an irregularity is found, there is the possibility to keep the
serial number unchanged, or to skip it. It is configured at subscription
creation or modification.

For instance, with a daily subscription you can have:
  skip serial number  |  keep serial number
----------------------+----------------------
 2012-01-01  ¦  No 1  | 2012-01-01  ¦  No 1
 2012-01-03  ¦  No 3  | 2012-01-03  ¦  No 2

To lighten the subscription modification page, manual history has been
moved in its own page subscription-history.pl which is accessible on
subscription-detail.pl, tab 'Planning'.

Important note: updatedatabase.pl script takes into account existing
subscriptions and create appropriate numbering patterns for them (it
tries to create as few patterns as possible). Frequency is
mapped to the correct entry in subscription_frequencies table.

This patch includes kohastructure.sql and updatedatabase.pl changes
+ sample frequencies data and sample numberpatterns data for fresh
installs (sample data is included in updatedatabase.pl)

=== TEST PLAN: ===

Create a new subscription:

  - Go to Serials module and click "New subscription" button
  - On the first page, choose a biblio and click next to go to the
    second page
  - Pick a first issue publication date
  - Choose frequency '1/day'
  - Choose a subscription length of 15 issues
  - Choose a subscription start date
  - Choose numbering pattern 'Volume, Number'
  - A table appears, fill 'Begins with' cells with '1'
  - Click on 'Test prediction pattern' button

The prediction pattern is displayed at the right of the page. You can
see in it the serial number, the publication date and a checkbox to
allow you to choose which serials will not be received (irregularities).

You can see that serial number start from "Vol 1, No 1" continue to "Vol
1, No 12" and then restart with "Vol 2, No 1".

Frequency is '1/day' so you can see that publication date is incremented
by one day line after line.

  - Now you can play a little with frequencies and numbering patterns,
    change one of them (or both) and click again on 'Test prediction
    pattern'
  - For example, choose frequency '3/weeks' and click on 'Test
    prediction pattern' button'.

There is a little behaviour change compared with current master.
Publication date will not be guessed within the week. Koha can't know
when you will receive issues. So the publication date stay the same
(monday of each week) for 3 consecutive issues and then jump to the next
week.

  - Now choose frequency '1/3 months' and numbering pattern 'Seasonal'
  - Fill 'Begins with' cells with '2012' for Year and '0' for Season
  - Click on 'Test prediction pattern'
  - You should have something like 'Spring 2012', 'Summer 2012', ...,
    'Winter 2012', 'Spring 2013'
  - Note that you can have seasons for south hemisphere by entering '2'
    in 'Year/Inner counter'
  - 2nd note: if you have some locales installed on your system, you can
    type its name in the 'Locale' field (actually it does not work for
    seasons name, only for month names and day names)

If you want to modify the numbering pattern you can still do it here:

 - Click on 'Show/Hide advanced pattern' link. The advanced pattern
   table is shown but all fields are readonly
 - Click on 'Modify pattern' button. All readonly fields are now
   editable. Note that 'Begins with' and 'Inner counter' line are
   repeated here and any modifications in the small table will be
   replicated in the big table, and vice versa.
 - Pattern name is emptied, if you type a new name, a new pattern will
   be created, and if you type the same name as an existing numbering
   pattern, this one will be modified (with a confirmation message)
 - There is two new lines in this table:
   - Label: it's what is displayed in the smaller table headers above
   - Numbering: used to format numbers in different ways. can be
     'seasons', 'monthname' or 'dayname'. Month name and day name can be
     localized using the 'Locale' field. Seasons can't (values for
     English and french are hard-coded in Serials.pm)
 - You can modify what you want in the table and click on 'Test
   prediction pattern' button each time you want to see your
   modifications. (Note that checkboxes for irregularities aren't displayed
   in this mode, and you can't save the subscription until you have saved
   or cancelled your changes).
 - To cancel your modifications, just click on 'Cancel modifications'
   button.
 - To save them, click on 'Save as new pattern'. If the pattern name is
   already existing, a confirmation box will ask you if you want to
   modify the existing numbering pattern. Otherwise a new pattern will be
   created and automatically selected.

Once you have finished modifying numbering pattern, you can click again
on 'Test prediction pattern' to define irregularities, and then click on
'Save subscription'.

Now you can check the serials module still works correctly:

 - Check the subscription detail page to confirm that nothing is
   missing. Especially the 'Frequency' and 'Number pattern' information.
 - Try to receive some issues. Check that the serial number is correctly
   generated and if irregularities you have defined are taken into
   account (if you have defined some).
 - Check that receiving is blocked once you have reached the number of
   issues you have defined in subscription length (or once you have
   reached the subscription end date)

In serials menu (to the left of almost each page of serials menu) you
have two new links: 'Manage frequencies' and 'Manage numbering
patterns'.

'Manage numbering patterns' lead to a page which list all numbering
patterns and allow you to create, edit or delete them. The interface is
almost the same as numbering pattern modification in subscription-add.pl

'Manage frequencies' lead to a page which list all frequencies and allow
you to create, edit or delete them.

Try to create a new frequency:
 - Click on 'Manage frequencies' link in the serials menu and then click
   on 'New frequency':
 - Fill in the description (mandatory).
 - Unit is one of 'day', 'week', 'month', year' or 'None' ('None' is for
   an irregular subscription)
 - If unit is different from 'None' you have to fill the two following
   fields (Issues per unit, and Units per issue)
 - Note that at least one of those must be equal to 1
 - Issues per unit is the number of received issues by 'unit' and Units
   per issue is the number of 'unit' between two issues
 - Display order is used to build the drop-down list. Leave empty and it
   will be set to 0 (top of the list)
 - Then click on 'Save'
 - Check that this new frequency appears in the frequencies table and in
   the drop-down list in subscription-add.pl

Subscription history has been moved in its own page. To test if it still
works, choose a subscription with manual history enabled (or modify an
existing subscription to turn on manual history).

 - On the detail page, tab 'Planning', you should have a link 'Edit history'.
 - Click on it
 - Modify history and click on Save
 - In tab 'Summary' you should have the infos you just entered

And finally, you can check that old subscriptions (by old I mean
subscriptions that existed before the update) are correctly linked to an
existing numbering pattern and an existing frequency. Numbering patterns
should be named 'Backup pattern X' where X is a number.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Great development! Work as described. No koha-qa errors
(with all patches applied). Please QA this fast.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Squashed commits:
-----------------

Bug 7688 follow-up: Small fixes for QA

- # Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s) in
  C4::Serials::GetSubscriptionIrregularities
- Bad template constructions fixed in serials/subscription-add.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----

Bug 7688 follow-up: Small fixes for QA #2

- "return undef" -> "return"
- ":utf8" -> ":encoding(UTF-8)"
- TAB -> SPACES

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----

Bug 7688: Translate sample frequencies for french

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----

Bug 7688: Fix generating next serial when there is no 'Expected' issue

It can happen when the Expected issue is claimed. In this case the
status of the last serial is 'Claimed'

This patch change the API of GetNextSeq and GetSeq

Test plan:
- Create a subscription which starts a long time ago so that serials
  automatically appear in late issues
- Receive the first serial
- Go to claims page and claim the 2nd serial.
- Go back to the subscription page and click on 'Serial collection'
- You should have 2 serials, one 'Arrived' and one 'Claimed'.
- Click on Generate Next. This should fail with a software error message
  ("can't call method output ...")
- Apply this patch and click again on Generate Next. A new issue must be
  created with status 'Expected'.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----

Bug 7688: Followup FIX perldoc

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11086: (follow-up) editing the database files also
Chris Cormack [Sun, 20 Oct 2013 18:51:29 +0000 (11:51 -0700)]
Bug 11086: (follow-up) editing the database files also

Signed-off-by: David Noe <drnoe@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes permission description in en and untranslated
installer files.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11086: Fixing some grammatical mistakes in member-flags and tools-home
Chris Cormack [Sun, 20 Oct 2013 18:51:29 +0000 (11:51 -0700)]
Bug 11086: Fixing some grammatical mistakes in member-flags and tools-home

To test before the patch is applied notice that on the member-flags
page it says

"upload patron images in batch or one at a time"
After the patch it should say

"upload patron images in a batch or one at a time"

Try also for tools-home

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, only affecting templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoTranslation files for 3.14.0-beta
Bernardo Gonzalez Kriegel [Tue, 29 Oct 2013 10:58:41 +0000 (07:58 -0300)]
Translation files for 3.14.0-beta

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Reports Help
Nicole C. Engard [Thu, 24 Oct 2013 14:51:31 +0000 (10:51 -0400)]
Bug 10671: Update Reports Help

Update all of the reports related help files.

To test:

* Visit report pages and confirm that text and links
are right.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update holds help
Nicole C. Engard [Thu, 24 Oct 2013 03:48:51 +0000 (23:48 -0400)]
Bug 10671: Update holds help

This patch updates the manual link in the holds help
file.

To test:

* Place a hold in the staff client
* Click the help link
* Confirm manual link works

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Reviews Help
Nicole C. Engard [Thu, 24 Oct 2013 03:46:39 +0000 (23:46 -0400)]
Bug 10671: Update Reviews Help

This patch updates the link to the manual in the comments
moderation help.

To test:

* Visit comments moderation
* Click the help link
* Confirm manual link works

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Remove Unused Help File
Nicole C. Engard [Thu, 24 Oct 2013 03:44:27 +0000 (23:44 -0400)]
Bug 10671: Remove Unused Help File

This patch removes an unused help file in the help/export
folder.

To test:

Just confirm that the file is removed, there were no links
to it anymore.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
A corresponding page in Koha doesn't seem to exist.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Offline Circ Help
Nicole C. Engard [Thu, 24 Oct 2013 03:38:56 +0000 (23:38 -0400)]
Bug 10671: Update Offline Circ Help

This patch updates the offline circulation help files.

To test:

Visit the KOC file upload and pending transactions page
Review the help and check the links

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update suggestion help
Nicole C. Engard [Tue, 15 Oct 2013 19:57:33 +0000 (15:57 -0400)]
Bug 10671: Update suggestion help

To test visit the suggestion management pages
and confirm that the link in the help file goes
to the right manual.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update plugins help
Nicole C. Engard [Tue, 15 Oct 2013 19:55:47 +0000 (15:55 -0400)]
Bug 10671: Update plugins help

To test visit the plugin pages and confirm that the links
to the manual are right.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Links correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update tag tool help
Nicole C. Engard [Tue, 15 Oct 2013 19:25:36 +0000 (15:25 -0400)]
Bug 10671: Update tag tool help

This patch updates the links to the manual in the
help files on tags.

To test:

* Visit the tag moderation tool
* Click the help link
* Confirm that the links to the manual are right

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Links correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update patron card creator help
Nicole C. Engard [Tue, 15 Oct 2013 19:06:16 +0000 (15:06 -0400)]
Bug 10671: Update patron card creator help

Update manual links in the patron card help file.

To test:
* visit all patron card creator pages and click 'help'
* confirm that the link to the manual goes to 3.14

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All links correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update links in label help
Nicole C. Engard [Tue, 15 Oct 2013 19:00:19 +0000 (15:00 -0400)]
Bug 10671: Update links in label help

This patch updates the links in the label help
to point to the 3.14 manual.

To test:

Visit all label pages and click the help link
confirm that the manual links goes to the right place

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Correct links

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Add missing authority merge help
Nicole C. Engard [Tue, 15 Oct 2013 18:56:08 +0000 (14:56 -0400)]
Bug 10671: Add missing authority merge help

Test after 10/23 (when the manual link will work)
Visit authorities
Start a merge
Click help on during the merge process
Be sure that help is there and link works.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
There is help and link works

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Lists Help
Nicole C. Engard [Tue, 15 Oct 2013 18:37:18 +0000 (14:37 -0400)]
Bug 10671: Update Lists Help

To test go to Lists in the staff client and click help
Confirm that the link goes to the right manual

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Good link on shelves help

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update main help files
Nicole C. Engard [Tue, 15 Oct 2013 18:24:34 +0000 (14:24 -0400)]
Bug 10671: Update main help files

This patch updates help files that aren't in any other folder.

To test:

* Visit the main staff page and review the help
* Visit the About page and review the help
* Visit a page without help (which there better not be) and
  review the link to the manual

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All links works.
For a page without help, in detailed view of a record, select MARC or ISBD tabs,
no help but good link.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update links in Catalog help
Nicole C. Engard [Tue, 15 Oct 2013 18:06:07 +0000 (14:06 -0400)]
Bug 10671: Update links in Catalog help

To test search the catalog and click results
Test al of the links to the manual and make sure they
go to the 3.14 manual.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All links Ok

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Authorities Help
Nicole C. Engard [Tue, 15 Oct 2013 18:01:48 +0000 (14:01 -0400)]
Bug 10671: Update Authorities Help

To Test go to all authorities pages and click 'Help'.
Confirm that text appears and links work.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Auth help works.
Note: authorities-home.tt and detail.tt have same content.
It's right?

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Add missing patron lists help
Nicole C. Engard [Tue, 15 Oct 2013 17:54:39 +0000 (13:54 -0400)]
Bug 10671: Add missing patron lists help

To test go to Tools > Patron Lists and click 'Help'.
Confirm that the help is there and without typos.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help present. No typos

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Help file shows on correct page, no typos found.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10271: (follow-up) correct tabs
Bernardo Gonzalez Kriegel [Sat, 21 Sep 2013 17:44:55 +0000 (14:44 -0300)]
Bug 10271: (follow-up) correct tabs

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 10271: fix searching using an index containing "ns" or "nb"
Fridolyn SOMERS [Fri, 17 May 2013 12:03:37 +0000 (14:03 +0200)]
Bug 10271: fix searching using an index containing "ns" or "nb"

When an index does not contain a structure part, the structure "wrdl"
is automatically added and a structure is mandatory to build search
query (to convert ':' into '=').

But the code that tests that the structure is not already defined looks
in entire index string :

  $index =~ /(st-|phr|ext|wrdl|nb|ns)/

It should look for a comma followed by a structure and in the case of
"nb" and "ns" look for an exact match.

The consequence is that an index containing ns or nb or phr or etc does
not work.

This patch modifies the regexp for this part and other parts looking at
structures into index.

Test plan :
- Desactivate all searching sysprefs.
- Create a new index called "ansa" number 8999 into bib1.att,
  ccl.properties and records.abs
- Index a biblio with a value on this index, ie "VALUE"
- Perform a search on this index by editing URL:
  http://<server>/cgi-bin/koha/catalogue/search.pl?idx=ansa&q=VALUE
=> Without patch, the search does not work. The PQF query is
   "@and ansa: VALUE"
=> With patch, the search works. The PQF query is "@attr 1=8999 VALUE";
- Perform same test with an index containing a structure ie "aphra"
- Set QueryAutoTruncate syspref to automatically
=> Check * is added to operand : PQF query is
   "@attr 1=8999 @attr 4=6 @attr 5=1 VALUE"
- You may check stopwords removal but this feature is obsolete

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: as far as I can test, this works. Small tab error reported
by koha-qa, fixed in a followup.

This kind of patch is difficult to test without explicit instructions,
not everyone knows how to check what kind of PQF search is used.
I don't know. But I can test search results.

Test:
1) Deactivate search sysprefs
QueryAutoTruncate = only if * is added
QueryFuzzy = Don't try
QueryStemming = Don't try
QueryWeightFields = Disable
UseQueryParser = Do not try

2) Create new index 'ansa'
bib1.att : att 8999 ansa
ccl.properties : ansa 1=8999
records.abs : melm 999 ansa:w,ansa:p

1) and 2) from comment 3 on Bug

3) In the undestanding that index refers to field 999,
edited default framework, made 999a visible on editor

4) Edit sample record, add 'VALUE' to 999a, save, reindex

5) Search with /cgi-bin/koha/catalogue/search.pl?idx=ansa&q=VALUE
No results

6) Apply patch, repeat search
Got results

That's all I can test. If not enough for QA, then this
must wait until further and explicit test instructions

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
There is (for MARC21, at least), an exising indexes that this patch
fixes: Code-institution.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10271: regression test for search using indexes containing 'ns'
Galen Charlton [Mon, 28 Oct 2013 15:34:15 +0000 (15:34 +0000)]
Bug 10271: regression test for search using indexes containing 'ns'

This patch adds a regression test for doing a form-based catalog
search using an index that contains the string 'ns' in its name.  In
this case, the index being tested is 'Code-institution'.

To test
-------
[1] Prove -v t/db_dependent/Search.t should have two failed tests;
    one each for GRS-1 and DOM testing.
[2] After applying the main patch for this bug, the tests should
    pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11090 - Bootstrap theme: fix CSS problem with suggestions toolbar links
Owen Leonard [Tue, 22 Oct 2013 16:33:49 +0000 (09:33 -0700)]
Bug 11090 - Bootstrap theme: fix CSS problem with suggestions toolbar links

There is a problem with the style on the toolbar on the suggestions page
which makes it float incorrectly. This patch corrects the problem.

To test, log in to the OPAC as a user who has suggestions. The
selections toolbar (which shows the "select all," etc. controls) should
look correct.

Signed-off-by: JD@TeTakere <joanned@tetakere.org.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10750: (follow-up) fix capitalization of suggestion form in Bootstrap theme
Galen Charlton [Mon, 28 Oct 2013 15:12:07 +0000 (15:12 +0000)]
Bug 10750: (follow-up) fix capitalization of suggestion form in Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10750: Correct capitalization on suggestion form in OPAC
Katrin Fischer [Sun, 18 Aug 2013 19:28:19 +0000 (21:28 +0200)]
Bug 10750: Correct capitalization on suggestion form in OPAC

Create a new suggestion from your patron account in the OPAC.
Verify that all strings are correctly capitalized on the form
and submit buttons.

- Copyright date
- Standard number ... and other
- Submit your suggestion

Signed-off-by: Dani Elder <dani@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11108: fix duplicate display of basket whose receipt has just been cancelled
Galen Charlton [Tue, 22 Oct 2013 00:14:47 +0000 (00:14 +0000)]
Bug 11108: fix duplicate display of basket whose receipt has just been cancelled

After receiving an order basket, before finishing receiving the shipment,
one has an option to cancel the receipt.  This patch fixes a bug where
a basket whose receipt was just cancelled displays on both the pending orders
and already received tabs.

This patch also fixes a minor unitialized variable warning.

To test:

[1] Create a basket with at least one order and close it.
[2] Receive the order, then on the row in the 'Already received'
    table, click the cancel receipt link.
[3] In the page that displays, the basket just cancelled displays
    on both tables.  Clicking the cancel receipt link again results
    in an error message.
[4] Apply the patch.
[5] Repeat steps 1 and 2.  This time, the cancelled basket displays
    only in the pending orders table, as expected.
[6] Verify that after applying the patch, the following no longer
    is logged in the Apache error log:

parcel.pl: Use of uninitialized value in string eq at acqui/parcel.pl line...

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, all tests and QA script.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11133: fix markup errors in OPAC place hold form HTML
Owen Leonard [Fri, 25 Oct 2013 14:39:03 +0000 (10:39 -0400)]
Bug 11133: fix markup errors in OPAC place hold form HTML

There are markup errors in the OPAC place hold form which prevent it
from validating successfully. These errors don't seem to cause any
visual problem but can potentially cause problems when debugging
template logic.

To test, apply the patch and validate the page using your preferred
validator (since it's a page which requires login you'll have to upload
or paste the source). The page should validate successfully. Test when
placing holds on:

- a single item
- multiple items
- items which you cannot place on hold

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested according to test plan and validated souce code with
W3C Validator.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11123: remove two unused routines from C4::Accounts
Jonathan Druart [Wed, 23 Oct 2013 11:41:44 +0000 (13:41 +0200)]
Bug 11123: remove two unused routines from C4::Accounts

C4::Accounts::fixcredit and C4::Accounts::refund are marked as
deprecated and are not used. They can be removed.

Use:
  git grep fixcredit
  git grep refund
and verify these routines are not currently in used.

Bonus: The module exports reconcileaccount which is not defined. The
export is removed too.

MLT: Ran qa tool on this patch with no issues either.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11057: Bootstrap theme: fix display of active language in language chooser
Owen Leonard [Sun, 20 Oct 2013 17:39:06 +0000 (10:39 -0700)]
Bug 11057: Bootstrap theme: fix display of active language in language chooser

There is a problem with how an active single language is styled, making
the alignment look incorrect. This patch amends the markup and the CSS
to make it look better. This patch does not address the position of the
language menu.

To test you must have at least one additional single translation
installed. Apply the patch, refresh the page, and confirm that the
display of the active language is improved.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Improved view of current language. No koha-qa errors.

1) Downloaded a couple of xx-YY-bootstrap.po from
http://translate.koha-community.org/projects/314
2) Installed sample languages
3) Enable them and opaclanguagesdisplay
4) Checked correct alignment of selected language

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The selected language has not a padding, contrary to others.
Not perfect but it fixes the descripted behavior.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10829: fix browsing across pages breaks for OPAC bibs-linked-to-authority searches
Martin Renvoize [Thu, 5 Sep 2013 14:49:55 +0000 (15:49 +0100)]
Bug 10829: fix browsing across pages breaks for OPAC bibs-linked-to-authority searches

Test plan
1. Do an authority search in the OPAC (A search for 'an:49' perhaps..
that should bring up results for authority number 49, hopefully there
are multiple pages of results, if not try again and find one that
gives you multiple pages of results)
2. Click the final result on any page of results (there must be more
results to follow for this to work)
3. Try clicking the 'Next' button in the 'Browse results' pane on
the right of the page.
4. It should take you to the next result in the search list (i.e
the first result from the next page of results) - Double check it is
correct, we found that it was often not.

5. Apply patch and run same process, this time you should get the
correct paging.

Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I reproduce the issue and I confirm this patch fixes it!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9192: let UNIMARC_sync_date_created_with_marc_biblio.pl create fields if needed
Fridolyn SOMERS [Mon, 3 Dec 2012 13:08:07 +0000 (14:08 +0100)]
Bug 9192: let UNIMARC_sync_date_created_with_marc_biblio.pl create fields if needed

Prior to this patch, this script would only modify the date
created and modified fields; this patch changes the behavior
so that the fields can be created if they're not already present
in the record.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 9192: UNIMARC_sync_date_created_with_marc_biblio.pl field creation (followup)

Add tests :
if field < 10 it must not have a subfield
if field > 9 is must have a subfield

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Both patches applied, no koha-qa errors.

Bug 9192: followup fix typo

Fix typo on usage message.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11034: remove incorrect return for BiblioAutoLink
Colin Campbell [Thu, 10 Oct 2013 13:09:19 +0000 (14:09 +0100)]
Bug 11034: remove incorrect return for BiblioAutoLink

BiblioAutoLink was being called expecting an array to
be returned. The subroutine in fact returns a scalar

As the variables that the return was stored in, went
out of scope immediately. It is probably better to be
explicit that we are throwing the return away by not
going through the motions of storing it in a variable

To test:

[1] Add or save a bib record using the cataloging editor.
[2] Verify that no regressions have occurred
[3] (optional) If BiblioAddsAuthorities is on, verify that
    relevant authority records are linked to from the bib.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10889: fix comment describing biblioitems.serial
Galen Charlton [Sun, 20 Oct 2013 17:43:12 +0000 (17:43 +0000)]
Bug 10889: fix comment describing biblioitems.serial

biblioitems.serial is not a foreign key; it's a Boolean indicating
whether the biblio record is a serial, which in turn influences how
serial items are displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10493: (follow-up) fix test errors
Galen Charlton [Wed, 23 Oct 2013 04:24:26 +0000 (04:24 +0000)]
Bug 10493: (follow-up) fix test errors

[1] Fix regression on bug 10663

Looks like the regression was introduced by a glitch during rebasing.

[2] Fix errors in Circulation_issue.t

The change in AddRenewal() turned up an issue with how the test
script issued one of the test items.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoupdate 3.14 release notes for second alpha
Galen Charlton [Tue, 22 Oct 2013 21:08:45 +0000 (21:08 +0000)]
update 3.14 release notes for second alpha

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10493: (follow-up) fix unitialized variable warning
Galen Charlton [Tue, 22 Oct 2013 20:59:50 +0000 (20:59 +0000)]
Bug 10493: (follow-up) fix unitialized variable warning

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10493: (follow-up) fix various QA issues
Kyle M Hall [Mon, 21 Oct 2013 20:46:26 +0000 (16:46 -0400)]
Bug 10493: (follow-up) fix various QA issues

Adds a new Template Toolkit filter EncodeUTF8 to encode strings
to utf8 for correct display of diactritics.

Adds the new JavaScript function removeFocus() to staff-global.js
Use this function to remove the focus from any element for
repeated scanning actions on errors so the librarian doesn't
continue scanning and miss the error.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This works as described - you have to actually look at the
error and pick what you want to do or confirm it. I think
maybe tying the action to a shortcut (c = confirm or similar)
would be nice, so you can get away with only using the keyboard.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10493: (follow-up) fix minor template issues
Owen Leonard [Thu, 1 Aug 2013 19:37:46 +0000 (15:37 -0400)]
Bug 10493: (follow-up) fix minor template issues

This template followup fixes some minor template errors and adds some
style to dialog buttons matching those seen on the circulation page.

To test, submit barcodes to trigger the various error conditions:
Non-existant barcode, over the renew limit, restricted patron, item on
hold. Override and Ignore buttons should be properly styled and
functional.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10493: Add renewal script
Kyle M Hall [Wed, 19 Jun 2013 09:28:01 +0000 (05:28 -0400)]
Bug 10493: Add renewal script

This patch adds a renewal tool that functions similar to the returns where a
librarian can continuously scan items for renewal. This script blocks
renewals that are impossible, and allow the same renewal overrides
as circulation.pl

Test plan:
 1) Apply the patches for bug 8798
 2) Apply this patch
 3) Browse to /cgi-bin/koha/circ/renew.pl
 4) Enter an invalid barcode, you should get an error message
 5) Enter a valid, but not checked out barcode, you should get an error
    message.
 6) Enter a valid barcode that is checkout out and should be renewable,
    you should get a success message.
 7) Enable AllowRenewalLimitOverride
 8) Enter a barcode for an item that has been renewed too many times
 9) You should get a warning which you can override.
10) Disable AllowRenewalLimitOverride
11) Repeat steap 8
12) You should get a blocking error message
11) Enter a barcode for an item with unfilled holds on it,
    you should get an overridable warning

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Passes all tests and QA script, some issues have been
addressed in follow-ups.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) improve setting 'partial' order status during upgrade
Galen Charlton [Tue, 22 Oct 2013 13:49:32 +0000 (13:49 +0000)]
Bug 5336: (follow-up) improve setting 'partial' order status during upgrade

This patch modifies the logic to set the partial status for an
order to verify that:

- at least one item has been received already
- the order belongs to a closed basket

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) remove unused new parameter to NewOrder() that slipped in
Galen Charlton [Tue, 22 Oct 2013 13:42:23 +0000 (13:42 +0000)]
Bug 5336: (follow-up) remove unused new parameter to NewOrder() that slipped in

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) update DBIC schema class for aqorders
Galen Charlton [Tue, 22 Oct 2013 13:38:18 +0000 (13:38 +0000)]
Bug 5336: (follow-up) update DBIC schema class for aqorders

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: DBRev 3.13.00.032
Galen Charlton [Tue, 22 Oct 2013 13:18:14 +0000 (13:18 +0000)]
Bug 5336: DBRev 3.13.00.032

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) multiple QA fixes
Jonathan Druart [Wed, 2 Oct 2013 07:58:14 +0000 (09:58 +0200)]
Bug 5336: (follow-up) multiple QA fixes

- add a message if the search returns no result
- keep selected values if the search returns no result (for fund and
  order status)
- remove plurals in order status
- move the order status column in the search results table

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
New tests also pass:
    t/db_dependent/Acquisition/close_reopen_basket.t

1) Database update - I end up with too many partials. My test cases:

 - New orders, basket still open
   OK Expected: new, Result: partial
 - Ordered orders, basket and basketgroup closed
   OK Expected: ordered, Result: partial
 - Partially received orders
   OK Expected: partial/complete, Result: partial/complete
 - Received orders
   OK: Expected: complete, Result: complete
 - Cancelled orders
   * cancelled from open basket before order
   OK: Expected: cancelled, Result: cancelled
   * cancelled from closed basket before receive
   OK: Expected: cancelled, Result: cancelled

All aqorders where updated with the correct status.

I have saved my 'pre-updatedatabase' and can repeat the test anytime you have a follow up.

2) Testing search functionality

  a) Order search - result list
  Order search shows a new column, I think it would be a bit better if the
  status there was singular instead of plural - new order, partially received
  order etc. - maybe we could even leave out the 'order'? (minor)

  The column seems a bit lost in the middle, not sure where it would make more
  sense (just saying)

  b) Order search - advanced search form
  The advanced search form now shows a new filter: Order status

  All new status can be searched.
  - an "empty" search will find all but cancelled orders
  - searching for cancelled orders works correctly and shows results
  Search works correctly, no regressions found.

  If no result is found a message is shown.
  All search input is kept, so you can modify your search terms easily.

3) Testing setting of status after applying the patch

   a) Create a new order with 2 items - status is new. OK
   b) Close the basket - status is ordered. OK
   c) Receive both items - status is completed. OK
   d) Undo receipt - status is ordered. OK
   e) Receive only 1 item - order is split up into 2 orders:
       - status is partial OK
       - status is completed OK
   f) Undo receipt of received item - order is combined into 1 again
       - status is ordered OK!
   g) Receive only 1 item again - status ordered/partial.
   h) Delete order.
       - status is completed
       - status is cancelled
      OK!

   i) Undo receipt of 1 item again.
      Refresh page.

This results in the following behaviour, that has been reported as
bug 10984. After refreshing the page follow message is shown:
  Cannot cancel receipt. Possible reasons :
    - The order line you trying to cancel was created from a partial
    receipt of another order line which is already received.
    Try to cancel this one first and retry.
    - The order line you trying to cancel was created from a partial
    receipt of another order line which has been deleted.
    Cancellation is not possible.
  BUT: The receipt is undone, but you are left with a
    line with 2 items, a cancellation date and the status ordered.
    Because of the cancellation date the order is not visible in pending orders.

The status is correct - so I feel this should not stop this patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) fix case where partial status was not correctly set
Jonathan Druart [Tue, 1 Oct 2013 12:06:11 +0000 (14:06 +0200)]
Bug 5336: (follow-up) fix case where partial status was not correctly set

An order (o1) is considered as partially received if (at least) another
order (o2) has the o1.ordernumber == o2.parent_ordernumber and the
quantity received is < to the quantity (to receive) and o1.ordernumber
!= o1.parent_ordernumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) use understandable codes rather than magic numbers for orderstatus
Jonathan Druart [Thu, 11 Jul 2013 08:43:05 +0000 (10:43 +0200)]
Bug 5336: (follow-up) use understandable codes rather than magic numbers for orderstatus

This patch uses understandable codes instead of magical numbers for the
aqorders.orderstatus field.

+ execute sql queries in unit tests into a transaction.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) miscellaneous changes
Jonathan Druart [Mon, 1 Jul 2013 14:27:32 +0000 (16:27 +0200)]
Bug 5336: (follow-up) miscellaneous changes

- fix capitalization
- fix update database message

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) add unit tests for 3 acq routines
Jonathan Druart [Tue, 23 Apr 2013 14:50:22 +0000 (16:50 +0200)]
Bug 5336: (follow-up) add unit tests for 3 acq routines

Unit tests In C4::Acquisition for:
- CloseBasket
- ReopenBasket
- GetBiblioCountByBasketno

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) merge parent ordernumber and ordernumber columns in display
Jonathan Druart [Thu, 2 May 2013 08:38:27 +0000 (10:38 +0200)]
Bug 5336: (follow-up) merge parent ordernumber and ordernumber columns in display

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: (follow-up) don't display deleted orders in late orders search result
Jonathan Druart [Tue, 23 Apr 2013 13:30:11 +0000 (15:30 +0200)]
Bug 5336: (follow-up) don't display deleted orders in late orders search result

Test plan:
Check that deleted orders are not listed in the late orders search
results.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5336: Order search (search and UI enhancements)
Jonathan Druart [Wed, 18 Jan 2012 15:05:40 +0000 (16:05 +0100)]
Bug 5336: Order search (search and UI enhancements)

You can now search orders by

- order status
- fund

The patch series also adds a new field, aqorders.orderstatus, which can
contain following values:

  new
  ordered
  partial (for partially received orders)
  complete
  cancelled

To test: Search and check if results are consistent in histsearch.pl
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Note: status are no longer numeric, but strings now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10403: Show inactive but unlocked budgets on orderreceive
Jared Camins-Esakov [Tue, 13 Aug 2013 11:51:57 +0000 (07:51 -0400)]
Bug 10403: Show inactive but unlocked budgets on orderreceive

I have heard from several libraries that at the end of the budget
year even though a budget is inactive for new acquisitions, an
inactive budget should remain modifiable until the books are
closed and the budget is marked inactive. This patch makes it so
that all budgets that are unlocked are available on the order
receipt page (only).

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10403: add ability to change fund on receipt
Jared Camins-Esakov [Sat, 8 Jun 2013 17:27:36 +0000 (13:27 -0400)]
Bug 10403: add ability to change fund on receipt

Right now there is no way to change the budget or fund when receiving an
item, which is annoying, particularly at the end of the fiscal year when
every item not already received has to be switched to the following
year's budget. This patch adds the ability to change the budget and fund
when receiving.

To test:
1) Apply patch.
2) Create an order for a vendor, choosing a fund to use for that order.
3) Receive the order, leaving the fund unchanged. Make sure the fund
   did not change.
4) Create another order for a vendor, choosing a fund to use for that
   order.
5) Receive the order, this time changing the fund. Make sure the fund
   is changed.
6) Run the unit test:
    > prove t/db_dependent/Acquisition.t
7) Sign off.

(Notes: this patch depends on the Acquisitions.t unit test improvements
in bug 10274; the seemingly-unrelated change in SQLHelper quiets an
irritating warning caused by the NewOrder call in ModReceiveOrder)

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers...
Owen Leonard [Mon, 21 Oct 2013 21:54:41 +0000 (14:54 -0700)]
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission

The "duplicate" button on the circ/patron toolbar should not appear if
the logged in user lacks permission to edit patron records. This patch
wraps the button in the required logic.

To test, open a patron record in circulation or patrons and view as a
staff client user who both has and doesn't have CAN_user_borrowers
permission. The button should be shown and not shown accordingly.

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10954: ensure that payment receipt displays the payment made
Kyle M Hall [Thu, 26 Sep 2013 16:22:39 +0000 (12:22 -0400)]
Bug 10954: ensure that payment receipt displays the payment made

When printing a payment receipt, the payment did not display, only the
total currently owed.

Test Plan:
1) Create a payment for a borrower
2) Print the payment with the "print" button to the right of the payment
3) Note the missing payment line
4) Apply this patch
5) Repeat step 2
6) Note the payment line now displays

Signed-off-by: cedric.vita@dracenie.com <cedric.vita@dracenie.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10785: (follow-up) fix one last bit of capitalization
Galen Charlton [Tue, 22 Oct 2013 05:40:49 +0000 (05:40 +0000)]
Bug 10785: (follow-up) fix one last bit of capitalization

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10785: change 'Dropbox' labels to 'Book drop'
Ketan Kulkarni [Wed, 9 Oct 2013 13:27:03 +0000 (18:57 +0530)]
Bug 10785: change 'Dropbox' labels to 'Book drop'

Signed-off-by: KohaCon13 demo <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Checked the book drop still works, also grepped for
other appearances of the term.
Fixed capitalization.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10982: fix link to IFLA UNIMARC documentation in Cataloging
Frédéric Demians [Wed, 2 Oct 2013 08:53:30 +0000 (10:53 +0200)]
Bug 10982: fix link to IFLA UNIMARC documentation in Cataloging

In Cataloging, a ? opens a documentation page on IFLA web site. The current
implementation rely on the tag tab to select the appropriate IFLA
documentation web page. It doesn't work when UNIMARC tag are displayed
in a tab which digit is different for tag first digit.

To reproduce the bug:

  - Modify default framework, put all 200 subfields in tab 1
  - Add a new biblio record
  - Click on ? on 200 field
   => Wrong IFLA page is opened

Apply the patch and retry...

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

Test on UNIMARC install
1) Switched all 2xx tags to tab 1
2) press any 2xx ?, wrong page
3) patch applied
4) links are now correct

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11099: fixed bug in Label in Staff Client - series on facets not easily css selec...
Jonet Moore [Mon, 21 Oct 2013 22:52:34 +0000 (11:52 +1300)]
Bug 11099: fixed bug in Label in Staff Client - series on facets not easily css selectable

add c-span to series facet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11002: (follow-up) use jQuery validator plugin
Galen Charlton [Tue, 22 Oct 2013 05:15:07 +0000 (05:15 +0000)]
Bug 11002: (follow-up) use jQuery validator plugin

This patch uses the jQuery validator plugin introduced in
bug 6209 for two reasons:

[1] To supply validation for non-HTML5-compatible web
    browsers.
[2] To force use of the validator plugin rather than
    built-in validation for HTML5 browsers, which means
    that our translations will be used.

Note that a version of the function to prevent double form submission
is used as the submit handler invoked when the validator plugin
is satisified that the form is complete.

To test:

[1] Same as the main test plan, but note that the validation
    messages now appear inline rather than as pop-ups.
[2] Verify that the double form submission prevention still
    works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11002: simplify patron mandatory field validation
Jonathan Druart [Mon, 7 Oct 2013 08:41:24 +0000 (10:41 +0200)]
Bug 11002: simplify patron mandatory field validation

When the pref BorrowerMandatoryField is set and a librarian forget to
fill fields, a js popup appears with the following message:
  "The following fields are mandatory: surname, etc."
The fields are not translatable.

Test plan:
- fill the pref BorrowerMandatoryField with something like:
  title|zipcode|surname|cardnumber|branchcode
- go the members/memberentry.pl?op=add page
- verify you are not allowed to add the patron without filling all
  mandatory fields.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11003: fix JS error on the staff cart page
Jonathan Druart [Mon, 7 Oct 2013 09:41:22 +0000 (11:41 +0200)]
Bug 11003: fix JS error on the staff cart page

A call to yuiToolbar breaks JavaScript code on the cart page.

Test plan:
- add some biblio to your cart
- open the cart
- a js error occurs (see it with firebug):
  ReferenceError: yuiToolbar is not defined
- apply the patch
- retry and verify the error does not appear anymore.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11058: fix compilation warning in C4::Record
Colin Campbell [Wed, 16 Oct 2013 09:09:12 +0000 (10:09 +0100)]
Bug 11058: fix compilation warning in C4::Record

A routine declares two lexical variables named $stylesheet.
This patch renames the second to keep code clearer and
avoid propagating compile time warnings

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11070: followup to correct tabs
Bernardo Gonzalez Kriegel [Sat, 19 Oct 2013 22:07:32 +0000 (19:07 -0300)]
Bug 11070: followup to correct tabs

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 11070: fix typo in UNIMARC 115a plugin
Fridolyn SOMERS [Thu, 17 Oct 2013 14:45:48 +0000 (16:45 +0200)]
Bug 11070: fix typo in UNIMARC 115a plugin

In UNIMARC 115a cataloging plugin, there is a typo : "NTSC", not "NSTC" :
http://fr.wikipedia.org/wiki/Ntsc

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple string change.
koha-qa complains about tab errors, fixed in followup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11098: fixed bug in label in opac - topics on facets not easily css selectable
Andrew Lockett [Mon, 21 Oct 2013 22:44:28 +0000 (11:44 +1300)]
Bug 11098: fixed bug in label in opac - topics on facets not easily css selectable

Search opac, then right-click "Topics" and select "inspect element"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Please add a description of the problem and a test plan to your commit
message next time, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as expected. Thx!

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