Bug 10609: Use branch name rather than branch code in serials-collection.pl (3.12.x)

This is the 3.12.x compatible version of the patch for 10609.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Serial collection page now displays the branch description
instead of the branchcode.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10218: Add individual CSS classes for bibliographic information in OPAC (UNIMARC)

Follow-up for UNIMARC XSLT Display
This patch adds class to span markup in list and detail display.
XSLT are not build in the same way in MARC21 and UNIMARC, so I had
to add a parameter "spanclass" to 3 templates called in UNIMARC :
tag_title, tag_7xx, tag_comma

To test, apply the patch on a Koha instance with UNIMARC records, and
- activate sysprefs  OPACXSLTDetailsDisplay and OPACXSLTDetailsDisplay
- make a search on the OPAC. In the results, check the spans with
"results_summary" class have also more a precise class.
Ex : span class="results_summary publication"
- view some records in detailed view. If possible, a record with
a series, a record with some subjects, a record with different authors,
a record with a link in 856. Check the spans with "results_summary"
have also a more precise class.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works exactly as described on results and detail.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT only change.
Tested in a UNIMARC install, HTML source code looks ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3d6bec745536a3e91e960d55542ec7233c17cfce)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10793: XSLT change 780/785 search queries to use ti,phr indexes like other linking entries

This patch adds the ti,phr index to the search queries for the 780
and 785 MARC fields in the XSLT templates.

Test Plan:

1) Use a record with 780 and 785 MARC fields with data in the "a" or
"t" subfields. (You might need to add these fields to an existing
record, or create a new record. You might also need to change your
MARC Bibliographic Framework settings to not "hide" these fields in
your framework(s)).

N.B. The data in the "a" or "t" subfields should be a title that
exists in your database. Otherwise, this test might seem misleading.

2) Set the system preferences "XSLTDetailsDisplay" and
"OPACXSLTDetailsDisplay" to "default".

3) Go to your record (which contains the 780/785 fields), and look
for links with linktext derived from the "a" or "t" fields in the
record. These may or may not be prefaced with labels such as
"Continued by" or "Continues".

4) Note that the links are formatted "q=TITLE". Click this link
and note the possibly high number of results.

5) APPLY THE PATCH

6) Shift+Refresh your record page, and observe that the link should
now say "q=ti,phr:TITLE". Click this link and note that you are
either taken directly to the referenced article or that your
search results are considerably fewer.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change only, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 275dfd2fac59c824d9591644fe982e9008032407)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10742: improve converting simple search to Z39.50 search

In intranet, when search does not return results, there is a button
to perform the same search on Z39.50 servers.  This works well when
coming from advanced search.  But when using simple search from header,
in the Z39.50 search box "kw,wrdl" is added to the operand in title.

This patch simply adds kw as default value when the cgi does not have
idx parameter.

Test plan :
- In intranet, perform a search from header that does not return any
  result. For example "afalseword"
- Click on "Z39.50 Search"
=> you get a popup with the searched word in title. For example:
    Title: afalseword
- Go to advanced search page
- Enter the same word into first input and submit
- Click on "Z39.50 Search"
=> you get a popup with the searched word in title.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small change, fixes an annoying problem.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0ab71d32641d092d11228f0e2282dd8805198720)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10721 - Improve DataTables configuration on transfers to receive report

I noticed this template used a hidden span to allow correct sorting of
titles--a relic of the previous table sorting plugin. I have removed
that and added an improved DataTables configuration.

To test apply the patch and view the transfers to receive report for a
library which has multiple transfers to receive. Sorting should work
correctly on all columns, including correct date sorting regardless of
dateformat system preference. Title sorting should correctly exclude
articles.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and works nicely.
Tested with different date formats.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8c3d3eb01a91c073aa9a5f2cb016bba01f0529ab)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10672 - Add subtitle to display of checkouts, overdues, and holds on the patron summary

In the OPAC, the patron summary page (opac-user.pl) should display
subtitle along with title in the lists of checkouts, overdues, and
holds. This patch adds it.

To test, log in to the OPAC as a patron who has checkouts, overdues, and
holds which include titles with subtitles. Titles should appear
correctly with and without subtitles.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ec070fa8375d9001041fc089ff193b17f87ae4c1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10272: make CheckReserves respect ReservesControlBranch

CheckReserves was using the CircControl system preference to determine what
patrons an item can fill a hold for. It should be using ReservesControlBranch
instead.

Test Plan:
1) Set ReservesControlBranch to "item's home library".

2) Create an item at Library A, place holds for it for patrons at
   Library B, Library C, and Library A in that order,
   for pickup at the patrons home library.

3) Make sure the holds policy for Library A is set to
   Hold Policy = "From home library" and
   Return Policy = "Item returns home".

   Make sure the holds policies for the other libraries are set to
   Hold Policy = "From any library".

4) Check the item in at Library C, the hold for the patron at Library B
   should pop up, even though it's in violation of the circulation rules.
   Don't click the confirm button!

5) Apply this patch, and reload the page,
   now the hold listed should be for the last hold,
   the hold for the patron at Library A, which is correct.

This patch adds the subroutine C4::Reserves::GetReservesControlBranch as
an equivilent to C4::Circulation::_GetCircControlBranch.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed POD so that arguments and explanation match (C<$item>).
Also tested opac-reserves.pl for regressions.
Passes all tests, QA script, and Reserves.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 78eba2f974ca9e8ff51f64d2356b004e7bfcecff)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10272: (follow-up) add regression test

This patch adds a regression test for this bug, effectively
implementing the manual test plan in the previous patch.

To test:

[1] Verify that prove -v t/db_dependent/Reserves.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e831a7eb3fe21561264cc756f40c539333e8ebbc)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10324: fix display of editorial series in normal view (UNIMARC / no XSLT)

The patch corrects the issue -- the content of the field 225 shall be
displayes under Series now.

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

Comment: Work as described, no koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comparing the XSLT with the normal view the patch seems to
work correctly. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 384566c1295a81dce0d9de001fcde36f2a996dfa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10349 - Don't show empty Descriptions/Title notes tabs in OPAC and staff

The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.

To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
That's better - thx Owen!
Works nicely and passes all tests.
Tested in staff and OPAC, also in combination with NotesBlacklist
hiding all notes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f5c7badb31dff9afcbb69e4f58155560e98a922f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works nicely.
Bug 10333: Labels/t_Batch.t needs to create its own data

prove t/db_dependent/Labels/t_Batch.t
db_dependent/Labels/t_Batch.t .. 1/33 # Testing Batch->new() method.
db_dependent/Labels/t_Batch.t .. ok
All tests successful.
Files=1, Tests=33,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.34 cusr
0.00 csys =  0.37 CPU)
Result: PASS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 402435b17a1ae32fb41b6fdde39b94059fdb2c2f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8215: TT plugins

Backporting some template toolkit plugins that are actively being used for
bugfixes on the stable branch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8507: koha-create now supports using DOM indexing for bibs

This patch makes the koha-create script install the file zebra-biblios-dom.cfg
with the proper string substitutions inside on the new instance koha-conf.xml file.

It also adds two option switches that control the indexing mode for the instance:

 --biblio-idx {dom|grs1}
 --auth-idx {dom|grs1}

DOM indexing is set as the default for both authorities and bibliographic records.

Following drojf (thanks!) advice I arranged stuff like explained here:

  http://wiki.koha-community.org/wiki/Switching_to_dom_indexing

To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
 $ koha-create --create-db domtest
 - Check there's a file /etc/koha/sites/domtest/zebra-biblios-dom.cfg
 - Check that /etc/koha/sites/domtest/koha-conf.xml points to:
   * zebra-biblios-dom.cfg (biblioserver section)
   * zebra-biblios-dom.cfg (publicserver section)
   * zebra-authorities-dom.cfg (authorityserver section)
 - Success means the new default is DOM
b) Play with the 4 possible combination of option switches
 $ koha-create --create-db --auth-idx grs1 --biblio-idx grs1 domtest
 $ koha-create --create-db --auth-idx grs1 --biblio-idx dom domtest
 $ koha-create --create-db --auth-idx dom --biblio-idx grs1 domtest
 $ koha-create --create-db --auth-idx dom --biblio-idx dom domtest
 - Check the koha-conf.xml file reflects the chosen options.
c) Run
 $ koha-create --help
 - It should advertise this addition accordingly.
d) Run
 $ man koha-create
 - Man page for koha-create should provide good information on the new switches behaviour

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aba3db2628f25361fecfbe67b100f8913074835a)
Bug 8507: (follow-up) fix one reference to __ZEBRA_BIBLIOS_CFG__

Fixed the path to __ZEBRA_BIBLIOS_CFG__ for <server id="mergeserver">

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5868490f026d0632416fdb78a6c0e7047f1e0df5)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 8705: Restore current stable branch's default behaviour

Biblios should be set to GRS-1 indexing by default in 3.12.x

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10802: make Debian package install history.txt

While bug 8911 fixed a problem regarding history.txt, a proper fix for
packages was missing.
This patch does three things:

 - Adds docs/history.txt to debian/koha-common.docs so it gets installed.
 - Moves the line installing the release notes from debian/koha-common.install
   to debian/koha-common.docs.
 - Adds an override_dh_compress entry in debian/rules that excludes
   history.txt from the dh_compress routine [1]

To test:
 - Take a picture of how /usr/share/doc/koha-common looks.
 - Apply the patch and build a package.
 - Upgrade and/or install using your package.
 - Look for the contents of the /usr/share/doc/koha-common, it should
   look the same, but history.txt must be there.
 - More > About Koha > Koha Timeline should show the history lines.

[1] As 'man dh_compress' says, it is needed as every file considered for
    the doc dir that is plain text and is more than 4k size will be
    gzipped unless stated otherwise. We need it uncompressed for about.pl.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b7cd95bcc909f7db330b5acbfcf9e8f817328a67)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Update release notes for 3.12.6 release

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Translation updates for 3.12.06

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 71ddc968f5606e3f3fe296baee8e19936364fa54)
Increment version for 3.12.6 release
Merge tag 'v3.12.06' into 3.12.ptfs

Koha release 3.12.06