Bug 12409: Fix fields order on exporting to bibtex

The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted
which is wrong with perl 5.18

Note that the t/db_dependent/Record.t fails without this patch.

Test plan (for perl >= 5.18 only):
1/ prove t/db_dependent/Record.t should return green
2/ Try to export a record to bibtex and verify the order is correct
(should be author, title, year, published, etc.).

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

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

Wrong Bug number on heading.
Work as described, test pass, no koha-qa errors.

The problem is to think that a hash returns
keys in a particular order, that's not true
and no matter which perl version.

Code as was left is... misleading.
Comments talks about a hash, which is no more.
On array asignment "a => b" is equivalent to "a, b",
but the former is usually used on hashes, so a
replacement of '=>' by ',' could clarify what are we storing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixing the comments in a follow-up patch.
Tests pass now without problems and records export ok.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12409: Follow up - Reflect from hash to array in comments

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl

This patch removes the use of smartmatch operators in the search code.

Regards
To+

Edit: this revision uses 'grep' instead of Lists::MoreUtils::any

Sponsored-by: Universidad Nacional de Cordoba

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 search, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12151: Remove uses of smartmatch operator in report scripts

This patch removes the use of smartmatch operators in report scripts.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Acquisition and Patron statistics wizard tested, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl

The '~~' smartmatch operator is used to compare MARC::Field->subfield(code)
(i.e. a string) and the text element of each MARC::Field->subfields() which
is also plain text.

Substituting '~~' for 'eq' should be harmless then.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Tested batch modification of items, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm

Just that.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Could only verify by reading the code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12499: adding units tests for C4::Letters

The tests for the subroutines : GetMessageTransportType, EnqueueLetter, SendQueuedMessages, GetQueuedMessages, GetLetters, getletter, addalert, getalert, delalert and GetPreparedLetter of the module C4::Letters have been added.

Test plan:
1) Apply the patch
2) Execute the unit tests by launching :
prove t/db_dependent/Letters.t
3) The result has to be a success without error or warning :
t/db_dependent/Letters.t .. ok
All tests successful.
Files=1, Tests=45,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.44 cusr  0.08 csys =  1.57 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All test pass, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12062: Untranslatable "Reserve not found"

This patch rewrites transfer slip code to make some
strings translatable.
Also simplifies some code and parameters.

To test:
1) Produce a transfer slip, no changes must be noted.

2) Update PO file, new strings
msgid "%s %s%s%sNo hold found%s %s %s "
msgid "%s%s%sNo hold found%s "
msgid "Koha &rsaquo; Circulation &rsaquo; Transfers"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12062: Follow up to fix more untraslatable cases

This patch modifies staff printslip.tt to take into account
caller. Also fixes similar problem on opac printslip.tt

To test:
staff
1. Print hold transfer slip
2. Print transfer slip
3. Print member slip
opac
4. Print self checkout slip

5. Update translation files, check new strings are present

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12062: Follow up - adds missing )

With this patch, patches pass QA script and unit tests.
Tested printing different slips successfully.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12511 - Novelist Select not using https in bootstrap

In prog we have:
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

but in bootstrap we have
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="http://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

Because bootstrap isn't using https, we get an error like this:
[blocked] The page at
'https://koha.mylibrary.com/cgi-bin/koha/opac-detail.pl?biblionumber=105315&query_desc=kw%2Cwrdl%3A%20home'
was loaded over HTTPS, but ran insecure content from
'http://imageserver.ebscohost.com/novelistselect/ns2init.js': this
content should also be loaded over HTTPS.

Test plan would require having a subscription to Novelist Select.
I think this is trivial enough to go without.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Very small change, trusting Kyle and the sign-off here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12495 - Include streetnumber in hold alert address

Steetnumber is not included in the addess in the hold alert add the
field to those displayed

To test this, place a hold on an item that is on-loan, having first made
sure that the requesting user has a value in the street number field of
his address. Check the item in, and an alert should appear giving the
name and address of the requesting user. This address should include the
contents of the street number address field.

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

I was able to confirm three of the four template changes for the
following cases:

- Item placed on hold for a patron at the current library, not waiting
- Item placed on hold for a patron at the current library, already
  waiting
- Item placed on hold for a patron at another library, not waiting

I don't know how to trigger the case [% IF ( diffbranch ) %].

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Note: Maybe sample slip templates should also include street number?

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