koha.git
9 years agoBug 13116 - Make it possible to propagate errors from C4::Reserves::CanItemBeReserved...
Olli-Antti Kivilahti [Mon, 20 Oct 2014 16:04:51 +0000 (19:04 +0300)]
Bug 13116 - Make it possible to propagate errors from C4::Reserves::CanItemBeReserved() to the web-templates.

This patch changes the way CanBookBeReserved() and CanItemBeReserved() return error
messages and how they are dealt with in the templates. This change makes it possible
to distinguish between different types of reservation failure.

Currently only two types of errors are handled, all the way to the user, from the CanItemBeReserved():
-ageRestricted
-tooManyReserves which translates to maxreserves

 #############
 - TEST PLAN -
 #############
((-- AGE RESTRICTION --))
STAFF CLIENT
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Place a hold for the underage Borrower for the ageRestricted Record.
4. You get a notification, that placing a hold on ageRestricted material is
   forbidden. (previously you just got a notification about maximum amount of reserves reached)

((-- MAXIMUM RESERVES REACHED --))
0. Set the  maxreserves -syspref to 3 (or any low value)
STAFF CLIENT AND OPAC
1. Make a ton of reserves for one borrower.
2. Observe the notification about maximum reserves reached blocking your reservations.

((-- MULTIPLE HOLDS STAFF CLIENT --))
3. Observe the error notification "Cannot place hold on some items"

((-- MULTIPLE HOLDS OPAC --))
1. Make a search with many results, of which atleast one is age restricted to the current borrower.
2. Select few results and "Place hold" from to result summary header element.
       (Not individual results "Place hold")
3. Observe individual Biblios getting the "age restricted"-notification, where others can be
   reserved just fine.

Updated the unit tests to match the new method return values.
t/db_dependent/Holds.t & Reserves.t

Followed test plan. Works as expected and displays meaningful messages for the reason why placing a hold is not possible.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: (RM followup) typo in sysprefs.sql
Tomas Cohen Arazi [Wed, 12 Nov 2014 14:18:55 +0000 (11:18 -0300)]
Bug 7673: (RM followup) typo in sysprefs.sql

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC
Owen Leonard [Fri, 10 Oct 2014 11:56:11 +0000 (07:56 -0400)]
Bug 10632 [Follow-up] Enable datatables for courses and course details in the OPAC

This follow-up adds some style improvements and corrects some errors in
the previous patch:

- The path to datatables.css has been corrected
- Unused CSS has been removed from datatables.css (particularly related
  to pagination controls, which are currently unused in the OPAC).
- Style has been added to datatables.css to make the table search form
  look better.
- The configuration of the course details table has been enhanced to
  include a title sort which ignores articles and date sorting according
  to the "title-string" method for date format agnostic sorting.
- Unrelated: A message <div> has been modified to have the correct style
  for the Bootstrap theme.

To test you should have multiple courses and at least one course with
multiple reserves. Clear your browser cache if necessary and view the
list of courses in the OPAC. All table sorting should work correctly, as
should the table search form.

View the details of a course which has multiple reserves. All sorting
should work correctly, including title sort excluding articles. Sorting
by date due should work correctly for any dateformat system preference
setting.

View the details of a course which has no reserves. You should see a "No
reserves" message box with a style consistent with similar messages in
the Bootstrap OPAC.

View other sorted tables in the OPAC to confirm that the CSS changes
have not negatively affected their appearance: opac-user.pl for
instance, or opac-detail.pl.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10632 - Enable datatables for courses and course details in the OPAC
Kyle M Hall [Thu, 9 Oct 2014 14:01:16 +0000 (10:01 -0400)]
Bug 10632 - Enable datatables for courses and course details in the OPAC

We should use datatables for the courses and course items tables. This
will make the tables sortable and searchable from the client side.

Test Plan:
1) Apply this patch
2) View the courses in the OPAC, try sorting and searching
3) View the course details for a course, try sorting and searching the items.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signing off, but have a follow-up to address some missing stuff.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8218: qa followup
Jonathan Druart [Wed, 5 Nov 2014 15:09:04 +0000 (16:09 +0100)]
Bug 8218: qa followup

This patch
- rename _entity_clean as _clean_ampersand
- rename the script to sanitize_records.pl
- add a --fix-ampersand switch (the only one FOR NOW, enabled by
  default) so it is obvious what the script does.
- make POD and usage reflect this changes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8218: Follow-up for some small typos
Marcel de Rooy [Thu, 17 Jul 2014 11:54:27 +0000 (13:54 +0200)]
Bug 8218: Follow-up for some small typos

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 8218 : Add a maintenance script to sanitize biblio records
Jonathan Druart [Fri, 28 Sep 2012 13:23:37 +0000 (15:23 +0200)]
Bug 8218 : Add a maintenance script to sanitize biblio records

This patch adds:
- a new maintenance script batch_sanitize_records
- a new subroutine C4::Charset::SanitizeRecord
- new unit tests for the new subroutine

Test plan:
1/ prove t/db_dependent/Charset.t
2/ Create a record containing "&amp;amp;" (could be follow with as many
'amp;' as you want) in one of its fields and the same for the field
linked to biblioitems.url.
The url should not be sanitized, it may contain "&amp;".
3/ Launch the maintenance script with the -h parameter to see how to use
it.
4/ Launch the script using the different parameters:
 --filename=FILENAME
 --biblionumbers='XXX'
 --auto-search

The auto-search permits to sanitize all records containing "&amp;amp;" in
the marcxml field.

Use the verbose flag for testing.
Without the --confirm flag, nothing is done.

5/ Use the --confirm flag and verify in the biblioitems.marcxml field
that the record has been sanitized.

6/ Try the --reindex flag to reindex records which have been modified.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12258 [Template follow-up] Datatable in Patrons Account Fines
Owen Leonard [Thu, 30 Oct 2014 13:57:49 +0000 (09:57 -0400)]
Bug 12258 [Template follow-up] Datatable in Patrons Account Fines

This follow-up corrects some of the QA issues affecting the other patch,
as well as changing the way the "filter" option is displayed:

- Added the use of the DataTables include file
- Removed redundant document.ready
- Fixed single quotes
- Fixed default sort (should be date descending to match the current
  functionality)
- Adding missing <tr>
- Converted filter button to a link

The last change is a judgement call, but the button in the DataTables
toolbar looked awkward and caused ugly wrapping at narrower viewport
sizes. I think a link is more keeping with the pattern established by
"select all / clear all" links.

To test, apply both patches and view the account page
(members/boraccount.pl) for a patron who has paid and unpaid fines (the
more the better).

- Confirm that the default sort is by date descending.
- Confirm that DataTables controls (paging, search, result count) work
  correctly.
- Confirm that clicking the "Filter paid transactions" link works
  correctly to toggle display of paid transactions.

Works as expected. Passed koha-qa.pl.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, no problems found.
Passes QA script and tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount...
Maxime Pelletier [Thu, 7 Nov 2013 21:03:23 +0000 (16:03 -0500)]
Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00).

Test steps :

* Create a few manual invoices with fines.
* Pay a fine.
* Go back to the account tab.
* Try the "Filter paid transactions" button. It should filter everything with 0.00 in the Outstanding column.
* Try the "Show all transactions" button.
* Play around with the buttons

Followed test steps. Works as expected.
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 9214 [Compiled CSS] Show damaged status in the OPAC for items which are not for...
Owen Leonard [Tue, 7 Oct 2014 18:14:03 +0000 (14:14 -0400)]
Bug 9214 [Compiled CSS] Show damaged status in the OPAC for items which are not for loan

This patch contains the compiled opac.css file generated from the
revised LESS file in this bug's other patch.

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 9214 - Show damaged status in the OPAC for items which are not for loan
Owen Leonard [Tue, 7 Oct 2014 18:08:02 +0000 (14:08 -0400)]
Bug 9214 - Show damaged status in the OPAC for items which are not for loan

Item statuses in the OPAC displayed according to a cascading hierarchy:
If something is lost it will appear as lost, "else if" it is checked out
it will appear as checked out, etc. I don't think there is a logical
reason why statuses should appear this way.

This patch modifies the logic in the template so that multiple statuses
can be displayed at the same time. The patch also wraps each status in
its own class so that libraries can apply custom CSS if they wish.

Some tweaks have been made to the LESS file adding some style to the
common "item-status" class for display of item statuses.

To test, apply the patch and view one or more titles in the OPAC which
have items with the following statuses: lost, checked out, damaged, not
for loan, waiting, on order, in transit, withdrawn, and available.

Modify items to have more that one status simultaneously, in particular
not for loan and damaged.

Also test the display of item statuses in the OPAC cart and the OPAC's
course details page (Course reserves -> [Course name]) since these pages
use the same include file.

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 12989: Fix JS error
Jonathan Druart [Thu, 2 Oct 2014 13:52:52 +0000 (15:52 +0200)]
Bug 12989: Fix JS error

inactive and active are not defined anymore. They should be removed. The
filter is done with DataTables.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12989: Update table footer with the visible rows - acqui-home
Jonathan Druart [Wed, 24 Sep 2014 15:23:42 +0000 (17:23 +0200)]
Bug 12989: Update table footer with the visible rows - acqui-home

Note that bug 12984 changes the view of this table.

On the acqui-home page, the total was not updated.
With this patch, the footer (totals) will be updated on filtering rows.

Test plan:
1/ Go on the acqui home page.
2/ Verify the totals are correct.
3/ Filter the table using the filter input and verify the totals are
updated with the rows shown.
4/ Hide/Show inactive budgets and verify the totals are still corrects.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12984: Improvement of the funds list view - acqui home
Jonathan Druart [Wed, 24 Sep 2014 09:19:52 +0000 (11:19 +0200)]
Bug 12984: Improvement of the funds list view - acqui home

Bug 11578 improved the funds list view in the administration module.
It would be great to have the same improvement on the acquisition
home page.

This improvement groups funds by budget and displays them with a
hierarchy.

Test plan:
0/ Create a budget and fund hierarchy, with active and inactive budgets.
1/ Go on the acquisition home page and verify the values are the same as
before
2/ Verify the funds are correctly listed
3/ Verify the links on top of table work (expand/collapse all, show/hide
inactive budgets).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12988: Update table footer with the visible rows - budgets
Jonathan Druart [Wed, 24 Sep 2014 15:16:48 +0000 (17:16 +0200)]
Bug 12988: Update table footer with the visible rows - budgets

On the budget list view, the total was not updated.
With this patch, the footer (totals) will be updated on filtering rows.

Test plan:
To test with both CurrencyFormat pref values.
1/ Go on the budget list view
2/ Verify the totals are correct.
3/ Filter the table using the filter input and verify the totals are
updated with the rows shown
4/ Hide/Show inactive budgets and verify the totals are still corrects.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
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 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Marcel de Rooy [Mon, 20 Oct 2014 10:36:36 +0000 (12:36 +0200)]
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c

In working on bug 10480, I noticed that these plugins needed some attention:

[2] unimarc_field_123i.pl: added missing template
[3] unimarc_field_123j.pl: resolved missing template with same file
[4] unimarc_field_210c_bis.pl: removed a warn, corrected some POD lines

Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8
characters long and contain the same components as subfields $f and $g
except that character position 0 contains a plus sign (for the northern
celestial hemisphere) or a minus sign (for the southern celestial hemisphere).

Test plan:
Connect unimarc_field_123i and 123j to some field.
Look especially at changing + or - for the hemisphere in the popup.
Check left-padding with zeroes for the other positions.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked plugin in a UNIMARC installation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: DBRev 3.17.00.053
Tomas Cohen Arazi [Tue, 11 Nov 2014 17:05:26 +0000 (14:05 -0300)]
Bug 7673: DBRev 3.17.00.053

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673 [Terminology follow-up] New patron permissions to manage items
Owen Leonard [Wed, 29 Oct 2014 15:58:39 +0000 (11:58 -0400)]
Bug 7673 [Terminology follow-up] New patron permissions to manage items

This bug adds a new preference, "SubfieldsToAllowForRestrictedEdition,"
but the use of the term "Edition" in this context is incorrect. I think
it would be more clear to change the preference name to
"SubfieldsToAllowForRestrictedEditing." This patch makes this change.

I realize this isn't a big issue since the preference has a good
description, but I thought that if we were going to make this as clear
as possible now would be the time to do it.

To test, start with a database which hasn't previously been used to test
Bug 7673. Apply all patches and run the database update. Follow the test
plan as described in the bug.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, change appears complete.
All tests and QA script still pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: add syspref in sysprefs.pl
Jonathan Druart [Fri, 10 Oct 2014 19:50:05 +0000 (21:50 +0200)]
Bug 7673: add syspref in sysprefs.pl

Also fix a typo in the permission description

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patches pass QA script and tests.

Copying the test plan from the bug report:
Test plan:
1/ add the following permissions to the logged in patron:
edit_item, edit_items_restricted, delete_all_items,
items_batchmod, items_batchmod_restricted

2/ Fill the prefs SubfieldsToAllowForRestrictedEdition
and SubfieldsToAllowForRestrictedBatchmod with some
subfield (for instance "995$f 995$o" and "995$o")

3/ Verify you are allowed to edit the item fields defined
in the pref SubfieldsToAllowForRestrictedEdition.

4/ Try to edit item in a batch and verify you are allowed
to edit the item fields defined in the pref
SubfieldsToAllowForRestrictedBatchmod.

5/ Try to delete all items of a record

Play with the pref/permissions and verify they are
correctly taken into account.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: Assume that all fields can be edited if the pref is empty
Jonathan Druart [Fri, 10 Oct 2014 19:50:34 +0000 (21:50 +0200)]
Bug 7673: Assume that all fields can be edited if the pref is empty

If the sysprefs are empty, we assume that the librarian can edit all
subfields, even if s/he has the restricted permission.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: DB changes - Add permissions
Jonathan Druart [Fri, 25 Apr 2014 14:45:57 +0000 (16:45 +0200)]
Bug 7673: DB changes - Add permissions

This patch adds:
3 permissions:
- edit_items_restricted
- delete_all_items
- items_batchmod_restricted

2 system preferences:
- SubfieldsToAllowForRestrictedEdition
- SubfieldsToAllowForRestrictedBatchmod.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: Change the superlibrarian check
Jonathan Druart [Fri, 25 Apr 2014 14:57:58 +0000 (16:57 +0200)]
Bug 7673: Change the superlibrarian check

To know if the user is a superlibrarian, we have to call
C4::Context->IsSuperLibrarian

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: Update permission names in script
Jonathan Druart [Fri, 25 Apr 2014 14:51:35 +0000 (16:51 +0200)]
Bug 7673: Update permission names in script

Two permission names have been changed since the first patch.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: Update syspref names in script
Jonathan Druart [Fri, 25 Apr 2014 14:37:17 +0000 (16:37 +0200)]
Bug 7673: Update syspref names in script

The both syspref names have been changed since the first patch.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: the limitation on editing an item does not affect FA framework
Jonathan Druart [Tue, 1 Apr 2014 08:30:16 +0000 (10:30 +0200)]
Bug 7673: the limitation on editing an item does not affect FA framework

The pref SubfieldsToAllowForLimitedEdition should not affect Fast
cataloguing framework (FA).

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: The delete all items link should only be displayed if delete_all_items...
Jonathan Druart [Mon, 31 Mar 2014 11:50:08 +0000 (13:50 +0200)]
Bug 7673: The delete all items link should only be displayed if delete_all_items is set

This test had been lost in a rebase.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: QA Followup: trailing whitespace and perlcritic issues
Jonathan Druart [Tue, 3 Dec 2013 14:09:01 +0000 (15:09 +0100)]
Bug 7673: QA Followup: trailing whitespace and perlcritic issues

This patch fixes the following qa issues:

 FAIL   cataloguing/additem.pl
   FAIL   forbidden patterns
        forbidden pattern: trailing space char (line 833)
   FAIL   critic
        # Variables::ProhibitConditionalDeclarations: Got 2 violation(s).

 FAIL   tools/batchMod.pl
   FAIL   critic
        # Variables::ProhibitConditionalDeclarations: Got 2 violation(s).

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7673: New patron permissions
Matthias Meusburger [Fri, 30 Mar 2012 11:52:38 +0000 (13:52 +0200)]
Bug 7673: New patron permissions

    This patch adds the following permissions:

     - editcatalogue.limited_item_edition: Limit item modification to barcode, status and note
     - editcatalogue.delete_all_items: Delete all items at once
     - tools.items_limited_batchmod: Limit batch item modification to item status

    The SubfieldsToAllowForLimitedEdition syspref is used to define which subfields can be edited
    when the editcatalogue.limited_item_edition permission is enabled.

    In the same way, the SubfieldsToAllowForLimitedBatchmod is used to define which subfields
    can be edited when the tools.items_limited_batchmod permission is enabled.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13113 [QA Followup] - Fix unit test
Kyle M Hall [Fri, 31 Oct 2014 13:18:27 +0000 (09:18 -0400)]
Bug 13113 [QA Followup] - Fix unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13113 - Prevent juvenile/children from reserving ageRestricted material
Olli-Antti Kivilahti [Mon, 20 Oct 2014 12:37:17 +0000 (15:37 +0300)]
Bug 13113 - Prevent juvenile/children from reserving ageRestricted material

There is no reason for underage borrowers to reserve ageRestricted material and
then be denied it's check-out due to ageRestriction.

This patch prevents reserving material for borrowers not suitably aged.

 # # # # # #
 # A PRIORI #
 # # # # # #
BOTH THE STAFF CLIENT AND THE OPAC
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Place a hold for the underage Borrower for the ageRestricted Record.
4. You can reserve an ageRestricted Record with ease.
STAFF CLIENT ONLY
5. Check-in an Item from the ageRestricted Record and catch the reservation.
6. Check-out the ageRestricted Item for this underage Borrower.
7. You get a notification about being unable to check-out due to age restriction.
   How lame is that for a 12 year old?

 # # # # # # # #
 # A POSTERIORI #
 # # # # # # # #
STAFF CLIENT
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Check-out an ageRestricted Item for this underage Borrower.
4. You get a notification about having the maximum amount of reserves.
5. Place a hold for the underage Borrower for the ageRestricted Record.
6. You get a notification, that placing a hold on ageRestricted material is
   forbidden.

Includes Unit tests.

Followed test plan. Patch behaves as expected. (Note: Propagating error messages to template will be handled in Bug 13116 or 11999)

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13106 - Encapsulate Circulation::GetAgeRestriction() and modify it to check borro...
Olli-Antti Kivilahti [Fri, 17 Oct 2014 14:23:21 +0000 (17:23 +0300)]
Bug 13106 - Encapsulate Circulation::GetAgeRestriction() and modify it to check borrowers age as well.

This patch moves the logic of deciding whether or not a borrower is old enough to access this material
to its own function GetAgeRestriction.

This makes it easier to use AgeRestriction elsewhere, like with placing holds.

This feature adds a new function C4::Members::SetAge() to make testing ages a lot easier.
A ton of Unit tests included.

C4::Circulate::CanBookBeIssued() fixed and issue with undefined $daysToAgeRestriction per Marc Véron's
suggestion.

Test plan:
(See comment #10 for screenshots about using age restriction)

1) Without patch

Configure Age Restricition (see Syspref AgeRestrictionMarker) and have a biblio record with e.g. PEGI 99 in age restriction field
Try to check out to a patron with age < 99
Check out should be blocked
Change entry in age restriction field to PEGI99
Check out schould now be blocked

2) With patch
Try checkouts again, behaviour should be th same.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13176 - Add links "My account" and "My checkouts" for logged in user to drop...
Marc Véron [Fri, 31 Oct 2014 06:19:32 +0000 (07:19 +0100)]
Bug 13176 - Add links "My account" and "My checkouts" for logged in user to drop down in staff client header

This patch adds links to "My account" and "My checkouts" to drop down in staff client header.

To test:
Apply patch
Got to drop down of logged in user (top right)
See new links to "My account" and "My checkout" (above "Log out")
Test the links.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Works as advertised. The options are not displayed when you are logged
in as the db/admin user.

Added classes "toplinks-myaccount" and "toplink-mycheckouts" to li tags to make it possible to hide them (per Kyle M $
Switching back to "Signd-off" (Hope this is OK becuause it is a tiny string addition)

Marc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12987: The new format_price include file should be include on using datatables
Jonathan Druart [Thu, 2 Oct 2014 13:51:57 +0000 (15:51 +0200)]
Bug 12987: The new format_price include file should be include on using datatables

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 12987: Update table footer with the visible rows
Jonathan Druart [Wed, 24 Sep 2014 15:16:01 +0000 (17:16 +0200)]
Bug 12987: Update table footer with the visible rows

This patch is the preparation step for others.

On acqui/acqui-home.pl and admin/aqbudgets.pl, it will be possible to
see the totals in the footer updated with the filtered rows.

Test plan:
This cannot be tested alone, you have to apply it with others (see the
"Blocked" bug reports).

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 13018 : Static fine should be charged only once
Sophie Meynieux [Wed, 1 Oct 2014 12:16:48 +0000 (14:16 +0200)]
Bug 13018 : Static fine should be charged only once

Test plan (see Bug 6858 for using staticfine.pl) :

For a user (of a given category and library) with several overdues, launch the script :

staticfines.pl --category CAT,AMOUNT --library LIB --delay DELAY

Then, check that the user has been charged of AMOUNT if the due date of the most late item plus the delay is *before* today.

One day later, re-execute the script with the same parameters and check that the fine has not been charged twice.

Without patch, the fine is charged twice, with patch the user already charged is skipped (see output in debug mode)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Without the patch, the fine will be applied every time the script is run.
With the patch the fine will only be applied once.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13230: t/Biblio.t should run without a DB
Tomas Cohen Arazi [Tue, 11 Nov 2014 02:59:36 +0000 (23:59 -0300)]
Bug 13230: t/Biblio.t should run without a DB

This patch makes t/Biblio.t mock the DB connexion setting
a void one. All tests in this file currently call the C4::Biblio
functions with invalid (absent) parameters, so they are expected to
raise warnings and return undef values.

If someone writes mocked tests for the rest of the functionality,
it is expected to mock the DB calls to match the desired scenario.

To test:
- Turn of MySQL
- Run
  $ prove t/Biblio.t
=> FAIL: Tests fail because of missing MySQL server
- Apply the patch
- Run
  $ prove t/Biblio.t
=> SUCCESS: Tests now pass
- Start MySQL
- Run
  $ prove t/Biblio.t
=> SUCCESS: Tests still pass
- Sign off

Regards
Tomas

Sponsored-by: The will to procrastinate
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Sponsored-by: Wanting the darn packages to build
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Sponsored-by: Not wanting to read in my maths book
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12234 - dependency updates for master
Robin Sheat [Tue, 11 Nov 2014 02:13:50 +0000 (15:13 +1300)]
Bug 12234 - dependency updates for master

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12448: (RM followup) fix bug number in updatedatabase.pl
Tomas Cohen Arazi [Mon, 10 Nov 2014 15:54:46 +0000 (12:54 -0300)]
Bug 12448: (RM followup) fix bug number in updatedatabase.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12986: Upgrade the DataTables jQuery plugin to the latest version (1.10.2)
Jonathan Druart [Wed, 24 Sep 2014 15:05:05 +0000 (17:05 +0200)]
Bug 12986: Upgrade the DataTables jQuery plugin to the latest version (1.10.2)

DataTables 1.10.2 is now available.

The footerCallback function does not seem to work correctly with our
current version.

Test plan:
Go on the maximum of pages where DataTables is used and try to catch a
bug/regression :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I tested many many pages with DataTables, taking special care to find
pages with different DataTables configurations. I found no errors in the
OPAC or staff client.

Tested thoroughly in Firefox (latest) on Windows 7.
Tested less thoroughly in Chrome (latest) on Windows 7.
Tested briefly in Internet Explorer 7 in Vista and Internet Explorer 8
and found no bugs which were related to the DataTables upgrade.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9043: DBRev 3.17.00.052
Tomas Cohen Arazi [Mon, 10 Nov 2014 15:41:03 +0000 (12:41 -0300)]
Bug 9043: DBRev 3.17.00.052

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9043 [QA Followup] - Don't show "More options" are there aren't any
Kyle M Hall [Fri, 12 Sep 2014 13:59:12 +0000 (09:59 -0400)]
Bug 9043 [QA Followup] - Don't show "More options" are there aren't any

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9043: Make strings translatable
Jonathan Druart [Wed, 27 Aug 2014 07:33:13 +0000 (09:33 +0200)]
Bug 9043: Make strings translatable

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 9043: Add the multiple select jquery plugin
Jonathan Druart [Tue, 13 Aug 2013 14:58:06 +0000 (16:58 +0200)]
Bug 9043: Add the multiple select jquery plugin

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 9043: Changes to the advanced search page
Jonathan Druart [Tue, 19 Feb 2013 13:49:20 +0000 (14:49 +0100)]
Bug 9043: Changes to the advanced search page

This patch adds 2 new sysprefs: OpacAdvSearchOptions and
OpacAdvSearchMoreOptions.

These sysprefs are multivalued and you can add or remove some elements on
the adv search page.

This patch allows to display/hide some entries in the advanced search
page at the OPAC.
On this way, it is possible to configure the search options to display.

Test plan:
1/
Fill OpacAdvSearchOptions with Item types and Languages.
Fill OpacAdvSearchMoreOptions with Item types, Languages and Location.
On the advanced search page, verify the Location is only displayed for
the "More options" view.
2/ Try different settings for these prefs
3/ Remove all entries for the OpacAdvSearchMoreOptions and verify that
the "More options" does not displayed additional options.
4/ Remove all entries for the OpacAdvSearchOptions and verify that the
"normal view" does not displayed any options.

Note that this patch only affects the bootstrap theme.

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9043: Syspref improvement: add new type "multiple"
Jonathan Druart [Tue, 19 Feb 2013 13:48:04 +0000 (14:48 +0100)]
Bug 9043: Syspref improvement: add new type "multiple"

This patch adds a new type "multiple" for syspref.
This new type allows to select several values for one syspref.

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12692 - Markup improvements to holds awaiting pickup report
Owen Leonard [Fri, 1 Aug 2014 18:05:45 +0000 (14:05 -0400)]
Bug 12692 - Markup improvements to holds awaiting pickup report

This patch makes some minor updates to the output of the holds awaiting
pickup report. To test you should have several holds which are marked as
"waiting," including some which have been waiting longer than the number
of days specified in the ReservesMaxPickUpDelay system preference.

- Go to Circulation -> Holds awaiting pickup
- In both the "waiting" and "over" tabs, confirm that titles display any
  associated subtitle
- Confirm that library name is shown instead of library code
- Confirm that the patron name mailto: link works correctly

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Works as described: subtitle displayes (if mapping defined), library name
instead of code, and email as clickable mailto.

Remark 1: As for bug 13083, subtitle display is not as good in UNIMARC than in
MARC21, since subtitle is not separated from title by ':'.

Remark 2: 'subtitle' field is retrieved from a field mapping. Taking a look at
C4::Biblio::GetRecordValue, one see that the fieldmapping is directly queried.
There isn't any caching system, like for frameworks.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13211: DBRev 3.17.00.051
Tomas Cohen Arazi [Mon, 10 Nov 2014 14:58:37 +0000 (11:58 -0300)]
Bug 13211: DBRev 3.17.00.051

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13211: (followup) remove 'masthead' reference
Tomas Cohen Arazi [Thu, 6 Nov 2014 13:34:43 +0000 (10:34 -0300)]
Bug 13211: (followup) remove 'masthead' reference

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 13211: Added Google Indic Transliteration as a System Preference
Amit Gupta [Thu, 6 Nov 2014 06:16:01 +0000 (11:46 +0530)]
Bug 13211: Added Google Indic Transliteration as a System Preference

Test scenario:
1. Apply the patch
2. Run updatedatabase.pl
3. Login to Koha and go to Adminstration.
4. Click on Global system preferences.
5. Search GoogleIndicTransliteration and choose value "Show".
6. Apply patches on bug 13144
7. Go to OPAC and see GoogleIndicTransliteration coming on Masthead.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12264: [QA Follow-up] Fixing biblionumber/biblioitemnumber mixup
Marcel de Rooy [Mon, 10 Nov 2014 08:21:46 +0000 (09:21 +0100)]
Bug 12264: [QA Follow-up] Fixing biblionumber/biblioitemnumber mixup

While testing the string change on 12264, I had this result:
DBD::mysql::st execute failed: Column 'biblioitemnumber' cannot be null at /usr/share/koha/testclone/C4/Items.pm line 2191.
DBD::mysql::st execute failed: Column 'biblioitemnumber' cannot be null at /usr/share/koha/testclone/C4/Items.pm line 2191.
    # Child (GetItemsInfo tests) exited without calling finalize()
not ok 4 - GetItemsInfo tests

This was caused by this line in the unit test:
 my $biblionumber = get_biblio();
This routine returns:
    return ($bibnum, $bibitemnum);
So instead of the bibnum the bibitemnum is saved in biblionumber.
In my test database bibnum and bibitemnum somehow got out of sync, revealing
this bug :)
The fix is just adding parentheses:
 my ( $biblionumber ) = get_biblio();

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12264: Correct tiny typo in t/db_dependent/Items.t
Katrin Fischer [Sun, 9 Nov 2014 21:54:28 +0000 (22:54 +0100)]
Bug 12264: Correct tiny typo in t/db_dependent/Items.t

One of the tests claims 'item-level_itypes is disabled'
when it should be 'item-level_itypes is enabled'.

Patch fixes this.

To test:
- run t/db_dependent/Items.t
- tests should all pass
- verify the last test reads 'enabled'
- look at the code and see it's true

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12466: 3.15.00.049 is about Bug 5377, not 11268
Nicolas Legrand [Mon, 23 Jun 2014 14:57:20 +0000 (16:57 +0200)]
Bug 12466: 3.15.00.049 is about Bug 5377, not 11268

Fixes the description and bug reference.

http://bugs.koha-community.org/show_bug.cgi?id=12466

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the description on the old update database entry,
no problems found.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13225: Z39.50 result Card View doesn't work for UNIMARC
Frédéric Demians [Fri, 7 Nov 2014 18:23:12 +0000 (19:23 +0100)]
Bug 13225: Z39.50 result Card View doesn't work for UNIMARC

This patch fix UNIMARC Card View on Z39.50 result page. The valid XSL was
there: UNIMARC_compact.xml, but were not selected (a regression). This patch
use themelanguage to access XSL file, anticipating a intranet new theme in
future.

TO TEST: Before applying this patch, do a Z39.50 search, and try to display a
biblio record card view: meaningless. Retry after applying this patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in a UNIMARC installation, works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13224: use TOUT-UF8 base for z3950 BNF server
Fridolin Somers [Fri, 7 Nov 2014 17:44:04 +0000 (18:44 +0100)]
Bug 13224: use TOUT-UF8 base for z3950 BNF server

For using z3950 BNF server with utf8 encoding, one must use "TOUT-UF8" base.
See http://www.bnf.fr/fr/professionnels/recuperation_donnees_bnf_boite_outils/a.profil_z3950_bnf.html

Test plan :
- create a fresh koha install : UNIMARC and fr-FR with optional z3950 servers
- go to cataloguing
- click on "New from Z39.50/SRU"
- Perform searches on BNF2
=> Check that encoding is correct
- Choose a record and import
=> Check that encoding is correct

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Trivial database field change, that reflects BnF recommended settings.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All instances have been changed. No problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12403: DBRev 3.17.00.050
Tomas Cohen Arazi [Fri, 7 Nov 2014 18:31:01 +0000 (15:31 -0300)]
Bug 12403: DBRev 3.17.00.050

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12403 [Follow-up] Batch record deletion
Owen Leonard [Tue, 28 Oct 2014 14:07:22 +0000 (10:07 -0400)]
Bug 12403 [Follow-up] Batch record deletion

This follow-up makes several changes to language and markup with one
change in behavior:

- Updated permission description to avoid the use of the term "biblio"
- Updated batch delete template to avoid the use of the term
  "biblio" and to improve clarity.
- Replaced instances of terms "issue" and "reserve" with "checkout" and
  "hold" respectively.
- On bibliographic record batch delete, wrap biblionumber in <label>.
- On bibliographic record batch delete, show subtitle via Keywords to
  MARC mapping.
- On bibliographic record batch delete, respect BiblioDefaultView system
  preference.
- In the staff client cart, move batch delete link from "Action" menu
  to text link below (alongside "add to list" and "place hold"). The
  buttons are actions which affect the whole Cart. The links are actions
  which can be applied to selected items. I think this change makes it
  more consistent with the kind of operation being performed.

To test:

- Submit a batch of bibliographic records and confirm that the
  list of titles shows subtitle data as defined in Keywords to MARC
  mapping. Confirm also that the title links respect your
  BiblioDefaultView system preference.

- Perform a catalog search, select several titles, and add them to the
  Cart. Open the Cart and test the "Batch delete" link with and without
  titles selected. Test as a user who lacks batch biblio delete
  permission and confirm that the link does not appear.

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

I love the rewording, we always translated 'biblio' as 'bibliographic record',
it makes a lot of sense.

Tested using direct input of biblionumber or cart, subtitle display shows
correctly, link respect preference, user without permission cant acces the
tool or links.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12403: Follow-up - fixing a few typos
Katrin Fischer [Sun, 26 Oct 2014 21:10:00 +0000 (22:10 +0100)]
Bug 12403: Follow-up - fixing a few typos

- Fixes the permission on the tools page
- Fixes some capitalization
- Changes 'Reserves' to 'Holds'

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12403: Add the new permission tools_records_batchdelitem
Jonathan Druart [Wed, 4 Sep 2013 14:04:30 +0000 (16:04 +0200)]
Bug 12403: Add the new permission tools_records_batchdelitem

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12403: Add a batch record deletion
Jonathan Druart [Wed, 4 Sep 2013 10:44:05 +0000 (12:44 +0200)]
Bug 12403: Add a batch record deletion

This patch offers a new tool for deleting records.
Biblios and authorities will can to be deleted with a simple list of
biblionumber or authid.

This feature adds:
- a new pl/tt files tools/batch_delete_records
- a new permission: tools > records_batchdel

Test plan for biblios:
1/ There are two ways to generate a list of biblionumbers:
- using the basket: do a search, add some biblio to your basket, open
  the basket and click on the "Action" button > "Delete"
- generating a list from a report
2/ On the "Batch record deletion" tool verify:
- biblios with issues cannot be deleted (checkbox disabled and line in
  red).
- information is correct.
- sort functions work on each columns.
- the items, reserves and issues values are correct.
3/ After clicking on the "Delete selected recors" button, verify:
- reserves, items and biblio have successful been deleted.
- if an error occurs, the tool display an error message.

Test plan for authority:
1/ Generate a list of authid using a report:
2/ On the "Batch record deletion" tool verify:
- authorities are display with the summary.
- the count usage (used in X biblios) is correct.
3/ After clicking on the "Delete selected recors" button, verify:
- The authorities have successful been deleted.
- if an error occurs, the tool display an error message.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12334: Make it easy to hide parts of material type and format information in...
Katrin Fischer [Thu, 28 Aug 2014 11:32:35 +0000 (13:32 +0200)]
Bug 12334: Make it easy to hide parts of material type and format information in results

With the system preferences DisplayIconsXSLT and DisplayOPACiconsXSLT we control
the visibility of the material type, format and audience information in staff
and OPAC.

Sometimes a library might only want to hide a part of that information - for
example, hide audience but keep the material type icon.

This patch adds CSS classes to make it easier to style this section of the page
and hide parts of the information.

To test:
- Verify that OPAC and staff result lists for various types of materials
  still display nicely.
- Take a look at the HTML and verify, that label and text are now
  wrapped into a new span with a results_* class.
- Try hiding a part of the information, for example in OpacUserCSS:

.results_material_type {
  display none;
}

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described... but for a missing colon on example CSS

.results_material_type {
  display: none;
}

No koha-qa errors

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12250: DBRev 3.17.00.049
Tomas Cohen Arazi [Fri, 7 Nov 2014 18:19:30 +0000 (15:19 -0300)]
Bug 12250: DBRev 3.17.00.049

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12250: Update descriptions for languages, scripts and regions
Bernardo Gonzalez Kriegel [Sat, 1 Nov 2014 23:04:49 +0000 (20:04 -0300)]
Bug 12250: Update descriptions for languages, scripts and regions

This patch adds/updates languages, scripts and regions to
reflect what we currently have on translation server.

Languages, scripts and regions are ordered by respective code

To test:
1. Apply the patch
2. run updatedatabase.pl, must run without errors
3. Go to advanced search (opac/staff), more options, and check
language pulldown (verify you have an empty AdvancedSearchLanguages
syspref)
4. Remove contents from language_descriptions, language_rfc4646_to_iso639,
language_script_bidi, language_script_mappin and language_subtag_registry
5. Load installer/data/mysql/mandatory/subtag_registry.sql,
must load without errors
6. Repeat 3

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tested the SQL, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: Fix default values
Jonathan Druart [Tue, 30 Sep 2014 10:19:21 +0000 (12:19 +0200)]
Bug 12627: Fix default values

The default value for *by and *date fields is NULL.
But without this patch, the values are 0 or 0000-00-00.
It comes from the fact that the form set to an empty string the values
and DBIX::Class does not consider them as undefined.

This patch is very ugly, not sure how we can fix that.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
No regressions found, adding and editing suggestions from
OPAC and staff.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: Bug 12627: Fix default values - TT changes
Jonathan Druart [Tue, 30 Sep 2014 10:56:35 +0000 (12:56 +0200)]
Bug 12627: Bug 12627: Fix default values - TT changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: Fix date management
Jonathan Druart [Tue, 30 Sep 2014 09:25:27 +0000 (11:25 +0200)]
Bug 12627: Fix date management

C4::Dates->today returns a string formatted depending on the dateformat
syspref.

Before the original patch, SQLHelper managed both format (string
formatted and DateTime.

Now DBIX::Class only manages DateTime, so the call to NewSuggestion and
ModSuggestion should pass a DateTime object

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: Remove warnings
Jonathan Druart [Mon, 29 Sep 2014 13:24:36 +0000 (15:24 +0200)]
Bug 12627: Remove warnings

suggestion.pl: keys on reference is experimental

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: DBIx::Class is case sensitive for column names
Jonathan Druart [Mon, 29 Sep 2014 13:18:31 +0000 (15:18 +0200)]
Bug 12627: DBIx::Class is case sensitive for column names

STATUS should be "STATUS", not "status".

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12627: SQLHelper replacement - C4::Suggestions
Yohann Dufour [Fri, 8 Aug 2014 13:11:18 +0000 (15:11 +0200)]
Bug 12627: SQLHelper replacement - C4::Suggestions

With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper.
Moreover, the tests and the .pl have been adapted.

Test plan:
1) Apply the patch.

2) Execute the unit tests by launching :
prove t/db_dependent/Suggestions.t

3) The result has to be a success without error or warning :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=91,  2 wallclock secs ( 0.05 usr  0.01 sys +  1.65 cusr  0.09 csys =  1.80 CPU)
Result: PASS

4) Log in the intranet, create a suggestion and verify the created suggestion.

5) Edit a suggestion from the intranet and verify the suggestion is correctly modified.

6) Log in the OPAC and verify you can add a suggestion.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass, suggestion created on staff and opac,
suggestion edited without problems, no koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script:
Also tested:
- adding suggestion from staff and OPAC
- edit suggestion from staff
- deleting suggestion from OPAC
- changing to a normal status (email got created)
- changing to a custom status (SUGGEST_STATUS)
- display of custom status in OPAC

No problems found.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13123 - Duplicate label ids for language and opaclanguages
Owen Leonard [Tue, 21 Oct 2014 18:31:25 +0000 (14:31 -0400)]
Bug 13123 - Duplicate label ids for language and opaclanguages

When enabling or disabling a OPAC language choice clicking the label
triggers the checkbox under the language preference instead. This is
because both <label>s have the same id.

This patch adds a modifier to each label and corresponding id attribute
in order to make them unique.

To test, go to Administration -> System preferences -> I18N/L10N.
Clicking the "English (en)" label under the "language" system preference
should toggle the corresponding checkbox. Clicking the "English (en)"
label under the "opaclanguages" system preference should toggle the
correct checkbox.

Further tests:

- Install an English 'sub-language' like en-GB and confirm that
  checkbox labels work correctly.
- Install a non-English language and confirm that checkbox labels work
  correctly.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13089 - Tab key triggers JavaScript error in the checkEnter function
Owen Leonard [Wed, 15 Oct 2014 16:36:27 +0000 (12:36 -0400)]
Bug 13089 - Tab key triggers JavaScript error in the checkEnter function

Tabbing through fields in the patron add form or MARC editor triggers a
JavaScript error for each tab. The cause seems to be some JS which was
designed to accommodate differences between Mozilla browsers and
Internet Explorer. A slight modification seems to work just as well in
Firefox and IE.

To test, apply the patch and clear your browser cache if necessary. To
look for JavaScript errors, open the Developer Tools console in Firefox,
Chrome, or Internet Explorer (or in Firefox's Firebug console).

Create a new patron and use the tab key to move between inputs. No error
should be reported in the console. Test typing in fields and pressing
enter. The form should not be submitted.

Test in all available browsers, including at least IE11, IE10, and IE9.

Reproduced with FF 32
Tested with FF 32, Chrome 38, IE 11 and IE Emulations 8,9,10
No JavaScript errors found. Enter does not submit.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in Chromium, confirmed the problem and that the patch fixes it.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13200 - Followup of Bug 12246 - noisy C4/Auth.pm
Mark Tompsett [Wed, 5 Nov 2014 08:06:42 +0000 (03:06 -0500)]
Bug 13200 - Followup of Bug 12246 - noisy C4/Auth.pm

While testing a bug, warnings in the opac error log were
building up due to a particular line in C4::Auth. After
reviewing the code, it was discovered that removal of the
OpacMainUserBlockMobile system preference created this.

Since the system preference no longer exists, and is not
used, the line was deleted from C4/Auth.pm to prevent this
warning from occuring.

TEST PLAN
----------
1) Go to any OPAC page.
2) Check your opac error log.
   -- there should be something about uninitialized values
      used in C4/Auth.pm around line 443.
3) Apply the patch
4) Refresh the page.
   -- that same error should not be triggered.
5) prove -v t/db_dependent/Auth.t
   -- this runs the get_template_and_user function
      which had the parameter removed.
6) run the koha qa test tools

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 12979: Fix error on layout3pagesfr
Jonathan Druart [Tue, 30 Sep 2014 07:27:16 +0000 (09:27 +0200)]
Bug 12979: Fix error on layout3pagesfr

The format method was not called.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
No regressions found, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12979: Price formatting should only be defined at one place
Jonathan Druart [Tue, 23 Sep 2014 09:32:14 +0000 (11:32 +0200)]
Bug 12979: Price formatting should only be defined at one place

There are some places where the price format is defined.
All these occurrences should be removed use the way introduced by bug
12844.

Test plan:
1/ Verify you don't see any price formatting change on the basketgroup pdf
(for layout2pages, payout2pagesde, layout3pages and layout3pagesfr).
2/ On admin/aqbudgetperiods.pl, the budget total should be unchanged
too.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12448: DBRev 3.17.00.048
Tomas Cohen Arazi [Fri, 7 Nov 2014 14:37:27 +0000 (11:37 -0300)]
Bug 12448: DBRev 3.17.00.048

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12448: Follow-up: Only ask confirmation when rental charge > 0
Katrin Fischer [Fri, 15 Aug 2014 19:35:45 +0000 (21:35 +0200)]
Bug 12448: Follow-up: Only ask confirmation when rental charge > 0

To test:
- Check out an item with no rental charge
- Verify no confirmation message appears
- Check out an item with rental charge
- Verify rental charge shows

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12448: Ask for confirmation when checking out an item with rental fees
mbeaulieu [Tue, 29 Jul 2014 20:20:39 +0000 (16:20 -0400)]
Bug 12448: Ask for confirmation when checking out an item with rental fees

Sponsored-by: Ville de Victoriaville, QC
Confirmation box contents:

"Please confirm checkout"
"-Rental charge for this item: n"
[Yes, check out (Y)] [No, Don't Check Out (N)]

Test case A: Confirm checkout
1) Go to checkout user "X"'s checkout page.
2) Enter barcode for an item with rental fees.
3) Click the "Check out" button.
4) Confirmation box appears.
5) Click on the "Yes" button.
6) Item is added to checkout list.
7) Fees are added to the patron's account.

Test case B: Decline checkout
1) Go to checkout user "X"'s checkout page.
2) Enter barcode for an item with rental fees.
3) Click the "Check out" button.
4) Confirmation box appears.
5) Click the "No" button.
6) Checkout page goes back to its initial state.
7) Patron has no item checked out and no fees to pay.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With the system preference RentalFeesCheckoutConfirmation
set to "don't ask" there is no change in behaviour.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12760 - add restrictions purge to cleanup_database.pl (followup 2)
Fridolin Somers [Thu, 14 Aug 2014 13:39:07 +0000 (15:39 +0200)]
Bug 12760 - add restrictions purge to cleanup_database.pl (followup 2)

Formatting :
perltidy
use q{} for SQL queries
add use Modern::Perl

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 12760 - add restrictions purge to cleanup_database.pl (followup 1)
Fridolin Somers [Thu, 14 Aug 2014 13:15:48 +0000 (15:15 +0200)]
Bug 12760 - add restrictions purge to cleanup_database.pl (followup 1)

Remove unused $query var
Correct redefined $count var

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 12760 - add restrictions purge to cleanup_database.pl
Fridolin Somers [Thu, 14 Aug 2014 12:56:26 +0000 (14:56 +0200)]
Bug 12760 - add restrictions purge to cleanup_database.pl

This patch adds to the database cleanup script an option to purge expired patron restrictions (debarments in code).

Test plan :
- Select a borrower
- Create a restriction with expiration date in the futur
- Create a restriction expired since 7 days
- Create a restriction expired since 14 days
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 14"
=> no restriction is removed for this borrower
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 13"
=> restriction expired since 14 days is removed
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 6"
=> restriction expired since 7 days is removed
- run without argument "misc/cronjobs/cleanup_database.pl"
=> You see help text for restrictions option
- run without days "misc/cronjobs/cleanup_database.pl -v --restrictions"
=> You get a purge on 30 days

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 9312: Resolve error triggered by mutli-type return value.
Mark Tompsett [Mon, 27 Oct 2014 02:43:08 +0000 (22:43 -0400)]
Bug 9312: Resolve error triggered by mutli-type return value.

$results is 1 upon success or a hash on failure.
Rather than check %$results || %error, I changed it to
$results!=1 || %error. Strangely, this works without
messy warnings. I believe this resolves the problem Katrin
mentions in comment #43.

TEST PLAN
---------
0) Make sure the system preference patronimages is set to Allow.
1) Apply all the patches
2) Login to staff client
3) Tools -> Upload patron images (it's in the bottom left)
4) Choose an image file, browse for a photo, enter a patron #.
5) Click Upload
6) Click the card number link
   -- the uploaded photo should be visible on the left side of
      the screen.
7) Run koha qa test tools.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Image uploaded without problems
No koha-qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9312: Followup for one tab character
Marcel de Rooy [Thu, 22 Aug 2013 12:26:45 +0000 (14:26 +0200)]
Bug 9312: Followup for one tab character

To satisfy qa tools, removing one tab somewhere..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Sometimes our QA tools are pretty annoying, in cases like this, when its a
tab in a comment, .. I don't think we really need to hold up a patch
set for it

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9312: fix a couple more uninitialized variable warnings
Galen Charlton [Wed, 16 Jan 2013 16:12:31 +0000 (08:12 -0800)]
Bug 9312: fix a couple more uninitialized variable warnings

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 9312: Perltidying picture-upload.pl
Fridolyn SOMERS [Wed, 12 Jun 2013 13:29:26 +0000 (15:29 +0200)]
Bug 9312: Perltidying picture-upload.pl

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 9312: strict perl for picture-upload.pl
Fridolyn SOMERS [Fri, 21 Dec 2012 13:31:52 +0000 (14:31 +0100)]
Bug 9312: strict perl for picture-upload.pl

Testing - this is a code-cleanup patch, so the purpose
of testing is to ensure that patron image upload functionality
still works.  To test:

- Turn on the patronimages system preference
- Go to Tools | Upload patron images and import a suitable image
  for a test patron.
- Bring up the test patron and verify that the image is attached.
- From the patron details page, upload a replacement image.
- Create a patron image ZIP file containing at least two images (
  per the documentation of the patron image feature) and load it
  via the patron image import tool.
- Verfiy that the test patrons now have images.
- Verify that tools/picture-upload.pl didn't report any errors
  in the Apache error log.

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 12829: Follow-up - fix small display issue in UNIMARC
Katrin Fischer [Wed, 5 Nov 2014 21:13:48 +0000 (22:13 +0100)]
Bug 12829: Follow-up - fix small display issue in UNIMARC

UNIMARC XSLT uses <li> instead of <span>.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12829: properly skip invalid ISBN when rendering for normal record display
Tomas Cohen Arazi [Wed, 29 Oct 2014 18:16:57 +0000 (15:16 -0300)]
Bug 12829: properly skip invalid ISBN when rendering for normal record display

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

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

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

Regards
To+

http://bugs.koha-community.org/show_bug.cgi?id=12901
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8836: (RM followup) unit tests should use the new API
Tomas Cohen Arazi [Fri, 7 Nov 2014 14:09:14 +0000 (11:09 -0300)]
Bug 8836: (RM followup) unit tests should use the new API

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8836: Update DBIx
Tomas Cohen Arazi [Thu, 6 Nov 2014 18:28:19 +0000 (15:28 -0300)]
Bug 8836: Update DBIx

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8836: DBRev 3.17.00.047
Tomas Cohen Arazi [Thu, 6 Nov 2014 18:25:12 +0000 (15:25 -0300)]
Bug 8836: DBRev 3.17.00.047

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8836: (RM followup) fix updatedatabase.pl rebase problem
Tomas Cohen Arazi [Thu, 6 Nov 2014 18:13:18 +0000 (15:13 -0300)]
Bug 8836: (RM followup) fix updatedatabase.pl rebase problem

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8836 [QA Followup] - Prevent multiple collections from having the same title
Kyle M Hall [Fri, 31 Oct 2014 10:46:53 +0000 (06:46 -0400)]
Bug 8836 [QA Followup] - Prevent multiple collections from having the same title

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This works, and so I'll sign off, but I'm not crazy about the workflow.
Having the error message display on an otherwise empty page is not user
friendly. The entry form should be redisplayed so that the user can
modify the data they submitted.

That really should be changed in a follow-up.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [Alt QA Followup] - Add confirmation dialog for deleting collections
Owen Leonard [Fri, 31 Oct 2014 13:04:43 +0000 (09:04 -0400)]
Bug 8836 [Alt QA Followup] - Add confirmation dialog for deleting collections

The previous patch for adding a confirmation dialog didn't work to make
the confirmation message translatable. This alternate patch uses a
progressive-enhancement method recycled from Guided Reports to trigger a
warning and highlight the row which was clicked.

To test, apply the patch and try to delete an existing rotating
collection. You should get a confirmation dialog, and the corresponding
row in the table should be highlighted red.

Clicking cancel should cancel the deletion. Clicking OK should complete
the deletion.

To test the translatability of the confirmation message:

Run perl translate update [a language code, e.g. 'en-GB']
Search [lang]-i-staff-t-prog-v-3006000.po for the message string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [QA Followup] - Don't transfer in items already in transit
Kyle M Hall [Fri, 31 Oct 2014 12:18:28 +0000 (08:18 -0400)]
Bug 8836 [QA Followup] - Don't transfer in items already in transit

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [QA Followup] - Sort transfer branches alphabetically
Kyle M Hall [Fri, 31 Oct 2014 10:50:41 +0000 (06:50 -0400)]
Bug 8836 [QA Followup] - Sort transfer branches alphabetically

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Libraries sort correctly now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [QA Followup] - Allow collection description to be optional
Kyle M Hall [Fri, 31 Oct 2014 10:24:20 +0000 (06:24 -0400)]
Bug 8836 [QA Followup] - Allow collection description to be optional

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Description is no longer made required by the template and an empty
description is saved correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [Template follow-up] Resurrect Rotating Collections
Owen Leonard [Thu, 30 Oct 2014 16:42:07 +0000 (12:42 -0400)]
Bug 8836 [Template follow-up] Resurrect Rotating Collections

This follow-up makes drastic changes to the templates in order to bring
them into compliance with established patterns and markup guidelines.
Only minor changes are made to perl scripts.

Changes:

- Add a toolbar include for displaying new, edit, transfer, and delete
  buttons.
- Improve title and breadcrumbs with collection titles and better
  specificity.
- Correct page structure which was inconsistent with the markup of
  similarly-structured pages.
- Correct styling of error and informational messages.
- Added detailed error messages for a couple of conditions which were
  not defined in the template.
- Add link to the detail page of titles which are in a collection using
  the view defined in the IntranetBiblioDefaultView preference.
- Add a link to remove an item from a collection directly without having
  to scan the barcode.
- Add client-side validation to collection creation form.
- In RotatingCollections.pm, add biblionumber to the list of columns
  returned by GetItemsInCollection.
- In rotating_collections/*.pl, remove obsolete declaration of system
  preference variables.

To test, perform all the operations associated with Rotating
Collections:

- Add a new collection
- Edit an existing collection
- Add items to a collection
- Remove items from a collection (via barcode and link)
- Test the behavior of all new toolbar buttons
- Verify that titles and breadcrumbs look correct and links work
  correctly.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [QA Followup 2]
Kyle M Hall [Thu, 30 Oct 2014 10:58:42 +0000 (06:58 -0400)]
Bug 8836 [QA Followup 2]

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 [QA Followup] - Fix koha-qa.pl errors reported
Kyle M Hall [Wed, 15 Oct 2014 14:46:28 +0000 (10:46 -0400)]
Bug 8836 [QA Followup] - Fix koha-qa.pl errors reported

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Trusting the sign off on the other page, I only tested the QA changes

Signed-off-by: Cindy Murdock Ames <cmurdock@ccfls.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 8836 - Resurrect Rotating Collections
Kyle M Hall [Fri, 15 Aug 2014 13:46:03 +0000 (16:46 +0300)]
Bug 8836 - Resurrect Rotating Collections

Test Plan:
In "Tools" -> "Rotating Collections" -> "Add/Remove items":
When adding item barcodes to the collection, the input field
  <input type="text" id="barcode" name="barcode">
should become active
automatically so it is easy to add multiple barcodes rapidly without touching the
mouse or keyboard.
Enter-press is dealt by the barcode reader so automatic form submittal should be handled
by the barcode reader.

In "Rotating collections" -> "Transfer Collection":
When the collection is initially transferred, items are set to trasfer correctly.
When the collection is transferred while items are still being transferred, the transfer
destination library doesn't change from the original one.
The holding library changes for all items in the collection to the destination library on
retransfers as well.
This is tricky if a user accidentally places the wrong destination.
When I try to checkin these items to their new retransfer location, I get the following messages:
-"This item is part of a rotating collection and needs to be transferred to <original transfer destination>"
-"Please return Valkoinen ihmissyj / to <original transfer destination>"
-"Print slip or Cancel transfer"

When I checkin a Item to a arbitrary branch, I get the following messages:
"This item is part of a rotating collection and needs to be transferred to <retransfer destination>"
"Please return Valkoinen ihmissyj / to <original trasfer destination>"

Bug 8836 - Resurrect Rotating Collections - QA Followup

Bug 8836 - Resurrect Rotating Collections - Followup 2 - Perltidy rotating collections scripts

Bug 8836 - Resurrect Rotating Collections - Followup 3

* Fix bad TT Tag
* Fix bad sql query
* Fix capitalization ( HTML4 )
* Allow a rotating collection's location to keep AutomaticItemReturn
  from sending it back to the branch of origin
* Fix bad query

Bug 8836 - Resurrect Rotating Collections - Followup 4 - Autofocus on barcode field

Bug 8836 - Resurrect Rotating Collections - Followup 5 - Don't transfer issued and waiting items

Items in a rotating collection are automatcially transferred when a
collection is transferred. This is a problem for currently checked out
items and items on hold marked as "Waiting".

This patch resolves this issue by skipping the transfer for those items.
When the items are then returned, the librarian will be alerted to
transfer the item to the library currently holding that rotating
collection.

Bug 8836 - Resurrect Rotating Collections - Followup 5 - Link collections.colBranchcode to branches.branchcode

Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Cindy Murdock Ames <cmurdock@ccfls.org>
http://bugs.koha-community.org/show_bug.cgi?id=8835

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 10582: Koha OPAC URL shows Perl error message before web installer was run
Tomas Cohen Arazi [Fri, 31 Oct 2014 15:50:37 +0000 (12:50 -0300)]
Bug 10582: Koha OPAC URL shows Perl error message before web installer was run

This patch makes opac/maintenance.pl run smoothly when the DB hasn't
been populated yet. It does so, by using C4::Templates::gettemplate
instead of C4::Auth::get_user_and_template as the maintenance page doesn't
need authentication checks at all, it should happen *before* any attempt
to check credentials.

To test:
- Backup and DROP your database
- Point your browser to the OPAC page
=> FAIL: An error is shown: "Cant's use an undefined value as an ARRAY..."
- Apply the patch
- Relad the page
=> SUCCESS: The maintenance page correctly shows.
We should now check the rest of the script's behaviour remains untouched:
- Reload your backed up DB
- Change your DB version number by hand to one version lower, like in:
  > UPDATE systempreferences SET value="3.1700042" WHERE variable LIKE '%version%';
- Go to the OPAC
=> SUCCESS: Maintenance page shows as expected
- Recover the right  version number, like in:
  > UPDATE systempreferences SET value="3.1700043" WHERE variable LIKE '%version%';
- Set OpacMaintenance to Show on the staff client
- Reload the OPAC
=> SUCCESS: Maintenance page shows as expected
- Set OpacMaintenance to 'Don't show' on the staff client
- Reload the OPAC
=> SUCCESS: Normal OPAC shows
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, fixes long existing bug.

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