Bug 11068: Update MARC21 es-ES default frameworks fields and translation

Rebased on top of Bug 3977

This patch updates the Spanish default frameworks for bibliographic records
and authorities using the files created from the po files on Pootle.

To test:
- Run the web installer, make sure all mandatory data is selected
- Verify there are no SQL errors
- Check cataloguing behaves normally
- Check adding authorities behaves normally

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Trusting Bernardo and Tomas as native speakers to get the Spanish right.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 9530: Follow-up - Fix t/db_dependent/Branch.t

Tests need to learn about the new fields in the branches table.

To test:
prove t/db_dependent/Branch.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12571 - Add ability to customize SIP2 screen messages

We should add the ability to apply a regular expression to screen
messages for the SIP2 server. This would allow libraries to not only
customize the screen messages the patron sees, but can also allow screen
messages to be translated.

Test Plan:
1) Apply this patch
2) Inspect etc/SIPconfig.xml, note the new screen_msg_regex tags
   that can be nested inside a given login tag.
3) Add one or more screen_msg_regex tags to your own SIP config
   Recommendation: s/Greetings from Koha./Welcome to your library!/g
4) Restart your SIP2 server
5) Test with a SIP2 machine, or use /misc/sip_cli_emulator.pl
6) Note your new AF fields!

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11007: Drop column aqorders.cancelledby

It seems that this column has never been used.

Test plan:
1/ Execute the updatedatabase entry.
2/ git grep cancelledby should not return occurrence in the code (except
in Koha/Schema/*
3/ prove t/db_dependent/Acquisition.t should return green.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I couldn't find any trace of this column being used.
Passes tests and QA script, updates all necessary files.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11007: DBRev 3.17.00.034

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11007: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8837: Dewey cn_sort inaccurate

This patch fix the cn_sort sorting accurace described by Joy Nelson.

Testing:

I) Appy the bug 12424 patch

Before applying this patch:
0) Select 3 items.
1) Edit the items selected
2) Change "Full call number" option to 971/P23w/v.1-2/pt.8, 971.01/P23w/v.1-2/pt.6-7 and 971.01/P23w/v.1-2/pt.7
3) Save changes
4) Valide 971P23WV_12PT_8_000000000000000, 971_000000000000000_01P23WV_12PT_67 and 971_01P23WV_12PT_700000000000000  (table items - cn_sort column).

After applying this patch:
5) Edit again the item selected in 0
3) Save changes
4) Valide 971_000000000000000_P23W_V_12_PT_8, 971_010000000000000_P23W_V_12_PT_67, 971_010000000000000_P23W_V_12_PT_7 (table items - cn_sort column).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8837 [QA Followup] - Add unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13083 - Hard-coded " by " in opac-tags.pl

The OPAC's list of a logged-in user's tagged titles displays title and
author, which for some reason are combined in the script into one
variable. I can't see any reason to do it this way.

This patch modifies the script so that title and author are passed as
separate variables. In addition, subtitle is now passed as well.

To test you must log into the OPAC as a user who has tagged multiple
titles, at least one of which should have an author and at least one
with a subtitle. View the list of tagged titles and confirm that this
information is being displayed correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text

This patch makes columns Holds, Items and "Hold ratio" to sort
numerically instead of lexicographically. Also changes default sorting
column from "Holds" to "Hold ratio" because this is a hold ratios
-report, not hold count report.

Also cleans up an excess aoColumn -definition, because aoColumns ==
aoColumnDefs without target operator. No point in defining columns
twice.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 5342: Serial claiming improvements: add a counter

This patch adds a new DB field serial.claims_count
This field already exists for late orders. It makes sense to introduce
it for serial.

Test plan:
0/
 a) Does not apply the patch.
 b) Remove all your claimissues notices and be sure you have some serial issues
    in late.
 c) remove email address for the vendor you will use.
 d) remove email address for the logged in user.
 e) Export claims using the csv export => The selected issues will be
 marked as claimed.
 f) logout/login (to update the email address).
1/ Apply the patch and execute the updatedb entry.
2/ Go on the Serials > Claims page
3/ Verify that you get a warning message 'No claimissue notice defined'
4/ Verify the vendor list is correct (with the number of serial in late.
You should not get any changes here.
5/ Select one vendor and verify that the issue which was claimed before
has a claim count set to 1.
6/ Verify that you are not able to send notification to the vendor.
7/ Create a claimissue notice.
Something like:
  <<LibrarianFirstname>>
  <<LibrarianSurname>>
  The following issues are in late:
  <order><<biblio.title>>, <<biblio.author>> (<<biblio.serial>>)</order>
8/ Go on the Serials > Claims page, the warning message does not appear
anymore.
9/ Select issues. Select a notice. And "Send notification".
You should get an error (no email defined for this vendor).
10/ Add an email for the vendor.
11/ Select issues. Select a notice. And "Send notification".
You should get an error (no email defined for your user).
12/ Add an email address to your user
logout/login
13/ Select issues. Select a notice. And "Send notification".
You should get a happy message: the email has been sent!
14/ The email will contain the order tags if bug 12851 is not
pushed/applied.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, some small issues fixed in a follow-up.
Note: If you change the email address of your staff user, you will
have to log out and back in to make the change take effect.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 5342: (qa-followup) FIX some issues

this patch:
- reintroduces the ISSN column
- fix a wording (already there before the main patch)
- fix the tests if a serial was already in late

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small change: Removed 2 tabs in claims.tt and fixed order
of ISSN/Issue number column descriptions as they were switched.

Note: The <order> tags are currently not stripped out of the
notice.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 5342: DBRev 3.17.00.035

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 5342: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13149: for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql

REPLICATE:

1. Create a new Koha database to your SQL Server. Set proper user permissions.
2. Change database data source definitions in koha-config.xml.
3. Run the web-installer to install a new Koha with defaults.
4. Run "SELECT * FROM systempreferences;" in your SQL Server and observe only
   3 systempreferences set.
 +--------------------------+
(( 5. mainpage.pl crashes!! ))
 +--------------------------+

AFTER THIS COMMIT:

0. Redo REPLICATE steps.
1. test phase 4 returns over 400 results.
2. test phase 5 doesn't crash.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13149: Fix sequence of fields in sysprefs.sql

The sequence of fields in the SQL statement didn't
match correctly.

Test plan:
- Run the web installer on an empty database
- Make sure no SQL errors are shown
- Check the systempreferences table in your database,
  especially all UsageStats*
- Make sure the explanations are in explanation etc.

Alternatively:
- Save your database
- truncate systempreferences;
- Load the sql file sysprefs.sql
- Verfiy as above

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

Tested creating new database, then loading kohastructure and sysprefs.sql
Without patch sysprefs fails to load, with patch loads Ok!
No koha-qa errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>