koha.git
9 years agoBug 11876: (qa-followup) some minor changes
Jonathan Druart [Thu, 25 Sep 2014 11:59:44 +0000 (13:59 +0200)]
Bug 11876: (qa-followup) some minor changes

- GetImportBiblios: prepare the query is useless here
- use Modern::Perl
- Remove useless indentation level in pl file and redirect to 404 if
  required params are not given.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11876 [Follow-up] Add a diff view to staged MARC Records
Owen Leonard [Thu, 14 Aug 2014 18:52:34 +0000 (14:52 -0400)]
Bug 11876 [Follow-up] Add a diff view to staged MARC Records

This follow up makes some corrections to the previously added files and
adds some functionality to the diff: A Javascript diff plugin highlights
the differences between the records in the two columns.

Corrections made: Converted tab indentation to spaces, corrected GPL
statement.

File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the
location of the page with which it functions,
tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl
accordingly.

Updates to the template: Added standard includes inclucing header menu
and breadcrumbs; converted custom layout to YUI Grid standard.

To test, follow the test plan previously defined:

- Stage a MARC record batch which contains at least one record match for
  something already in your catalog.
- Locate the staged MARC record batch in Tools -> Manage staged records
  and click to view the contents.
- Find the record which matched an existing record and click the "View"
  link in the Diff column.
- The compare screen should include the header menu and breadcrumbs. The
  differences between your staged file and the existing record should be
  higlighted.
- You should be able to return to the MARC batch you were previously
  viewing by following the link in the breadcrumbs or the link at the
  bottom of the page.
- Confirm that the "About" page includes information about the new
  JavaScript plugin on the Licenses tab.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11876 - Ommited files in last patch
mbeaulieu [Thu, 7 Aug 2014 17:21:58 +0000 (13:21 -0400)]
Bug 11876 - Ommited files in last patch

I forgot to include these files in the last patch

new file:   tools/showdiffmarc.pl
new file:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11876 - Add a diff view for staged MARC records.
mbeaulieu [Thu, 7 Aug 2014 17:10:26 +0000 (13:10 -0400)]
Bug 11876 - Add a diff view for staged MARC records.

New patch should apply correctly.

modified:   C4/ImportBatch.pm
modified:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 11876 - Diff column is now displayed.

If a match is found, a 'View' link appears in the Diff column.

Old patch was not implementing datatables, and therefore was not compatible with this version of Koha.
modified:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
modified:   tools/batch_records_ajax.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
These patches have some issues but I'm going to submit a follow-up which
I think will address them all and offer some improvements as well.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11517: Braille and combination swapped in XSLT result lists
Katrin Fischer [Mon, 1 Sep 2014 21:39:12 +0000 (23:39 +0200)]
Bug 11517: Braille and combination swapped in XSLT result lists

http://www.loc.gov/marc/bibliographic/bd007f.html

- Catalog a record:
  * 007 - choose 'Tactile material'
  * Pos. 1 - choose b = Braille or C = combination
  * Reindex!
  * Verify the result list shows the format correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Problem exist, fixed with this patch.
No koha-qa errors

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12995 - script update_totalissues.pl stops on corrupted record - UT
Admin User Koha [Mon, 20 Oct 2014 13:05:23 +0000 (15:05 +0200)]
Bug 12995 - script update_totalissues.pl stops on corrupted record - UT

This patch adds an unit test on C4::Biblio::UpdateTotalIssues method
call on non existing record

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I can't comment on the correctness of the test other than to say it ran
successfully.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves CLI script, works as described.

Note: A small improvement would be to output the problematic biblionumber.

9 years agoBug 12995 - script update_totalissues.pl stops on corrupted record
Admin User Koha [Mon, 20 Oct 2014 13:07:29 +0000 (15:07 +0200)]
Bug 12995 - script update_totalissues.pl stops on corrupted record

When running update_totalissues.pl cronjob, it will stop on a corrupted
record.

This patch changes UpdateTotalIssues so that it return 1 if processing
record has succeded. Also, if mapping with biblioitems.totalissues does
not exist, the method has nothing to do so it stops and returns 1.

When processing a corrupted record, script now alerts about the error on
this biblionumber (if script is verbose) and process next record.
A total number of records with error will be printed at the end of the
script.

Test plan :
- Create a dabase with a few biblios and some issues
- Modify first biblio record (use direct sql update) : set empty value
  in biblioitems.marcxml
- Launch script : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v

=> Without patch : the script stops at first record
=> With patch : the script prints error for first record and processes
   all records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I was able to confirm the problem before the patch and successfully
follow the test plan.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 13164: Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN...
Tomas Cohen Arazi [Wed, 29 Oct 2014 19:24:49 +0000 (16:24 -0300)]
Bug 13164: Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN present

Currently, 022$z (and 011$z for UNIMARC) occurences are not shown, but the XSLT
logic used introduces punctuation characters for those $z occurences.

This patch adds a check for the existence of subfield a, and only loops
on $a subfields.

To test:
- Create/have a record with 022$z (or 011$z on UNIMARC) but no 022$a (no 011$a on UNIMARC).
- Open the detail page for the record (on both OPAC and staff).
=> FAIL: the ISSN label and ';' and '.' characters incorrectly shown.
- Repeat mixing with 022$a occurences to notice the bug.
- Apply the patch, reload
=> SUCCES: ISSN label shows only on the presence of a $a, and $z are skipped.
           no matter how many ISSN fields you add.
- Sign off :-D

Regards
To+

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Works as described on an UNIMARC DB. Mimics what's done for ISBN field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13141: (QA Followup) Update number of unit tests
Kyle M Hall [Fri, 24 Oct 2014 13:42:37 +0000 (09:42 -0400)]
Bug 13141: (QA Followup) Update number of unit tests

While updating the number of unit tests from 12 to 13,
the number of tests to skip due to a outdated version
of DBD::Mock was missed.

This patch retains the test number change, and corrects
the number of tests.

TEST PLAN
---------
1) prove -v t/db_dependent/ReportsGuided.t
   -- on an UBUNTU git (lacks DBD::Mock >= 1.45)
2) prove -v t/db_dependent/ReportsGuided.t
   -- on a DEBIAN git (has DBD::Mock >= 1.45)
3) compare results.
   -- skipped tests should be 8 (2 individual tests + 6 in the loop)
      under Ubuntu.
   -- non-skipped tests should align.
   -- everything should be 13 tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports
Mark Tompsett [Fri, 24 Oct 2014 04:20:29 +0000 (00:20 -0400)]
Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports

By tweaking the GetReservedAuthorisedValues function in
C4::Reports::Guided, biblio_framework can be added as a dropdown
list into the guided reports parameters.

The change in C4/Reports/Guided.pm required a test, which is
found in t/db_dependent/ReportsGuided.t

Code was then added to reports/guided_reports.pl to build the
appropriate hash to trigger the proper dropdown list.

TEST PLAN
---------
1) Apply patch
2) prove -v t/db_dependent/ReportsGuided.t
   -- all should pass, this confirms that both
      C4/Reports/Guided.pm and this test file work.
3) Log into staff client
4) Reports
5) Create from SQL
6) Enter appropriate information like:
Report name: Test 13141
-- no need to change Report group or Report is public or Notes or Type
SQL:
SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',
     biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS
     BiblioNumbers, title, author, frameworkcode
FROM biblio
WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>>

7) Save report
8) Run report
   -- The parameter entry page should have a drop down of
      framework codes.
9) Select a framework code, and click Run the report
   -- The displayed SQL should have a "frameworkcode=" portion
      matching the selected framework.
10) Run the koha qa test tool.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan followed successfully.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13174 : XSLT fails if, and only if you have an author, linked to an authority
Chris Cormack [Thu, 30 Oct 2014 23:54:04 +0000 (12:54 +1300)]
Bug 13174 : XSLT fails if, and only if you have an author, linked to an authority

And only in MARC21

To test:

Only for MARC21 with XSLT on for detail

1/ Find a record that has an authority linked author in it
2/ View the detail page in the opac
3/ Notice bibliographic data is missing
4/ Apply patch
5/ Refresh notice bibliographic data is back

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as describe, the details are back!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13173 - remove some operations that are no longer needed
Robin Sheat [Thu, 30 Oct 2014 22:38:07 +0000 (11:38 +1300)]
Bug 13173 - remove some operations that are no longer needed

Build was failing because some files that it expected had vanished.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13172 t/Koha_Email.t was database dependent
Chris Cormack [Thu, 30 Oct 2014 22:15:17 +0000 (11:15 +1300)]
Bug 13172 t/Koha_Email.t was database dependent

To test
1/ Stop your database server
2/ run t/Koha_Email.t
3/ Notice the errors
4/ Apply patch
5/ run t/Koha_Email.t again
6/ No errors

(Don't forget to restart your db server after)

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Verified that it fixes a package build.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tests pass now without database connection.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13105: Columns misplaced in member search result
Rafal Kopaczka [Fri, 17 Oct 2014 14:22:04 +0000 (16:22 +0200)]
Bug 13105: Columns misplaced in member search result

When staff member, without manage_patron_lists permissions, search for
patrons on result page, he gets table with additional column in head
table.
Test plan:
Log in as staff member without manage_patron_lists permissions, search
for any patron.
Check that table with results is fine now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes problem by adding a permission check to the template.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 3186 [QA Followup] - Don't return undef, just return
Kyle M Hall [Fri, 29 Aug 2014 14:38:31 +0000 (10:38 -0400)]
Bug 3186 [QA Followup] - Don't return undef, just return

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 3186 - invalid or uninstalled SMSSendDriver (or bad number format) causes process...
Olli-Antti Kivilahti [Wed, 27 Aug 2014 12:43:59 +0000 (15:43 +0300)]
Bug 3186 - invalid or uninstalled SMSSendDriver (or bad number format) causes process_message_queue to fail

This patch wraps the SMS::Send Driver initialization and sending process into an eval block
  and gracefully causes the sending to fail, instead of crashing the process and preventing
  emails and good sms' from being sent.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: Update DBIx
Tomas Cohen Arazi [Thu, 30 Oct 2014 04:05:11 +0000 (01:05 -0300)]
Bug 7162: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: DBRev 3.17.00.043
Tomas Cohen Arazi [Thu, 30 Oct 2014 04:02:36 +0000 (01:02 -0300)]
Bug 7162: DBRev 3.17.00.043

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: (RM followup) fix the number of tests
Tomas Cohen Arazi [Thu, 30 Oct 2014 03:47:13 +0000 (00:47 -0300)]
Bug 7162: (RM followup) fix the number of tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: (follow-up) Add unit tests for DelOrder
Jonathan Druart [Tue, 15 Jul 2014 12:00:25 +0000 (14:00 +0200)]
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>
9 years agoBug 7162: Remove "(Y)" and "(N)" from buttons text
Julian Maurice [Mon, 21 Jul 2014 09:29:52 +0000 (11:29 +0200)]
Bug 7162: Remove "(Y)" and "(N)" from buttons text

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: Factorize code for order cancellation (QA fixes)
Julian Maurice [Mon, 7 Jul 2014 07:27:58 +0000 (09:27 +0200)]
Bug 7162: Factorize code for order cancellation (QA fixes)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162: Add unit tests for DelOrder
Julian Maurice [Fri, 13 Jun 2014 10:55:44 +0000 (12:55 +0200)]
Bug 7162: Add unit tests for DelOrder

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7162; Factorize code for order cancellation (QA fixes)
Julian Maurice [Tue, 20 May 2014 11:49:57 +0000 (13:49 +0200)]
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>
9 years agoBug 7162 [Follow-up] Fix referrer URL when coming from parcel.pl
Julian Maurice [Tue, 19 Mar 2013 15:15:51 +0000 (15:15 +0000)]
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>
9 years agoBug 7162: Factorize code for order cancellation
Julian Maurice [Sat, 5 Nov 2011 06:59:25 +0000 (12:29 +0530)]
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>
9 years agoBug 13161 - Report name should be mandatory when editing saved reports
Owen Leonard [Wed, 29 Oct 2014 17:34:03 +0000 (13:34 -0400)]
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>
9 years agoBug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm
Mark Tompsett [Thu, 23 Oct 2014 00:51:22 +0000 (20:51 -0400)]
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>
9 years agoBug 12916 - Missing Test to demonstrate warnings.
Mark Tompsett [Wed, 22 Oct 2014 19:50:08 +0000 (15:50 -0400)]
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>
9 years agoBug 12901: (QA followup) correct copy and paste error
Tomas Cohen Arazi [Tue, 28 Oct 2014 21:10:33 +0000 (18:10 -0300)]
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>
9 years agoBug 12901: (consistency followup) add buildBiblioDefaultViewURL to MARC21 XSLT
Tomas Cohen Arazi [Mon, 15 Sep 2014 13:44:16 +0000 (10:44 -0300)]
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>
9 years agoBug 12901: BiblioDefaultView doesn't do anything with NORMARC or UNIMARC XSLT
Tomas Cohen Arazi [Mon, 15 Sep 2014 13:43:39 +0000 (10:43 -0300)]
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>
9 years agoBug 13028: Followup adding a -partial flag for partial compares
Marcel de Rooy [Wed, 8 Oct 2014 12:27:40 +0000 (14:27 +0200)]
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>
9 years agoBug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194
Marcel de Rooy [Mon, 6 Oct 2014 12:09:53 +0000 (14:09 +0200)]
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>
9 years agoBug 13145 UNIMARC 610 tag isn't displayed in OPAC when there is no $9 subfield
Frédéric Demians [Sat, 25 Oct 2014 12:09:34 +0000 (14:09 +0200)]
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>
9 years agoBug 12653: remaining prog reference in t/db_dependent/SuggestionEngine_ExplodedTerms.t
Tomas Cohen Arazi [Thu, 30 Oct 2014 02:37:54 +0000 (23:37 -0300)]
Bug 12653: remaining prog reference in t/db_dependent/SuggestionEngine_ExplodedTerms.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10433 - colspan calculation done by opac/opac-reserve.pl should be moved to template
Owen Leonard [Fri, 18 Jul 2014 12:55:00 +0000 (08:55 -0400)]
Bug 10433 - colspan calculation done by opac/opac-reserve.pl should be moved to template

Since the bootstrap OPAC's place hold interface doesn't use tables
there is no use for the colspan calculation being done in the script.
This patch removes it.

To test, place one or more holds in the OPAC and confirm that there are
no display problems. The OPAC error logs should show no associated
error.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No display problems, no related errors on log, no koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12494: DBRev: 3.17.00.042
Tomas Cohen Arazi [Thu, 30 Oct 2014 01:07:57 +0000 (22:07 -0300)]
Bug 12494: DBRev: 3.17.00.042

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12494 - Remove yuipath system preference
Owen Leonard [Fri, 27 Jun 2014 13:11:21 +0000 (09:11 -0400)]
Bug 12494 - Remove yuipath system preference

With the OPAC prog template going away, the only remaining use of the
yuipath preference is on the basketgroups template. The yuipath
preference should be removed and the local path hard-coded.

This patch:
  - removes yuipath handling from C4/Templates.pm
  - removes the preference from sysprefs.sql
  - deletes the preference via updatedatabase.pl
  - removes the preference from the staff client preferences file
  - removes unused references to the YUI assets from the help file
    header include
  - adds the local YUI asset path to acqui/basketgroup.tt

To test, apply the patch and run the database update. View some online
help pages and confirm that they function correctly. View the
basketgroups page (Acquisition -> Vendor -> Basket groups), edit a
basket group, and confirm that basket drag and drop operations work
correctly.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Online help and basket group drag&drop functionality still work correctly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12535 - PROG/CCSR Deprecation: Make opac translation theme independent
Bernardo Gonzalez Kriegel [Mon, 7 Jul 2014 01:11:14 +0000 (22:11 -0300)]
Bug 12535 - PROG/CCSR Deprecation: Make opac translation theme independent

This patch makes opac translation files theme independent
A side effect is that current prog translation file is
renamed.

But the renaming is not added, that gives a patch of ~60M!

Current list of languages are now obtained from pref files.

To test:
1) Apply the patch

2) For your preferred language, rename opac prog file
from 'xx-YY-i-opac-t-prog-v-3006000.po' to 'xx-YY-opac-prog.po'

3) Update that language, there must be no errors
cd misc/translation
./translate update xx-YY [-v]
Check updated po files

4) Install any language, there must be no errors
./translate install xx-YY
Check prog theme for that language

5) Create translation files. Remove a language or create new lang files
./translate create zz-WW
ls -l po/zz-WW*po
check there are 3 files (and *~) for opac

6) Check updated pod for LangInstaler.pm and translate script

When PROG/CCSR themes are removed, I'll add a Bug to remove
corresponding files.

Perhaps RM could add a followup to rename all files,
cd misc/translator/po
for old in $(ls *opac-t*); do
    new=$(echo $old | sed 's/-i-opac-t-prog-v-3006000/-opac-prog/');
    git mv $old $new;
done

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11346: DBRev 3.17.00.41 (deprecate the PROG and CCSR themes)
Tomas Cohen Arazi [Wed, 29 Oct 2014 23:50:36 +0000 (20:50 -0300)]
Bug 11346: DBRev 3.17.00.41 (deprecate the PROG and CCSR themes)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12653: (RM followup) Fix the test count
Tomas Cohen Arazi [Wed, 29 Oct 2014 23:40:37 +0000 (20:40 -0300)]
Bug 12653: (RM followup) Fix the test count

Bug 12233 removed the prog and CCSR theme directories, so the number
of tests needs to be fixed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12233: change opacthemes syspref from {prog|ccsr} to bootstrap MM-OPAC/theme_dep
Tomas Cohen Arazi [Sun, 10 Aug 2014 13:37:26 +0000 (10:37 -0300)]
Bug 12233: change opacthemes syspref from {prog|ccsr} to bootstrap

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12233: Remove the prog and ccsr themes files
Tomas Cohen Arazi [Sun, 10 Aug 2014 13:26:00 +0000 (10:26 -0300)]
Bug 12233: Remove the prog and ccsr themes files

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12653: Text file clean up
Mark Tompsett [Mon, 20 Oct 2014 14:41:13 +0000 (10:41 -0400)]
Bug 12653: Text file clean up

_README.txt has 4 newlines removed.
_COPYING.txt has 2 empty lines at the end of the file removed.
This was done by copying the smallest file in an existing theme
directory.

TEST PLAN
---------
1) Compare files.
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/prog/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/ccsr/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/prog/itemtypeimg/crystal-clear/_README.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/ccsr/itemtypeimg/crystal-clear/_README.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/crystal-clear/_README.txt
-- there will be differences.
2) Apply patch
3) Compare files again.
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/prog/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/ccsr/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_COPYING.txt koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/crystal-clear/_COPYING.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/prog/itemtypeimg/crystal-clear/_README.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/ccsr/itemtypeimg/crystal-clear/_README.txt
diff koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/crystal-clear/_README.txt koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/crystal-clear/_README.txt
-- there will be no differences.
4) git reset --hard origin/master
5) Apply the patch affecting the .t files.
6) Prove things.
prove xt/author/icondirectories.t xt/author/translatable-templates.t xt/author/valid-templates.t xt/single_quotes.t xt/tt_valid.t
-- expecting xt/author/icondirectories.t to fail
7) Apply this patch.
8) Prove things.
prove xt/author/icondirectories.t xt/author/translatable-templates.t xt/author/valid-templates.t xt/single_quotes.t xt/tt_valid.t
-- expecting success.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This patch fixes some issues with files on itemtypes dirs.
No koha-qa erros.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12653: PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in tests
Bernardo Gonzalez Kriegel [Thu, 16 Oct 2014 22:35:52 +0000 (19:35 -0300)]
Bug 12653: PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in tests

This patch removes explicit references of themes from

  xt/author/icondirectories.t
  xt/author/translatable-templates.t
  xt/author/valid-templates.t
  xt/single_quotes.t
  xt/tt_valid.t

For xt/author/icondirectories.t it fixes a small difference on
two bootstrap files, previously unchecked, crystal-clear/_COPYING.txt
and crystal-clear/_README.txt

Some updates to license information

To test:
1. Apply the patch
2. Run each test, all must pass
prove xt/author/icondirectories.t xt/author/translatable-templates.t xt/author/valid-templates.t xt/single_quotes.t xt/tt_valid.t

3. Try to fail each test

a) xt/author/icondirectories.t
create a new file on any of icon dirs, e.g.
touch koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/newfile.png
test must fail

b) xt/author/translatable-templates.t
change the name of 'en' dir on any theme opac or staff
test must fail

Add following line to any template file
<span [% IF ( value ) %]name="name"[% ELSE %] js="_('">TEST [% INCLUDE 'fail.inc' %]</span>

c) xt/author/valid-templates.t must fail
d) xt/single_quotes.t must fail
e) xt/tt_valid.t must fail

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12655 [Revised] PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path...
Owen Leonard [Tue, 12 Aug 2014 14:09:57 +0000 (10:09 -0400)]
Bug 12655 [Revised] PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT

Two XSL files in the bootstrap theme contain hard-coded paths to the
prog theme directory. This patch adds a query of the opacthemes system
preference and builds the path based on the returned value.

To test in a MARC21 system:

Create or locate a record which contains a subject which is linked to an
authority record. View the detail page for that record in the bootstrap
OPAC and confirm that there is a magnifying class icon next to the link
for that subject heading. Inspect or right-click the image and "View
image" [FF. "Open image in new tab" in Chrome] to verify that the image
being shown is from the bootstrap theme directory.

Also modified: The NORMARC XSL for the detail page which has been
changed in the same way. I did not test it in a NORMARC catalog.

Edit: Fixed copy-and-paste error causing duplicate image.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12657 - remove references to prog and ccsr from the packages
Robin Sheat [Fri, 25 Jul 2014 04:09:49 +0000 (16:09 +1200)]
Bug 12657 - remove references to prog and ccsr from the packages

To test:
* Build a package and install it, and verify that there are no errors.
* Play around with koha-translate, listing, adding, and removing
  languages.

Note: one reference to prog and ccsr remains in koha-translate. This is
to allow it to remove any pre-existing translations on an upgrade.

Note 2: prog translations are still being installed, I think this is due
to the underlying translation system doing it.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12539: Follow up to fix fallback theme
Bernardo Gonzalez Kriegel [Sun, 3 Aug 2014 12:41:37 +0000 (09:41 -0300)]
Bug 12539: Follow up to fix fallback theme

The is a problem in the logic, fallback must be:
1. Requested (theme, lang, tmpl)
a. return    (theme, lang, tmpl), if not
b. return    (fallback, lang, tmpl), if not
c. return    (theme, 'en', tmpl), if not as last resort
d. return    (fallback, 'en', tmpl)

Previous patch missed option 'c', worked for CCSR
but not bootstrap, sorry.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm
Bernardo Gonzalez Kriegel [Mon, 7 Jul 2014 18:30:02 +0000 (15:30 -0300)]
Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm

This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm
It adds a new syspref OPACFallback to hold the prefferred fallback
theme for new themes with minimal changes.

This does not brake CCSR if new syspref value is 'prog',
using 'bootstrap' works somehow, but with strange results.

To test:
1) Apply the patch
2) Run updatedatbase.pl
3) CCSR, prog & bootstrap must work as usual
4) Need to test theme/language fallback
 a) translate for your preferred language (xx-YY)
 b) enable language on opac
 c) go to opac, select that language
 d) login on opac, go to personal details
 e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt
 d) reload page, must load in English
 f) click other member options, must load on translated language
(can use other pages, ccsr, prog or bootstrap)
5) Do a similar test but for a staff page, enable lang, switch to it,
rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt,
any page must be translated except for admin home.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12245 - PROG/CCSR deprecation: Remove OPACMobileUserCSS system preference
Owen Leonard [Tue, 1 Jul 2014 15:42:30 +0000 (11:42 -0400)]
Bug 12245 - PROG/CCSR deprecation: Remove OPACMobileUserCSS system preference

With CCSR now deprecated there is no longer a need for the
OPACMobileUserCSS system preference. This patch removes it.

To test, apply the patch and run updatedatabase. Check that the
preference can no longer be found in system preferences.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12246 - PROG/CCSR deprecation: Remove OpacMainUserBlockMobile system preference
Owen Leonard [Tue, 1 Jul 2014 15:56:28 +0000 (11:56 -0400)]
Bug 12246 - PROG/CCSR deprecation: Remove OpacMainUserBlockMobile system preference

With CCSR having been deprecated there is no longer a use for the
OpacMainUserBlockMobile system preference. This patch removes it.

To test, apply the patch and run updatedatabase. Check that the
preference can no longer be found in system preferences.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12513 - PROG/CCSR deprecation: Remove OpacShowLibrariesPulldownMobile system...
Owen Leonard [Tue, 1 Jul 2014 16:18:12 +0000 (12:18 -0400)]
Bug 12513 - PROG/CCSR deprecation: Remove OpacShowLibrariesPulldownMobile system preference

With CCSR having been deprecated there is no longer a use for the
OpacShowLibrariesPulldownMobile system preference. This patch removes
it.

To test, apply the patch and run updatedatabase. Check that the
preference can no longer be found in system preferences.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13088: (RM followup) add missing pref mock
Tomas Cohen Arazi [Tue, 28 Oct 2014 15:07:46 +0000 (12:07 -0300)]
Bug 13088: (RM followup) add missing pref mock

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoRevert "Bug 9828: More specific indexing of UNIMARC 6XX fields"
Tomas Cohen Arazi [Tue, 28 Oct 2014 15:02:34 +0000 (12:02 -0300)]
Revert "Bug 9828: More specific indexing of UNIMARC 6XX fields"

This reverts commit 0dd1ac40a0df984bee6583f13f80744b539b8f37.

9 years agoRevert "ug 9828 : Add and fix comments in UNIMARC biblio-koha-indexdefs.xml"
Tomas Cohen Arazi [Tue, 28 Oct 2014 15:02:22 +0000 (12:02 -0300)]
Revert "ug 9828 : Add and fix comments in UNIMARC biblio-koha-indexdefs.xml"

This reverts commit 5bbe42932e6395a8cb49c880c094c21b40590fd3.

9 years agoRevert "Bug 9828 : Followup for Queryparser and deletion of useless 6XX$9"
Tomas Cohen Arazi [Tue, 28 Oct 2014 15:02:09 +0000 (12:02 -0300)]
Revert "Bug 9828 : Followup for Queryparser and deletion of useless 6XX$9"

This reverts commit 49788987b29f14884a59d41602c7821fec03e491.

9 years agoBug 12830: use find instead of search
Jonathan Druart [Wed, 27 Aug 2014 12:16:39 +0000 (14:16 +0200)]
Bug 12830: use find instead of search

Since ordernumber is the pk, it is stupid to use search.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
All acquisition related tests and the QA script pass.
I can't find any regressions with these patches.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12830: Move the order-related code into Koha::Acquisition::Order
Jonathan Druart [Wed, 27 Aug 2014 10:36:04 +0000 (12:36 +0200)]
Bug 12830: Move the order-related code into Koha::Acquisition::Order

The C4::Acquisition module should be exploded in order to add
readability and maintainability to this part of the code.

This patch is a POC, it introduces a new Koha::Acquisition::Order module and put in
it the code from NewOrder and NewOrderItem.

Test plan:
1/ Create an order, modify it, receive it, cancel the receipt.
2/ Launch the prove command on all unit tests modified by this patch and
verify that all pass.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12281: Display for records with RTL script in 880 in Boostrap
Katrin Fischer [Fri, 19 Sep 2014 12:41:29 +0000 (14:41 +0200)]
Bug 12281: Display for records with RTL script in 880 in Boostrap

This patch adds a missing CSS declaration to the Boostrap CSS file
in order to fix the display for RTL script catalogued in tag 880.

To test:
- Catalog or import records using the 880 tag into your catalog
- Compare the prog OPAC detail and rsult view with bootstrap
- Apply patch
- Verfiy now the display in bootstrap is the same as before in
  prog (and also in staff)

Note: Some notes on how to catalog with 880 were added to
the bug report.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12068: Follow up - make Text::Bidi mandatory
Katrin Fischer [Sat, 11 Oct 2014 15:57:53 +0000 (12:57 -0300)]
Bug 12068: Follow up - make Text::Bidi mandatory

Without the module some of the tests will fail. As this is
fixing a serious bug for RTL language users, we agreed
to make it mandatory.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt
Fridolin Somers [Wed, 22 Oct 2014 15:38:01 +0000 (17:38 +0200)]
Bug 13129 - HTML and JS escapes missing in unimarc_field_4XX.tt

This patch adds JS and HTML espaces are it is missing.
Replaces calls to url filter by uri filter, url filter does not espace
enough characters: http://template-toolkit.org/docs/manual/Filters.html#section_url.

Also corrects the fact the code: resul.size => resul.item('size').
Old code returns the size of the loop instead of the value of "size" field.

Test plan :
 - Use the plugin unimarc_field_4XX
 - Perform a search with a ? or &
=> Search works
 - Perform a search that returns a record with a double quote in title
 - Choose this record
=> Plugin works
 - Check the results displays well the value of biblioitems.size

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, I fixed some tabs.
Tested in a UNIMARC  installation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11593: Remove subtag_registry.txt
Katrin Fischer [Mon, 27 Oct 2014 20:05:56 +0000 (21:05 +0100)]
Bug 11593: Remove subtag_registry.txt

This file is no longer needed by the web installer and can be deleted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11593 - subtag_registry.sql files contain the same information for each language
Bernardo Gonzalez Kriegel [Wed, 2 Apr 2014 20:49:48 +0000 (17:49 -0300)]
Bug 11593 - subtag_registry.sql files contain the same information for each language

This patch removes subtag_registry.sql from lang dirs,
and put it on a new mandatory dir

In that way we need to update only one file.
All similar files are removed.

To test:
1) Try a new install, or simply create a new database,
grant permissions on it, change koha-conf.xml to use
this database and go to staff page

2) Go step by step until all mandatory or optional sql
files are loaded. Check that subtag_registry.sql is
loaded.

3) Do it again but on other language. First install
translation and repeat 2), could use de-DE or fr-FR

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested with de-DE.
Thx!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13095: An email will be sent shortly
Marcel de Rooy [Thu, 16 Oct 2014 11:48:36 +0000 (13:48 +0200)]
Bug 13095: An email will be sent shortly

This patch adjusts two instances where Koha says that an email has
been sent while it is just enqueued (put in the message queue). The
crontab example still suggests to run process_message_queue once an hour
and the manual even speaks about 1-4 hours.

In the process of selfregistration and sharing a shelf, I have adjusted
the text "has been sent" to "will be sent shortly". This covers imo
the one-hour frequency.

When writing this patch, I have examined all calls of EnqueueLetter;
I only found these two occurrences to be of interest.

Note: I would recommend to increase this frequency in the documentation,
but consider that for now to be outside the scope of this report.

Test plan:
[1] Self-register a new user with verification by email required. Look at
    the text when you submit your data.
[2] Share a list with someone else. Look at the text when you submit the
    invitation.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, small string change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13112 - Add name of template file in html comment for each '.tt' file.
Marc Véron [Mon, 20 Oct 2014 19:59:14 +0000 (21:59 +0200)]
Bug 13112 - Add name of template file in html comment for each '.tt' file.

This patch adds the name of the .tt file as a HTML comment to OPAC and Staff client pages.

To test:
Apply patch
Open pages in OPAC and Staff client.
Make sure that a comment similar to the following appears in the source code:
<!-- TEMPLATE FILE: intranet-main.tt -->

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12573: Use correct comparison for comparing strings
Colin Campbell [Mon, 14 Jul 2014 15:28:27 +0000 (16:28 +0100)]
Bug 12573: Use correct comparison for comparing strings

Perl issues a warning when you try to do a numeric comparison on
non numeric values. While in 99% of the caeses numeric and string
comparison behave similarly when they dont tracking down resulting
bugs is hard. Also we dont want to be logging errors for normal
operations. replace numeric == with eq
(also switched to non-interpolating quotes so we dont generate
a warning from static code checkers like perlcritic)

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
I can get this warnings in log files. This patch make perfectly sense.
MARC subfield code should never be tested with Perl == operator, since
the code could be letter or a number. Perl eq operator do an implicit
string conversion for value which is a number, so it will work in any
case.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13149: Fix sequence of fields in sysprefs.sql
Katrin Fischer [Mon, 27 Oct 2014 18:22:26 +0000 (19:22 +0100)]
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>
9 years agoBug 13149: for B 11926 (HEA - Render community koha statistic usages) introduces...
Olli-Antti Kivilahti [Mon, 27 Oct 2014 14:07:54 +0000 (16:07 +0200)]
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>
9 years agoBug 5342: Update DBIx
Tomas Cohen Arazi [Tue, 28 Oct 2014 13:11:26 +0000 (10:11 -0300)]
Bug 5342: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5342: DBRev 3.17.00.035
Tomas Cohen Arazi [Tue, 28 Oct 2014 13:09:30 +0000 (10:09 -0300)]
Bug 5342: DBRev 3.17.00.035

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5342: (qa-followup) FIX some issues
Jonathan Druart [Fri, 26 Sep 2014 15:14:00 +0000 (17:14 +0200)]
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>
9 years agoBug 5342: Serial claiming improvements: add a counter
Jonathan Druart [Fri, 29 Aug 2014 10:47:50 +0000 (12:47 +0200)]
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>
9 years agoBug 11990 - Holds ratio report (circ/reserveratios.pl) sorts numeric values as text
Olli-Antti Kivilahti [Wed, 8 Oct 2014 12:22:53 +0000 (15:22 +0300)]
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>
9 years agoBug 13083 - Hard-coded " by " in opac-tags.pl
Owen Leonard [Wed, 15 Oct 2014 18:39:06 +0000 (14:39 -0400)]
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>
9 years agoBug 8837 [QA Followup] - Add unit tests
Kyle M Hall [Fri, 24 Oct 2014 12:59:52 +0000 (08:59 -0400)]
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>
9 years agoBug 8837: Dewey cn_sort inaccurate
simith [Wed, 6 Aug 2014 13:11:47 +0000 (09:11 -0400)]
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>
9 years agoBug 11007: Update DBIx
Tomas Cohen Arazi [Tue, 28 Oct 2014 12:37:56 +0000 (09:37 -0300)]
Bug 11007: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11007: DBRev 3.17.00.034
Tomas Cohen Arazi [Tue, 28 Oct 2014 12:33:15 +0000 (09:33 -0300)]
Bug 11007: DBRev 3.17.00.034

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11007: Drop column aqorders.cancelledby
Jonathan Druart [Fri, 18 Jul 2014 10:48:57 +0000 (12:48 +0200)]
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>
9 years agoBug 12571 - Add ability to customize SIP2 screen messages
Kyle M Hall [Mon, 14 Jul 2014 13:50:32 +0000 (09:50 -0400)]
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>
9 years agoBug 9530: Follow-up - Fix t/db_dependent/Branch.t
Katrin Fischer [Mon, 27 Oct 2014 17:46:41 +0000 (18:46 +0100)]
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>
9 years agoBug 11068: Update MARC21 es-ES default frameworks fields and translation
Bernardo Gonzalez Kriegel [Mon, 27 Oct 2014 17:16:30 +0000 (14:16 -0300)]
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>
9 years agoBug 12844: Force the symbol place in the tests
Jonathan Druart [Fri, 10 Oct 2014 20:47:32 +0000 (22:47 +0200)]
Bug 12844: Force the symbol place in the tests

Looking with Katrin at the default configuration of Number::Format, she
has the p_cs_precedes value set to 0 (put the symbol at the end) and
p_sep_by_sep set to 1.

Now it is possible to sent these values to the format subroutine.
On this way, the tests can force them in order to pass on all configuration.

This default value for this variable certainly depends on the locales.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12844: FIX import package missing
Jonathan Druart [Tue, 16 Sep 2014 07:49:40 +0000 (09:49 +0200)]
Bug 12844: FIX import package missing

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12844: Use Koha::Number::Price where it can be useful
Jonathan Druart [Thu, 28 Aug 2014 14:20:27 +0000 (16:20 +0200)]
Bug 12844: Use Koha::Number::Price where it can be useful

This patch use the new module into pl and tt script.

Note that we could use it in the acqui/pdfformat/layout*.pm files.

Test plan:
1/ Verify that the acquisition home page displayes the prices as before.
2/ Verify that the budgets page displayes the prices as before.
3/ Verify that the funds page displayes the prices as before.
4/ Verify that the planning page displayes the prices as before. (Note
that 1 price is now formatted: 'Fund remaining').
5/ Create an order from a staged file. This stage file should contain a
formatted price.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12844: Remove the C4::Output::FormatNumber subroutine
Jonathan Druart [Thu, 28 Aug 2014 14:20:18 +0000 (16:20 +0200)]
Bug 12844: Remove the C4::Output::FormatNumber subroutine

This subroutine is now useless.

Test plan:
  git grep FormatNumber
should not return any result in pl and pm files.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12844: New module to manage prices into Koha
Jonathan Druart [Thu, 28 Aug 2014 14:19:17 +0000 (16:19 +0200)]
Bug 12844: New module to manage prices into Koha

This patch introduces a new module to manage prices into Koha and
especially the acquisition module.

How to use is:
1/ You can use it in a perl script/module:
  my $price = Koha::Number::Price->new(3);
  $price->format; # Will display 3.00 (or 3,00 depending on the CurrencyFormat syspref).
  $price->format({with_symbol => 1}); # Will display €3.00 (or [$]3,00 depending on the CurrencyFormat syspref).

2/ But this module is usefull to display the price from a template file.
  [% my_price | Price %]

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13080 - Addition of noEnterSubmit class should not apply to textarea, only to...
Owen Leonard [Tue, 14 Oct 2014 17:52:33 +0000 (13:52 -0400)]
Bug 13080 - Addition of noEnterSubmit class should not apply to textarea, only to input

The application of the "noEnterSubmit" class to textareas in the
cataloging editor prevents the user from being able to use the Enter key
to create line breaks. This is not intentional and should be corrected.

This patch adds more specific scoping to the relevant JavaScript.

To test, apply the patch and clear your browser cache if necessary. Open
up the MARC editor and locate a tag which uses a textarea for entry. Try
typing lines of text separated by line breaks. The enter key should work
correctly.

Signed-off-by: bondiurbano costalc@gmail.com
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and fixes the problem.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9828 : Followup for Queryparser and deletion of useless 6XX$9
Mathieu Saby [Wed, 20 Aug 2014 14:24:49 +0000 (16:24 +0200)]
Bug 9828 : Followup for Queryparser and deletion of useless 6XX$9

This followup
- changes some indexes in Queryparser configuration file
- supresses some clearly useless 6XX$9 in biblio-koha-indexdefs.xml and adds 2 new ones, probably useless (not sure of that)
- change the name of index Subject-geographical to Subject-name-geographical in ccl.properties (to match bib1.att)
the xsl file zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl was generated with the following command:
xsltproc zebradb/xsl/koha-indexdefs-to-zebra.xsl zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml > zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl

To test :
1) Apply the 3 patches
2) copy the modified files from the source directory to the directory where you store the config files for Zebra and Queryparser
The files modified by the 3 patches and that need to be copied are:
etc/zebradb/biblios/etc/bib1.att
etc/zebradb/ccl.properties
etc/searchengine/queryparser.yaml
etc/zebradb/ccl.properties
.../unimarc/biblios/biblio-koha-indexdefs.xml
.../unimarc/biblios/biblio-zebra-indexdefs.xsl
3) Rebuild Zebra
4) Create a record A with some values in critical fields, for example:
- the string "test9828" in 600$c 600$f 600$p, 602$f, 616$c, 616$f, 606$2,600$2
- the string "subform" in 600$j
4) Create a record B with the string "subgeo" in 606$y
5) Create a record C with the string "subdate" in 606$z
WITHOUT QP activated in sysprefs ("Don't try to use QP"):
6) try to search "su:test9828". You should have no results
7) try to search "su-genre:subform". You should have 1 result : record A
8) try to search "su-geo:subgeo". You should have 1 result : record B
9) try to search "su-chrono:subdate". You should have 1 result : record C
10) on existing records, try su-ut, su-to, su-na, su-form, su-corp, su-geo indexes, and see it results are relevant
WITH QP activated in sysprefs:
Same tests

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoug 9828 : Add and fix comments in UNIMARC biblio-koha-indexdefs.xml
Mathieu Saby [Mon, 18 Aug 2014 20:51:01 +0000 (22:51 +0200)]
ug 9828 : Add and fix comments in UNIMARC biblio-koha-indexdefs.xml

Only cosmetic :
- the references to lines record.abs are now useless and outdated
- some comments added in record.abs could be usefull in biblio-koha-indexdefs.xml

No change expected, only comments

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9828: More specific indexing of UNIMARC 6XX fields
Mathieu Saby [Sat, 16 Mar 2013 18:47:20 +0000 (19:47 +0100)]
Bug 9828: More specific indexing of UNIMARC 6XX fields

[New commit on 18 Aug 2014 : rebased, and DOM indexing only]

Issues to fix :
Most of 6XX may contain a $2 that identifies the system used for indexing. It should not be indexed.
In French libraries, $2 contains "rameau". So searching books about the music composer "Rameau" retreive thousands of records!
For some 6XX fiels, other subfields should not be indexed, for example dates of persons and family, or adresses.
In Unimarc guide, 600$t,601$t,602$t are said to exist but to be "not used". I keep them indexed.

Additionnally, subject indexing could be improved by using specific indexes for each 6XX if possible :
In ccl.properties :
- su-to, su-geo and su-ut are defined as aliases of Subject.
- a specific index is defined, but not used in record.abs : Subject-name-personal, alias su-na
We can use these indexes and create new specific indexes by using existing bib1 attributes.

We could also index $j,$x,$y,$z subdivision in specific indexes.

This patch does the following changes :
1) For all 6XX : Not indexing $2 (LSCH, Rameau...), $3 and $5
2) Suppressing the indexing of some specific subfields, depending on the field:
600 : Personal name used as a subject // see Marc21 600
not indexing c (additional elements),f (dates),p (address/affiliation)
602 : Family name used as a subject // see Marc21 600 3X
not indexing f (dates)
616 : Trademark
not indexing c,f
3) For all 6XX : index $j,$x,$y,$z in several indexes in addition to the specfific index for their 6XX field:
4) Define in ccl.properties some specific indexes :
Subject-name-conference 1=1073 => alias su-conf
Subject-name-corporate 1=1074 => alias su-corp
Subject-genre-form 1=1075 => alias su-genre and su-form
Subject-geographical 1=1076 => alias su-geo
Subject-chronological 1=1077 => alias su-chrono
Subject-title 1=1078 => alias su-ut and su-ti
Subject-topical 1=1079 => alias su-to
5) Adding new aliases in Search.pm :
su-chrono, su-form, su-genre, su-corp, su-conf, su-ti
6) Using these new indexes in for
600 : Subject and Subject-Personal-Name ; all subfields except subdivisions in Personal-name
601 : Subject, Subject-name-conference and Subject-name-corporate and Subject-name-conf ; all subfields except subdivisions in Corporate-name and Conference-name
602 : same as 600 but could be improved later
604 : Subject and Subject-title ; $a in Subject-Personal-Name ; all subfields except subdivisions in Name-and-Title
605 : Subject and Subject-title
606 : Subject and Subject-topical
607 : Subject and Subject-geographical ; all subfields except subdivisions in Name-geographic
608 : Subject and Subject-genre-form

To test :

A. In a UNIMARC-DOM indexing environment
1) Apply the patch
2) Rebuild zebra
3) Create a record A with some values in critical fields, for example:
- the string "test9828" in 600$c 600$f 600$p, 602$f, 616$c, 616$f, 606$2,600$2
- the string "subform" in 600$j
4) Create a record B with the string "subgeo" in 606$y
5) Create a record C with the string "subdate" in 606$z
6) try to search "su:test9828". You should have no results
7) try to search "su-genre:subform". You should have 1 result : record A
8) try to search "su-geo:subgeo". You should have 1 result : record B
9) try to search "su-chrono:subdate". You should have 1 result : record C
10) on existing records, try su-ut, su-to, su-na, su-form, su-corp, su-geo indexes, and see it results are relevant

Indexing of subjects could maybe be improved later

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
All seems to work as expected, I am not super-familiar with UNIMARC but I wonder if in su-corp and su-conf the subdivisions might be useful (e.g. France-Gendarmie / Staatsbibliothek-Berlin)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 3977: MARC21 321$b has wrong description
Katrin Fischer [Mon, 1 Sep 2014 21:06:25 +0000 (23:06 +0200)]
Bug 3977: MARC21 321$b has wrong description

Fixing descriptions in all frameworks for consistency.

Changed frameworks are:
- es-ES, default framework
- fr-FR, default and simple frameworks
- nb-NO, default and simple frameworks
- pl-PL, default and simple frameworks

To test:
- verify changes by reading them
- or verify by running the web installers of those languages
  and checking the description appears correctly
- or verify by loading the sql files manually and check
  they still load correctly

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13139 - Move treeview jQuery plugin outside of language-specific directory
Owen Leonard [Thu, 23 Oct 2014 18:55:23 +0000 (14:55 -0400)]
Bug 13139 - Move treeview jQuery plugin outside of language-specific directory

This patch moves the treeview plugin in the staff client from the
language-specific lib/jquery/plugins directory to the one outside the
theme directory.

To test, apply the patch and view the "Set permissions" page for a
patron. The list of permissions should display in an expandable list as
usual.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
It works, following the test plan. I can see the jQuery treeview plugin moved
from 'prog' language specific directory to the global lib/plugins directory.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Found no other places where we use this plugin.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12651: DOM indexing is the default
Tomas Cohen Arazi [Thu, 23 Oct 2014 23:12:05 +0000 (20:12 -0300)]
Bug 12651: DOM indexing is the default

On the 23 July development meeting it was decided to formally deprecate
GRS-1 indexing mode for Zebra. This patch makes code fallback to DOM
on the remaining places. No behaviour change should be noticed, as DOM
has been the default for a while.

Regards

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Also checked running Makefile.PL

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13088: DBRev 3.17.00.033
Tomas Cohen Arazi [Mon, 27 Oct 2014 15:28:23 +0000 (12:28 -0300)]
Bug 13088: DBRev 3.17.00.033

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13088: Allow the user to specify a max amount of facets to show
Tomas Cohen Arazi [Mon, 20 Oct 2014 15:12:00 +0000 (12:12 -0300)]
Bug 13088: Allow the user to specify a max amount of facets to show

This patch makes _get_facet_from_result_set rely on a new syspref (FacetsMaxCount)
to set the max facets to show for each facet category. It defaults to 20 if
the syspref is absent or empty.

To test:
- Have a search with lots of facet results (with some category showing the "See more" link).
- Jump to "See more", notice it shows more than 20 facet values.
- Apply the patch, reload the page.
=> SUCCESS It only shows 20 (default hardcoded value)
- Change the FacetsMaxCount syspref to other value (e.g. 15 or 100).
- Reload
=> SUCCESS: it shows the expected amount.
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan completed successfully

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>
9 years agoBug 13088: Add a syspref so the user can chose the amount of facets to show
Tomas Cohen Arazi [Mon, 20 Oct 2014 16:46:28 +0000 (13:46 -0300)]
Bug 13088: Add a syspref so the user can chose the amount of facets to show

This patch introduces a syspref (FacetMaxCount) that controls how many
facets to show for each category (e.g. Author).

Sponsored-by: Universidad Nacional de Cordoba
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>
9 years agoBug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl
Owen Leonard [Tue, 21 Oct 2014 18:05:31 +0000 (14:05 -0400)]
Bug 13120 - Invalid HTML generated by MARC21slim2OPACResults.xsl

This patch converts an id to a class in order to avoid duplicate id
attributes on one page.

To test you must have XSLT enabled with the default setting. Perform a
search in the OPAC and confirm that the display of location looks
correct.

Run the resulting page through a validator using an in-browser tool like
Firefox's Html Validator addon or using the W3C's validator.w3.org. The
results should not complain of duplicate id attributes.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
OK for me. Obvious mistake: I can confirm FF HTML validator reports it, and
stop reporting it after applying this patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can confirm this fix is correct.
Also, I found that jQuery doesn't like repeated ids in some cases
so this will make customizing easier.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13128 - Add span with id for logged in branch name, add hidden span for branchcode
Kyle M Hall [Wed, 22 Oct 2014 04:18:27 +0000 (00:18 -0400)]
Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode

It would be nice if there were a simple way to access the name and
branchcode of the currently logged in library, as well as the logged in
user via JavaScript ( via intranetuserjs ).

I propose the following:
1) Remove the whitespace surrounding the loggedinusername span
2) Wrap the logged in branch name with a span that has an id
3) Add the branchcode in a hidden span that has an id

Test Plan:
1) Apply this patch
2) Log into Koha
3) Inspect the html source code
4) Note the lack of whitespace within the tag <span class="loggedinusername">[% loggedinusername %]</span>
5) Note the logged in branch name is now surrounded by a span with an id
6) Note below that is a span containing the branchcode, also with an id.
7) Verify the branchcode span is hidden by default.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, no problems found.

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