koha-equinox.git
9 years agoBug 12005 : Creating a new zebra connection for each time we need one
Chris Cormack [Thu, 9 Oct 2014 16:03:01 +0000]
Bug 12005 : Creating a new zebra connection for each time we need one

Zebra is not designed to have persistent connections, under cgi this
didn't matter the scripts would get a new connection each time, but
under plack we try to use dead connections

This patch changes it so plack works the same way that cgi did.

To test:
Apply this patch
Do some searches
Check everything still works

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl
Jonathan Druart [Mon, 8 Sep 2014 11:21:17 +0000]
Bug 12884: Get rid of redefined subroutine warnings in dateaccessioned.pl

Instead of removing all warnings, we should remove warnings about the
redefined subroutines.

Test plan:
- link the dateaccessioned plugin with one of your biblio field
- edit an item
- verify they are no warnings in the Koha log file.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 9859: Follow-up - Adding a simple unit test for nsb_clean
Katrin Fischer [Thu, 16 Oct 2014 14:10:50 +0000]
Bug 9859: Follow-up - Adding a simple unit test for nsb_clean

This tests uses the example given on the perl file on the
bug report.

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

9 years agoBug 9859: fix nsb_clean side effect
Stéphane Delaune [Wed, 20 Mar 2013 09:54:46 +0000]
Bug 9859: fix nsb_clean side effect

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
This sub was causing 2 bugs :
- tools/exports.pl --clean was removing Â
- authority search plugin used in cataloging was removing Â in suggested authorities displayed dynamicly (using ajax)
After applying the patch,
- NSB/NSE are still removed by nsb_clean
- tools/exports.pl --clean is no more removing Â
- authority search plugins is no more removing Â

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11812 - Add missing "required" indicator to fields which are required
Owen Leonard [Fri, 21 Feb 2014 14:44:21 +0000]
Bug 11812 - Add missing "required" indicator to fields which are required

Form fields in the staff client which are required should be configured
to be so by doing several things:

- Add a class "required" to the field's <label>
- Add a class "required" to the form field
- Add 'required="required"' to the form field
- Apppend a <span class="required">Required</span> after the form field.

Several places in the templates are missing the <span>. This patch adds
them.

To test, apply the patch and view the following pages to confirm that
the "Required" text appears:

- Acquisitions -> Add an order to a basket from a new (empty) record.
  Title, quantity, and fund should indicate they are required.

- Administration -> Authority types ->  New authority type. The
  authority type and description fields should indicate they are
  required.

- Administration -> Authority types -> MARC structure -> New tag. The
  tag field should indicate it is required.

- Patron types and categories -> New category. Category code,
  description, and category type should indicate that they are required.
  FIXME: Enrollment period is required but the user must choose one. I'm
  not sure how to handle that clearly.

- Tools -> CSV profiles. Profile name, profile type, and profile MARC
  fields should indicate they are required on both the new and edit
  forms.

- Administration -> Manage MARC modification templates. Under "Create a
  new template" the name field should indicate that it is required.

- Tools -> Batch patron modification -> Submit a batch for editing. Any
  fields which are required according to your BorrowerMandatoryField
  system preference should indicate that they are required.

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

QA Edits: Re-worded the "required" not on the batch patron edit form,
added a missing word to the help text on that page. On the csv-profiles
page I removed an unnecessary "javascript:" protocol from the markup.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works and passes QA script.

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

9 years agoBug 13085: bugfix to allow call of export.pl in commandline without id_list_file...
Stéphane Delaune [Wed, 15 Oct 2014 13:23:35 +0000]
Bug 13085: bugfix to allow call of export.pl in commandline without id_list_file parameter

Test plan
1/ run ./tools/export.pl
2/ notice an error like cannot open 0: No such file or directory at ./tools/export.pl line 209.
3/ apply patch
4/ run again
5/ no errors

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, adding an additional check.

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

9 years agoBug 12068: (rm followup) remove useless newline introduced on merging
Tomas Cohen Arazi [Wed, 22 Oct 2014 12:31:01 +0000]
Bug 12068: (rm followup) remove useless newline introduced on merging

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

9 years agoBug 13115 - Holidays.t will fail some unit tests on Sundays
Kyle M Hall [Mon, 20 Oct 2014 05:56:46 +0000]
Bug 13115 - Holidays.t will fail some unit tests on Sundays

Due to the fact that Sunday is a repeating holiday in the example data
which is used for part but not all of Holidays.t, the last test will
fail on Sundays. The test is to see if today is *not* a special holiday
for MPL, but since it's already a repeating holiday, is_holiday will
return true rather than false.

Test Plan:
1) Wait until Sunday
2) prove t/db_dependent/Holidays.t
3) Note the failure
4) Apply this patch
5) Repeat step 2
6) Note there is no longer a failure

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Used my time machine... :)

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

9 years agoBug 13114: Prevent Shibboleth Patches from spamming logs
Martin Renvoize [Mon, 20 Oct 2014 13:04:45 +0000]
Bug 13114: Prevent Shibboleth Patches from spamming logs

- The shibboleth patch introduced an undefined message into the error
  logs, when shiboleth is disabled.

Testplan

1. Ensure shibboleth is disabled.
2. Refresh any opac page
3. See 'Use of uninitialized value $ENV{"REMOTE_USER"} in string ne at
/home/koha/kohaclone/C4/Auth.pm line 711.' popup in the opac-error.log
4. Apply patch
5. Refresh opac page
6. Error should no longer appear

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

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

9 years agoBug 10960 - Holds Queue Report display loc code not description
Owen Leonard [Tue, 30 Sep 2014 14:34:57 +0000]
Bug 10960 - Holds Queue Report display loc code not description

The holds queue report shows codes for item shelving location and for
library transfer location. This patch adds template plugin handling of
both these fields to display their full description.

To test, make sure you have one or more items in your holds queue which
have a shelving location. Rebuild your holds queue if necessary and view
it. Items which have a shelving location should show the description
instead of the code. The "send to" column should show the library name
instead of code.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, making use of the TT plugins.

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

9 years agoBug 12068 - label-create-pdf.pl Add support for RTL language
Bernardo Gonzalez Kriegel [Wed, 23 Apr 2014 21:18:25 +0000]
Bug 12068 - label-create-pdf.pl Add support for RTL language

On top of Bug 8375

If you print a label using arabic/hebrew script,
letters are printed in logical direction, from left
to right, giving a mangled result

This patch will try to fix those cases adding a new
perl dependency, Text::Bidi, and using the automagic
feature if it's log2vis() function to rearrange chars
based on detected text 'direction'

To test:
1. Install Text::Bidi package
(apt-get install libtext-bidi-perl)

2. Try a batch, using Helvetica, with a mix of
ltr and rtl (arabic/hebrew) titles, chars are good,
but direction is bad

NOTE: I suggest changing the mapping for 'HO' font
on koha-conf.xml, from DejaVuSans-Oblique.ttf to
DejaVuSans.ttf to view 'title' chars

3. Apply the patch

4. Try again, now the result is good

Formerly a followup of Bug 8375, look sample pics
on that Bug.
Rebased following changes on Bug 8375

Note: Arabic titles will not be displayed, because
current code selects Oblique variant (unless you
change mapping as suggested on 2. )
Hebrew looks good.

Rebased and move use of new dependency to Labels.pm

Rebased on master

Signed-off-by: Karam Qubsi <karamqubsi@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with the help of Bernardo. With the patch
the characters of RTL strings appear in the correct
order in the generated PDF files.

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

9 years agoBug 12914 - Wrong message 'Patron(..) is blocked for 2014-09-30 day(s).
Marc Véron [Sat, 13 Sep 2014 10:52:08 +0000]
Bug 12914 - Wrong message 'Patron(..) is blocked for 2014-09-30 day(s).

The message in circulation.tt assumed to get days but date is given. Updated comments and message depending on expiration date or no expiration of restriction.

The message shows up on top of Bug 643 Allow override of 'debarred' status if a patron has a restriction.

Replaced date_format with date template (see comment #6)

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 8687 - Overdues: Add utf-8 support to HTML and additional fields to CSV output
simith [Thu, 31 Jul 2014 13:29:17 +0000]
Bug 8687 - Overdues: Add utf-8 support to HTML and additional fields to CSV output

This patch contains small improvements made in the overdue_notices.pl script.

- UTF-8 support in the HTML output
- Add the phone, cardnumber, branchname and letternumber columns
  to the csv output

Testing:

I) Create an issue overdue (intranet):
0) Enter in a patron account, add some characters like
   ユーザー別サイト in his address
1) Check if in Patron category administration the overdue column
   is YES for his code
2) In Tools -> Notice triggers define first delay = 7, letter
   Overdue notice. Nothing for second ni third
3) Check if Tools -> Notices and slips, code overdue is available
4) checkout a book with a retard more than 7 days.
5) Check if Adminstration -> Defining circulation and fine rules
   for all libraries has fine rules for his patron category,
   item type book.

II) Before applying the patch
0) Run misc/cronjobs/overdue_notices.pl -n -html .
1) Open the file notices_"date".html in a brower
2) Validate the characters are not correct

III) After applying the patch
0) Run misc/cronjobs/overdue_notices.pl -n -html .
1) Open the file notices_"date".html in a brower
2) Validate the characters are correct
3) Run misc/cronjobs/overdue_notices.pl -n -csv temp.csv
4) Validate phone, cardnumber, branchname and letternumber
   columns and values

Sponsored-by: CCSR

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Added the Sponsored-by line.

9 years agoBug 13035: Overdue notices send notices for due date in future.
Rafal Kopaczka [Tue, 7 Oct 2014 12:43:36 +0000]
Bug 13035: Overdue notices send notices for due date in future.

Overdue notices, script uses method days_between which returns always
positive value of days, no mater if due_date is higher or lower from
date_to_run. This causes overdue notices to be send for real overdue and
for checkouts with due date in future, which have same days_between as
in notice triggers.

To reproduce:
1. Set up overdue notice triggers for eg. 2 day.
2. Checkout items for 2 borrowers first gets item with due date 2 days
in past and second gets 2 days in future.
3. run ./misc/cronjobs/overdue_notices.pl -n -t
4. watch that notices was generated for both of them.

To test:
1. Repeat steps 1,2
2. Apply patch
3. run ./misc/cronjobs/overdue_notices.pl -n -t
4. should be 1 notice for borrower with overdue item.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, just adds an additional test.

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

9 years agoBug 13020 - Checkouts table default ordering is incorrect
Kyle M Hall [Wed, 1 Oct 2014 12:25:02 +0000]
Bug 13020 - Checkouts table default ordering is incorrect

The checkouts table is no longer keeping "today's checkouts" in the
order they were scanned.

Test Plan:
1) Create 3 records "Test 1", "Test 2" and "Test 3" each with one item
2) Check out the items to a patron in the order "Test 2", "Test 1", "Test 3".
3) Note the order is incorrect.
4) Apply this patch
5) Refresh the page
6) Note the order is now correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note that the bug already exists before bug 12550. I checked on a 3.14.x
branch (without the ajax circ stuff), and the order is the same as with
this patch.

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

9 years agoBug 12550 [QA Followup] - Make checking the checkbox load the table of checkouts
Kyle M Hall [Wed, 1 Oct 2014 12:35:40 +0000]
Bug 12550 [QA Followup] - Make checking the checkbox load the table of checkouts

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

9 years agoBug 12550 - Add ability to delay loading of patron's checkouts in circulation and...
Kyle M Hall [Thu, 10 Jul 2014 16:37:44 +0000]
Bug 12550 - Add ability to delay loading of patron's checkouts in circulation and patron details

Now that a patron's checkouts are loaded asynchronously, we can further
improve Koha's performance by not loading the checkouts table when it is
not needed. For example, if a librarian is checking out 5 items to a
patron, we really don't need to load the table during the scanning of
items 1 to 4, just for item 5. Another example would be browsing to the
patron details table in order to change a patron's password.

Test Plan:
1) Apply this patch
2) Browse to circulation.pl for a patron
3) Note the table is not loaded automatically
4) Click the "Show checkouts" button
5) Note the checkouts table loads
6) Check the "Always show checkouts immediately" checkbox
7) Reload the page, the checkouts should now load immediately
8) Repeat steps 3-7 for the patron details page ( moremember.pl )

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove trailing spaces.
Note: I am not sure the checkbox is at the best place, but I don't have
a better suggestion.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12862: OPAC bootstrap - clean up language="javascript"
Mark Tompsett [Tue, 2 Sep 2014 20:43:32 +0000]
Bug 12862: OPAC bootstrap - clean up language="javascript"

There was a <script language="javascript"> tag.
It was cleaned up to be <script type="text/javascript">.
Also, the div was being chopped because the script was
in the middle of the div. Moving it to head solved the issues.

This is difficult to test, since the printslip is triggered
when you click Finish.

TEST PLAN
---------
 1) Home -> Koha administration -> Global system parameters -> OPAC
 2) Set the OPAC system preference 'opacthemes' to 'bootstrap'.
 3) Start the self-checkout client (/cgi-bin/koha/sco/sco-main.pl)
 4) Log in.
 5) Check something out.
 6) Change the address url text box to
    .../cgi-bin/koha/sco/printslip.pl?borrowernumber=##&amp;print=qslip
    Where ## is your borrower number which just checked something out.
 7) Click Cancel on the print dialogue
 8) View Page Source
    -- The HTML validation plugin will point out multiple errors.
 9) Apply patch
10) Refresh page
11) View Page Source
    -- Much happier validation results.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12862: Staff client tweaks related to obsolete language="javascript"
Mark Tompsett [Tue, 2 Sep 2014 14:13:28 +0000]
Bug 12862: Staff client tweaks related to obsolete language="javascript"

As a result, this patch removed the deprecated tag from the
intranet templates.

And since there was just 1 other tiny error in the same template
file, the checked="checked" was removed from a text box.

TEST PLAN
---------
1) Install the HTML Validator 0.9.5.8 for FireFox.
2) Open Intranet to Home -> Tools -> News
3) View Page Source
   -- you'll notice the message about language="javascript" being
      one of the error messages.
4) Click Edit beside one of the news items.
5) View Page Source
   -- you'll notice the message about language="javascript" being
      one of the error messages.
6) Apply patch
7) Repeat steps 2 to 5 without "language="javascript" related
   error messages.
8) Run koha QA test tools.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 13027: Typo RoutlingListNote
Marcel de Rooy [Mon, 6 Oct 2014 11:07:59 +0000]
Bug 13027: Typo RoutlingListNote

Trivial patch adjusts two occurrences of this typo in two installer sql
files.

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Typo in sysprefs.sql is only in the description, so fixing
this without a database update seems ok.

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

9 years agoBug 12424: DBRev 3.17.00.029
Tomas Cohen Arazi [Sat, 18 Oct 2014 13:55:25 +0000]
Bug 12424: DBRev 3.17.00.029

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

9 years agoBug 12424 - ddc sorting of call numbers truncates long Cutter parts
simith [Thu, 21 Aug 2014 18:42:04 +0000]
Bug 12424 - ddc sorting of call numbers truncates long Cutter parts

This patch increases the cn_sort field length to 255 chars.

Modified:

C4/ClassSortRoutine.pm                    - change the hardcoded cn_sort length to 255
installer/data/mysql/kohastructure.sql    - alter tables items and deleteditems,
                                            biblioitems and deletedbiblioitems
installer/data/mysql/updatedatabase.pl    - alter tables items and deleteditems,
                                            biblioitems and deletedbiblioitems

Testing:

Before applying the patch:
0) Select an item
1) Edit the item selected
2) Change "Full call number" option to 530 F435_1996 v2p1
3) Save changes
4) Valide 530_000000000000000_F435_1996_ (table items - cn_sort column).

After applying the patch:
5) Edit again the item selected in 0
3) Save changes
4) Valide 530_000000000000000_F435_1996_V2P1 (table items - cn_sort column).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
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 12296: DBRev 3.17.00.028
Tomas Cohen Arazi [Sat, 18 Oct 2014 13:41:26 +0000]
Bug 12296: DBRev 3.17.00.028

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

9 years agoBug 12296: (QA followup) remove rebasing leftover
Tomas Cohen Arazi [Sat, 18 Oct 2014 13:39:06 +0000]
Bug 12296: (QA followup) remove rebasing leftover

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

9 years agoBug 12296: make search box customisable with OpacCustomSearch
Robin Sheat [Wed, 25 Jun 2014 02:42:18 +0000]
Bug 12296: make search box customisable with OpacCustomSearch

This allows the search box to be replaced by some custom HTML, useful
when you're needing to integrate with some other search system, and
don't want to maintain a template change across upgrades.

Test plan:
* Install patch
* Look at the OPAC, see that nothing has changed.
* Change the OpacCustomSearch syspref to something like <h1>Zuul</h1>
* Look at the OPAC again, you can no longer search, there is only Zuul.

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

Works as advertised. Seems like it would be really easy to screw up your
OPAC with this feature, but since we already offer other easy ways to
screw up your OPAC I guess this fits in.

New patch changes: removed the bootstrap code, changed the entry in
syspref.sql

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes QA script and tests.
The feature has some limitations, described on the bug.

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

9 years agoBug 12725: Show RDA tag 264 on Intranet Results and Detail XSLT view (MARC21)
Marcel de Rooy [Thu, 7 Aug 2014 07:55:49 +0000]
Bug 12725: Show RDA tag 264 on Intranet Results and Detail XSLT view (MARC21)

As bugs 12724 and 12726 did on OPAC, this patch adds similar changes to
Intranet Results and Details XSLT view. It shows information from tag 264 on
the Publisher line of Intranet Results and Detail.

Test plan (see also bug 12742 and the rules mentioned there):
[1] Add tag 260 and some 264s to your MARC21 record.
[2] Check the display of Intranet Results.
[3] Check the display of Intranet Detail.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Results and detail show 264. I added 2 but only shows the second,
is that right?

[Reply from marcel:] Yes. Based on the rules described, it picks the most
'appropriate' 264.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12726: Show RDA tag 264 on OPAC Results XSLT view (MARC21)
Marcel de Rooy [Thu, 7 Aug 2014 07:25:41 +0000]
Bug 12726: Show RDA tag 264 on OPAC Results XSLT view (MARC21)

This patch adds the same information to the Publisher line of OPAC Results
as bug 12724 did on OPAC Detail.
To accomplish this and reduce repeated code, two XSLT routines (named
templates) are moved from OPACDetail to MARC21slimUtils.

Test plan (see also bug 12742 and the rules mentioned there):
[1] Add tag 260 and some 264s to your MARC21 record.
[2] Check the display of OPAC Details. Should not have changed.
[3] Now check also the display of this record in OPAC Results.
[4] Change some indicators in the record. Check OPAC Results again.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
On top of 12724, no change on detail, more data on results.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Change moves display logic to Utils, 260 will display as
before and 264 will only display if there is no 260.

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

9 years agoBug 12724: Show RDA tag 264 on OPAC Detail XSLT view
Marcel de Rooy [Mon, 4 Aug 2014 13:36:41 +0000]
Bug 12724: Show RDA tag 264 on OPAC Detail XSLT view

This patch adds selected information from tag 264 to the Publisher line
on the OPAC detail XSLT view (MARC21). This includes a label, and the
subfields abc.

If Publication tag 260 exists, it adds information. If tag 260 does not exist,
it creates a 'publisher' line. (NOTE: Probably, both fields will not both be
present, but this patch can deal with that..)

Instead of showing all 264 tags, it picks the preferred one based on the
following rules (using both indicators; see LOC description):
[1] Try to select a Publisher -- Latest. Pick first one.
[2] Else try to select a Publisher. Pick the last one.
[3] Else try to select an other one (Producer, Manufacturer, ..) with Latest.
    Pick the first one of that.
[4] Otherwise: Pick the last 264 tag.

Test plan:
[1] Add one 260 and multiple 264 tags to your record.
[2] Check display in OPAC detail XSLT.
[3] Change some indicators, subfields of the 264s.
[4] Check display again, following the above rules.
    Go back to step 3 a couple of times.
[5] Remove tag 260. Check display again.

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12801: Use the branchcode to cache holidays
Jonathan Druart [Thu, 21 Aug 2014 15:23:30 +0000]
Bug 12801: Use the branchcode to cache holidays

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12801 - Unit Test
Kyle M Hall [Thu, 21 Aug 2014 13:47:37 +0000]
Bug 12801 - Unit Test

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12646: Display all invoices on the same page
Jonathan Druart [Tue, 19 Aug 2014 08:09:38 +0000]
Bug 12646: Display all invoices on the same page

Only first 20 invoices were displayed on the page. Without pagination, DT
did not allow to show others.
This page explicitely removes the pagination option in order to display
all invoices on the page.

Test plan:
1/ Create 21+ invoices
2/ Go on acqui/invoices
3/ Verify all invoices are displayed.

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 12927: Problems with item information tab on acq order from staged page
Bernardo Gonzalez Kriegel [Tue, 16 Sep 2014 17:48:50 +0000]
Bug 12927: Problems with item information tab on acq order from staged page

This patch fixes a regression introduced (by me)
on Bug 12673.

I adds the code needed to display properly all fields

To test:
1) Check that 'AcqCreateItem' syspref is set to 'placing an order'
2) Satage a file with some items
3) Go to a Vendor, create a basket, clic add from staged file, select your file
4) On 'Item information' tab fields are displayed wrong

5) Apply the patch

6) Reload, display must now be fixed

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 8446: (qa followup) Patch reintroduces SolR stuff
Tomas Cohen Arazi [Thu, 16 Oct 2014 15:34:19 +0000]
Bug 8446: (qa followup) Patch reintroduces SolR stuff

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

9 years agoBug 8446: (qa followup) Tests should be conditional on Test::DBIx::Class
Tomas Cohen Arazi [Thu, 16 Oct 2014 15:25:44 +0000]
Bug 8446: (qa followup) Tests should be conditional on Test::DBIx::Class

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

9 years agoBUG8446, QA Followup: Add Test::DBIx::Class to dependancies
Martin Renvoize [Fri, 10 Oct 2014 14:41:00 +0000]
BUG8446, QA Followup: Add Test::DBIx::Class to dependancies

- To correct tests after converting module to dbic, we need to add the
  Test::DBIx::Class module as a dependancy.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The dependency will probably need to be packaged by us until
it can get into Debian proper.

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

9 years agoBUG8446, QA Followup: Use DBIx::Class
Martin Renvoize [Mon, 29 Sep 2014 07:51:42 +0000]
BUG8446, QA Followup: Use DBIx::Class

- Convert Auth_with_shibboleth to use dbic stanzas.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, QA Followup: Minor Code Tidies
Martin Renvoize [Tue, 23 Sep 2014 14:49:15 +0000]
BUG8446, QA Followup: Minor Code Tidies

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, QA Followup: Cleanup tabs and license
Martin Renvoize [Tue, 23 Sep 2014 13:52:07 +0000]
BUG8446, QA Followup: Cleanup tabs and license

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, Follow up: Add Unit Tests
Martin Renvoize [Thu, 31 Jul 2014 15:07:08 +0000]
BUG8446, Follow up: Add Unit Tests

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, Follow up: Refactor to clean up bad practice
Martin Renvoize [Thu, 31 Jul 2014 15:06:19 +0000]
BUG8446, Follow up: Refactor to clean up bad practice

- A number of issues were highlighted whilst writing sensible unit tests
  for this module.
  - Removed unnessesary call to context->new();
  - Global variables are BAD!
  - Croaking is a wimps way out, we should handle errors early and
    properly.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, Follow up: Improve local login fallback
Martin Renvoize [Tue, 1 Apr 2014 12:15:40 +0000]
BUG8446, Follow up: Improve local login fallback

- Local fallback was not very well implemented, this patch adds
  better handling for such cases allowing clearer failure messages
- This patch also adds the ability to use single sign on via the
  top bar menu in the bootstrap theme.

BUG8446, Follow up: Adds perldoc documentation

- Add some documentation to the Auth_with_Shibboleth module
  including some guidance as to configuration.

BUG8446, Follow up: Correct filenames to match guidlines

- Moved Auth_with_Shibboleth.pm to Auth_with_shibboleth.pm to match
  other files present on the system.

BUG8446, Follow up: Correct paths after file rename

BUG8446, Follow up: Implemented single sign out

- This follow up rebases the code against 3.16+ which managed to break
  some of the original logic.
- As a side effect of the rebasing, we've also implemented the single
  sign out element. Upon logout, koha will request that the shibboleth
  session is destroyed, and then clear the local koha session upon
  return to koha.  Due to the nature of shibboleth however, you will
  only truly be signed out of the IdP if they properly support Single
  Sign Out (which many do not). As a consequence, although you may
  appear to be logged out in koha, you might find that upon clicking
  'login' the IdP does NOT request your login details again, but instead
  logs you silently back into your koha session. This is NOT a koha bug,
  but a shibboleth implementation issue that is well known.

BUG8446, Follow up: Fixed bootstrap login via modal

- The bootstrap theme enable login from any opac page via modal. To
  enable this with shibboleth we had to make some template parameters
  globally accessible when shibboleth is enabled.

BUG8446, Follow up: Add template rules for Shibboleth and CAS

- Add template rules so that CAS and Shibboleth can coexist.

BUG8446, Follow up: Added default config to config file

BUG8446, Follow up: Embellished perldoc documentation

- Updated perldoc to correct detail about configuring shibboleth
  authentication.
- Updated perldoc to include subroutines and their respective functions.

BUG8446, Follow up: Enable configuration of match field

- Added clearer, more flexible, configuration of shibboleth attribute to
  koha borrower field matching for authentication
- Correcting of documentation to make it more clear to the current
  implementation
- Minor refactoring of code to reduce some code duplication

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, Follow up: Remove unnecessary sysprefs, move to config
Jesse Weaver [Mon, 21 Oct 2013 16:17:08 +0000]
BUG8446, Follow up: Remove unnecessary sysprefs, move to config

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446, Follow up: Adds Shibboleth authentication
Martin Renvoize [Fri, 29 Nov 2013 14:16:27 +0000]
BUG8446, Follow up: Adds Shibboleth authentication

- Use syspref OpacBaseURL instead of ENV{'SERVER_NAME'} as this wont
  work if koha is behind a reverse proxy.
  - To use multiple vhosts, set OpacBaseURL per vhost explicitly with
    'SetEnv OpacBaseURL Value' as per Bug 10325

BUG8446, Follow up: Adds Shibboleth authentication

- Ensure user is returned to requested page after authentication
  - Added querystring to the target path in shibboleth URL so
    that when a user is authenticated he/she is returned to the
    correct page they requested before authentication.
    Example where this is important: When a user clicks a direct
    biblio link of the form - /opac-detail.pl?biblionumber=12345

BUG8446, Follow up: Remove unused imports from scripts

- Remove import of deprecated C4::Utils module from shibboleth
  authentication module: Auth_with_shibboleth.pm

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBUG8446: Adds Shibboleth authentication
Matthias Meusburger [Wed, 15 Feb 2012 13:57:02 +0000]
BUG8446: Adds Shibboleth authentication

 - Use the shibbolethAuthentication syspref to enable Shibboleth authentication
 - Configure the shibbolethLoginAttribute to specify which shibboleth user
   attribute matches the koha login
 - Make sure the OPACBaseURL is correctly set

BUG8446, Follow-up: Adds Shibboleth authentication

 - Fix logout bug: shibboleth logout now occurs only when
   the session is a shibboleth one.
 - Do some refactoring: getting shibboleth username is now
   done in C4::Auth_with_Shibboleth.pm (get_login_shib function)

BUG8446, Follow-up: Adds Shibboleth authentication

 - Adds redirect to opac after logout

BUG8446, Follow-up: Adds Shibboleth authentication

 - Shibboleth is not compatible with basic http authentication
   in C4/Auth.pm. This patch fixes that.

BUG8446, Follow-up: Adds Shibboleth authentication

 - Use ENV{'SERVER_NAME'} instead of syspref OpacBaseURL in order to work with
   multiple vhosts.

BUG8446, Follow-up: Adds Shibboleth authentication

 - Adds missing protocol for $ENV{'SERVER_NAME'}

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with the feide idp.
- LDAP login and logout are working
- local login/logout are still working
- CAS login/logout are still working

Instructions for setup can be found on the wiki:
http://wiki.koha-community.org/wiki/Shibboleth_Configuration

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

9 years agoBug 10126: (qa followup) fix tests
Tomas Cohen Arazi [Thu, 16 Oct 2014 13:24:07 +0000]
Bug 10126: (qa followup) fix tests

It seems the removal of global variables changes the behaviour
of Test::MockModule, and it now expects the namespace in front
of the statically called method.

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

9 years agoBug 10126: Remove my variables at module level
Jonathan Druart [Thu, 9 Oct 2014 15:16:34 +0000]
Bug 10126: Remove my variables at module level

In C4::Reports::Guided, a lot of variables was defined at module level
and reused in subroutine.

I didn't find any problem with Plack, so I'm not sure this patch is
useful.

Test plan:
Verify there is no more ^my in the module and you don't find any
regression with the guided reports tools (with and without Plack)

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

I'm unsure if this is needed, but I have verified it causes no
regressions

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
No regressions spotted. I'd prefer this code to be fully refactored of course :-P

9 years agoBug 7143 - Fix name and link to Athens County Public Libraries
Owen Leonard [Tue, 14 Oct 2014 13:27:00 +0000]
Bug 7143 - Fix name and link to Athens County Public Libraries

The previous update to the Athens County Public Libraries link was
incorrect. It is preferable to point to our library system's home page
rather than our OPAC. If any change is necessary it is to update the
name from the old "Nelsonville Public Library" to the new "Athens County
Public Libraries."

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 13062 - Cataloging search no longer passes search terms to z39.50 search
Kyle M Hall [Thu, 9 Oct 2014 17:36:21 +0000]
Bug 13062 - Cataloging search no longer passes search terms to z39.50 search

If you search the catalog and click new from z39.50, your term is put in
the search popup. Doing the same thing from the cataloging search no
longer works.

Test Plan:
1) Do a cataloging search
2) Click "New from Z39.50/SRU"
3) Note you get a blank search form
4) Apply this patch
5) Repeat steps 1-2
6) Note the search time is now pre-populated

Signed-off-by: Veronica Lencinas <verolencinas@yahoo.com.ar>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 2889 - templates should use [% IF ( loop.odd ) %] - Administration
Owen Leonard [Mon, 14 Jul 2014 12:33:48 +0000]
Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration

Some scripts pass a template variable to facilitate an alternate table
row class for styling. Other use the 'IF (loop.odd)' construction. I
think we're at the point where the CSS3 :nth-child() selector is
widely-supported enough that we can do without template-based solutions:

http://caniuse.com/#feat=css-sel3

This patch adds such a selector to the staff client CSS and removes the
corresponding template markup from Administration pages. The last in
this series of patches will remove the redundant CSS.

Also in this patch: a few minor markup corrections.

To test, apply the patch and clear your browser cache if necessary. View
the following pages and confirm that alternate table row highlighting
works as before:

 - Administration -> Budgets
 - Acquisitions   -> Vendor -> Contracts
 - Administration -> Budgets -> Budget -> Planning
 - Administration -> Authority types
 - Administration -> Authority types -> MARC structure
 - Administration -> Authority types -> MARC structure -> subfields
 - Administration -> MARC bibliographic framework
 - Administration -> MARC bibliographic framework -> MARC structure
 - Administration -> MARC bibliographic framework -> MARC structure -> Subfields
 - Administration -> Libraries and groups
 - Administration -> Cities and towns
 - Administration -> Classification sources
 - Administration -> Circulation and fines rules
 - Administration -> Currencies and exchange rates
 - Administration -> Item types
 - Administration -> Koha to MARC mapping
 - Administration -> System preferences -> Local use
 - Administration -> Z39.50 client targets

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 2889: template aqbasketusersearch add loop.odd
Karl Menzies [Fri, 25 Jul 2014 03:59:29 +0000]
Bug 2889: template aqbasketusersearch add loop.odd

To Test
1/ In Acquisitions > Create a test Budget
2/ In the Budget > Create at least three Test Funds
3/ Create at least three Users who use the fund
4/ Select Search for Basket User
5/ In the Table results list see the list of users and see the alternate table highlighting

6/ Apply the patch
7/ Refresh the Search for Basket User results window
8/ In the Table results list see the list of users and see the alternate table highlighting in place
9/ Bug fixed

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: (qa followup) empty ID due to namespace mistake
Tomas Cohen Arazi [Wed, 15 Oct 2014 15:15:26 +0000]
Bug 11232: (qa followup) empty ID due to namespace mistake

Note: NORMARC is missing the id field.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This patch makes t/db_dependent/Search.t pass again.
NORMARC is currently not tested.

I checked the results before and after applying the patch
and the facets are now looking the same as before.
Passes all tests and QA script.

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

9 years agoBug 11232: (qa followup) Add missing fields/subfields to the item types faceta
Tomas Cohen Arazi [Tue, 14 Oct 2014 22:13:00 +0000]
Bug 11232: (qa followup) Add missing fields/subfields to the item types faceta

The itype facet was missing 952$y for both MARC21 and NORMARC.
This patch adds that. And also modifies the zebra-biblios-dom.cfg file
(also the debian/ version) so facetNumRecs is set to 1000 for zebra.

It is the amount of records that are taken into account. The more record,
the more exact the facets for the result set. 1000 was chosen as it changed
the time to reindex 1000 records from 18s to 19s.

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 11232: (followup) Configuration variable for enabling Zebra facets
Tomas Cohen Arazi [Wed, 15 Oct 2014 13:28:44 +0000]
Bug 11232: (followup) Configuration variable for enabling Zebra facets

This patch adds a variable to koha-conf.xml controlling the use of Zebra facets.

Usage:
 - use_zebra_facets = 1 | 0

Zebra facets work only on DOM.

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 11232: (followup) remove unnecesary namespace definition from all XML elements
Tomas Cohen Arazi [Mon, 8 Sep 2014 13:28:09 +0000]
Bug 11232: (followup) remove unnecesary namespace definition from all XML elements

The previous patches for facet extraction from Zebra indexes set a default
namespace on the following files:

etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml
etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml

and hence the XML file index_subfields can be cleaned by removing the namespace.

To test:
- Apply this patch
- Run

$ for i in marc21 normarc unimarc
  do xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl \
              etc/zebradb/marc_defs/$i/biblios/biblio-koha-indexdefs.xml \
              > etc/zebradb/marc_defs/$i/biblios/biblio-zebra-indexdefs.xsl
  done

=> SUCCESS: no errors reported

- Run
$ git diff
=> SUCCESS: no differences on the xsl files

- Sign off :-D

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: retrieve facets from Zebra's indexes in DOM
Tomas Cohen Arazi [Fri, 5 Sep 2014 19:05:54 +0000]
Bug 11232: retrieve facets from Zebra's indexes in DOM

This patch adds the following routines to C4::Search

- GetFacets
   This is a wrapper routine, that given a ZOOM::ResultSet, extracts
   the relevant facets. To do the job, it uses the internal functions:
   _get_facets_from_records and _get_facets_from_zebra. The choice is done
   on querying the indexing mode: grs1 will use records, and dom zebra's facets.
- _get_facets_from_records
   Just refactoring the already existent main loop from getRecords into a function.
- _get_facets_from_zebra
   Given a result set, loop through all defined facets in C4::Koha::getFacets
   and call _get_facet_from_result_set for each, to build the facets
   information. It retrieves the facets from Zebra's facets.
- _get_facet_from_result_set
   Given a result set and a facet index name, retrieve the facets
   for the given index, and build the result for rendering.

To test this preliminay work:
- Apply the patches, install on DOM, using MARC21, NORMARC and UNIMARC.
- Reindex some DB with lots of records.
- Check facets work.

Note: UNIMARC is the only dialect that has more than one subfield (concatenated)
for facets values, so it is better to test on uNIMARC. The approach leaves room
for re-thinking facets in MARC21/NORMARC, but it is outside of the scope of the bug
(e.g. we could have more author facets)

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: NORMARC facet definition and updated XSL file for DOM
Tomas Cohen Arazi [Thu, 4 Sep 2014 16:24:13 +0000]
Bug 11232: NORMARC facet definition and updated XSL file for DOM

This patch adds the facets definitions to the biblio-koha-indexdefs.xml, based
on what is hardcoded on C4::Koha::getFacets().

The biblio-zebra-indexdefs.xsl file for NORMARC is generated using the usual:

xsltproc ...koha-indexdefs-to-zebra.xsl ...normarc/biblios/biblio-koha-indexdefs.xml > \
    ...normarc/biblios/biblio-zebra-indexdefs.xsl

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: UNIMARC facet definition and updated XSL file for DOM
Tomas Cohen Arazi [Thu, 4 Sep 2014 16:12:52 +0000]
Bug 11232: UNIMARC facet definition and updated XSL file for DOM

This patch adds the facets definitions to the biblio-koha-indexdefs.xml, based
on what is hardcoded on C4::Koha::getFacets().

The biblio-zebra-indexdefs.xsl file for UNIMARC is generated using the usual:

xsltproc ...koha-indexdefs-to-zebra.xsl ...unimarc/biblios/biblio-koha-indexdefs.xml > \
    ...unimarc/biblios/biblio-zebra-indexdefs.xsl

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: MARC21 facet definition and updated XSL file for DOM
Tomas Cohen Arazi [Thu, 4 Sep 2014 16:12:09 +0000]
Bug 11232: MARC21 facet definition and updated XSL file for DOM

This patch adds the facets definitions to the biblio-koha-indexdefs.xml, based
on what is hardcoded on C4::Koha::getFacets().

The biblio-zebra-indexdefs.xsl file for MARC21 is generated using the usual:

xsltproc ...koha-indexdefs-to-zebra.xsl ...marc21/biblios/biblio-koha-indexdefs.xml > \
    ...marc21/biblios/biblio-zebra-indexdefs.xsl

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11232: Add new syntax for facets definition on koha-indexdefs-to-zebra.xsl
Tomas Cohen Arazi [Thu, 4 Sep 2014 16:11:07 +0000]
Bug 11232: Add new syntax for facets definition on koha-indexdefs-to-zebra.xsl

This patch changes koha-indexdefs-to-zebra.xsl to correctly process a new syntax
for defining facet indexes on the XML files.

It also changes the retrieval file to allow access to Zebra's internal data from
Zoom (i.e. access to zebra::facet:*).

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>

Seems to work with DOM and MARC21.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12957: Get rid of warnings in aqbudgets.pl
Jonathan Druart [Thu, 18 Sep 2014 10:56:50 +0000]
Bug 12957: Get rid of warnings in aqbudgets.pl

There are a lot of warnings on navigating into the fund views (list,
editing, etc.)

"Use of uninitialized value in string eq..."
"Use of uninitialized value in hash element"
"Use of uninitialized value in concatenation..."

Test plan:
Verify the warnings don't appear anymore in logs on going on the fund
list view, editing a fund, saving a fund.

QA note: the budget_owner_name, budget_borrowernumber and branchname are
never used on the fund list view. A call to GetMember has been removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This seems to work nicely reducing the amount of noise in the log
considerably.

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

9 years agoBug 13052 - OPAC Cart JavaScript is included twice in the footer
Owen Leonard [Thu, 9 Oct 2014 13:40:26 +0000]
Bug 13052 - OPAC Cart JavaScript is included twice in the footer

The external JavaScript file which powers the OPAC Cart should not be
included twice. The correct instance is the one which comes after the
definition of MSG strings.

To test you must have the opacbookbag system preference turned on. In
Bootstrap OPAC, test adding some items to the Cart and confirm that Cart
operations work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Cart is still working as expected, passes tests and QA script.

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

9 years agoBug 12929 [QA Followup] - Hide borrownumber from sample csv file
Kyle M Hall [Fri, 10 Oct 2014 11:37:32 +0000]
Bug 12929 [QA Followup] - Hide borrownumber from sample csv file

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, hides the borrowernumber from the list
of fields to edit and also brings back the list of fields
for the sample file in the documentation.

Passes tests and QA script.

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

9 years agoBug 12929: Restore behavior before bug 12716
Jonathan Druart [Tue, 16 Sep 2014 14:26:52 +0000]
Bug 12929: Restore behavior before bug 12716

This patch remove borrowernumber from the borrower list fields and
display the field list in the notes.

Test plan:
- verify that the list of fields is displayed on the right (Notes).
- verify the borrowernumber is not displayed anymore in the field list.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>

Confirmed that this patch removes borrowernumber from list of default
values, and reintroduces missing list of CSV columns in the Notes field.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12999: Untranslatable string on enhanced_content.pref
Bernardo Gonzalez Kriegel [Fri, 26 Sep 2014 00:35:29 +0000]
Bug 12999: Untranslatable string on enhanced_content.pref

This patch modifies LangInstaller.pm to catch strings
on syspref files that have no associated syspref

To test:
1) Update strings for your preffered language
2) Check that the string "you can only choose one source"
is not present on xx-YY-pref.po file

3) Apply the patch
4) Update strings again
5) Check the strig now appears [ and another one :) ]

Doing a diff before and after will show
 # Enhanced Content > All
 msgid "enhanced_content.pref## <strong>NOTE:</strong> you can only
 choose one source of cover images from below, otherwise Koha will show
 the images from all sources selected."
 msgstr ""

 # Local Use
 msgid "local_use.pref## Nothing defined yet."
 msgstr ""

6) Translate the string
7) Install your language, check Administration > System preferences >
   Enhanced content > All
   (on your languge) and check the string is now translated

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 12974 - Argument "" isn't numeric in numeric gt (>) in opac-results.tt
Marc Véron [Sat, 20 Sep 2014 19:38:02 +0000]
Bug 12974 - Argument "" isn't numeric in numeric gt (>) in opac-results.tt

If an item has no star ratings you get an error message in opac-error.log:
Argument "" isn't numeric in numeric gt (>) at (...) /koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt line 467.

To test:
In OPAC, search for a bilio that has no star ratings.
Check opac-error.log for message as above
Apply patch
Repeat search
Check opac-error.log again, there should be no more warnings

(Fixed mistake with brackets, see comment #2)

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Works as advertized. Looks like you have to be logged in to trigger
the error.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised, passses xt/author/valid-templates.t

9 years agoBug 12538: Two SolR-related templates remaining
Jonathan Druart [Sat, 11 Oct 2014 22:30:13 +0000]
Bug 12538: Two SolR-related templates remaining

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

9 years agoBug 12538: DBRev 3.17.00.027
Tomas Cohen Arazi [Sat, 11 Oct 2014 20:03:02 +0000]
Bug 12538: DBRev 3.17.00.027

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

9 years agoBug 12538: FOLLOW UP Remove Moose from the list of dependencies
Chris Cormack [Tue, 23 Sep 2014 05:23:08 +0000]
Bug 12538: FOLLOW UP Remove Moose from the list of dependencies

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 12538: Remove Solr without breaking anything else
Jonathan Druart [Mon, 7 Jul 2014 14:51:12 +0000]
Bug 12538: Remove Solr without breaking anything else

Since nobody is currently working on the zebra layer introduced by bug
8233, Solr won't never work.
Some code has been introduced in 3.10 to prove several search engines
can cohabit into Koha but no help/fund has been found to go ahead.
It is useless to keep this code and to maintain an ambiguous situation.

I think the indexes configuration page could be restore later if someone
else introduces a new search engine into Koha.

Test plan:
Look at the code introduced by bug 8233 and verify all is removed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoFix of translation files as requested by RM
Bernardo Gonzalez Kriegel [Sat, 11 Oct 2014 14:42:43 +0000]
Fix of translation files as requested by RM

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

9 years agoBug 7143: Adding Irma to the about page
Chris Cormack [Fri, 10 Oct 2014 19:57:47 +0000]
Bug 7143: Adding Irma to the about page

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 7143: Fixed link to Athens County Koha Opac
Martin Renvoize [Thu, 4 Sep 2014 08:00:13 +0000]
Bug 7143: Fixed link to Athens County Koha Opac

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 7143: Change the Kohala association link
Jonathan Druart [Thu, 4 Sep 2014 07:39:16 +0000]
Bug 7143: Change the Kohala association link

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 7143 Adding a new developer to the history
Chris Cormack [Wed, 3 Sep 2014 22:19:47 +0000]
Bug 7143 Adding a new developer to the history

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12874: A DB field without a default mapping is set to a default value on editing
Jonathan Druart [Thu, 19 Jun 2014 13:18:23 +0000]
Bug 12874: A DB field without a default mapping is set to a default value on editing

If an item is edited and a field is not mapped to Koha, it is to 0 or
NULL (depending on the default value defined).

This patch adds a check on the mapping before editing the item. It there
is no mapping, the DB value is not erased.

Test plan:
1/ Edit an item and fill a value for a field
2/ Unmap this field
3/ Edit the item
4/ Verify that the value is not erased (using the MySQL CLI)

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12938 - strings.inc is missing a semicolon in var CIRCULATION_RENEW_FAILED =...
Olli-Antti Kivilahti [Wed, 17 Sep 2014 11:31:24 +0000]
Bug 12938 - strings.inc is missing a semicolon in var CIRCULATION_RENEW_FAILED = _("Renew failed:")

This doesn't appear to be affecting anything negatively, but the fix
makes it more correct.

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 12435: DBRev 3.17.00.026
Tomas Cohen Arazi [Sat, 11 Oct 2014 15:11:39 +0000]
Bug 12435: DBRev 3.17.00.026

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

9 years agoBug 12435 - Update MARC21 frameworks to Update No. 18 (April 2014)
Bernardo Gonzalez Kriegel [Tue, 17 Jun 2014 11:28:17 +0000]
Bug 12435 - Update MARC21 frameworks to Update No. 18 (April 2014)

This patch updates MARC21 frameworks to Update No. 18 (April 2014)
Also updates values on database for MARC21 installs.

To test
1. Apply the patch
2. Run updatedatbase.pl, check that runs without error
3. Remove default framework, load again. Check that loads without
error.
4. Verify changes
Bibs
007/04 Sound recording -> q Quadraphonic, multichannel, or surround
347f -> Encoded bitrate
110/1,610/1,710/1,810/1 subfield c -> repeatable
Auth
110/1,410/1,510/1,710/1 subfield c -> repeatable

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Checked changes are according to documentation from LOC and
consistent between sample files and updatedatabase.pl.
No problems found, all English frameworks were updated.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 13051: And remember, usernames are not case sensitive
Marcel de Rooy [Thu, 9 Oct 2014 12:32:59 +0000]
Bug 13051: And remember, usernames are not case sensitive

opac-auth contains the following statement:
You entered an incorrect username or password. Please try again! And
remember, usernames and passwords are case sensitive.

Obviously, this is not completely true. The username can be entered in
lowercase, uppercase, any mixed case.

This patch simply adjusts this string.

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 12740: Make the error message translatable
Jonathan Druart [Mon, 22 Sep 2014 07:55:44 +0000]
Bug 12740: Make the error message translatable

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12740 - Data Validation followup
Mark Tompsett [Sat, 20 Sep 2014 12:01:36 +0000]
Bug 12740 - Data Validation followup

Added server-side validation and feedback to Koha news.

TEST PLAN
---------
1) Log in to staff client as someone who can add news
2) Paste a variation of the ugly following URL into your
   address bar:

https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new=

   -- A blank news item is added without warning!
3) Apply patch
4) Repeat step 2
   -- "ERROR: Required news title missing!" is displayed
      and no blank news is added
5) run koha qa test tools

Followed test plan, Error message appears as expected, qa test tool: OK
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12740 - It should not be possible to store empty news
Marc Véron [Sat, 13 Sep 2014 16:10:06 +0000]
Bug 12740 - It should not be possible to store empty news

This patch marks the title field as 'required' and it is not
longer possible to store a news without having at least a title.

To test:
Got to Tools->News
Create news or edit existing news
Field "Title" should have a red label and should be marked as "required"
It should not be possible to save with empty field "Title"

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: Only keeps the user from doing it.
      Fails to handle the fake the url call case.
https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new=

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 7372: (follow-up) remove debug message
Jonathan Druart [Thu, 9 Oct 2014 13:10:07 +0000]
Bug 7372: (follow-up) remove debug message

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Only removes debugging leftover. In french :-D

9 years agoBug 12985: All basketgroups should be listed
Jonathan Druart [Wed, 24 Sep 2014 13:50:49 +0000]
Bug 12985: All basketgroups should be listed

Only 20 first are listed, others are hidden.

Test plan:
- Create at least 21 basketgroups
- verify you can see it on the "open" tab
- close all of them
- verify you can see it on the "close" tab

There is no restriction to hide datables functions here.

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 12755 - MARC Preview doesn't always display in managed MARC record
Owen Leonard [Tue, 23 Sep 2014 16:24:34 +0000]
Bug 12755 - MARC Preview doesn't always display in managed MARC record

The MARC preview feature seems to have been broken by Bug 11570 -
Upgrade jQueryUI to the latest version. When that patch was being
developed there were no existing cases where the jQueryUI dialog feature
was used, so the patch omitted it.

Rather than update the build of jQueryUI to include the dialog feature
I'm submitting a patch which uses a Bootstrap modal instead. This keeps
the jQueryUI library smaller and avoids an unnecessary duplication of JS
functionality. It also helps keep our modals consistent.

The implementation uses progressive enhancement principles to improve
click handling: Real links in the table, so that the preview link can be
opened in a new tab if the user chooses; Event handling in the
JavaScript instead of the markup ( $(selector).on(click... instead of <a
onclick=...).

To test, apply the patch and add or view a batch of staged MARC records
(Tools -> Staged MARC management). In the list of titles (the "Citation"
column) click any link and confirm that the MARC preview loads
correctly. Confirm that previews work correctly on any page and after
re-sorting.

Confirm also that the modal window flexibly handles different browser
window sizes.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 9967 - include $branch_limit in the cache key
Robin Sheat [Mon, 2 Jun 2014 22:41:46 +0000]
Bug 9967 - include $branch_limit in the cache key

Make the caching more correct. Also removes a warn that got left behind.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 9967 - Cache authorised value requests properly
Robin Sheat [Wed, 9 Apr 2014 03:50:37 +0000]
Bug 9967 - Cache authorised value requests properly

Authorised values are now cached using the proper Koha::Cache mechanism,
rather than a simple internal cache. Memoize has been removed because it
didn't really work like we needed it to.

Test plan:
 * running a persistent environment:
 * load the edit item screen
 * refresh several times to ensure any process-based caches are filled
 * add a new LOC authorised value as fast as possible (prepare it on
   another tab.)
 * refresh the edit item page
 * note that the new LOC value may or may not be showing in the
   "shelving location"
 * if more than 5 seconds have passed since saving it, it must now show
   up.
 * refresh a few times to ensure that it's showing on all processes.

Note:
 * This patch depends on the caching changes of 9967.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12937 [Follow-up] Deleting suggestions should ask for a confirmation
Owen Leonard [Wed, 17 Sep 2014 12:31:27 +0000]
Bug 12937 [Follow-up] Deleting suggestions should ask for a confirmation

This minor follow-up revises the language a bit: Adding missing question
marks and using the more standard prompt "Please select at least one..."

To test, follow the previous test plan and confirm that the prompts are
improved:

- go on the suggestion management page
- don't select any suggestion and try to delete (check the checkbox and
  submit the form). Verify that you get an alert.
- select 1 suggestion and delete it, verify you get a confirmation
  message
- select 1+ suggestions and delete it, verify you get a confirmation
  message

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 12937: Deleting suggestions should ask for a confirmation
Jonathan Druart [Wed, 17 Sep 2014 11:11:00 +0000]
Bug 12937: Deleting suggestions should ask for a confirmation

On the suggestion management page, the librarian can choose to delete
suggestions but no confirmation is needed.
This could produce unexpected lost of data.

Test plan:
- go on the suggestion management page
- don't select any suggestion and try to delete (check the checkbox and submit the form).
  Verify that you get an alert.
- select 1 suggestion and delete it, verify you get a confirmation
  message
- select 1+ suggestions and delete it, verify you get a confirmation
  message

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12876: (followup) remove useless diags
Tomas Cohen Arazi [Wed, 24 Sep 2014 00:07:08 +0000]
Bug 12876: (followup) remove useless diags

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

9 years agoBug 12876: Improve unit tests for CanReserveBeCanceledFromOpac
Jonathan Druart [Fri, 5 Sep 2014 15:40:05 +0000]
Bug 12876: Improve unit tests for CanReserveBeCanceledFromOpac

This patch fix the subroutine name and add a restriction on the
arguments: both argument are mandatory!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12876 - Reserve in waiting/transfer status may be cancelled by user
Rafal Kopaczka [Fri, 5 Sep 2014 12:50:15 +0000]
Bug 12876 - Reserve in waiting/transfer status may be cancelled by user

User may cancel his own reservation at waiting or in transit status
through calling opac-modrequest.pl. Cancel button is disabled in
interface but possibility to cancel should be checked also in
opac-moderequest.pl, before calling CancelReserve().
Similar situation is with opac-modrequest-suspend.pl

This patch provides new soubroutine to chceck if user can cancel given
reserve. It's possible only when he's owner of hold and hold isn't in
transfer or waiting status.

Additionaly there are new test for this function in Reserves.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and new tests.
Works as described, tested with:
.../cgi-bin/koha/opac-modrequest.pl?reserve_id=XXX

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

9 years agoBug 12873 - Reserve can be cancelled by any logged in user
Rafal Kopaczka [Thu, 4 Sep 2014 14:40:33 +0000]
Bug 12873 - Reserve can be cancelled by any logged in user

It is possible to cancel reservations through simply running opac-modreserve.pl with existing reserve_id number. This may provide remove even all reservations from system. The only limitation is that user have to be logged in. Simplest solution is to check whether reserve belongs to user or not.

Test plan:
1. Create reserves by 2 different users, and get their ID's
2. Before patch, hold may by cancelled by anyone who run site:
http://example.com/cgi-bin/koha/opac-modrequest.pl?reserve_id=XXX
3. After patch hold may by cancelled only by user whose reserve is.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
Marc Véron [Fri, 25 Jul 2014 21:57:54 +0000]
Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch

This patch adds a branch sepecific class to all OPAC pages.

Example:
If not logged in, opac-main.pl displays:
<body ID="opac-main" class="branch-default" >
If logged in at branch FFL, it displays:
<body ID="opac-main" class="branch-FFL" >

If you log in, opac-user.pl should display
<body ID="opac-user" class="branch-FFL scrollto" >

To test:
1)
Apply patch.

2)
Add to syspref OPACUserCSS something highly visible, e.g. for branch FFL:
.branch-FFL {
background-color: yellow;
border: 10px solid red;
}

3)
Go to OPAC and login in with a user with home branch FFL

4)
Verify that colors change as appropriate.

5)
Log out. Verify that colors display as before or as defined in class branch-default in OPACUserCSS

6)
Display patch in patch diff view, verify that ids and classes in body tag are consistent with params bodyid and bodyclass in INCLUDE line

7)
Search for regressions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

9 years agoBug 11672: (followup) warnings tested
Tomas Cohen Arazi [Wed, 27 Aug 2014 13:11:28 +0000]
Bug 11672: (followup) warnings tested

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 11672: Untranslatable dropdown on Guided Reports and dictionary
Tomas Cohen Arazi [Sun, 24 Aug 2014 05:11:50 +0000]
Bug 11672: Untranslatable dropdown on Guided Reports and dictionary

This patch removes hardcoded descriptions and sets them in the templates
using the variable content as id.

To test, create a new guided report and verify the 'module to report on' dropdown
shows as usual [1]. Functionality shouldn't get changed.

The patch also changes the dictionary pages where 'area' should be displayed/selectable
with the same strings as the guided reports. Try all the possible disctionary pages.

The last page when creating a dictionary now shows the 'area description' instead of the
code. The same happens to the dictionary list once you have dictionaries saved.

[1] The following texts get changed:
    Catalogue -> Catalog
    Acquisition -> Acquisitions

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 11672: (regression test) get_report_areas gets tested
Tomas Cohen Arazi [Sun, 24 Aug 2014 05:21:52 +0000]
Bug 11672: (regression test) get_report_areas gets tested

This patch introduces a unit test for the new get_report_areas functionality.

To try it, run
  $ prove t/db_dependent/Reports_Guided.t

It is expected to have 16 tests defined, and to fail the introduced one

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 11633 Return Correct status if patron blocked by fines
Colin Campbell [Thu, 17 Apr 2014 15:07:20 +0000]
Bug 11633 Return Correct status if patron blocked by fines

If the patron has amassed charges that block borrowing, but we
allow staff override the information that the patron cannot
issue should be included the patron information response

This patch sets the appropriate status fields in the patron object

It restores the fee_limit member to the patron object
and calls a local subroutine to set it.

This could be done more elegantly but that would require more
major refactoring of the rather messy initializer code
in ILS::Patron

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 11633 : Block Issue if fines require staff override
Colin Campbell [Thu, 17 Apr 2014 14:55:03 +0000]
Bug 11633 : Block Issue if fines require staff override

If a patrons fines exceed noissuescharge and we allow
staff to allow issue at their discretion via an override
the SIP process allowed charges to go ahead.
This patch closes the loophole which allowed self issue
to subvert the usual library loan policy

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 7372: (follow-up) does execute this DB entry twice
Jonathan Druart [Thu, 11 Sep 2014 13:22:44 +0000]
Bug 7372: (follow-up) does execute this DB entry twice

Since this enh has been backported on 3.14, this patch should be applied
on 3.16 and master branch in order to update the updatedb entry.
It should not be executed twice otherwise the process is stuck on this
entry.

http://irc.koha-community.org/koha/2014-09-11#i_1567078
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>