Bug 7485 - Cannot edit barcode on Fast Add

Simple fix, a special case was added for the fast add framework
in the case that an item was being checked out that had not been
catalogued. In that case, the barcode was being passed as a parameter
through addbiblio.pl to additem.pl.

This barcode param was used to overwrite the existing value, so if
no barcode param was passed ( which is only the case with fast adds
from the circ screen ), the barcode field would appear empty in the
items editor.

This commit causes that special case code to check for an existing
barcode value first, and only use the cgi parameter 'branch' in the
case that there is no existing barcode value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Editing barcode of fast added item now works. Passes t xt

Recommend this for 3.6 release.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 4819: Add ids to OPAC detail page

Patch adds an unique id to every item tab and
to every column in the items table on the holdings tab.

http://bugs.koha-community.org/show_bug.cgi?id=4819
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7436 - Set itemtypes.rentalcharge = 0 in sample data for nb-NO and de-DE

Set the rentalcharge = 0 for sample itemtypes (except Music for nb-NO).

To test:
Run through the web-installer for nb-NO and de-DE, and check that
itemtypes are displayed correctly for each language.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>.
Note: You have to install the language first in order to be able
to select it in the web installer. There was a problem
in the po files for nb-NO that kept all files from being created
correctly. I fixed the po file and did an installation with all sample
files. There is a problem with z3950servers.sql that is not caused
by this patch:
z3950servers.sql
ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1

Web installer for de-DE ran without problems on the sample files.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and UseICU for NORMARC XSLT

IMPORTANT! This patch relies on the patch for Bug 7092, which is now pushed to
master.

As the title says, this patch implements TraceCompleteSubfields,
TraceSubjectSubdivisions and UseICU for NORMARC XSLT, both for the OPAC
and the Intranet. This affects how clickable subject-links are constructed.

To make this work the indexing of MARC fields in the 600 range is changed
to include "Subject:p" in several new places.

To test:

Find a record with a "complex" subject, like "Internet -- Law and legislation".
MARC21 and NORMARC are very similar in how they handle subjects, so testing
on a MARC21 database should be OK. (Changes in indexing reflect changes already
made to the MARC21 indexing.)

Make sure you have these syspref settings:
- marcflavour = NORMARC
- XSLTDetailsDisplay = using XSLT stylesheets
- OPACXSLTDetailsDisplay = using XSLT stylesheets

(Ideally, testing should be done on a real NORMARC setup, but since the changes
to indexing only reflect how it's already done in MARC21, I think testing
on a MARC21 installation with marcflavour = NORMARC should be OK.)

Now try the different combinations of TraceCompleteSubfields,
TraceSubjectSubdivisions and UseICU, and check the format of the
clickable links, both in the OPAC and staff client. Here's what you should
be seeing:

1.
TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Don't include
UseICU = Not using
  opac-search.pl?q=su:"Internet"
UseICU = Using
  opac-search.pl?q=su:{Internet}

2.
TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Don't include
UseICU = Not using
  opac-search.pl?q=su,complete-subfield:"Internet"
UseICU = Using
  opac-search.pl?q=su,complete-subfield:{Internet}

3.
TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Include
UseICU = Not using
  opac-search.pl?q=(su:"Internet") AND (su:"Law and legislation.")
UseICU = Using
  opac-search.pl?q=(su:{Internet}) AND (su:{Law and legislation.})

4.
TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Include
UseICU = Not using
  opac-search.pl?q=(su,complete-subfield:"Internet") AND (su,complete-subfield:"Law and legislation.")
UseICU = Using
  opac-search.pl?q=(su,complete-subfield:{Internet}) AND (su,complete-subfield:{Law and legislation.})

UPDATE 2012-03-23
- Change the syspref TracingQuotes to UseICU, see bug 7092
- Change boolean operator from "and" to "AND", see bug 7695

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: UseControlnumber must be turned off.

1) Works.
2) Works.
3) Works.
4) Works.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7617: Sort authority results by authid

Add the option of sorting authority search results by authid, and instruct the
FirstMatch and LastMatch linkers to use that sort order rather than the default
search order.

To test:
1. Install new Zebra authorities config
    etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml,
    etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl,
    etc/zebradb/marc_defs/marc21/authorities/record.abs, and
    etc/zebradb/marc_defs/unimarc/authorities/record.abs
2. Reindex authorities in Zebra
3. Set LinkerModule to FirstMatch or LastMatch
4. Add two identical authority records, and a bib record with a heading that
   matches them
5. Run misc/link_bibs_to_authorities.pl on that record
6. Confirm that the authid that's been inserted into subfield $9 of that
   heading is the first, if you selected FirstMatch, or last if you selected
   LastMatch

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I followed the test plan and checked that for "Last match" and "First match"
the correct authority was selected and linked to the record.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7701: Error when sending serial alerts

Probably due to bug 6875, C4::Letters is no longer used by C4::Serials, so that
when SendAlerts is called (exactly when this happens is a mystery to me), you
will get an error. Adding a "require C4::Letters;" and prefixing SendAlerts to
C4::Letters:: should fix it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes the perl error. Steps to reproduce:

1) Create a subscription and set patron notification to "Routling list" -
this is necessary, so that a link to email notifications shows up in the OPAC.
2) Search for the serial record in the OPAC and click on the more details
view from the subscriptions tab. Subscribe to email notifications.
3) Go back into the serials module and receive and issue for the serial.
Before the patch a nasty perl error will be shown, after the patch
receiving works.

I couldn't confirm that the email was sent out with my setup, but this patch
certainly fixes serial receive.

[Update 2011-02-29] Fixed the typo and retested. Looks good, but couldn't check
if the mail was actually sent.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7641: Suspend Reserves

Adds the ability to suspend reserves. The new system preference
AutoResumeSuspendedHolds enables the ability to set a date for
a suspended hold to automatically be resumed.

When a hold is suspended, it will continue to increase in priority
as the holds above it are fulfilled. If the first holds in line
to be filled are suspended, the first non-suspened hold in line
will be used when an item can fulfill a hold that has been placed.

http://bugs.koha-community.org/show_bug.cgi?id=7641
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested with the preference on and off:
1. placed several holds in the staff client
2. suspended some with a date
3. suspended some without a date
4. triggered hold message by checking in for hold with suspensions
5. the suspended hold was skipped as it should be
6. tested suspending holds in the OPAC w and w/out dates
7. ran the cron to clear suspensions with dates

All the above tests worked as expected. Signing off.
bug 7641 follow-up DBRev number
bug 7641 follow-up: activate use strict (see coding guidelines)
bug 7641 follow-up: remove some unconditionnal warns
Bug 7835 - submit and cancel buttons on diff lines on notices

Changing markup of cancel button to match standard Koha pattern.
Also correcting some invalid markup:
 - unescaped ampersands
 - invalid form action attributes
 - improperly nested elements in <ol>
 - invalid "for" on label

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>