Bug 1861 - Unique patrons logins not (totally) enforced

The Koha 3.0 patron admin page will prevent you from creating a user who
has an identical OPAC login as someone else (though I would change the
error message from "Login/password already exists." to "Login
already exists.", since it's not the password that's the
problem).

However, there's nothing enforced in the MySQL database to prevent
patrons from being imported or manually inserted with duplicate logins.
Would it be better to change the MySQL spec from this:
KEY `userid` (`userid`)
to this:
UNIQUE KEY `userid` (`userid`)

Test plan:
1) Enter mysql console
2) Attempt to create two borrowers with identical user id's
3) Note you are able to do so
4) Delete these bororwers
5) Apply this patch
6) Run updatedatabase.pl
7) Repeat step 2
8) Note you are now unable to do so

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Leaves deletedborrowers as it is, deleting patrons still works ok.
Works according to test plan.
Database update will only be successful, when no duplicate entries
exist in the database.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 1861 [QA Followup] - Fix Check_Userid and unit tests

Check_Userid assumes that a borrowernumber will always be passed in
and thus fails to to return 0 for an already used userid when creating
a new patron.

Unit tests must now also me modified to no longer assume it is possible
to create multiple patrons with the same userid.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 1861 [QA Followup] - Don't modify userids, warn if we can't modify the index automatically

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 13453: Koha.t daily quote tests assume sample data

By adding quotes 3 and 25 from the sample data, this test can
pass without having the sample quote data loaded.

TEST PLAN
---------
1) Ensure there is no quote id=3 or that it is NOT
   Abraham Lincoln.
2) prove t/db_dependent/Koha.t
   -- this should fail the daily quote test.
3) apply patch
4) prove t/db_dependent/Koha.t
   -- this should *NOT* fail the daily quote test.
5) run koha qa test tools

Followed test plan 1)-4). Without patch, daily quote test failed. With patch, test passed OK.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, leaves actual data unchanged.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13360: C4::Ris assumes that hash keys are ordered - KW

This patch only fixes the KW order.

Test plan:
1/ Choose/create a record with several 6XX (for KW), see the code source
to know which fields you can use
2/ Export this record in RIS format
3/ Verify that the KW lines are ordered following the marc record fields
order.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

We really should refactor this whole thing into Koha::RIS sometime, it's
a horrible module at the moment.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13357: Untranslatable strings on itemsearch.tt

This patch enable translation of labels on itemsearch.tt

To test:
1) Translate for a fairly complete language (es-ES de-DE)
2) On staff, go to Search > Item search
3) Check there are many untranslated strings
e.g. Text before pulldowns on first and second box
     All options on third box

4) Apply the patch

5) Repeat 1 & 2
6) Check there are now some strings translated
7) Update translation file, check there are some
new strings to translate (may be they are fuzzy)
e.g. "All statuses", "All collection codes"

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13124 - Record titles with parentheses causing label weirdness

Test Plan ( using sample data included with Koha )
1) Catalog a record and item with the title "Oh no! or, (How my
   science project destroyed the world) /"
2) Edit the DEFAULT template
   a) Set layout type to Biblio
   b) Set data fields to "title, author, isbn, issn, itemtype,
      barcode, itemcallnumber"
   c) Set font size to 10
3) Create a batch with just the one item you created
4) Export the PDF with the Avery template and the DEFAULT layout
5) Note the weirdness
6) Apply this patch
7) Re-export the PDF, note it's no longer weird ; )

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@gmail.com>