]> git.koha-community.org Git - koha.git/log
koha.git
8 years ago Bug 15592 - spelling mistake in ~/Koha/koha-tmpl/intranet-tmpl/p./plugins/plugins...
Chloe [Tue, 19 Jan 2016 21:18:09 +0000 (21:18 +0000)]
 Bug 15592 - spelling mistake in ~/Koha/koha-tmpl/intranet-tmpl/p./plugins/plugins-upload.tt

To Test:

checkthat "extention" has been changed to "extension" on line 27

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15609 - spelling mistake in :692: writen ==> written
Chloe [Tue, 19 Jan 2016 21:02:13 +0000 (21:02 +0000)]
 Bug 15609 - spelling mistake in :692: writen ==> written

To test:

Check that "writen" has been changed to "written" on line 692

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 2669: Change checkboxes to radio buttons on dictionary
Jonathan Druart [Mon, 11 Jan 2016 11:32:23 +0000 (11:32 +0000)]
 Bug 2669: Change checkboxes to radio buttons on dictionary

On creating new dictionary for report, the choice between "All dates"
and "Date range" should be a real radio button, not 2 radio buttons with
different names (which means they could be selected altogether...)

Note that I don't understand what means 'All dates', there is no
condition generated for the dictionary. We should not have to select a
field if we don't want to add a condition on it :)

Test plan:
Create a new dictionary for the Patron module, then a date field
(dateenrolled or birthdate, etc.)

Confirm that the radio buttons now behave as radio buttons...

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Looks so much nicer too!

Radio buttons display as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 4912: Redirect to the appropriate view after editing/deleting a list
Jonathan Druart [Wed, 6 Jan 2016 14:25:14 +0000 (14:25 +0000)]
 Bug 4912: Redirect to the appropriate view after editing/deleting a list

There are 2 places where a list can be edited/deleted: on the list view
and the list content view. After the edition, the user expect to be
redirect to the previous page.
This patch implements that.

Test plan:
At the OPAC, delete and edit a list from the 2 differents places.
Confirm that you are redirect to the page you come from.

With patch, redirects work as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off
Owen Leonard [Wed, 23 Apr 2014 16:59:25 +0000 (12:59 -0400)]
 Bug 6322 - It's possible to view lists/virtualshelves even when virtualshelves is off

If the user knows the URL for OPAC lists they can access them even with
the virtualshelves preference turned off. This patch copies the solution
added to opac-topissues.pl by Bug 10595 and applies it to OPAC lists
pages.

To test, apply the patch and set the virtualshelves system preference to
"don't allow."

- Navigate to /cgi-bin/koha/opac-shelves.pl. You should be redirected to
  an Error 404 page.
- Also check:
  - /cgi-bin/koha/opac-shareshelf.pl.
  - /cgi-bin/koha/opac-downloadshelf.pl
  - /cgi-bin/koha/opac-sendshelf.pl
  - /cgi-bin/koha/opac-addbybiblionumber.pl
- Turn virtualshelves back on. Access to lists and list sharing should
  be restored.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 9754: koha-remove optionally includes var/lib and var/spool
Marcel de Rooy [Thu, 14 Jan 2016 11:29:45 +0000 (12:29 +0100)]
 Bug 9754: koha-remove optionally includes var/lib and var/spool

Currently, the files in the folder /var/lib/koha/[instance] and also
in /var/spool/koha/[instance] are not removed.
This patch adds the option -p|--purge-all to include those two
directories when removing files.

Note: There was a small bug in the for loop. On the -k line the extra
shift statement is one too much.

NOTE: Verify that you use the adjusted koha-remove in the test plan
and not accidentally an older version of this script.

Test plan:
[1] Create an instance test.
[2] Run koha-remove and verify that /var/lib/koha/test still exists.
[3] Create an instance test2.
[4] Run koha-remove -k -p and verify that the sql database still exists
    but the two instance folders in var/lib/koha and var/spool/koha are
    gone.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13177: Accidental copy/paste error fix
Aleisha [Tue, 12 Jan 2016 22:15:23 +0000 (22:15 +0000)]
 Bug 13177: Accidental copy/paste error fix

Confirm it now says Rotating Collections instead of Patron Import in the last line, and the link is correct.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13177: Help page for Rotating Collections
Aleisha [Mon, 21 Dec 2015 21:27:00 +0000 (21:27 +0000)]
 Bug 13177: Help page for Rotating Collections

To test:

Go to Tools -> Rotating Collections and click Help in the top-right. Confirm the Help page shows and gives correct accurate instructions with no typos or grammatical errors.

Help displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14015 - Checkout: Fix software error if barcode '0' is given
Marc Véron [Mon, 28 Dec 2015 11:15:18 +0000 (12:15 +0100)]
Bug 14015 - Checkout: Fix software error if barcode '0' is given

To reproduce the bug:
- Go to Home > Circulation > Checkouts > [a patron]
- Enter 0 (zero) in barcode field and hit Enter

Result:
Software error
  Can't use string ("1") as a HASH ref while "strict refs" in use
  at /usr/share/kohaclone/circ/circulation.pl line 473

To test:
- Apply patch
- Repeat steps above
- Verify that the sofware error is gone and that you get a
  message as with other invalid barcodes.
- Test with other values: '00', '000', existing barcode,
  and a barcode that does not exist
- Test with empty barcode (for printing slip)
- Search for regressions

This patch implements Jonathan's solution (see comment #15)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
8 years ago Bug 14133: Print notices should be generated with the print template
Jonathan Druart [Fri, 21 Aug 2015 09:43:13 +0000 (10:43 +0100)]
 Bug 14133: Print notices should be generated with the print template

If the overdue notice to send is an email or a SMS and the patron does
not provided such information, a print notice is generated.
But it will be generated with the email or sms template, which is not
useful, especially in the SMS case.

The template to use should be the print one.

Test plan:
0/ Does not apply this patch and Correctly define the overdue rules to generate
an overdue notice to the message_queue table.
Check email + SMS
1/ Define an email address and a SMS number for a patron
2/ Generate the overdue notices (misc/cronjobs/overdue_notices.pl [-t])
3/ 2 notices should have been generated:
    mtt=email with the email template used
    mtt=sms   with the sms template used
4/ Truncate the message_queue table
5/ Remove the email address and repeat 2
6/ Only 1 notice should have been generated:
    mtt=print with the email template used
7/ Truncate the message_queue table
8/ Remove the sms alert number and repeat 2
9/ 2 notices should have been generated:
    mtt=print with the email template used (or sms I suppose)

10/ Apply this patch and repeat previous steps.
The print notices should be generated with the print template.

IMPORTANT NOTE: This test plan does not take into account the notices
generated for the staff ("These messages were not sent directly to the
patrons."). However the behavior will also change, the print template
will be used in all cases. Is it what we want?

Signed-off-by: Chris <chris@bigballofwax.co.nz>
Seems fine by me

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15135: Remove Warning Subroutine HasOverdues redefined
Marc Véron [Mon, 11 Jan 2016 10:59:14 +0000 (11:59 +0100)]
 Bug 15135: Remove Warning Subroutine HasOverdues redefined

In staff client, while displying patron related pages (e.g. moremember.pl) you get a warning like:
moremember.pl: Subroutine HasOverdues redefined at /usr/share/kohaclone/Koha/Template/Plugin/Borrowers.pm line 52.
This occurs with all pages that have [% USE Borrowers %] in their templates (directly or via members-toolbar.inc)

To test:
- Go to Home > Patrons > Patron details for....
- Search for warning above in log
- Apply patch
- Verify that no more warnings appear
- Verify that patron pages behave as before

(Solution as of comment #18)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that warning disappears with this patch.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15209: Check the parameter at the beginning of the subroutines
Jonathan Druart [Mon, 28 Dec 2015 15:47:01 +0000 (15:47 +0000)]
 Bug 15209: Check the parameter at the beginning of the subroutines

It seems better to check if parameters exist at the beginning of a
subroutine.
It makes the code easier to read and there is 1 indentation level less.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15209: Add tests
Jonathan Druart [Mon, 28 Dec 2015 15:46:59 +0000 (15:46 +0000)]
 Bug 15209: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15209 Validate passed MARC::Record objs in C4::Koha
Colin Campbell [Wed, 18 Nov 2015 14:53:58 +0000 (14:53 +0000)]
 Bug 15209 Validate passed MARC::Record objs in C4::Koha

Ensure that a passed MARC::Record is defined before calling
its methods. Otherwise you are open to occurences of the
error 'Can't call method "field" on an undefined value'
In a CGI environment you can live with such sloppiness but
in a persistent environment the error can cause the instance
to abort.
Made all routines passed a MARC::Record validate it before calling
its methods. Changed the parameter name from the meaningless
record to marcrecord to indicate its content. Added an explicit return
for all cases where no valid data returned. Cleaned up some logic for
clarity. I think we can assume that GetNormalizedOCLCNumber meant to
look at all 035s till it found an OCLC number not just the first.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15299: Ask for confirmation when deleting a report from second page
Jonathan Druart [Thu, 7 Jan 2016 12:50:35 +0000 (12:50 +0000)]
 Bug 15299: Ask for confirmation when deleting a report from second page

Some link are hidden when loading the page, by DataTables, we need to
use the delegate jQuery method to attach a handler to the click event
for all delete links (the ones existing when loading the page, and the
ones displayed in the future).

Test plan:
Have more than 20 reports defined
Go on the report list view, then change the number of elements
displayed, click "action>delete". You should get a warn.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Confirm that there is now a confirmation on delete from the list -> action menu

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15357: Display existing holds even if no items exist
Jonathan Druart [Mon, 14 Dec 2015 09:32:50 +0000 (09:32 +0000)]
 Bug 15357: Display existing holds even if no items exist

If all the items have been deleted for a record and holds exist, the
holds are not displayed.
You are not able to delete the items from the record detail page, but
you can from the items page.

Test plan:
1 - Place 1 or more title level holds on a record.
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
With this patch, that holds are accessible via the holds tab.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15391: Fix HoldsQueue.t tests
Jonathan Druart [Tue, 19 Jan 2016 16:58:07 +0000 (16:58 +0000)]
 Bug 15391: Fix HoldsQueue.t tests

Prior to this patch, in HoldsQueue.t:
 63 my @item_types = C4::ItemType->all;
 64 my $itemtype = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");

Then we use the $itemtype variable (which contains the number of item types not for loan):

 92 $dbh->do("INSERT INTO biblioitems (biblionumber, marcxml, itemtype)
 93           VALUES                  ($biblionumber, '', '$itemtype')");

There is obviously something wrong here.

The code should be

 64 my @not_for_loan = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");
 66 my $itemtype = $not_for_loan[0]->{itemtype};

But then some tests don't pass:

Actually the problem comes from:
commit bfbc646fdd9ca4b90a0bc2751d0faa95d9e93ba1
  Bug 10336: HoldsQueue.t needs to create its own data

-my $itemtype = $dbh->selectrow_array("SELECT min(itemtype) FROM itemtypes WHERE notforloan = 0")
+my @item_types = C4::ItemType->all;
+my $itemtype = grep { $_->{notforloan} == 1 } @item_types

The line should have been:
my $itemtype = grep { $_->{notforloan} == 0 } @item_types

Test plan:
Confirm that the tests still pass after this patch applied.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
All tests pass pre and post patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15398: Hide Staff members only in the patron deletion/anonymization tool
Jonathan Druart [Tue, 5 Jan 2016 15:41:36 +0000 (15:41 +0000)]
 Bug 15398: Hide Staff members only in the patron deletion/anonymization tool

On bug 9076 (commit 568a4c1230ee9a4002181fcab2c083faf6c323a9), the plan
was to hide the Staff members from the tool.
But the test was wrong, it was done on the category_code instead of the
category_type value.

Test plan:
1/ Create a category 'Student' which is not part of the Staff
(category_code=S, category_type!=S)
2/ Create a staff category (category_type=S)
3/ Go on the deletion/anonymization tool (tools/cleanborrowers.pl) and
confirm that the category Student category is displayed in the dropdown
list.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=15308

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15626: Remove log4perl.conf when using koha-remove
Jonathan Druart [Wed, 20 Jan 2016 10:28:58 +0000 (10:28 +0000)]
 Bug 15626: Remove log4perl.conf when using koha-remove

if you create a koha install using koha-create, and remove it with
koha-remove, the /etc/koha/sites/$SITE/ directory won't be removed,
because the /etc/koha/sites/$SITE/log4perl.conf has not been removed by
this script.

Test plan:
Use this koha-remove script to remove a koha install
Without this patch, the /etc/koha/sites/$SITE directory won't be
removed.
With this patch applied, the directory will be correctly removed.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 12045 - Transfer impossible if barcode includes spaces
Chloe [Thu, 21 Jan 2016 23:47:42 +0000 (23:47 +0000)]
 Bug 12045 - Transfer impossible if barcode includes spaces

have changed the code which strips the white space to only remove the leading and trailing white space instead

To Test-
1- go to circulation -> transfer
2- attempt to tranfer an item where the barcode has a space in the middle of it
3- it should fail
4- apply patch
5- try again
6- it should work

NOTE: I purposefully added: die "($barcode)";
      Before, all spaces were removed.
          '    white space    ' became '(whitespace)'
      After, only external spaces were remove
          '    white space    ' became '(white space)'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15188: Do not remove unused auths if zebra is not reachable
Jonathan Druart [Tue, 19 Jan 2016 08:55:49 +0000 (08:55 +0000)]
 Bug 15188: Do not remove unused auths if zebra is not reachable

Other conn errors should be checked (wrong user/pwd, etc.)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra...
Alex Arnaud [Tue, 29 Dec 2015 15:46:38 +0000 (16:46 +0100)]
 Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra is not running

Test plan:

1) Shut down zebra: koha-zebra-ctl.sh stop
2) Execute the script: remove_unused_authorities.pl (with -t if you don't want to really delete from your database).
3) Check that the script would have deleted all the authorities (eg: 31449 authorities parsed, 31449 deleted and 0 unchanged because used).
4) Apply patch
5) Run, notice that the script dies because zebra is unavailable

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15530 - Editing a course item via a disabled course disables it even if it is...
Kyle M Hall [Fri, 8 Jan 2016 17:00:36 +0000 (17:00 +0000)]
 Bug 15530 - Editing a course item via a disabled course disables it even if it is on other enabled courses

It appears that if the course item is edited by clicking the edit link
from an active course, the course item will be set to enabled and the
fields will be swapped, if the same course item is edited from a course
that is *not* active, the course item will be set to *not* enabled, and
the original fields will be swapped back in!

The short term work-around is to only edit course items from an enabled
course if the item has a course that is enabled. If all the courses it
is on are disabled, it doesn't matter what course the item is edited
from.

Test Plan:
1) Create two courses, 1 enabled and 1 disabled
2) Add an item as a course reserve to both courses
3) Edit the course reserve data for the item via the enabled course
4) Note the course item is enabled ( easy way is to check the database )
5) Edit the same course reserve data, but via the disabled course
6) Note the course item is now disabled even though it is part of
   an enabled course!
7) Apply this patch
8) Repeat steps 1 through 5
9) Note the course item is still enabled

Signed-off-by: Margaret Holt <mholt@bastyr.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15530 - Add Unit Test
Kyle M Hall [Fri, 8 Jan 2016 17:00:18 +0000 (17:00 +0000)]
 Bug 15530 - Add Unit Test

Signed-off-by: Margaret Holt <mholt@bastyr.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years agoBug 15572: TransformHtmlToMarc - rewrite the loop
Julian Maurice [Tue, 12 Jan 2016 15:49:15 +0000 (16:49 +0100)]
Bug 15572: TransformHtmlToMarc - rewrite the loop

This rewrites the while loop into a for loop, so $i still gets
incremented when we call next

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Make sense. Add readability. Infinite loop no more possible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Patches previously applied in reverse order.

8 years agoBug 15572: Add tests for TransformHtmlToMarc
Jonathan Druart [Tue, 12 Jan 2016 15:23:33 +0000 (15:23 +0000)]
Bug 15572: Add tests for TransformHtmlToMarc

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15572: Follow-up to fix error on authority creation
Frédéric Demians [Tue, 12 Jan 2016 10:53:11 +0000 (11:53 +0100)]
Bug 15572: Follow-up to fix error on authority creation

Bug 6657 modified the way C4::Biblio::TransformHtmlToMarc operates in order to
solve an issue occuring during biblio record cataloguing. But this function is
also used by authorities cataloguing, and the code in this case is irrelevante.
This followup allows to distinguish for which kind of record
TransformHtmlToMarc is called: biblio/authority.

A bug appears in authority creation without this patch in some circunstances:
when authid is linked to 001 field.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Tested with a new authority record

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoRevert "Bug 15572: TransformHtmlToMarc - rewrite the loop"
Jesse Weaver [Mon, 25 Jan 2016 14:01:29 +0000 (07:01 -0700)]
Revert "Bug 15572: TransformHtmlToMarc - rewrite the loop"

This reverts commit 1eab5c199d21a622abde7e47ca248d80e882ca46.

8 years agoRevert "Bug 15572: Follow-up to fix error on authority creation"
Jesse Weaver [Mon, 25 Jan 2016 14:01:28 +0000 (07:01 -0700)]
Revert "Bug 15572: Follow-up to fix error on authority creation"

This reverts commit 2ca9bd5dc247ae26225cbc299c1bc0883bc444e0.

8 years agoRevert "Bug 15572: Add tests for TransformHtmlToMarc"
Jesse Weaver [Mon, 25 Jan 2016 14:01:25 +0000 (07:01 -0700)]
Revert "Bug 15572: Add tests for TransformHtmlToMarc"

This reverts commit 467355d846a047ba3e77c0e9d73bf2323ab4fd67.

8 years agoBug 15542 [QA Followup] - Tidy member-password.pl
Kyle M Hall [Fri, 15 Jan 2016 17:37:17 +0000 (17:37 +0000)]
Bug 15542 [QA Followup] - Tidy member-password.pl

No other patches in process modify member-password.pl, now would be
a great time to tidy it!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15542 [QA Followup] - Fix code error
Kyle M Hall [Fri, 15 Jan 2016 17:35:49 +0000 (17:35 +0000)]
Bug 15542 [QA Followup] - Fix code error

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15542: Change for the German style address format
Jonathan Druart [Mon, 11 Jan 2016 10:40:27 +0000 (10:40 +0000)]
Bug 15542: Change for the German style address format

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15542: Always display the patron's info the same way.
Jonathan Druart [Mon, 11 Jan 2016 09:18:30 +0000 (09:18 +0000)]
Bug 15542: Always display the patron's info the same way.

The patron's information displayed in the member module
(includes/circ-menu.inc and includes/member-display-address-style-*.inc)
are not always displayed the same way.
Sometimes the streetnumber is missing, sometimes it's the streettype.
Sometimes the streettype is after the address, sometimes before...

Test plan:
Go on a patron detail page, and open all the tabs on the left (Check
out, Fines, Notices, etc.)
Without this patch, the patron's info displayed will differ from one page to
another.
With this patch, they will be displayed the same everywhere.

Followed test plan, works as expected. (Tested both patches together.)
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15569: Do not displayed "automatic renewal" if the patron cannot checkout
Jonathan Druart [Wed, 13 Jan 2016 16:36:47 +0000 (16:36 +0000)]
Bug 15569: Do not displayed "automatic renewal" if the patron cannot checkout

If the patron cannot checkout (debarred) and on-site checkout is
enabled, the "Automatic renewal" checkbox should not be displayed on the
circulation screen.

Test plan:
Enable OnSiteCheckouts and OnSiteCheckoutsForce
Debar a patron and go on the circulation page.
Without this patch, the automatic renewal checkbox is displayed.
With this patch applied, it's not.

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15576: Fix for incorrect link redirect
Aleisha [Thu, 14 Jan 2016 02:26:34 +0000 (02:26 +0000)]
Bug 15576: Fix for incorrect link redirect

To test:

1) Edit a user to have an uncertain address (gone no address)
2) Log in as that user on OPAC
3) Click 'online update form' link in the yellow message
4) Confirm you are taken to opac-memberentry.pl

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15601: Fix TestBuilder tests
Jonathan Druart [Tue, 19 Jan 2016 15:10:42 +0000 (15:10 +0000)]
Bug 15601: Fix TestBuilder tests

Bug 13624 modified the DB structure for overduerules.
The TestBuilder tests (t/db_dependent/TestBuilder.t) based some of its
checks on this structure.

Test plan:
  prove t/db_dependent/TestBuilder.t
Should return green.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15602: Remove cursor:pointer
Jonathan Druart [Fri, 22 Jan 2016 09:10:29 +0000 (09:10 +0000)]
Bug 15602: Remove cursor:pointer

With the href attribute, the cusor will be displayed as a pointer.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15602: Accessibility: Can't tab to add link in patron card creator add patrons...
Natasha [Wed, 20 Jan 2016 03:47:06 +0000 (03:47 +0000)]
Bug 15602: Accessibility: Can't tab to add link in patron card creator add patrons popup

To Test -

1. Go onto Tools and then click on Patron Card Creator.
2. Click on New and then Card Batch.
3. Add a borrowernumber then add patron.
4. Search for a patron.
5. Using the tab key try to navigate onto the Add link.
6. Notice it skips Add.
7. Apply the patch and then repeat steps 1-5, notice the add link can now be accessed through using the keyboard.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15603 - Accessibility: Can't tab to select link in budgets add user popup
Natasha [Wed, 20 Jan 2016 01:22:45 +0000 (01:22 +0000)]
Bug 15603 - Accessibility: Can't tab to select link in budgets add user popup

To Test -
1. If you don't have a budget and a fund, make at least one of each.
2. Go to funds from budgets.
3. Either make a new fund or edit an existing one and then click Edit owner, which will bring up a pop-up tab.
4. Search for a patron.
5. Using the tab key try to navigate onto the Select link.
6. Notice it skips select.
7. Apply the patch and then repeat steps 3-5, notice the select link can now be accessed through using the keyboard.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 14193 - Accessibility: Searching patrons using the alphabetic index doesn't work
Owen Leonard [Tue, 19 Jan 2016 16:36:44 +0000 (11:36 -0500)]
Bug 14193 - Accessibility: Searching patrons using the alphabetic index doesn't work

Using a mouse to click on the alphabetic index letters works even though
the anchor markup doesn't contain an href attribute. However you
can't tab to them using the keyboard, and I assume the issue with
screen readers is related.

This patch adds a dummy href attribute and a class-based click handler
so that we can get rid of the "onclick" attribute in the markup.

To test, apply the patch and visit the "Patrons" section.

1. Use the tab key to move the focus to one of the alphabet links.
2. Hit "Enter" and confirm that the search is performed correctly.
3. Click any of the alphabet links and confirm that clicking works as
   well.
4. View the details of any patron and click the "Add child" button.
5. In the "Guarantor information" section click the "Change" button.
6. In the search popup, use the tab key to move the focus to one of the
   alphabet links.
2. Hit "Enter" and confirm that the search is performed correctly.
3. Click any of the alphabet links and confirm that clicking works as
   well.

Signed-off-by: Briana <brianagreally@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15550: Fix authority search and detail at the OPAC
Jonathan Druart [Tue, 12 Jan 2016 10:21:16 +0000 (10:21 +0000)]
Bug 15550: Fix authority search and detail at the OPAC

The author of Bug 15381 (me!) has mismatch the objects he was
manipulating and forgotten to update a template.
for the opac-aythorities-home, the variable is named authority_types,
not authtypesloop.
In opac-authoritiesdetail.pl, the $record is a MARC::Record and there is
no authtypecode method. We need to retrieve the authtypecode using
the new Koha::Authorities module.

Test plan:
Search for authorities at the OPAC and click on the detail link to go to
the detail page.
Without this patch, you will get errors.
With this patch, the errors should have gone and everything should work
as before bug 15381.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. Pull down for choosing the auth_type displayed again

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15560: Fix display of multiple item types in pending reserves report
Jonathan Druart [Wed, 20 Jan 2016 09:40:25 +0000 (09:40 +0000)]
Bug 15560: Fix display of multiple item types in pending reserves report

Same fix as previous patch, but for item types.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15560: Fix display of multiple branches and locations in pending reserves report
Katrin Fischer [Wed, 20 Jan 2016 00:46:14 +0000 (01:46 +0100)]
Bug 15560: Fix display of multiple branches and locations in pending reserves report

The patches from bug 12152 broke the display on the pending reserves/
holds to pull report when items from multiple branches and with
multiple locations were displayed. The table cells were left empty.

To test:
- Add a record with at least 2 items from different locations and
  holdingbranches
- Open the 'holds to pull' report
- Verify all branches and locations show with their correct
  description

Signed-off-by: Natasha <tasham_8@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15578: Make sure all params will be taken into account when instantiating
Jonathan Druart [Thu, 14 Jan 2016 12:27:55 +0000 (12:27 +0000)]
Bug 15578: Make sure all params will be taken into account when instantiating

The tests in t/db_dependent/Koha_Authority.t expects at least 1
authority record in the DB to run them, otherwise they are skipped.
On our integration server, the DB does not contain any records, and the
tests are skipped.
Unfortunately these tests were testing the authid method of
Koha::MetadataRecord::Authority.

Test plan:
Apply the first patch, launch tests
=> Fail
Apply the second patch, launch tests
=> \o/

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Test pass successfuly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15578: Insert authority records before processing tests
Jonathan Druart [Thu, 14 Jan 2016 12:27:32 +0000 (12:27 +0000)]
Bug 15578: Insert authority records before processing tests

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15579: Fix permission for batch record modification
Marc Véron [Thu, 21 Jan 2016 15:25:33 +0000 (16:25 +0100)]
Bug 15579: Fix permission for batch record modification

To test:

- For a patron, permissions 'catalogue' and 'records_batchmod' only
- Log in as this patron
- Go to /cgi-bin/koha/tools/batch_record_modification.pl

Without patch: You have no permisson to acces the page.
With patch: Page 'Batch record modification' displays as expected.

(Amended to fix wrong test plan)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15606: Fix spelling mistake in MARC21slim2OPACDetail.xsl
Gus [Tue, 19 Jan 2016 20:01:41 +0000 (20:01 +0000)]
Bug 15606: Fix spelling mistake in MARC21slim2OPACDetail.xsl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15607: batch patron mod - do not update dates if not given
Jonathan Druart [Wed, 20 Jan 2016 08:45:48 +0000 (08:45 +0000)]
Bug 15607: batch patron mod - do not update dates if not given

Bug 15332 fixed a bug but introduced a bigger one. Even if dateenrolled and
dateexpiry are not modified, they will be updated to today.
Indeed, dt_from_string returns today without parameters.

Test plan:
- Set dateenrolled and expirydate for a patron
- Using the batch patron mod tool, update any field but dateenrolled and
expirydate.
=> Without this patch, the 2 date fields should be set to today
=> With this patch applied, the 2 date fields should not have been
modified.

Signed-off-by: Karam Qubsi <karamqubsi@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 14406: When adding messages in patron account, only first name is shown in pull...
Briana [Tue, 19 Jan 2016 00:57:34 +0000 (00:57 +0000)]
Bug 14406: When adding messages in patron account, only first name is shown in pull down

To test:

Log in to staff patron account
Go to Checkout tab
Click 'Add a new message'
Drop down box should show 'Staff - Internal Note' and 'OPAC - [Full name
of patron]'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Made a tiny change during signoff: uncapitalized "note"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 14613: Send cart window is too small in staff and hides 'send' button
Chloe [Mon, 18 Jan 2016 22:31:19 +0000 (22:31 +0000)]
Bug 14613: Send cart window is too small in staff and hides 'send' button

To Test: Add an item to cart click "cart" click "send"
confirm that the send window is larger and the send button is
visible

NOTE: Remember to clear cache to refresh javascripts.
      This is much more visible if you zoom in 10% or more.
      This is larger, but more of a stop gap if you've got a large zoom.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 14538: editing perl doc for CalcFine
Natasha [Mon, 18 Jan 2016 22:59:03 +0000 (22:59 +0000)]
Bug 14538: editing perl doc for CalcFine

To Test:
Read perldoc C4/Overdues.pm
Confirm that it says CalcFine returns four values and that rest of the documentation is correct

NOTE: only a little visual ugliness, but definitely an improvement.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15354: (QA followup) remove tab character
Jesse Weaver [Tue, 5 Jan 2016 20:37:39 +0000 (13:37 -0700)]
Bug 15354: (QA followup) remove tab character

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15354: Sort itemtypes by translated description everywhere on circ rules admin...
Jonathan Druart [Mon, 4 Jan 2016 10:02:06 +0000 (10:02 +0000)]
Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page

It's better to cmp on lc.

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Passes QA tools. Fixes sorting of dropdown for translated itemtype
descriptions.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15354: Fix translated itemtype descriptions in circ rules
Jonathan Druart [Mon, 14 Dec 2015 10:14:16 +0000 (10:14 +0000)]
Bug 15354: Fix translated itemtype descriptions in circ rules

In bug 14100, the admin/smart-rules.pl needed much more love.
Indeed, the translated_description string should be used everywhere and
replaced the previous 'humanitemtype'.

Test plan:
1/ Translate some item types.
2/ Define some holds policy using these item types.
3/ Update the template strings
4/ Confirm that the "holds policy by item type" are displayed (for the
default and specific library) and sorted by translated item type descriptions.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Passes QA tools.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15568: Fix display default circ rules
Jonathan Druart [Wed, 13 Jan 2016 16:13:36 +0000 (16:13 +0000)]
Bug 15568: Fix display default circ rules

To reproduce:
Go on the admin circ rules page (admin/smart-rules.pl), switch the
dropdown list from specific to "all libraries".
The rules are not displayed anymore.

Test plan:
Apply this patch and confirm that the rules are now displayed correctly.
Make sure the enh introduced by bug 11625 is not broken.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15570: (follow-up) Bug 11944 Remove all utf8 filter from templates
Jonathan Druart [Wed, 13 Jan 2016 17:51:01 +0000 (17:51 +0000)]
Bug 15570: (follow-up) Bug 11944 Remove all utf8 filter from templates

Test plan:
use circ/renew.pl to renew an issue.
Without this patch, you will get an error.

Note: The error exists for 1 year now and nobody complained?? Does
someone still use this script?

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15572: Add tests for TransformHtmlToMarc
Jonathan Druart [Tue, 12 Jan 2016 15:23:33 +0000 (15:23 +0000)]
Bug 15572: Add tests for TransformHtmlToMarc

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15572: Follow-up to fix error on authority creation
Frédéric Demians [Tue, 12 Jan 2016 10:53:11 +0000 (11:53 +0100)]
Bug 15572: Follow-up to fix error on authority creation

Bug 6657 modified the way C4::Biblio::TransformHtmlToMarc operates in order to
solve an issue occuring during biblio record cataloguing. But this function is
also used by authorities cataloguing, and the code in this case is irrelevante.
This followup allows to distinguish for which kind of record
TransformHtmlToMarc is called: biblio/authority.

A bug appears in authority creation without this patch in some circunstances:
when authid is linked to 001 field.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Tested with a new authority record

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15572: TransformHtmlToMarc - rewrite the loop
Julian Maurice [Tue, 12 Jan 2016 15:49:15 +0000 (16:49 +0100)]
Bug 15572: TransformHtmlToMarc - rewrite the loop

This rewrites the while loop into a for loop, so $i still gets
incremented when we call next

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Make sense. Add readability. Infinite loop no more possible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 15586 - References to Koha::Branches remain in unit tests
Kyle M Hall [Sat, 16 Jan 2016 01:28:45 +0000 (01:28 +0000)]
Bug 15586 - References to Koha::Branches remain in unit tests

The unit tests BiblioObject.t and Hold.t still have references to
Koha::Branches that need to be changed to Koha::Libraries. These tests
currently fail because of this.

Test Plan:
1) prove t/db_dependent/BiblioObject.t should fail
2) prove t/db_dependent/Hold.t should fail
3) Apply this patch
1) prove t/db_dependent/BiblioObject.t should pass
2) prove t/db_dependent/Hold.t should pass

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15295: (follow-up) Koha::Libraries - Remove GetBranchesCount
Jonathan Druart [Fri, 15 Jan 2016 09:35:26 +0000 (09:35 +0000)]
Bug 15295: (follow-up) Koha::Libraries - Remove GetBranchesCount

Fix conflict with bug 11625

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15394 - Tidy up error messages in OPAC lists
Liz Rea [Thu, 17 Dec 2015 22:01:47 +0000 (11:01 +1300)]
Bug 15394 - Tidy up error messages in OPAC lists

To test:

Create a list in the OPAC, observe the message
Create another list in the OPAC with the same name, observe the message
Delete a list, observe the message

Check the patch itself, look for typos.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15469: Same fix for the "entire record" tab
Jonathan Druart [Thu, 7 Jan 2016 08:29:40 +0000 (08:29 +0000)]
Bug 15469: Same fix for the "entire record" tab

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15469: Fix authority header search
Jonathan Druart [Tue, 5 Jan 2016 10:49:31 +0000 (10:49 +0000)]
Bug 15469: Fix authority header search

Introduced by bug 15381.

The logs contain plenty of "detail.pl: No method value!" and the
dropwdown list is not correctly populated (no value for options)

Test plan:
Go to the authority module and have a look at the auth type codes
dropdown list.
Without this patch, the values of the options are empty.
With this patch, the values are correctly filled.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  I confirm this patch silence noise in log file.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295! Koha::Libraries - Remove ModBranchCategoryInfo
Jonathan Druart [Thu, 3 Dec 2015 15:02:35 +0000 (15:02 +0000)]
Bug 15295! Koha::Libraries - Remove ModBranchCategoryInfo

This has been replaced with Koha::Library->update_categories and
Koha::Library->add_to_categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove GetBranchesCount
Jonathan Druart [Thu, 3 Dec 2015 14:47:50 +0000 (14:47 +0000)]
Bug 15295: Koha::Libraries - Remove GetBranchesCount

This is replaced with Koha::Libraries->search->count.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove GetCategoryTypes
Jonathan Druart [Thu, 3 Dec 2015 14:42:11 +0000 (14:42 +0000)]
Bug 15295: Koha::Libraries - Remove GetCategoryTypes

'searchdomain' and 'properties' were hardcoded in this subroutine.
Now there are in the admin script. Not a big deal, we could improve that
later if someone wants to add a third values.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove GetBranchCategories
Jonathan Druart [Thu, 3 Dec 2015 14:35:05 +0000 (14:35 +0000)]
Bug 15295: Koha::Libraries - Remove GetBranchCategories

Test plan
1/ enable OpacAddMastheadLibraryPulldown
2/ Defined a group of libraries as searchdomain
and tick 'show in pull down'
3/ At the OPAC, go on the advanced search form, limit by the group of
libraries you have just created.
4/ The group should be selected by default in the dropdown list

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove GetBranchCategory
Jonathan Druart [Thu, 3 Dec 2015 14:12:22 +0000 (14:12 +0000)]
Bug 15295: Koha::Libraries - Remove GetBranchCategory

This has been replaced with Koha::Libraries->find

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove CheckBranchCategorycode
Jonathan Druart [Thu, 3 Dec 2015 14:09:36 +0000 (14:09 +0000)]
Bug 15295: Koha::Libraries - Remove CheckBranchCategorycode

This verification is now done in admin/branches.pl, no need for a
special subroutine/method, it's 1 line only called once.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove CheckCategoryUnique
Jonathan Druart [Thu, 3 Dec 2015 14:06:13 +0000 (14:06 +0000)]
Bug 15295: Koha::Libraries - Remove CheckCategoryUnique

This subroutine is not used anymore and was not really useful.
The branchcategories table has a primary key defined on categorycode.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
http://bugs.koha-community.org/show_bug.cgi?id=15294

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15295: Koha::Libraries - Remove DelBranch and DelBranchCategory
Jonathan Druart [Thu, 3 Dec 2015 14:04:06 +0000 (14:04 +0000)]
Bug 15295: Koha::Libraries - Remove DelBranch and DelBranchCategory

These 2 subroutines are not used anymore, there were only used from the
admin script rewrote on bug 15294.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15294: Koha::Libraries - Rewrite the admin scripts
Jonathan Druart [Thu, 3 Dec 2015 15:19:13 +0000 (15:19 +0000)]
Bug 15294: Koha::Libraries - Rewrite the admin scripts

This patch rewrites the admin/branches.pl script to use the new modules
instead of C4::Branches.

Test plan:
1/ Create libraries using all the fields available
2/ Create groups of libraries
3/ Assign 1+ libraries to some groups
4/ Delete libraries and groups of libraries
You should not able to delete a library if items or patrons use it.
You should not able to delete a group of libraries if there are still
libraries using it.
5/ Update libraries and groups of libraries

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15294: Koha::Libraries - Move existing Koha::Branch[es]
Jonathan Druart [Wed, 2 Dec 2015 16:53:33 +0000 (16:53 +0000)]
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]

There was already 2 Koha::Branch[es] using Koha::Object[s] before.
For this new rewrite, it seems preferable to start with good basis and
name the new modules Koha::Library and Koha::Libraries.

Tested both patches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15337: Make itemtypes retrieved with GetItemTypes ordered by descriptions
Jonathan Druart [Tue, 5 Jan 2016 14:25:35 +0000 (14:25 +0000)]
Bug 15337: Make itemtypes retrieved with GetItemTypes ordered by descriptions

Prior to this patch, the itemtypes were displayed ordered by the code
(itemtypes.itemtype DB column).
This patch will make them displayed by the description displayed (the
translated description).

Test plan:
0/ Do not apply this patch set
1/ Confirm that the itemtypes are displayed ordered by code (when adding
an item, cataloguing/additem.pl)
2/ Confirm that t/db_dependent/Koha.t does not pass
3/ Apply the test patch
4/ Confirm that t/db_dependent/Koha.t pass
5/ Confirm that the itemtypes are not displayed by description (on
additem.pl)

See comment #3
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15337: Add tests to ensure that GetItemTypes will return element ordered by desc
Jonathan Druart [Tue, 5 Jan 2016 14:23:24 +0000 (14:23 +0000)]
Bug 15337: Add tests to ensure that GetItemTypes will return element ordered by desc

See comment #3
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15477: (follow-up) Bug 14100: Better errors handling
Jonathan Druart [Wed, 6 Jan 2016 11:17:00 +0000 (11:17 +0000)]
Bug 15477: (follow-up) Bug 14100: Better errors handling

On bug 14100, the patch "Better errors handling" introduced an ...
error.
The user always get "An error occurred when updating this translation"
although it has been updated in DB.

Test plan:
Edit translations for an item type: you should not get an error when
everything went fine.

Tested on top of 15487, error message does no longer appear.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15487: Fix encoding issue on localization
Jonathan Druart [Wed, 6 Jan 2016 16:59:22 +0000 (16:59 +0000)]
Bug 15487: Fix encoding issue on localization

It has been introduced
  commit ed0ff59152a41f6690b480d0b13b607250678418
    Bug 11559: Supporting changes for Rancor

Pushed at the same time as bug 14100.

Test plan:
Add/update translations for item types, confirm there is no encoding
issues.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15512 - Minor regression caused by Bug 7369 - warn on deleting item not triggered
Nick Clemens [Thu, 7 Jan 2016 00:27:38 +0000 (00:27 +0000)]
Bug 15512 - Minor regression caused by Bug 7369 - warn on deleting item not triggered

To test:
1 - Delete an item using the Action menu
2 - There is a js error and no warning box
3 - Apply patch
4 - Delete an item using the action menu
5 - You should get a confirmation box as expected

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15473: Make Koha::Objects->find accepts 0 and '' as a key
Jonathan Druart [Tue, 5 Jan 2016 15:08:23 +0000 (15:08 +0000)]
Bug 15473: Make Koha::Objects->find accepts 0 and '' as a key

This bug has been found after bug 15381 was pushed:
If you go on authorities/authorities.pl, you expect a form to create a
 authorities with a "Default" authority type.
Now, it explodes:
    Can't call method "authtypetext" on an undefined value at
    /home/koha/src/authorities/authorities.pl line 665.

Koha::Objects->find does not want to search if the key does not exist
(undef, '', 0). But actually it should only be a coward if it is not defined.

Moreover this is the default behavior of the DBIx::Class find method.

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green
and
  GET /cgi-bin/koha/authorities/authorities.pl
should not make everything explode.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Find this after signing 15470 :)
Test pass, new auth (Default) created, no errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15501 - Planned Irregularities are deleted when modifying subscription
Lyon3 Team [Thu, 7 Jan 2016 09:48:42 +0000 (10:48 +0100)]
Bug 15501 - Planned Irregularities are deleted when modifying subscription

Add a warning to avoid saving a subscription whitout testing prediction pattern
when there are planned no published issues

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Ran through test plan, looks all good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15367: Do not display repeatable patron attributes in the batch patron modification
Jonathan Druart [Mon, 21 Dec 2015 12:24:46 +0000 (12:24 +0000)]
Bug 15367: Do not display repeatable patron attributes in the batch patron modification

The repeatable patron attributes are not correctly managed and can cause
data lost. To avoid that, the easier way is not to display them in the
batch patron modification tool.
This should be implemented, as a new enhancement.

Test plan:
Create some patron attributes, some should be repeatable.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as repeatable won't be
display anymore.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years ago Bug 15412: Enable dropdowns date selector when suspending holds
Jonathan Druart [Tue, 5 Jan 2016 15:54:59 +0000 (15:54 +0000)]
 Bug 15412: Enable dropdowns date selector when suspending holds

It seems to be the way to fix that
https://stackoverflow.com/questions/13649459/twitter-bootstrap-multiple-modal-error

Test plan:
1 - Place a hold through the opac
2 - View your account->Holds
3 - Click suspend hold
4 - You should be able to select a date using the arrows and dropdowns

Followed test plan, 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: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15466: Do not assume $values_in is a hashref
Jonathan Druart [Tue, 5 Jan 2016 09:39:32 +0000 (09:39 +0000)]
 Bug 15466: Do not assume $values_in is a hashref

It could be undefined.
Test plan:
prove t/db_dependent/Suggestions.t
should return green.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15467: If authtypecode is not defined, do not explode
Jonathan Druart [Tue, 5 Jan 2016 10:23:16 +0000 (10:23 +0000)]
 Bug 15467: If authtypecode is not defined, do not explode

The test t/db_dependent/AuthoritiesMarc.t fails because one test expect
the BuildSummary subroutine to not crash if the authtypecode passed in
parameter does not exist in the DB.

Test plan:
prove t/db_dependent/AuthoritiesMarc.t
should return green.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Test fails before patch, and doesn't anymore after.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15511: Fix tabbed display on OPAC patron account summary page
Katrin Fischer [Wed, 6 Jan 2016 22:05:35 +0000 (23:05 +0100)]
 Bug 15511: Fix tabbed display on OPAC patron account summary page

Some variables were not correctly renamed in a previous patch,
resulting in the fines tab of the OPAC patron summary page
not showing correctly.

To test:
- Go to the OPAC patron account
- Check the display of the Checkouts, Fines and Holds tabs on
  the summary page
- Verify that with the patch, the display is corrected

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15453: Assign the correct shelfid to the download list links
Jonathan Druart [Thu, 31 Dec 2015 11:11:51 +0000 (11:11 +0000)]
 Bug 15453: Assign the correct shelfid to the download list links

Introduced by bug 14544, the shelfnumber is not correctly passed to the
template.
The shelf variable is passed to the template, to access the shelfnumber,
we need to get shelf.shelfnumber.

Test plan:
At the intranet, try to download a list.
Without this patch it won't work.

Followed test plan, 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: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15478 - Update the remaining schema files that do not match the db schema
Kyle M Hall [Wed, 6 Jan 2016 12:06:34 +0000 (12:06 +0000)]
 Bug 15478 - Update the remaining schema files that do not match the db schema

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15478 - Checksum mismatch when regenerating schema
Kyle M Hall [Wed, 6 Jan 2016 12:04:56 +0000 (12:04 +0000)]
 Bug 15478 - Checksum mismatch when regenerating schema

When regenerating the db schema on master, the script will error out
with a checksum mismatch on Borrower.pm, and also DeletedBorrower.pm

Test Plan:
1) Check out master
2) Run ./misc/devel/update_dbix_class_files.pl
3) Note the error
4) Apply this patch
5) Re-reun ./misc/devel/update_dbix_class_files.pl
6) Note there is no error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15493: Use the correct CSV profile when exporting records from the export tool
Jonathan Druart [Wed, 6 Jan 2016 16:17:10 +0000 (16:17 +0000)]
 Bug 15493: Use the correct CSV profile when exporting records from the export tool

The CSV profile used is not the one the user has chosen, but the one
defined in the pref ExportWithCsvProfile.

It's caused by a wrong variable name csv_profile vs csv_profile_id

Test plan:
Define 1+ csv profiles
Set ExportWithCsvProfile with 1 of these profile
Use the export tool to export some records using a csv profile.
Without this patch, the csv profile used, will always be the one defined
in ExportWithCsvProfile.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as descrived

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15462 - Unable to renew books via circ/renew.pl
Marc Véron [Tue, 5 Jan 2016 08:14:30 +0000 (09:14 +0100)]
 Bug 15462 - Unable to renew books via circ/renew.pl

To verify: Got to circ/circulation.pl and try to renew an item.
Result: Can't call method "single" without a package or
        object reference at /usr/share/kohaclone/circ/renew.pl
        line 57

To test:
- Apply patch
- Try to renew items that are or are not checked out. Error
  no longer occurs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years agoBug 7143: Adding releases and fixing some missing tabs
Chris Cormack [Sun, 3 Jan 2016 20:34:09 +0000 (09:34 +1300)]
Bug 7143: Adding releases and fixing some missing tabs

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoRevert "Bug 15478 - Checksum mismatch when regenerating schema"
Kyle M Hall [Wed, 6 Jan 2016 14:56:18 +0000 (14:56 +0000)]
Revert "Bug 15478 - Checksum mismatch when regenerating schema"

This reverts commit f56a37a6ab444a9544f3864c561c6759639efccd.

8 years agoRevert "Bug 15478 - Update the remaining schema files that do not match the db schema"
Kyle M Hall [Wed, 6 Jan 2016 14:56:06 +0000 (14:56 +0000)]
Revert "Bug 15478 - Update the remaining schema files that do not match the db schema"

This reverts commit 4f6b4a3a57044af2f847a4e7a40d9f7987d3f337.

8 years agoBug 12375 - Add new serial fields to kohastructure
Kyle M Hall [Wed, 6 Jan 2016 12:17:22 +0000 (12:17 +0000)]
Bug 12375 - Add new serial fields to kohastructure

8 years agoBug 15478 - Update the remaining schema files that do not match the db schema
Kyle M Hall [Wed, 6 Jan 2016 12:06:34 +0000 (12:06 +0000)]
Bug 15478 - Update the remaining schema files that do not match the db schema

8 years agoBug 15478 - Checksum mismatch when regenerating schema
Kyle M Hall [Wed, 6 Jan 2016 12:04:56 +0000 (12:04 +0000)]
Bug 15478 - Checksum mismatch when regenerating schema

When regenerating the db schema on master, the script will error out
with a checksum mismatch on Borrower.pm, and also DeletedBorrower.pm

Test Plan:
1) Check out master
2) Run ./misc/devel/update_dbix_class_files.pl
3) Note the error
4) Apply this patch
5) Re-reun ./misc/devel/update_dbix_class_files.pl
6) Note there is no error

8 years agoBug 15344: Remove one occurrence in circ/circulation.pl
Jonathan Druart [Thu, 31 Dec 2015 11:43:54 +0000 (11:43 +0000)]
Bug 15344: Remove one occurrence in circ/circulation.pl

In C4::Circulation::CanBookBeIssued, $borrower->{flags} is called and
should be populated by GetMemberDetails

It fixes the following error on checking out:
Can't use string ("1900156") as a HASH ref while "strict refs" in use at
/home/koha/src/C4/Circulation.pm line 813.

Note: Error occurs with patrons with staff permissions, not with 'normal' patrons.
Error is fixed with this patch.
Signed-off-by: Marc Véron <veron@veron.ch>
8 years agoBug 15443 - DBrev 3.23.00.015
Kyle M Hall [Mon, 4 Jan 2016 12:53:08 +0000 (12:53 +0000)]
Bug 15443 - DBrev 3.23.00.015