]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 15685: (QA follow-up) Fix qa script errors
Kyle M Hall [Thu, 10 Nov 2016 14:07:18 +0000 (14:07 +0000)]
Bug 15685: (QA follow-up) Fix qa script errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 15685: Implement needed changes in Koha::Edifact::Order
Kyle M Hall [Thu, 10 Nov 2016 14:01:37 +0000 (14:01 +0000)]
Bug 15685: Implement needed changes in Koha::Edifact::Order

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 15685: Allow creation of items (AcqCreateItem) to be customizable per-basket
Jesse Weaver [Thu, 28 Jan 2016 22:01:24 +0000 (15:01 -0700)]
Bug 15685: Allow creation of items (AcqCreateItem) to be customizable per-basket

This adds a new basket attribute (create_items) that can optionally be
set to override AcqCreateItem.

The following have been modified to reflect this (with the value of
create_items that causes them to behave differently in parentheses):
  * Cancelling receipt of an order (receiving)
  * Creating an order by hand or from MARC (ordering)
  * Receiving an order (receiving)
  * Showing orders with uncertain price (ordering)
  * Showing orders (receiving)
  * Showing acquisition details in the OPAC (ordering)

Test plan:
  1) Create baskets with "Create items when:" set to ordering,
     receiving, cataloging and unset.
  2) Test each of the above for each of these baskets, verifying that
     the basket-specific attribute overrides AcqCreateItem if set and
     falls back to the syspref otherwise.

NOTE: A check of AcqCreateItem in opac-detail.tt was removed because it
was redundant; the code path in question cannot be triggered unless
create_items/AcqCreateItems is set to the correct value anyway.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18399: (follow-up) Escape reason input
Alex Arnaud [Wed, 11 Oct 2017 10:16:36 +0000 (10:16 +0000)]
Bug 18399: (follow-up) Escape reason input

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18399: Add reasons in edit suggestion page
Alex Arnaud [Wed, 4 Oct 2017 15:04:15 +0000 (15:04 +0000)]
Bug 18399: Add reasons in edit suggestion page

Test plan:

 - Fill the authorised values's category 'SUGGEST' with reason
 - Edit a pending suggestion. Set the status to rejected
   and select a reason
 - Check the reason has been saved (i.e in the suggestions
   table of rejected tab)
 - Check in the corresponding message_queue that the reason
   is here
 - Re-edit the same suggestion
 - Check that the correct reason is selected by defaut
 - Edit an other pending suggetion. Set the status to rejected,
   select other reason and fill the input text
 - Re-edit the previews suggestion and make sure the input
   "other" is displayed by default with the correct value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19085: Remove empty files patron_attributes.* in installer
Jonathan Druart [Tue, 10 Oct 2017 12:49:46 +0000 (09:49 -0300)]
Bug 19085: Remove empty files patron_attributes.* in installer

These files has been added and emptied in the same patch set (bug 5670).
It does not make sense to keep them.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19414: Move the location of the 'Import this batch into the catalog' button
Your Full Name [Thu, 5 Oct 2017 05:54:55 +0000 (05:54 +0000)]
Bug 19414: Move the location of the 'Import this batch into the catalog' button

Moves the location of the button in question to be below the framework selector

Test plan:
1. Go to Tools -> Stage MARC records for import
2. Upload a .mrc file and stage it for import
3. Click Manage staged records
4. Note that the import button appears above the framework selector
5. Apply patch
6. Refresh the window
7. Notice that the button has now moved to below the framework selector

Sponsored-By: CALYX information essentials
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 16401: DBRev 17.06.00.013
Jonathan Druart [Wed, 11 Oct 2017 15:56:24 +0000 (12:56 -0300)]
Bug 16401: DBRev 17.06.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 16401: Add a warning if letter.content matches staffClientBaseURL
Jonathan Druart [Wed, 11 Oct 2017 15:50:26 +0000 (12:50 -0300)]
Bug 16401: Add a warning if letter.content matches staffClientBaseURL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference
Katrin Fischer [Wed, 20 Sep 2017 21:28:49 +0000 (23:28 +0200)]
Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference

Adds a condition to check that the staffClientBaseUrl is not empty
before updating it with 'http://'.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 16401: System preference staffClientBaseURL hardcoded to 'http://'
Josef Moravec [Tue, 15 Aug 2017 15:23:00 +0000 (17:23 +0200)]
Bug 16401: System preference staffClientBaseURL hardcoded to 'http://'

Test plan:
1) Insert some value to staffBaseURL preference, without starting http://
2) Apply the patch
3) Update database
4) Go to system preferences adminsitration, find the staffBaseURL
preference, the inserted value should be prepended with 'http://' and
the comment should be "This should be a complete URL, starting with
http:// or https://. Do not include a trailing slash in the URL. (This
must be filled in correctly for CAS, svc, and load_testing to work.)"
5) prove t/db_dependent/Auth_with_cas.t
6) prove t/db_dependent/selenium/basic_workflow.t
7) prove t/db_dependent/check_sysprefs.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19328: Internal server error because of missing currency
Marc Véron [Sun, 17 Sep 2017 09:53:34 +0000 (11:53 +0200)]
Bug 19328: Internal server error because of missing currency

This patch fixes internal server errors because of missing active currency
in files aqbudgetperiods.pl, aqbudgets.pl and aqplan.pl.

To reproduce:
- Make sure that no active currency is defined. You can undefine the active
  currency in Administration->Currencies and exchange rates
- Try to go to Administration->Budgets and Admistration->Funds
Result: Internal server error

To test:
- Apply patch
- Restart plack
- Try to reproduce issue, it should no longer occur. There should be a
  yellow message box "No active currency is defined"
- From Administration-> Budgets administration try to edit a fund and go to
  "Planning". Verify that the message box appears here as well.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18709: Make koha-foreach use koha-shell internally
Tomas Cohen Arazi [Tue, 27 Jun 2017 14:55:45 +0000 (11:55 -0300)]
Bug 18709: Make koha-foreach use koha-shell internally

This patch simplifies the koha-foreach script, making it use koha-shell
to gain instance privileges and have all environment variables set.

To test:
- Apply the patch
- Have one or more instances created (kohadev already exists in kohadevbox, add
  another onewith $ sudo koha-create --create-db test)
- Run:
  $ sudo kohaclone/debian/scripts/koha-foreach echo "This is instance __instancename__"
=> SUCCESS: The script runs gracefuly, and outputs something like:
This is instance kohadev
This is instance test
  Note: this means the command was executed for each instance and the current behaviour
        of replacing the placeholder __instancename__ for the actual instance name still
        works as expected.
- You can try the different filter switches, but the logic has not been touched. only the
  command call.
- Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19259: Enforce type of the delay value when editing overdue rules - template...
Jonathan Druart [Wed, 27 Sep 2017 16:07:59 +0000 (13:07 -0300)]
Bug 19259: Enforce type of the delay value when editing overdue rules - template side only

Overdue rules do not save when a delay that is not an integer > 0,
without any warnings.
This patch forces the user to select a number > 0.

Test plan:
Without this patch applied, enter non-integer value or negative or 0
=> The rule will not be inserted without any warnings.
With this patch applied you will get an message from the browser and the
form will not save

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13766: DBIC Schema changes
Jonathan Druart [Tue, 10 Oct 2017 17:23:39 +0000 (14:23 -0300)]
Bug 13766: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19418: (bug 12833 follow-up) Add missing use statement
Alex Arnaud [Fri, 6 Oct 2017 07:19:15 +0000 (07:19 +0000)]
Bug 19418: (bug 12833 follow-up) Add missing use statement

Patron search fail on calling svc/members/search. This script
return a 500 error and the search stay on "Processing..."

Test plan:
  - Enable ExtendedPatronAttributes system preference,
  - make a standard search (search fields),
  - check the search works and it doesn't stick on "Processing..."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I do not recreate the issue, but the change make sense and the issue has
been raised by several people

7 years agoBug 14039: Fix patron search
Jonathan Druart [Tue, 10 Oct 2017 13:14:41 +0000 (10:14 -0300)]
Bug 14039: Fix patron search

The JSON was malformed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19440: Existing calls need to be done in scalar context
Jonathan Druart [Mon, 9 Oct 2017 18:57:46 +0000 (15:57 -0300)]
Bug 19440: Existing calls need to be done in scalar context

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19440: Identify overlimit problems in XISBN tests
Tomas Cohen Arazi [Mon, 9 Oct 2017 18:36:41 +0000 (15:36 -0300)]
Bug 19440: Identify overlimit problems in XISBN tests

This patch makes C4::XISBN::get_xisbns() return an errors hashref
including information of the failing fetches from xisbn services.

It tackles the situation of XISBN, which in some cases returns 'overlimit'
errors.

The patch makes the relevant functions check if the response->{stat} string
is 'ok' and returns the string in $errors otherwise.

This only happens when in list context. This allows to fix the randomly failing
tests while keeping the current behaviour.

All this code should be rewritten. It does the job bug doesn't have problems handling
or reoprting. This is just a band aid.

To test:
- Make sure
 k$ prove t/db_dependent/XISBN.t
=> SUCCESS :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18528: Patron card creator template: switch form fields for card height and card...
Marc Véron [Wed, 3 May 2017 14:23:22 +0000 (16:23 +0200)]
Bug 18528: Patron card creator template: switch form fields for card height and card width

This patch changes the sequnce of form fields for card height and card width.

To test:
- Apply patch
- Edit or create a patron card template
- Verify that the fields display in sequence Page height - Page width -Card height - Card width

Followed test plan, worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19196: Rename page and per_page
Tomas Cohen Arazi [Mon, 25 Sep 2017 18:01:51 +0000 (15:01 -0300)]
Bug 19196: Rename page and per_page

This patch just renames 'page' and 'per_page' params, for
'_page' and '_per_page' respectively.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19196: Make plugin available to endpoints
Tomas Cohen Arazi [Tue, 29 Aug 2017 20:02:13 +0000 (17:02 -0300)]
Bug 19196: Make plugin available to endpoints

This patch just initializes the plugin on the main controller class so
it is available for all endpoints to use.

As it is not used, in order to test just restart plack and make sure the
endpoints work (run the t/db_dependent/api/v1 tests).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19196: Add Koha::REST::Plugin::Pagination
Tomas Cohen Arazi [Tue, 29 Aug 2017 19:52:48 +0000 (16:52 -0300)]
Bug 19196: Add Koha::REST::Plugin::Pagination

This patch introduces a Mojolicious plugin to be used on the REST api.
It adds a helper method:

add_pagination_headers
======================

When used, it adds a _Link_ header to the reponse with the calculated
values for pagination, and X-Total-Count containing the total results
like this:

    my $params  = $c->validation->output;
    my $patrons = Koha::Patrons->search;
    my $count   = $patrons->count;

    $c->add_pagination_headers({
            total  => $count,
            params => $params )};

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/Koha/REST/Plugin/Pagination.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: ByWater solutions
Sponsored-by: Camden County
Edit: I fixed a mistake on the POD (tcohen)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19196: Unit tests
Tomas Cohen Arazi [Tue, 29 Aug 2017 20:00:50 +0000 (17:00 -0300)]
Bug 19196: Unit tests

This patch adds unit tests for the new pagination Mojo plugin.

Sponsored-by: ByWater Solutions
Sponsored-by: Camden County
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19397: Release team for 17.11
Marcel de Rooy [Mon, 2 Oct 2017 12:33:02 +0000 (14:33 +0200)]
Bug 19397: Release team for 17.11

This patch adds the release team for 17.11 to about template.

Test plan:
Check the changes with the wiki pages for 17.05 and 17.11.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19255: QA Followup - Fix tabs for spaces
Nick Clemens [Sat, 7 Oct 2017 00:07:31 +0000 (00:07 +0000)]
Bug 19255: QA Followup - Fix tabs for spaces

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19255: [Follow-up] Typo "will accessible"
Marcel de Rooy [Wed, 6 Sep 2017 11:01:17 +0000 (13:01 +0200)]
Bug 19255: [Follow-up] Typo "will accessible"

This patch speaks for itself.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19255: Correct explanation about list types on shelves.pl in staff
Marcel de Rooy [Tue, 5 Sep 2017 13:10:53 +0000 (15:10 +0200)]
Bug 19255: Correct explanation about list types on shelves.pl in staff

The explanation on list categories on the shelves form is removed.
The online help text is actualized.

Test plan:
Go to Lists in staff. Edit a list. The remarks about private and public
lists on the right side are gone.
Click Help. Read the adjusted text. Does it make sense?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18785: Force scalar context in Koha::Subscription::biblio
Julian Maurice [Wed, 9 Aug 2017 09:30:00 +0000 (11:30 +0200)]
Bug 18785: Force scalar context in Koha::Subscription::biblio

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18785: Add the Koha::Subscription->biblio method
Julian Maurice [Mon, 12 Jun 2017 11:01:14 +0000 (13:01 +0200)]
Bug 18785: Add the Koha::Subscription->biblio method

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 14039: Add the title to all places
Jonathan Druart [Wed, 9 Aug 2017 19:45:31 +0000 (16:45 -0300)]
Bug 14039: Add the title to all places

There are other scripts where the borrower variable is not defined and
the fields are passed one by one.
To have a consistent behaviour we should add the title at the different
places.

Note that this script also add the use of the include file for
statistics.tt and remove the pass of parameters to the template, already
done later:
 99 $template->param(%$borrower);

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 14039: Add patron salutation to checkout screen
David Roberts [Tue, 6 Jun 2017 23:01:17 +0000 (00:01 +0100)]
Bug 14039: Add patron salutation to checkout screen

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18916: Add pagination to top of search results in staff client
Aleisha Amohia [Mon, 10 Jul 2017 00:14:10 +0000 (00:14 +0000)]
Bug 18916: Add pagination to top of search results in staff client

To look the same as OPAC.

To test:
1) Do a catalogue search in staff client that results in more than one
page
2) Notice pagination is only at the bottom
3) Apply patch and refresh page
4) Notice pagination is at top also

Sponsored-by: Catalyst IT
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13205: [FOLLOW-UP] Fixing math and variable names
Aleisha Amohia [Mon, 10 Jul 2017 00:07:38 +0000 (00:07 +0000)]
Bug 13205: [FOLLOW-UP] Fixing math and variable names

Have changed
  my $last_page = $pages * ( $results_per_page - 1 );
to
  my $last_page = ( $pages - 1) * $results_per_page;
which seems to fix the 'last' button offset! (Comment 10)

Will add the box to jump to a page in a separate patch.
Adding the pagination to the top on the staff client will be dealt with
in Bug 18916 as it is slightly out of the scope of this bug.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13205: [FOLLOW-UP] Some extra logic
Aleisha Amohia [Tue, 27 Jun 2017 04:36:56 +0000 (04:36 +0000)]
Bug 13205: [FOLLOW-UP] Some extra logic

See Comment 8.

Test:
When on first page of results, confirm that the 'First' and 'Previous'
buttons do not show. Confirm they come back on the second page and every
page after.
When on last page of results, confirm that the 'Last' and 'Next' buttons
do not show. Confirm they come back on all previous pages.
Check on both staff side and OPAC.

Sponsored-by: Catalyst IT
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13205: Last/first page options for result list paging for OPAC
Aleisha Amohia [Thu, 16 Feb 2017 02:28:13 +0000 (02:28 +0000)]
Bug 13205: Last/first page options for result list paging for OPAC

Same fix but on OPAC side. Same test plan

Sponsored-by: Catalyst IT
Signed-off-by: Dilan Johnpulle <dilan@calyx.net.au>
Signed-off-by: Your Full Name <your_email>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13205: Last/first page options for result list paging
Aleisha Amohia [Wed, 15 Feb 2017 02:42:10 +0000 (02:42 +0000)]
Bug 13205: Last/first page options for result list paging

This patch adds first and last page buttons to the pagination at the
bottom of a page of catalog search results.

To test:
1) Apply patch
2) Do a number of searches
3) For each search, ensure that the first and last page buttons work as
expected

Sponsored-by: Catalyst IT
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19190: [Follow-up] Do not rely on the return of ModItem
Marcel de Rooy [Mon, 28 Aug 2017 10:13:26 +0000 (12:13 +0200)]
Bug 19190: [Follow-up] Do not rely on the return of ModItem

touch_all_items looks at the return of ModItem to determine if the
operation was successful. But ModItem does not return a meaningful
value. This patch puts the ModItem call in an eval and looks at $@.

Test plan:
Run touch_all_items with a where condition and verbose option.
Put print 1/0; at the end of ModItem.
Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19190: Silly calculation of average time in touch_all scripts
Marcel de Rooy [Mon, 28 Aug 2017 09:59:19 +0000 (11:59 +0200)]
Bug 19190: Silly calculation of average time in touch_all scripts

When you want to calculate average time, do not divide count by time :)

Test plan:
Run the script with a where condition and verbose option and see that
the average time is meaningful.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19043: DBRev 17.06.00.012
Jonathan Druart [Mon, 9 Oct 2017 17:29:41 +0000 (14:29 -0300)]
Bug 19043: DBRev 17.06.00.012

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19043: (QA follow-up) Add update DB entry and print warning
Marcel de Rooy [Mon, 9 Oct 2017 10:51:34 +0000 (12:51 +0200)]
Bug 19043: (QA follow-up) Add update DB entry and print warning

This follow-up takes care of the requested warning at upgrade time.
At the same time it removes the obsolete Columbia record when host and
port are equal to the formerly used values. Note that the new host for
on-campus use has been changed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19043: Z39.50 target clio-db.cc.columbia.edu:7090 is no longer publicly available
Josef Moravec [Tue, 8 Aug 2017 13:03:19 +0000 (15:03 +0200)]
Bug 19043: Z39.50 target clio-db.cc.columbia.edu:7090 is no longer publicly available

Test plan:
0) Apply the patch
1) Install all affected languages: de-DE, es-ES, fr-CA and pl-PL
2) Remove and recreate Koha database
3) Go through web installer in English and don't forgot to load sample Z39.50 servers
4) Go to Administration -> Z39.50/SRU Servers and confirm the sample
servers are here, but columbia.edu is not here
5) Repeat 2-4 for other languages: de-DE, es-ES, fr-CA and pl-PL

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18449: Rename misleading button when renewing
Jonathan Druart [Wed, 27 Sep 2017 19:04:04 +0000 (16:04 -0300)]
Bug 18449: Rename misleading button when renewing

If you hit the renewal limit on the renewal tab, the message gives you a
message like:

"Windows 8 / ( 50610018249545 ) has been renewed the maximum number of
times by Johnny Test ( 12345678 )"

And has a button that reads:

"Ignore and continue"

This button is misleading, as it may be interpreted as "ignore the limit
and continue to renew the item".

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19371: Changed table column text to 'Cancel?' on the patron circulation page
Alex Buckley [Wed, 27 Sep 2017 07:20:34 +0000 (07:20 +0000)]
Bug 19371: Changed table column text to 'Cancel?' on the patron circulation page

Test plan:
1. Place a hold on an item

2. Search for the patron who the hold is associated with

3. View the Hold(s) tab of the Checkouts page and notice there is a
column with the text 'Delete?' and a button below the table with the
text 'Cancel marked holds'

4. Apply patch

5. Notice that the column text described in step 3 now has the text
'Cancel?' and the button text is the same as it was in step 3

Sponsored-By: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13766: DBRev 17.06.00.011
Jonathan Druart [Mon, 9 Oct 2017 17:24:31 +0000 (14:24 -0300)]
Bug 13766: DBRev 17.06.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13766: Follow-up - use index_exists()
Katrin Fischer [Mon, 4 Sep 2017 20:36:38 +0000 (20:36 +0000)]
Bug 13766: Follow-up - use index_exists()

Changes check for existing index to use index_exists.
Also checks deletedbiblioitems for an existing ean index
and drops it if one is found.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13766: Change *bibioitems.ean to mediumtext and add indexes
Katrin Fischer [Thu, 17 Aug 2017 11:54:36 +0000 (13:54 +0200)]
Bug 13766: Change *bibioitems.ean to mediumtext and add indexes

- biblioitems.ean and deleteditems.ean are changed
  to mediumtext to match issn and isbn.
- An index is added for ean on both tables.

Patch cleans up inconsistencies caused by bug 5337 that
causes some older databases to have an existing index
on biblioitems.ean.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19367: $biblio variable redefined in same scope in ISBDdetail
David Cook [Tue, 26 Sep 2017 01:45:25 +0000 (11:45 +1000)]
Bug 19367: $biblio variable redefined in same scope in ISBDdetail

The following warning is generated by ISBDdetail.pl:
my" variable $biblio masks earlier declaration in same scope
at ./catalogue/ISBDdetail.pl line 171.

This patch removes this unnecessary declaration, which removes the
warning.

_TEST PLAN_

After applying patch:

1) Check code compilation with "KOHA_CONF=/path/to/koha-conf.xml perl -c catalogue/ISBDdetail.pl"
2) Note the only message is "./catalogue/ISBDdetail.pl syntax OK"
2) On /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1,
view the source of the page and verify that the Javascript
contains a holdcount e.g. "var holdcount = 0".

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19340: Read basket details of transfer partner
Colin Campbell [Tue, 19 Sep 2017 11:58:12 +0000 (12:58 +0100)]
Bug 19340: Read basket details of transfer partner

Details of the basket an order is tranferred to or from
are displayed in the basket display.
Unfortunately these details were not being read so
the display incorrectly showed the details
of the current owning basket.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: Display complete breadcrumbs on successful deletion
Jonathan Druart [Mon, 9 Oct 2017 17:12:24 +0000 (14:12 -0300)]
Bug 13208: Display complete breadcrumbs on successful deletion

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: [FOLLOW-UP] Tests for Koha::Acquisition::Baskets
Aleisha Amohia [Tue, 5 Sep 2017 03:31:54 +0000 (03:31 +0000)]
Bug 13208: [FOLLOW-UP] Tests for Koha::Acquisition::Baskets

To test:
prove -v t/db_dependent/Koha/Acquisition/Baskets.t

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: (QA follow-up) Remove blank breadcrumbs on successful deletion
Nick Clemens [Fri, 1 Sep 2017 13:18:21 +0000 (13:18 +0000)]
Bug 13208: (QA follow-up) Remove blank breadcrumbs on successful deletion

After order is deleted we don't have a vendor or basket so we get blank
breadcrumbs, this removes them

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: [FOLLOW-UP] Perl documentation for modules
Aleisha Amohia [Fri, 18 Aug 2017 03:23:55 +0000 (03:23 +0000)]
Bug 13208: [FOLLOW-UP] Perl documentation for modules

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: [FOLLOW-UP] Creating and implementing new Koha::Acquisition::Basket[s...
Aleisha Amohia [Thu, 27 Jul 2017 01:54:35 +0000 (01:54 +0000)]
Bug 13208: [FOLLOW-UP] Creating and implementing new Koha::Acquisition::Basket[s] modules

Test plan remains the same.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13208: Improving breadcrumbs for when cancelling an order
Aleisha Amohia [Wed, 28 Jun 2017 01:24:00 +0000 (01:24 +0000)]
Bug 13208: Improving breadcrumbs for when cancelling an order

To test:
1) Go to Acquisitions -> Find a vendor -> View a basket with orders in
it (or make a new basket and add an order)
2) Click Cancel order
3) Notice incomplete breadcrumbs, and 'Acquisition' typo
4) Apply patch and refresh page
5) Breadcrumbs should be fixed. Confirm links to vendor and basket work
as expected

Sponsored-by: Catalyst IT
Signed-off-by: severine.queune <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19437: (followup) Rearrange CancelExpiredReserves tests - fix typos
Josef Moravec [Mon, 9 Oct 2017 08:43:32 +0000 (08:43 +0000)]
Bug 19437: (followup) Rearrange CancelExpiredReserves tests - fix typos

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19437: Rearranging tests for CancelExpiredReserves
Marcel de Rooy [Fri, 6 Oct 2017 08:41:29 +0000 (10:41 +0200)]
Bug 19437: Rearranging tests for CancelExpiredReserves

This patch originates from a QA Follow-up on bug 19260.

The first 19260 patch adds CancelExpiredReserves tests to Reserves.t.
But note that we already have some tests in Holds/CancelReserves.t.

This patch does:
Renames Holds/CancelReserves.t to Reserves/CancelExpiredReserves.t.
Rearranges modules there.
Moves its existing tests into a first subtest.
Moves the new subtest from Reserves.t to CancelExpiredReserves.t.
Replaces $dbh->do('DELETE FROM reserves').
Adds some TestBuilder statements for missing data (by the move): adding
biblio, item, borrower (removing slow AddMember call).

Test plan:
Run Reserves.t and Reserves/CancelExpiredReserves.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
Marcel de Rooy [Thu, 5 Oct 2017 08:41:33 +0000 (10:41 +0200)]
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05

Commit b4392018bc1f9bf6a2f7dfe70b488856ad3a3897 [Bug 12478: make things using SimpleSearch use the new version] changed sub FindDuplicateAuthority and replaced this call (from 3.22.x) in 16.05 (pushed April 2016):
    my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );

The new call does unfortunately not include the authorityserver:
    my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1 );
Simple_search_compat redirects to C4/Search/SimpleSearch and SimpleSearch assumes a biblioserver if no server is passed.

This effectively makes FindDuplicateAuthority useless since we will no longer find duplicates and we could see an error like this in the log:
    16:51:42-04/10 zebrasrv(51) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @and @attr 1=authtype PERSO_NAME @attr 1=Heading Moerenhout

The fix is obviously trivial.

Test plan:
[1] Go to Authorities.
[2] Add a new authority PERSO_NAME with 100a Moerenhout.
[3] Repeat step 2. Verify that you get the duplicate authority warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19260: (followup) Fix CancelReserves.t test
Josef Moravec [Fri, 6 Oct 2017 16:41:28 +0000 (16:41 +0000)]
Bug 19260: (followup) Fix CancelReserves.t test

Test plan:
Run t/db_dependent/Holds/CancelReserves.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly
Jonathan Druart [Fri, 6 Oct 2017 15:30:18 +0000 (12:30 -0300)]
Bug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly

CanBookBeIssued returns STATS if categorycode is X

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19193: When displaying the fines of the guarantee on the guarantor account, price...
Nick Clemens [Mon, 28 Aug 2017 16:27:41 +0000 (16:27 +0000)]
Bug 19193: When displaying the fines of the guarantee on the guarantor account, price is not in correct format

1 - Have a patron with guarantees
2 - Charge some fines to the guarantees
3 - View the patron
4 - Fines are displayed unformatted
5 - Apply patch
6 - Refresh
7 - Fines should now be formatted correctly

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17664: Silence non-zebra warnings in t/db_dependent/Search.t
Mark Tompsett [Mon, 21 Nov 2016 17:08:52 +0000 (12:08 -0500)]
Bug 17664: Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- the spammy warnings (other than zebra index warnings) may
      already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19345: Add missing error flag to template
David Bourgault [Tue, 19 Sep 2017 17:37:54 +0000 (13:37 -0400)]
Bug 19345: Add missing error flag to template

Adds a missing error flag to the template->param { } call.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18550: [Follow-up] Add POD descriptions to subs
Marc Véron [Thu, 7 Sep 2017 12:48:48 +0000 (14:48 +0200)]
Bug 18550: [Follow-up] Add POD descriptions to subs

This patch simply adds POD descriptions to subs affected by first patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18550: Patron card creator: Print output does not respect layout units
Marc Véron [Fri, 5 May 2017 13:08:56 +0000 (15:08 +0200)]
Bug 18550: Patron card creator: Print output does not respect layout units

To reproduce:
Text, images and barcode positions are always layed out based on PostScript points, regardless of unit defined in card layout.

To reproduce:
- Test on top of Bug 18541 (introduces layout grid)
- Create a card layout with a text field, an image and a barcode. Use points
  as layout unit
- Activate layout grid
- Create PDF output, save
- Change layout unit to mm
- Create PDF output, save
- Compare PDFs. Verify that the positions are unchanged (still using points)

To test:
- Apply patch
- Create again PDF
- Verify that elements are positionad as expected (using unit, e.g. mm)
- Bonus test: Repeat with other units

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19315: [QA Follow-up] Trivial edits
Marcel de Rooy [Fri, 6 Oct 2017 06:21:23 +0000 (08:21 +0200)]
Bug 19315: [QA Follow-up] Trivial edits

Replace $subs->{bibnum} by $biblionumber on a following line.
The scalar in the boolean expression is not needed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19315: Use bibnum instead of biblionumber in routing-preview.pl and add item...
Nick Clemens [Thu, 14 Sep 2017 12:23:09 +0000 (12:23 +0000)]
Bug 19315: Use bibnum instead of biblionumber in routing-preview.pl and add item check

To test:
 1 - Create a serial subscription attached to a record
 2 - Receive some issues
 3 - Edit the subscription
 4 - Go to serails collection
 5 - Try to print a routing list
 6 - You may or may not get the right serial
 7 - Additionally create a subscription attached to a bib with no items
 8 - Try to print a routing list for this serial
 9 - You will get 'Internal server error'
10 - Apply patch
11 - Print routing list for first serial
12 - You will always get the correct bib
13 - Print routing list for second serial
14 - You should no longer get an error

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19398: Format date of birth in circ patron search
Jonathan Druart [Mon, 2 Oct 2017 17:22:27 +0000 (14:22 -0300)]
Bug 19398: Format date of birth in circ patron search

When searching for a patron from the circulation tab, the results table
shows the date of birth unformatted.

Test plan:
Apply this patch, search for patrons in the circ tab and confirm that
the date of birth are correctly formatted according to the dateformat
syspref

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19386: [QA Follow-up] Remove some default values
Marcel de Rooy [Fri, 6 Oct 2017 09:39:42 +0000 (11:39 +0200)]
Bug 19386: [QA Follow-up] Remove some default values

In the meantime bug 19403 added default nulls for gonenoaddress, lost
and debarred. So these lines can be removed safely.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly
Jonathan Druart [Thu, 28 Sep 2017 20:31:04 +0000 (17:31 -0300)]
Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly

Depending on the values used by TestBuilder, some tests from t/db_dependent/SIP/Patron.t can fail

    #   Failed test 'Not blocked without overdues when set to 'Don't block''
    #   at t/db_dependent/SIP/Patron.t line 55.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Not blocked without overdues when set to 'confirmation''
    #   at t/db_dependent/SIP/Patron.t line 61.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Not blocked without overdues when set to 'Block''
    #   at t/db_dependent/SIP/Patron.t line 67.
    #          got: '0'
    #     expected: '1'

Caused by this check in C4::SIP::ILS::Patron->new
110     for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
111         ($flags->{$_}) or next;
[...]
115         if ($flags->{$_}->{noissues}) {
116             foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
117                 $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
118             }
119         }
120     }

Test plan:
Execute several times (50x?) these tests.
Without this patch they may fail
With this patch they must never fail

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19198: Prevent the test to fail randomly
Jonathan Druart [Fri, 6 Oct 2017 14:58:42 +0000 (11:58 -0300)]
Bug 19198: Prevent the test to fail randomly

If categorycode is 'X', the test will fail

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19198: do not autovivify
Jonathan Druart [Fri, 6 Oct 2017 14:49:38 +0000 (11:49 -0300)]
Bug 19198: do not autovivify

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19198: (QA followup) Fix typo in conditions
Nick Clemens [Wed, 13 Sep 2017 11:59:19 +0000 (11:59 +0000)]
Bug 19198: (QA followup) Fix typo in conditions

'&' should be '&&'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19198: Renewal as issue causes too many error
Nick Clemens [Tue, 29 Aug 2017 14:25:20 +0000 (14:25 +0000)]
Bug 19198: Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19198: Unit tests
Nick Clemens [Tue, 29 Aug 2017 14:10:54 +0000 (14:10 +0000)]
Bug 19198: Unit tests

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19374: CircSidebar overlapping transferred items table
Lari Taskula [Wed, 27 Sep 2017 14:59:55 +0000 (17:59 +0300)]
Bug 19374: CircSidebar overlapping transferred items table

When CircSidebar is activated, "Transferred items" table at
Circulation -> Transfers goes under the sidebar. This patch fixes the issue.

To test:
1. Enable CircSidebar system preference
2. Go to cgi-bin/koha/circ/branchtransfers.pl
3. Enter a barcode and click submit
4. Observe transferred items table under the circulation side bar
5. Apply patch
6. Enter a barcode and click submit
7. Observe transferred items is now correctly displayed
8. Also test with CircSidebar system preference deactivated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19374: (follow-up) Remove stray closing div tag

To test:
1. Apply first patch and validate the document e.g. here
   https://validator.w3.org/#validate_by_input
2. Observe "Stray end tag div." error
3. Apply this patch and validate again
4. Observe no errors
5. Go through test plan from first patch to make sure things still look nice

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19135: Restore AllowHoldsOnPatronsPossessions behaviour
Kyle M Hall [Thu, 20 Jul 2017 18:28:20 +0000 (14:28 -0400)]
Bug 19135: Restore AllowHoldsOnPatronsPossessions behaviour

Bug caused by
  commit bc39f0392bbebaad4c083f81308f652a325be042
  Bug 14695 - Add ability to place multiple item holds on a given record per patron

Test Plan:
1) Set AllowHoldsOnPatronsPossessions to "Don't"
2) Check out an item to a patron
3) Place a hold on that item for the same patron
4) Note you are allowed to with no alert
5) Delete the hold
6) Apply this patch
7) Place a hold on that item for the same patron
8) Note you recieve an alert now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19260: [QA Follow-up] Remove obsolete $dbh
Marcel de Rooy [Fri, 6 Oct 2017 09:05:49 +0000 (11:05 +0200)]
Bug 19260: [QA Follow-up] Remove obsolete $dbh

The variable is no longer used.
Removed a few empty lines on the way.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19260: Holds marked as problems being seen as expired ones and deleted wrongly
Josef Moravec [Thu, 5 Oct 2017 20:37:25 +0000 (20:37 +0000)]
Bug 19260: Holds marked as problems being seen as expired ones and deleted wrongly

Test plan:
0) Apply just the first patch - the one with test
1) Run t/db_dependent/Reserves.t - test for CancelExpiredReserves should
fail
2) Apply the second patch
3) t/db_dependent/Reserves.t should pass now

Followed test plan, patch worked as described. Passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19260: Add test for CancelExpiredReserves
Josef Moravec [Thu, 5 Oct 2017 20:36:31 +0000 (20:36 +0000)]
Bug 19260: Add test for CancelExpiredReserves

Passes QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19388: FIX display item status if item is checked out
Jonathan Druart [Fri, 29 Sep 2017 14:49:30 +0000 (11:49 -0300)]
Bug 19388: FIX display item status if item is checked out

In course reserves, if an item which was added to a course is checked
out, it is not possible to show details for that course on OPAC.
The error says: "Template process failed: undef error - The method
onsite_checkout is not covered by tests! at
/home/koha/src/C4/Templates.pm line 121."

onsite_checkout is an attribute of Koha::Checkout, not Koha::Item

Test plan:
Create a course with 2 items that are checked out (standard and on-site)
At the OPAC, add them to your cart and confirm the status of these 2
items is correct
Confirm that on the detail page of the bib record as well as the detail
of the course.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour
Jonathan Druart [Mon, 2 Oct 2017 17:11:52 +0000 (14:11 -0300)]
Bug 19122: (bug 18098 follow-up) Fix IncludeSeeFromInSearches behaviour

The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog.
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name.

It was added by bug 7417.

This regression has been introduced by
  commit 5ef1b6710e7520b844e145e248da0deeee707fde
  Bug 18098: Add an index with the count of not onloan items

-        } elsif ($record_type eq 'biblio' && C4::Context->preference('IncludeSeeFromInSearches')) {
-            my $normalizer = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
[...]
+            push @filters, 'IncludeSeeFromInSearches'
+                if C4::Context->preference('IncludeSeeFromInSearches');

Test plan:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
  - main heading in 100
  - see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading
- Verify that the record can be found searching for the see from headings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Yet another reason to get rid of all this functions from this script.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19405: Prevent api/v1/holds.t to fail randomly
Jonathan Druart [Tue, 3 Oct 2017 22:20:18 +0000 (19:20 -0300)]
Bug 19405: Prevent api/v1/holds.t to fail randomly

DBD::mysql::st execute failed: Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' [for Statement "INSERT INTO `borrowers` ( `branchcode`, `categorycode`, `flags`, `surname`, `userid`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0='N2ElsY9', 1='Kk8G', 2=80, 3='Test Surname', 4='cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvnnbgezJqmxqwz'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' at /kohadevbox/koha/Koha/Object.pm line 121
[18:52:19] t/db_dependent/api/v1/holds.t

Reading the code I guess it happens if TestBuilder generates a userid with the size of borrowers.userid (75 chars). In that case the following lines are wrong:

$borrower->userid($nopermission->{ userid }."z");
$borrower2->userid($nopermission->{ userid }."x");
$borrower3->userid($nopermission->{ userid }."y");

The 3 patrons will have the same userid.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19403: Prevent Circulation.t to fail randomly
Jonathan Druart [Tue, 3 Oct 2017 17:16:02 +0000 (14:16 -0300)]
Bug 19403: Prevent Circulation.t to fail randomly

Due to the number of test cases handle by CanBookBeIssued, Circulation.t
fails randomly. To prevent that it is better to set some values.
For instance if the patron is a statistical patron (category_type=X),
the subroutine will return a STATS flag.

This patch also adds a subroutine to the test file to display the keys
of $error, $question and $alert set by CanBookBeIssued.
It will be easier to track other random failures.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19403: Add some default values when building patrons for test
Jonathan Druart [Tue, 3 Oct 2017 17:15:47 +0000 (14:15 -0300)]
Bug 19403: Add some default values when building patrons for test

To avoid some tests to fail randomly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19350: Add tests
Jonathan Druart [Tue, 3 Oct 2017 15:15:30 +0000 (12:15 -0300)]
Bug 19350: Add tests

7 years agoBug 19350 - Holds without link in 773 trigger SQL::Abstract::puke
Dobrica Pavlinusic [Wed, 20 Sep 2017 14:01:16 +0000 (16:01 +0200)]
Bug 19350 - Holds without link in 773 trigger SQL::Abstract::puke

Test:
1. find bibio without items which has something in field 773
   (for us, it's article) but doesn't have 0 or 9 (host item entry)
2. click on hold in left menu
3. verify application error
4. apply patch and verify that it works

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
7 years agoBug 16726: Do not display "You searched for:" if not needed
Jonathan Druart [Tue, 3 Oct 2017 14:03:43 +0000 (11:03 -0300)]
Bug 16726: Do not display "You searched for:" if not needed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19276: Update the number of tests
Jonathan Druart [Fri, 29 Sep 2017 22:39:34 +0000 (19:39 -0300)]
Bug 19276: Update the number of tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: Tidy up
Jonathan Druart [Fri, 29 Sep 2017 20:08:28 +0000 (17:08 -0300)]
Bug 18120: Tidy up

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: (QA followup) Add POD to controler class
Tomas Cohen Arazi [Fri, 22 Sep 2017 18:37:41 +0000 (15:37 -0300)]
Bug 18120: (QA followup) Add POD to controler class

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: (QA followup) 'vendors_manage' permission fits better than full acq
Tomas Cohen Arazi [Thu, 24 Aug 2017 17:36:07 +0000 (14:36 -0300)]
Bug 18120: (QA followup) 'vendors_manage' permission fits better than full acq

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: Update field descriptions
Katrin Fischer [Tue, 15 Aug 2017 21:58:19 +0000 (23:58 +0200)]
Bug 18120: Update field descriptions

Trying to clarify some of the descriptions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: Add '/acquisitions/vendors' endpoint
Tomas Cohen Arazi [Tue, 28 Feb 2017 12:00:07 +0000 (09:00 -0300)]
Bug 18120: Add '/acquisitions/vendors' endpoint

This patch introduces an /acquisitions/vendors endpoint.
To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> SUCCESS: Tests pass
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18120: /acquisitions/vendors unit tests
Tomas Cohen Arazi [Mon, 6 Mar 2017 19:40:11 +0000 (16:40 -0300)]
Bug 18120: /acquisitions/vendors unit tests

This patch introduces unit tests that need to be passed by an
/acquisitions/vendors/ REST endpoint.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: The endpoint is not present, should fail.

Sponsored-by: ByWater Solutions
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19392: Clean-up behind auth_values_input_www.t
Jonathan Druart [Fri, 29 Sep 2017 19:28:13 +0000 (16:28 -0300)]
Bug 19392: Clean-up behind auth_values_input_www.t

The two categories created by this test script are not removed

Test plan:
without this patch, the two authorised value categories 学協会μμ and
tòmas are not removed when the script finishes.
Now it does!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19391: (bug 19128 follow-up) Fix failing tests from auth_values_input_www.t
Jonathan Druart [Fri, 29 Sep 2017 19:16:56 +0000 (16:16 -0300)]
Bug 19391: (bug 19128 follow-up) Fix failing tests from auth_values_input_www.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13912: DBRev 17.05.00.010
Jonathan Druart [Fri, 29 Sep 2017 19:49:06 +0000 (16:49 -0300)]
Bug 13912: DBRev 17.05.00.010

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13912: (QA followup) Make it explicit that syspref applies to MARC21
Tomas Cohen Arazi [Wed, 20 Sep 2017 13:52:16 +0000 (10:52 -0300)]
Bug 13912: (QA followup) Make it explicit that syspref applies to MARC21

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 13912: (QA followup) Update database
Tomas Cohen Arazi [Thu, 7 Sep 2017 19:18:00 +0000 (16:18 -0300)]
Bug 13912: (QA followup) Update database

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>