Bug 9574: Plack fixes for serials/subscription-add.pl

This patch fixes the following warnings under Plack:
* Use of uninitialized value $firstissuedate in string eq at \
    /home/jcamins/kohaclone/serials/subscription-add.pl line 92.
* Use of uninitialized value $firstissuedate in substr at \
    /home/jcamins/kohaclone/serials/subscription-add.pl line 105.
* Use of qw(...) as parentheses is deprecated at \
    /home/jcamins/kohaclone/serials/subscription-add.pl line 95.
* Variable "$firstissuedate" is not available at \
    /home/jcamins/kohaclone/serials/subscription-add.pl line 338.

To test:
1) Create a subscription. Ensure that setting the first issue's
   publication date works.
2) Edit a subscription. Ensure that the first issue's publication
   date shows up.
3) Sign off.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No regressions found, all tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9574' into 3.12-master
Bug 8620: Any index in DOM mode sensitive to -x flag of rebuild_zebra.pl

The definition of the Any index was sensitive to whether
spaces were present between (say) subfield elements in the
MARCXML representation of the bib being indexed.  When using
the -x option to rebuild_zebra.pl, spaces would be present
because of how MARC::File::XML emits MARCXML.

When not using the -x option, spaces would not be present
and the contents of a field would be run together, potentially
as one big token.

The visible behavior was that doing a keyword search by
item barcode would sometimes not work.

To test:
0) Make sure Zebra is using DOM mode
1) Create an item record.
2) Reindex using rebuild_zebra.pl -b -z, *without* -x
3) Do a keyword search by the barcode of the item just
   added; the search shouldn't work
4) Apply patch.
5) Update the following two files:
    etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
    etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl
6) Reindex
7) Do a search that was previously failing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the problem for me - formerly not working callnumbers
and barcodes are now found in keyword (any) searches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(revised commit description to better explain why it fixes the problem)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Passes all my tests, happy to sign off
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_8620' into 3.12-master
Bug 9656: Make logging to a file optional (for fines)

To test:
1/ Before the patch run misc/cronjobs/fines.pl
   Notice that a file has been written to /tmp

2/ rm the file

3/ Apply the patch and run the script again
   Notice the file is not created

4/ run the script with -l
   Notice the file is created again

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

Comment: Now it work as described. No errors.
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 9656: Followup Make logging to a file optional (for fines)

The -log option become optional if the -output_dir is given.

Test plan:
call the script with
1/ no one parameter : no log file
2/ -l : log file will be created in /tmp
3/ -o=/home/koha/var/log : log file with be created in the specified
4/ -o=/home/koha/var/log -l: Same as 3/

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

Comment: All combination of options tested. Works well. No errors.
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9656' into 3.12-master
Bug 9653: FIX collapse class is used by already Bootstrap

Quick, simple and dirty fix.

Test plan:
Apply this patch and check that filters are present on the suggestion
management page.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Filters are back on the page, regression fixed.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9653' into 3.12-master
Bug 9620: IncludeSeeFromInSearches and data in $9 subfields can break indexing

In Germany 020$9 is used to store the ISBN with hyphens. In rare cases this
can break indexing in combination with IncludeSeeFromInSearches.

To reproduce:
1) Change your frameworks:
  * Make sure 084 $a is visible
  * Create a 084 $9 that you link to PERSO_NAME authorities.
2) Create a record or edit an existing one:
  * Use the plugin on 084 to link the record to an authority.
  * Make sure 400 is filled in your authority record.

Preparations all done, now test indexing:

3) Make sure IncludeSeeFromInSearches is OFF
  * Reindexing should work without any problems.

4) Activate IncludeSeeFromInSearches
  * Reindexing should throw an error and stop:
    201.Subfields are only for data fields (generally,
    just tags >= 010 at /home/koha/Koha/Filter/MARC/EmbedSee
    FromHeadings.pm line 94

5) Apply patch and reindex.
  * No error should occur.
  * Test 4xx fields from other tags were properly indexed.

What causes the problem is the fact, that Koha tries to store
the date from the 400 in the bibliographic record for indexing.
For this it calculates a tag in the bibliographic record from the
tag it found the authority link in and the 4xx tags used in the
authority record. If you have an authority linked to a 0xx field
and the matching authority has a 4xx where xx < 10, the calculated
tag will be a control field. The attempt to add subfields to this
control field, is causing the error and breaks the indexing process.

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

Comment: Work as described, and is a long description :)
Test:
1) Enabled 084 (all subfields visible), added 084_9 (missing from
default framework) linked to PERSO_NAME
2) Edited authority record and added some data to 400
3) Edited bib record, linked 084 to previous auth record
4) With IncludeSeeFromInSearches OFF, re-index without problem
5) With IncludeSeeFromInSearches ON, re-index problems!!!
====================
exporting biblio
====================
1...Subfields are only for data fields (generally, just tags >= 010) at...
Abort
6) Applied patch
7) With IncludeSeeFromInSearches ON, re-index without problem
...
====================
5001....................................................................................................
Records exported: 5060
====================
...
====================
2001....................................................................................................
Records exported: 2024
====================
CLEANING
====================
Good!

*) That's "works as described", don't know if other tests are needed.

No errors from koha-qa

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9620' into 3.12-master
Bug 9570 - view plain not working in ccsr

The code in opac-showmarc.pl isn't smart enough to find the xsl files in
the "default" (prog) theme if the ccsr theme is enabled, so the "view
plain" option on opac-MARCdetail.pl fails ever time.

This patch copies some path-handling code from XSLT.pm to improve xsl
file path handling when dealing with a "sub-theme."

To test, view the MARC view in the OPAC and click the "view plain" link.
This should work correctly in prog and ccsr themes and with different
languages enabled (keeping in mind the ccsr theme will fail in general
for languages other than en).

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked plain view works in both prog and ccsr themes now.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9570' into 3.12-master
Bug 9267 - Ubuntu 12.04 install docs broken

Current install instructions are broken in the (1.6) step. On amd64
architectures it breaks the whole dependency tree, pulling i386 packages.

This patch replaces the 'dpkg --set-selections' combo and replacess some spaces
for tabs in one line.

This should be cherry-picked for other releases that have 12.04 install instructions
as the problem is related to multiarch.

Regards
To+

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9267' into 3.12-master
Bug 9586 - Remove $ENV{DEBUG} info from Member Template

Currently, if $ENV{DEBUG} is set (for example to 1), the debug level
will be printed on the Add/Edit Patron pages (memberentrygen.tt) in the
form of: "Debug is on (level 1)".

While many if not most folks might not set $ENV{DEBUG} on a production
system, there is no reason to have this information printing on the
member template(s).

No where else in Koha is there a template that prints $ENV{DEBUG}
information, with the exception of calendar.inc, although that doesn't
activate until at least debug level 2 or 5, so it might be worth holding
on to. It is certainly more complicated than simply printing the debug
level. I don't do development on the calendars, so I'm not going to
address that one.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9586' into 3.12-master
Bug 9698 - Replace YUI buttons on patron card creator manage toolbar with Bootstrap

This patch converts the toolbar include file used by the patron card
creator home and manage pages to Bootstrap, replacing YUI button and
menu code with Bootstrap markup.

This patch converts the previous menu buttons to plain buttons,
removing the redundant links to the manage pages, which are in the
left-hand sidebar. This keeps toolbar buttons within the general
category of "action" (as opposed to "view").

To test, view the patron card creator home page and any manage page
("Manage layouts," "Manage profiles," etc). Buttons should look correct
and work correctly.

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

Comment: Work as described. No errors.
No "plus" sign for this buttons?

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No plus signs? :)
Works nicely and didn't have the plus before, so it's ok.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_9698' into 3.12-master
Bug 9696 - Remove YUI styling from buttons on patron card creator edit pages

Submit and cancel buttons on patron card creator edit pages should not
be styled differently than other submit and cancel controls.

This patch removes YUI styling of these controls and makes them
consistent with controls on other Koha pages. The "Cancel" button has
been removed altogether from the batch edit page since there is not a
corresponding submit button.

To test, got to the patron card creator and edit a batch, a layout, a
profile, and a template. Submit and cancel controls should look correct
and work correctly.

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

Comment: Work as described. Works and looks well. No errors.

Note: It's true that edit batch has not a submit button, but
on the other managed pages (layout, profile, template) cancel
aborts editing and takes you to a list of objects (layout, etc.)
Now if we selected the wrong batch, we need to click on left menu o
back button (yay). Are we loosing a consistent interface?
Just thinking.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, more consistent with Koha's general interface
patterns.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>