Bug 12653: remaining prog reference in t/db_dependent/SuggestionEngine_ExplodedTerms.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13145 UNIMARC 610 tag isn't displayed in OPAC when there is no $9 subfield

On OPAC detail page, subject fields are not displayed when they are not linked
to authorities ($9 subfield). This is due to a misplelling in UNIMARC XSL
detail page.

TO TEST:

(1) On a Koha UNIMARC, find out a biblio record with a 610 field, without $9
    subfield. Something like:

    610 1 $a Aliment -- Approvisionnement -- Europe -- Histoire

    Or add such a field to an existing record.

(2) Check that OPACXSLTDetailsDisplay is set to 'default'

(3) See this record on OPAC detail page. You must see 'Subject: ' => nothing
    after the 'Subject' label. If your record contains several 610 fields
    without $9, the | character will appear, separating no content.

(4) Apply the patch.

(5) Reload the page seen at step (3): subject is displayed now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested on a UNIMARC installation.
Small XSLT change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194

If you use the restore option with a partial pref file not containing a version, you will have this error. Also the count of updated prefs will be one too high.

This is corrected by a better test of the hash value in the CheckVersionPref subroutine.

Test plan:
[1] Create a small pref file and remove the version pref (if present). You
could for instance do a pref backup and remove most lines.
[2] Use the restore option with and without this patch.
    So, something like:
        maintclone/misc/maintenance/cmp_sysprefs.pl -c r -f 9999crucial.pref
[3] Check on the error message and the pref count.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13028: Followup adding a -partial flag for partial compares

If you compare the database with a partial pref file, you may not be
interested in lots of lines saying that a pref is not in the file. You
were already aware of that ;)
If you add the -partial flag, these lines will be skipped.

Test plan:
Do as described above.

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 12901: BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12901: (consistency followup) add buildBiblioDefaultViewURL to MARC21 XSLT

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12901: (QA followup) correct copy and paste error

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described now, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12916 - Missing Test to demonstrate warnings.

Modifying C4/Tags.pm should have tests.

TEST PLAN
---------
1) Apply this test patch only.
2) prove -v t/db_dependent/Tags.t
   -- should see two warnings.
3) Apply the first patch.
4) prove -v t/db_dependent/Tags.t
   -- no warnings.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm

When the stratify_tags function is called without any tags, the
$min and $max variables are left undefined, which triggers a
warning message about uninitialized values in the subtraction.

TEST PLAN
---------
1) prove -v t/db_dependent/Tags.t
   -- should succeed, but there is no test for empty tags.
2) Make sure that you have no tags
3) In Opac, go to 'Tag cloud'
4) Check the opac error log file
   (e.g. ~/koha-dev/var/log/koha-opac-error_log) for entries
   regarding uninitialized values $max and $min in C4/Tags.pm
5) apply this patch
6) prove -v t/db_dependent/Tags.t
   -- should still succeed, though no tests are added.
7) Reload page 'Tag cloud'
   -- Result: No additional warnings in opac error log file.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
New and old tests pass. Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13161 - Report name should be mandatory when editing saved reports

When Bug 2969 made report name required for SQL reports, it did so only
for new reports. This patch makes the same requirement true when editing
existing reports.

Other changes:

- Removed unused "type" setting from edit screen (already removed from
  creation form).
- Added form field size attribute to report name field to match creation
  form.
- Moved SQL textarea into its own fieldset and marked it as required,
  matching the report creation form.

To test, apply the patch and edit an existing saved SQL report. You
should be prevented from saving your report with either the report name
or SQL field blank. Test with JavaScript enable and disabled.

Confirm that after entering valid data your report runs correctly.
Compare the new SQL report form with the update SQL report form. They
should be structured the same.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script. Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: Factorize code for order cancellation

Some code was duplicated, all is now in cancelorder.pl
Added possibility to provide a reason for cancellation (or other things,
this is saved in aqorders.notes)

Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162 [Follow-up] Fix referrer URL when coming from parcel.pl

Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162; Factorize code for order cancellation (QA fixes)

* Remove tab characters in acqui/addorder.pl
* Remove FIXME in acqui/cancelorder.pl
* Fix typos: "canceled" -> "cancelled", "occured" -> "occurred"
* Replace "Click here" link by "OK"
* Add a column to aqorders to store cancellation reason instead of
  having it in aqorders.notes, to avoid having untranslatable strings in
    database

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: Add unit tests for DelOrder

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: Factorize code for order cancellation (QA fixes)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: Remove "(Y)" and "(N)" from buttons text

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: (follow-up) Add unit tests for DelOrder

The unit tests did not take into account the new DB field.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also all Acquisition related
patches.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 7162: (RM followup) fix the number of tests

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

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

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