koha.git
6 years agoBug 14544: QA fixes - some minor bug fixes
Jonathan Druart [Mon, 12 Oct 2015 08:34:41 +0000 (09:34 +0100)]
Bug 14544: QA fixes - some minor bug fixes

See comment 171 and 172 for more details.

This patch mainly fixes typo or silly error in templates.

It also uses the relationships added by previous patch to join the
biblioitems and items tables (changes in opac-shelves.pl and
shelves.pl).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Add missing biblio <=> biblioitems <=> items relationships to the schema
Jonathan Druart [Mon, 12 Oct 2015 09:40:46 +0000 (10:40 +0100)]
Bug 14544: Add missing biblio <=> biblioitems <=> items relationships to the schema

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adjusted by a follow-up.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: [QA Follow-up] Fix warning about transaction
Marcel de Rooy [Fri, 9 Oct 2015 11:26:39 +0000 (13:26 +0200)]
Bug 14544: [QA Follow-up] Fix warning about transaction

When running Virtualshelves.t, you have this warning:
DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1339.

By moving the DBI lines after creating the TestBuilder object, the warning
will be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Handle database error when creating a shelf with DB admin account
Alex Arnaud [Wed, 2 Sep 2015 08:04:04 +0000 (10:04 +0200)]
Bug 14544: Handle database error when creating a shelf with DB admin account

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I don't think this is useful, it will be a mess if we have to check this
case everywhere. But it works!
I let the cut to the QAer or RM.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: DB Changes: Set a default value for sortfield
Jonathan Druart [Wed, 26 Aug 2015 13:48:35 +0000 (14:48 +0100)]
Bug 14544: DB Changes: Set a default value for sortfield

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Fix regression on adding a new list
Jonathan Druart [Wed, 26 Aug 2015 13:24:25 +0000 (14:24 +0100)]
Bug 14544: Fix regression on adding a new list

The user should not be allowed to create a new list and get a friendly
error message if he tries.

The "New list" links are removed.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Remove wrong tips about permissions
Jonathan Druart [Tue, 18 Aug 2015 13:13:15 +0000 (14:13 +0100)]
Bug 14544: Remove wrong tips about permissions

The owner of a list should not need any permission to remove contents.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page
Jonathan Druart [Tue, 18 Aug 2015 09:54:17 +0000 (10:54 +0100)]
Bug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Move HandleDelBorrower to C4::Members
Jonathan Druart [Tue, 18 Aug 2015 09:50:06 +0000 (10:50 +0100)]
Bug 14544: Move HandleDelBorrower to C4::Members

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetSomeShelfNames
Jonathan Druart [Mon, 17 Aug 2015 19:45:34 +0000 (20:45 +0100)]
Bug 14544: Get rid of GetSomeShelfNames

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetShelfContent
Jonathan Druart [Mon, 17 Aug 2015 17:46:42 +0000 (18:46 +0100)]
Bug 14544: Get rid of GetShelfContent

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of ShelfPossibleAction
Jonathan Druart [Mon, 17 Aug 2015 14:57:27 +0000 (15:57 +0100)]
Bug 14544: Get rid of ShelfPossibleAction

Bug 14544: (follow-up) Get rid of ShelfPossibleAction

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Make the OPAC side independent of Page.pm
Jonathan Druart [Mon, 10 Aug 2015 15:53:06 +0000 (16:53 +0100)]
Bug 14544: Make the OPAC side independent of Page.pm

Bug 14544: Fix redirect on editing a list

If you edit a list from the list view, after saving the form, you are
not redirected to the list view (but on the edit form).

Bug 14544: Cosmetic: &rsaquo; should be a class divider

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetShelves
Jonathan Druart [Thu, 16 Jul 2015 16:42:03 +0000 (17:42 +0100)]
Bug 14544: Get rid of GetShelves

This does not work for now, see later.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetBibliosShelves
Jonathan Druart [Thu, 6 Aug 2015 14:28:12 +0000 (15:28 +0100)]
Bug 14544: Get rid of GetBibliosShelves

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Make the intranet side independent of Page.pm
Jonathan Druart [Wed, 5 Aug 2015 15:37:02 +0000 (16:37 +0100)]
Bug 14544: Make the intranet side independent of Page.pm

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Koha::Virtualshelfcontent[s]
Jonathan Druart [Thu, 16 Jul 2015 16:13:40 +0000 (17:13 +0100)]
Bug 14544: Koha::Virtualshelfcontent[s]

Get rid of AddToShelf and DelFromShelf

Bug 14544: Allow a user to delete his own contents

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetAllShelves
Jonathan Druart [Thu, 16 Jul 2015 11:29:48 +0000 (12:29 +0100)]
Bug 14544: Get rid of GetAllShelves

Signed-off-by: Koha Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Move share routines to Koha::Virtualshelfshare and Koha::Virtualshelfshares
Jonathan Druart [Thu, 16 Jul 2015 10:24:56 +0000 (11:24 +0100)]
Bug 14544: Move share routines to Koha::Virtualshelfshare and Koha::Virtualshelfshares

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of ModShelf
Jonathan Druart [Wed, 15 Jul 2015 16:26:09 +0000 (17:26 +0100)]
Bug 14544: Get rid of ModShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of DelShelf
Jonathan Druart [Wed, 15 Jul 2015 16:16:34 +0000 (17:16 +0100)]
Bug 14544: Get rid of DelShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of AddShelf
Jonathan Druart [Wed, 15 Jul 2015 16:06:35 +0000 (17:06 +0100)]
Bug 14544: Get rid of AddShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Get rid of GetShelf
Jonathan Druart [Wed, 15 Jul 2015 13:43:34 +0000 (14:43 +0100)]
Bug 14544: Get rid of GetShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves
Jonathan Druart [Wed, 15 Jul 2015 13:21:01 +0000 (14:21 +0100)]
Bug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves

The 2 modules C4::VirtualShelves and C4::VirtualShelves::Page are really badly
coded and buggy.
It became complicated to fix and enhance them.
This rewrite will make the code more robust and the list feature will be easier
to change.

Some new modules are added to the Koha namespace (Koha::Virtualshelf,
Koha::Virtualshelves, Koha::Virtualshelfshare[s] and Koha::Virtualshelfcontent[s])
to take advantage of Dbix::Class.

The patchset fixes some bugs:
1/ Bug 6279 - Can't delete lists from the second page of lists in the OPAC
2/ The owner of a list should not need any permission to remove content from
his lists.
3/ No feedback messages when actions are done

Test plan:
A) Intranet and OPAC
1/ Create more than 20 private and public lists with different users
2/ Edit some and confirm that the changes are taken into account
3/ Share some lists with other users
4/ Add / remove contents
Be sure you have some lists with more than 20 items (to test the pagination)
5/ Play with permissions and confirm it works as expected.
For private lists:
They should not be viewed by anyone else, if they are not shared
If they are shared (OPAC only):
a. "Allow anyone else to add entries"
  Should allow the user with whom the list is shared to add entries.
b. "Allow anyone to remove his own contributed entries."
  Should allow the user with whom the list is shared to remove his own entries.
c. "Allow anyone to remove other contributed entries."
  Should allow the user with whom the list is shared to remove any entries.

For public lists:
They should be viewed by anyone else.
a. "Allow anyone else to add entries"
  Should allow any user to add entries.
b. "Allow anyone to remove his own contributed entries."
  Should allow any user to remove his own entries.
c. "Allow anyone to remove other contributed entries."
  Should allow any user to remove any entries.

6/ Download and sent lists.

7/ Confirm that the "Add to" feature works as expected.

8/ Confirm that the "Add an item to" works as expected.

9/ Delete some lists.

10/ Print some lists and subscribe to the RSS feed (OPAC only) (with more than
20 items).

11/ Use the remove "Remove share" links.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14965: Remove C4::Dates from 'lists' in folder reports
Marc Véron [Tue, 6 Oct 2015 12:39:38 +0000 (14:39 +0200)]
Bug 14965: Remove C4::Dates from 'lists' in folder reports

Remove C4::Dates from:

- reports/bor_issues_top.pl
- reports/borrowers_out.pl
- reports/cat_issues_top.pl
- reports/itemslost.pl

To test:

- Go to Home > Reports
- Verify that following reports behave as before:
  - 'Patrons with the most checkouts (reports/bor_issues_top.pl)
  - 'Most circulated items' (reports/cat_issues_top.pl)
  - 'Patrons who haven't checked out (reports/borrowers_out.pl)
  - 'Items lost'

Amended to fix issue with reports/borrowers_out.pl / see comment #3
Amended to fix issue with reports/bor_issues_top.pl / see comment #7
http://bugs.koha-community.org/show_bug.cgi?id=14965

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Code OK. The 4 reports works for me as before (same results).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15098: Itemtype description missing from facets for itypes in a search group
Bernardo Gonzalez Kriegel [Wed, 4 Nov 2015 12:24:10 +0000 (09:24 -0300)]
Bug 15098: Itemtype description missing from facets for itypes in a search group

This patch adds a second variable to hold item types info
just for facets.

In case we have an item type in a search category, it's description
is removed from GetItemTypesCategorized, which is good for advanced
search, but no for facets

A second var is needed which holds all item type info.

To test:
On top of Bug 15092 patches (no really needed, but I write this on top
of them)
1) Add an item type to a search group
2) Do a search in opac, in facets will see only item type code,
no description, for that item type
3) Apply the patch
4) Repeat search, now description must be present

Followed test plan including translated descriptions. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity...
Marc Véron [Wed, 4 Nov 2015 09:58:50 +0000 (10:58 +0100)]
Bug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity in translation

This patch moves the word "basket" out of the <a> tags to have a better context for translation.

To test:
- Transfer an order from one basket to another basket
- Verify that "basket" is detached from the strings "Transferred to" rsp
  "Transferred from" by th <a> tag (See screenshot)
- Apply patch
- Verify that the word "basket" is now otuside the <a> tags

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agobug 15112: Make greybox consistent size across label/card creator
Liz Rea [Mon, 2 Nov 2015 23:20:25 +0000 (12:20 +1300)]
bug 15112: Make greybox consistent size across label/card creator

Also fixes minor issue with buttons stacking on patroncards/edit-batch
and labels/label-manage

To test:

Export a batch every way you can:

multiple together from label/label-manage
individual items from labels/label-edit-batch
selected items from labels/label-edit-batch
export full batch from labels/label-edit-batch

multiple together from patroncards/manage
individual cards from patroncards/manage
individual cards from patroncards/edit-batch
selected cards from patroncards/edit-batch
export full batch from patroncards/edit-batch

Also notice that before this patch, the delete and export buttons
were stacking on the table rows, and  that now they are not doing
that anymore. It may take a force refresh to see the behaviour and
the change.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14955: Don't double encode chars in the "Show more" link
Jonathan Druart [Mon, 5 Oct 2015 10:17:23 +0000 (11:17 +0100)]
Bug 14955: Don't double encode chars in the "Show more" link

Bug 13789 has fixed this issue for the facet links (select/unselect) but
not for the "Show more" facets link.

This patch reuses the "url" variable, generated for the facets, for
these links. A new "local_url" variable is used to build links for each
entry.

Test plan (for OPAC and intranet):
- Search for a very common term
- Filter the results using facets
- You should get more than 5 entries for a facet and 1 selected:
Author
 author 1
 author 2 [x] # Selected
 author 3
 author 4
 author 5
 Show more # you see this link if there is 5+ values for this facet
- Click on the Show more link
Without this patch, the url contains double-encoded characters and you
will certainly don't get any results
With this patch, you should get results.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15066: Make transfer rotating collection works under Plack
Jonathan Druart [Tue, 27 Oct 2015 09:21:24 +0000 (09:21 +0000)]
Bug 15066: Make transfer rotating collection works under Plack

This patch the 2 following errors:
Undefined subroutine &C4::RotatingCollections::transferbook called at
C4/RotatingCollections.pm line 451.
Undefined subroutine &C4::RotatingCollections::GetTransfers called at
C4/RotatingCollections.pm line 450.

And this warning:
"my" variable $colId masks earlier declaration in same scope at
/home/koha/src/rotating_collections/transferCollection.pl line 75.

Test plan:
Create a rotating collection
Transfer it to another branch
It should work with this patch

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15092: (followup) Descriptions not show for search categories
Bernardo Gonzalez Kriegel [Tue, 3 Nov 2015 18:15:54 +0000 (15:15 -0300)]
Bug 15092: (followup) Descriptions not show for search categories

If we have some item types in search categories, description
is not show in opac advanced search

To test:
1) Add some item type to a search category
2) Go to OPAC > Advanced search
empty description for that category
3) Apply the patch
4) Repeat 2), description must be present

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Add types for patron's fields in Swagger spec
Julian Maurice [Wed, 4 Nov 2015 13:29:19 +0000 (14:29 +0100)]
Bug 13799: Add types for patron's fields in Swagger spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Rename t/.../v1/borrowers.t to t/.../v1/patrons.t
Julian Maurice [Fri, 30 Oct 2015 07:49:23 +0000 (08:49 +0100)]
Bug 13799: Rename t/.../v1/borrowers.t to t/.../v1/patrons.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Reword 'borrower' to 'patron'
Julian Maurice [Wed, 7 Oct 2015 15:19:34 +0000 (17:19 +0200)]
Bug 13799: Reword 'borrower' to 'patron'

Also, complete the Swagger definition of a patron

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Change 'required' value type from string to boolean
Julian Maurice [Wed, 7 Oct 2015 12:19:58 +0000 (14:19 +0200)]
Bug 13799: Change 'required' value type from string to boolean

String is not accepted as a valid value in more recent versions of
Swagger2 module

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Allow to set Mojolicious secret in $KOHA_CONF
Julian Maurice [Wed, 7 Oct 2015 09:10:12 +0000 (11:10 +0200)]
Bug 13799: Allow to set Mojolicious secret in $KOHA_CONF

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Change Mojolicious default mode to 'production'
Julian Maurice [Wed, 7 Oct 2015 09:00:45 +0000 (11:00 +0200)]
Bug 13799: Change Mojolicious default mode to 'production'

This avoid getting a debug page when URL is wrong.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: (QA followup) make tests use random data
Tomas Cohen Arazi [Thu, 24 Sep 2015 17:21:55 +0000 (14:21 -0300)]
Bug 13799: (QA followup) make tests use random data

With the introduction of TestBuilder there's no need to
rely on existing data on the DB (the original patch relies
on categories and branches already existing).

This patch creates a random branch, category and two borrowers
with the fixed data that is needed for the tests. It adjusts
the tests to use the randomized data instead of the previously
fixed one.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The feature works as expected and all tests passes. koha-qa.pl too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Fix API unit tests
Julian Maurice [Wed, 23 Sep 2015 08:06:13 +0000 (10:06 +0200)]
Bug 13799: Fix API unit tests

They were failing because of the now required 'borrowers' permission

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Add missing license notices
Julian Maurice [Tue, 22 Sep 2015 09:08:53 +0000 (11:08 +0200)]
Bug 13799: Add missing license notices

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: Add cookie-based authentication to REST API
Julian Maurice [Mon, 31 Aug 2015 15:00:52 +0000 (17:00 +0200)]
Bug 13799: Add cookie-based authentication to REST API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13799: RESTful API with Mojolicious and Swagger2
Julian Maurice [Wed, 4 Mar 2015 15:46:33 +0000 (16:46 +0100)]
Bug 13799: RESTful API with Mojolicious and Swagger2

Actual routes are:
  /borrowers
    Return a list of all borrowers in Koha

  /borrowers/{borrowernumber}
    Return the borrower identified by {borrowernumber}
    (eg. /borrowers/1)

There is a test file you can run with:
  $ prove t/db_dependent/rest/borrowers.t

All API stuff is in /api/v1 (except Perl modules)
So we have:
  /api/v1/script.cgi     CGI script
  /api/v1/swagger.json   Swagger specification

Change both OPAC and Intranet VirtualHosts to access the API,
so we have:
  http://OPAC/api/v1/swagger.json   Swagger specification
  http://OPAC/api/v1/{path}         API endpoint
  http://INTRANET/api/v1/swagger.json   Swagger specification
  http://INTRANET/api/v1/{path}         API endpoint

Add a (disabled) virtual host in Apache configuration api.HOSTNAME,
so we have:
  http://api.HOSTNAME/api/v1/swagger.json   Swagger specification
  http://api.HOSTNAME/api/v1/{path}         API endpoint

Add 'unblessed' subroutines to both Koha::Objects and Koha::Object to be
able to pass it to Mojolicious

Test plan:
  1/ Install Perl modules Mojolicious and Swagger2
  2/ perl Makefile.PL
  3/ make && make install
  4/ Change etc/koha-httpd.conf and copy it to the right place if needed
  5/ Reload Apache
  6/ Check that http://(OPAC|INTRANET)/api/v1/borrowers and
     http://(OPAC|INTRANET)/api/v1/borrowers/{borrowernumber} works

Optionally, you could verify that http://(OPAC|INTRANET)/vX/borrowers
(where X is an integer greater than 1) returns a 404 error

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15014: Returns 0 if everything went fine
Jonathan Druart [Fri, 16 Oct 2015 09:02:26 +0000 (09:02 +0000)]
Bug 15014: Returns 0 if everything went fine

Be kind and return 0 if the sample file has been generated correctly.
Otherwise you are a bad guy and you make Plack returns an internal error
(exited nonzero: 1 at /home/vagrant/kohaclone/tools/import_borrowers.pl line 390.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected here too.

6 years agoBug 12933: DBRev 3.21.00.050
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:45:51 +0000 (12:45 -0300)]
Bug 12933: DBRev 3.21.00.050

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: (QA followup) Add missing notice templates and other small fixes
Katrin Fischer [Sat, 24 Oct 2015 18:58:04 +0000 (20:58 +0200)]
Bug 12933: (QA followup) Add missing notice templates and other small fixes

- Fixes page title of slip print window: Members > Patrons
- Fixes error message if no notice template is found
- Fixes a stray template variable that resulted in the
  borrower number showing in the 'Print' pull down
- Fixes xt/sample_notices.t by adding the sample notice to
  it-IT and es-ES

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: (QA followup) Rename GetOverdues to GetOverduesForPatron
Kyle M Hall [Mon, 26 Jan 2015 13:39:17 +0000 (08:39 -0500)]
Bug 12933: (QA followup) Rename GetOverdues to GetOverduesForPatron

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: (QA followup) Add Unit Tests
Kyle M Hall [Fri, 2 Jan 2015 00:18:18 +0000 (19:18 -0500)]
Bug 12933: (QA followup) Add Unit Tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: (QA followup) Rename parse_letter to parse_overdues_letter
Kyle M Hall [Thu, 1 Jan 2015 23:48:03 +0000 (18:48 -0500)]
Bug 12933: (QA followup) Rename parse_letter to parse_overdues_letter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: Add new OVERDUES_SLIP letter
Kyle M Hall [Tue, 16 Dec 2014 13:10:02 +0000 (08:10 -0500)]
Bug 12933: Add new OVERDUES_SLIP letter

Signed-off-by: Amy Purvis <APurvis@galencollege.edu>
Signed-off-by: Laurie McKee <lmckee@littleelm.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12933: Add ability to print overdue slip from staff intranet
Kyle M Hall [Tue, 16 Sep 2014 16:51:13 +0000 (12:51 -0400)]
Bug 12933: Add ability to print overdue slip from staff intranet

Some librarians would like to be able to print an overdues slip from the
staff intranet. This slip would be defined as the print transport
version of the ODUE slip.

Test Plan:
1) Apply this patch
2) Locate a patron with overdues
3) Define a print version of the OVERDUES_SLIP slip
4) Try Print > Print overdues

Signed-off-by: Amy Purvis <APurvis@galencollege.edu>
Signed-off-by: Laurie McKee <lmckee@littleelm.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15095: marc_modificacation_template_actions DB not consistent between fresh and...
Tomas Cohen Arazi [Sat, 31 Oct 2015 14:57:42 +0000 (11:57 -0300)]
Bug 15095: marc_modificacation_template_actions DB not consistent between fresh and updated DB

A review of the 3.20.00 + upgrade DB, compared to a fresh master install
highlighted an inconsistency on that table. This is mysqldbcompare's
output for it:

-   `action` enum('delete_field','update_field','move_field','copy_field','copy_and_replace_field') COLLATE utf8_unicode_ci DEFAULT NULL,
?                                                                        -------------------------                          ^^^^^^
+   `action` enum('delete_field','update_field','move_field','copy_field') COLLATE utf8_unicode_ci NOT NULL,

So one ENUM value is missing on fresh installs, and an upgraded one
yields a DEFAULT NULL configuration for the 'action' column.

To test:
1) have a v3.20.00 DB:
  > CREATE DATABASE koha_master_upgraded;
  $ git checkout v3.20.00
  $ mysql koha_master_upgraded < installer/data/mysql/kohastructure.sql
2) upgrade it to latest master by running:
  $ git checkout origin/master
  $ perl installer/data/mysql/updatedatabase.pl
3) Create a new DB
  > CREATE DATABASE koha_master_fresh;
  $ mysql koha_master_fresh < installer/data/mysql/kohastructure.sql
4) Run mysqldbcompare (you need mysql-utilities installed for that)
  $ mysqldbcompare --difftype=differ --server1=root@localhost \
                   --skip-data-check --skip-table-options \
                   --run-all-tests  koha_master_upgraded:koha_master_fresh
=> FAIL: You will notice the marc_modification_template_actions discrepancy
- Repeat from 1), but apply this patch on 2) before the upgrade.
=> SUCCESS: The DB's discrepancies are now irrelevant [1]
- Sign off :-D

[1] Only KEY definition order is 'wrong', but it is not relevant.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11431: DBRev 3.21.00.049
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:09:28 +0000 (12:09 -0300)]
Bug 11431: DBRev 3.21.00.049

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11431: (QA followup) Make audio alerts sql top level
Kyle M Hall [Wed, 4 Nov 2015 15:08:39 +0000 (10:08 -0500)]
Bug 11431: (QA followup) Make audio alerts sql top level

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11431: (QA followup) Typo in help file / variable name
Katrin Fischer [Sat, 24 Oct 2015 10:01:52 +0000 (12:01 +0200)]
Bug 11431: (QA followup) Typo in help file / variable name

Fixes the variable name to avoid a double-up that made it
impossible to turn off the sounds in general. If AudioAlerts
are turned off, they will only work on the audio administration
page now so you can set up and test the different sounds there.

Also fixes a little typo in the help file.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11431: (QA followup) Add ability to edit audio alerts
Kyle M Hall [Fri, 23 Oct 2015 11:55:18 +0000 (07:55 -0400)]
Bug 11431: (QA followup) Add ability to edit audio alerts

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Update help
Kyle M Hall [Fri, 23 Oct 2015 12:15:45 +0000 (08:15 -0400)]
Bug 11431: (QA followup) Update help

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Always allow audio alerts for audio alerts editor page
Kyle M Hall [Fri, 23 Oct 2015 11:05:23 +0000 (07:05 -0400)]
Bug 11431: (QA followup) Always allow audio alerts for audio alerts editor page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Fix alter precedences on delete
Kyle M Hall [Fri, 18 Sep 2015 10:36:10 +0000 (06:36 -0400)]
Bug 11431: (QA followup) Fix alter precedences on delete

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Hard code list of sounds for security
Kyle M Hall [Thu, 17 Sep 2015 15:04:09 +0000 (11:04 -0400)]
Bug 11431: (QA followup) Hard code list of sounds for security

The sounds directory is no longer available for listing for security.
It is better and safer to hard code the list of sounds.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Move AudioAlerts to a separate plugin
Kyle M Hall [Thu, 17 Sep 2015 14:48:24 +0000 (10:48 -0400)]
Bug 11431: (QA followup) Move AudioAlerts to a separate plugin

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Simplify audio_alert_id to just id
Kyle M Hall [Wed, 19 Aug 2015 11:57:17 +0000 (07:57 -0400)]
Bug 11431: (QA followup) Simplify audio_alert_id to just id

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Unit Tests
Kyle M Hall [Wed, 19 Aug 2015 11:55:31 +0000 (07:55 -0400)]
Bug 11431: (QA followup) Unit Tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Fix js error
Kyle M Hall [Tue, 18 Aug 2015 18:23:12 +0000 (14:23 -0400)]
Bug 11431: (QA followup) Fix js error

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: Update UsageStats.pm
Kyle M Hall [Tue, 30 Jun 2015 11:12:36 +0000 (07:12 -0400)]
Bug 11431: Update UsageStats.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Fix POD
Kyle M Hall [Mon, 27 Apr 2015 11:53:25 +0000 (07:53 -0400)]
Bug 11431: (QA followup) Fix POD

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: (QA followup) Allow https in sound URLs
Kyle M Hall [Mon, 27 Apr 2015 11:49:50 +0000 (07:49 -0400)]
Bug 11431: (QA followup) Allow https in sound URLs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: Add additional sound options
Kyle M Hall [Mon, 22 Dec 2014 10:58:48 +0000 (05:58 -0500)]
Bug 11431: Add additional sound options

This patch set replaces and extends Koha's current sound options.
This is implemented be removing the existing sound system, and
re-engineering using a table of selector/sound combinations such that
the highest precedence selector that is found in the DOM will trigger
and audio alert. The existing audio behaviors are implemented as a set
of default audio alerts.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Enable the AudioAlerts system preference
4) Test existing sounds
5) Enter the new alerts editor in the admin section
6) Add a new audo alert with the following selector:
    "body:contains('Check in message')",
   choose any sound alert you wish, make sure it's not one of the 3
   sounds already used! Make this selector precedence 1
4) Browse to the checkins page, you should hear the default sound
5) Attempt to return an invalid barcode, you should hear your custom sound!

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: DBIC update schema
Kyle M Hall [Mon, 22 Dec 2014 10:58:09 +0000 (05:58 -0500)]
Bug 11431: DBIC update schema

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: Add audio alerts to installer
Kyle M Hall [Mon, 22 Dec 2014 10:57:21 +0000 (05:57 -0500)]
Bug 11431: Add audio alerts to installer

http://bugs.koha-community.org/show_bug.cgi?id=11431
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 11431: Update database
Kyle M Hall [Mon, 22 Dec 2014 10:56:33 +0000 (05:56 -0500)]
Bug 11431: Update database

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t
Kyle M Hall [Wed, 4 Nov 2015 14:34:11 +0000 (09:34 -0500)]
Bug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15081: (followup) Make test files using TestBuilder handle their transactions
Tomas Cohen Arazi [Sun, 1 Nov 2015 19:39:37 +0000 (16:39 -0300)]
Bug 15081: (followup) Make test files using TestBuilder handle their transactions

This trivial patch introduces the code needed on the test files so they handle
the DB transaction instead of relying on the (removed) transaction started/rolled back
by TestBuilder.

Tested all of the files before and after applying the patch, resultes are the same.
(Pass exept of t/db_dependent/Barcodes_ValueBuilder.t, this has the same error).
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15081: Take transaction handling out from TestBuilder
Tomas Cohen Arazi [Sat, 31 Oct 2015 15:29:09 +0000 (12:29 -0300)]
Bug 15081: Take transaction handling out from TestBuilder

This patch removes transaction handling code from TestBuilder.
It fixes the TestBuilder.t to handle the transaction on its own.

Verify that t/db_dependent/TestBuilder.t passes.

Followed test plan, TestBuilder.t passes
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14978: (RM followup) DBIx update
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:09:06 +0000 (12:09 -0300)]
Bug 14978: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14805: Replace generic 'items' with the specific ones
Jonathan Druart [Mon, 21 Sep 2015 14:56:49 +0000 (15:56 +0100)]
Bug 14805: Replace generic 'items' with the specific ones

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14805: (follow-up) fix a bug in previous code and change msg string
Joonas Kylmälä [Thu, 17 Sep 2015 11:35:32 +0000 (11:35 +0000)]
Bug 14805: (follow-up) fix a bug in previous code and change msg string

Previously the code didn't work if there was only one batch available for selection.
This fixes that now. Also there was a bug with wrong string showing now it's
changed to a general one, "items". I choosed the string "items" because there was
difficulties adding the plural part of the word. One cannot add just s to the end
of the word batch like you can in the case of profile.

Sponsored-by: Vaara-kirjastot
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14805: QA follow-up
Jonathan Druart [Thu, 17 Sep 2015 08:40:46 +0000 (09:40 +0100)]
Bug 14805: QA follow-up

This patches remove a trailing whitespace and simplify 2 parts of code.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14805: Allow the user to delete multiple batches
Joonas Kylmälä [Fri, 11 Sep 2015 13:55:07 +0000 (13:55 +0000)]
Bug 14805: Allow the user to delete multiple batches

Allows the user to delete multiple patron card batches.

Test plan:

1. Add first some 20 batches
2. Go to the edit page of some X batch by first selecting from the
   batch list the batch you want to edit and then after that by clicking
   edit.
3. Delete one batch by selecting one batch and then clicking delete.
4. Select 0 batches and click delete, notice you cannot delete.
5. Select 0 batches and click edit, notice you cannot edit.
6. Select 2 batches and click edit, notice you cannot edit.
7. Apply patch
8. Check that steps from 2-6 work like they worked before.
   (and add more batches so that you have ~20 of them)
9. Select 2 batches and click delete. Make sure they are deleted.
10. Try to figure out some anomalies this patch might have caused.

Sponsored-by: Vaara-kirjastot
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8438: Users can only claim for serials related to their branch.
Jonathan Druart [Thu, 23 Aug 2012 11:53:21 +0000 (13:53 +0200)]
Bug 8438: Users can only claim for serials related to their branch.

Only superlibrarian users and users with superserials permission
can override this limitation.

This patch adds a new subroutine C4::Serials::can_claim_subscription.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
The upgrading of the DB was as required:
for each [PT/S] patron with the permission "claim_serials" ON,
the permission "superserials" became[/was kept to] ON.

Then, after having checked the DB upgrading, to test the currently
adding limitation:
> Users can only claim for serials related to their branch
, I reset 2 PT/S patrons-users to:
permission claim_serials: YES
permission superserials: NO
and I set the syspref "IndependendeBranches" to "Prevent".

For:
> Only superlibrarian users can override this limitation.
the S patron-user could list AND claim:
A) subscriptions of his own branch,
B) subscriptions of other branch,
C) subscriptions without branch.

For:
> Only users with superserials permission can override this limitation.
the PT patron-user could list:
A) subscriptions of his own branch,
B) subscriptions of other branch,
C) subscriptions without branch,
and could claim only:
A) subscriptions of his own branch,
C) subscriptions without branch.

NB: a subscription is selected to be claimed.

Then I set the syspref "IndependendeBranches" to "Don't prevent".
The behaviour was [exactly the same as in master] without the added
limitation.

On [S/PT] patrons, if permission claim_serials was NO, no Claims
link was available on Serials' page, either under "Prevent" or under
"Don't prevent".

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added the results of Paola's testing to the commit message
as test plan.

Note to RM: Maybe we could add a note to the release notes, that
Koha now enforces superserials with independent branches better,
so people might have to adapt permissions in order to claim
for other branches.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8436: QA Follow-up: Add Library to result list
Katrin Fischer [Tue, 20 Oct 2015 14:46:15 +0000 (16:46 +0200)]
Bug 8436: QA Follow-up: Add Library to result list

If we offer a library filter, we should also show the
library in the result list, so that search options
and result list match.

Otherwise, for libraries with multiple branches, there
is no way to see, which is the subscription of a
specific branch in the list.

- Add a Library column in the result list
- Rename branch to library in the template

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off
Katrin Fischer [Tue, 20 Oct 2015 14:36:06 +0000 (16:36 +0200)]
Bug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off

The superserials permission is only in use in combination with
IndependentBranches - so it makes sense to also show the branch
filter when IndependentBranches is off.

Permission description:
 superserials Manage subscriptions from any branch
 (only applies when IndependentBranches is used)

Also adds a missing check for superlibraian.

Note: the duplicated permission check in the code is not really nice
- would be good to rewrite this to be more clean.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8436: Use C4::Context->IsSuperLibrarian()
Julian Maurice [Tue, 25 Aug 2015 11:15:41 +0000 (13:15 +0200)]
Bug 8436: Use C4::Context->IsSuperLibrarian()

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8436: Replace GetBranches with GetBranchesLoop
Jonathan Druart [Fri, 20 Feb 2015 09:57:52 +0000 (10:57 +0100)]
Bug 8436: Replace GetBranches with GetBranchesLoop

The branch selection logic still exists in GetBranchesLoop, it should be
used here.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 8436: Add limit on branch in checkexpiration.pl
Julian Maurice [Wed, 22 Aug 2012 12:35:37 +0000 (14:35 +0200)]
Bug 8436: Add limit on branch in checkexpiration.pl

This limit is only available for superlibrarians and patrons that have
superserials permission. Other patrons will only see subscriptions of
their branch.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11678: QA follow-up - Fixing some typos in the documentation
Katrin Fischer [Sat, 24 Oct 2015 22:21:59 +0000 (00:21 +0200)]
Bug 11678: QA follow-up - Fixing some typos in the documentation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11678: Improve documentation of new parameter
Julian Maurice [Mon, 19 Oct 2015 08:49:32 +0000 (10:49 +0200)]
Bug 11678: Improve documentation of new parameter

Say --email is repeatable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11678: Gather print notices: add --email parameter
Jonathan Druart [Thu, 23 Jan 2014 12:12:30 +0000 (13:12 +0100)]
Bug 11678: Gather print notices: add --email parameter

This patch add the ability to send generated files by email.

You can specify several emails.

Test plan:
- same as Bug 11603
- call the script misc/cronjobs/gather_print_notices.pl with the
  following parameters:

perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv --ods --html
--letter_code=CHECKIN -d=: --email="email_one@example.org"
--email="email_two@example.org"

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  - Works as desribed. Rebased upon bug-11603.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15059: Line break in html attribute in branchoverdues.tt
Fridolin Somers [Mon, 26 Oct 2015 07:44:17 +0000 (08:44 +0100)]
Bug 15059: Line break in html attribute in branchoverdues.tt

In circ/branchoverdues.tt, there is a line break inside href attribute.
This generates an attribute with a lot of spaces %20.

Test plan :
- at intranet go to ciculation module
- click on "Overdues with fines"
- look at links "Phone", "Notice" and "Considered lost"
=> Without patch the URL contains a lot of spaces
=> With patch the URL is correct

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15035: Anti-spam for opac-suggestions - FOLLOW-UP
Mason James [Wed, 16 Sep 2015 01:56:23 +0000 (13:56 +1200)]
Bug 15035: Anti-spam for opac-suggestions - FOLLOW-UP

to test this patch...

1/ enable 'suggestion' and 'AnonSuggestions' sysprefs

2/ edit the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt file,
    to reveal the hidden 'negcap' field

   replace line 87 opac-suggestions.tt, from...
     <li id="negcap" style="position: absolute; left: -2000px;">
   to ...
     <li id="negcap">

3/ attempt to add another suggestion, and populate the 'negcap' field
   adding the suggestion is supposed to fail, but actually succeeds!?  :/

4/ apply patch

5/ repeat step 3, suggestion attempt should fail as expected

modified:   opac-suggestions.pl

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed insertion with negcap before patch.
With negcap value suggestion fails silently
Without negcap suggestion is inserted
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15061: Can't add item to rotating collection
Bernardo Gonzalez Kriegel [Tue, 3 Nov 2015 15:16:08 +0000 (12:16 -0300)]
Bug 15061: Can't add item to rotating collection

This patch prevents adding items to invalid (empty)
rotating collection id

To test:
1) Go to /cgi-bin/koha/rotating_collections/addItems.pl
2) Try to add an item, you get error show in attached pictures
3) Apply the patch
4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl
5) Can't add any items

I don't know if this is a real problem

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: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15068: Get rid of warnings in members/summary-print.pl
Marc Véron [Tue, 27 Oct 2015 11:38:32 +0000 (12:38 +0100)]
Bug 15068: Get rid of warnings in members/summary-print.pl

This patch removes warnings when printing a summary from a member's
detail page, like:

- use of uninitialized value in sprintf
  at /usr/share/kohaclone/members/summary-print.pl line 47

- Use of uninitialized value $roadtype in concatenation (.) or string
  at /usr/share/kohaclone/members/summary-print.pl line 61

- Use of uninitialized value in addition (+)
  at /usr/share/kohaclone/members/summary-print.pl line 87

- Argument "2015-11-03 23:59:00" isn't numeric in numeric comparison
  (<=>) at /usr/share/kohaclone/members/summary-print.pl line 103

To test:
- Apply patch
- Go to a detail page with a member who has a lot of fines
- Print summary
- Verify that warnings like the ones above do no longer appear.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Have been able to see those warnings in Apache log file, and notice
  their disappearance after applying this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14821: Do not list not returned items
Jonathan Druart [Tue, 15 Sep 2015 07:24:07 +0000 (08:24 +0100)]
Bug 14821: Do not list not returned items

On the checkin page, the table is always filled with info of the scanned
barcode, even if the checkin has failed.
When the checkin fails, there is already an error displayed, so there is
no need to keep a row for fails.

Test plan:
Confirm that the failed checkins don't appear anymore in the checkin
table.
- checkin an item which is not issued;
- BlockReturnOfWithdrawnItems is set and item is withdrawn;
- Not returned at the right place;
- privacy=2 and AnonymousPatron not correctly set;

Before this patch this behavior existed only for bad barcode.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm that the checkin table hasn't to be populated with info on items
  which haven't been checked in.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14978: (obsessive followup) fix upgrade text
Tomas Cohen Arazi [Tue, 3 Nov 2015 14:07:22 +0000 (11:07 -0300)]
Bug 14978: (obsessive followup) fix upgrade text

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14978: DBRev 3.21.00.048
Tomas Cohen Arazi [Mon, 2 Nov 2015 16:00:37 +0000 (13:00 -0300)]
Bug 14978: DBRev 3.21.00.048

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14978: Add unique key constraint on issues.itemnumber
Jonathan Druart [Thu, 8 Oct 2015 08:15:57 +0000 (09:15 +0100)]
Bug 14978: Add unique key constraint on issues.itemnumber

The constraint might have existed before bug 14069.
For these DB, this patch will restore it, for others, it will add it :)

Test plan:
> show create table issues;
should not return "unique key itemnumber"
Execute the updatedb entry twice
> show create table issues;
should return only one "unique key itemnumber"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14589: Adjust authorities_merge_ajax and replace some indirect syntax
Marcel de Rooy [Wed, 22 Jul 2015 12:41:42 +0000 (14:41 +0200)]
Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax

This patch does the following:
[1] Adjust authorities_merge_ajax just as in bug 14588.
[2] Replace some indirect syntax for fetch GGI::Cookie.
[3] Along the way replace some new CGI's. Note that I am not aiming to
    replace them Koha wide. The "fetch class" variant is less readable.

NOTE: The changes to tools/upload-file.pl and upload-file-progress.pl
are moved to report 14321.

Test plan:
[1] Run the URL authorities/merge_ajax.pl in staff.
[2] Upload a file with Stage MARC records for import.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
[1] It runs, but also before patch
[2] File uploads without problem
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We could certainly remove 1 or 2 call to CGI->new in tools/background-job-progress.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10904: DBRev 3.21.00.047
Tomas Cohen Arazi [Mon, 2 Nov 2015 15:39:52 +0000 (12:39 -0300)]
Bug 10904: DBRev 3.21.00.047

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10904: (QA followup) Use branch limit if either IndependentBranches or Independen...
Kyle M Hall [Thu, 17 Apr 2014 14:18:26 +0000 (10:18 -0400)]
Bug 10904: (QA followup) Use branch limit if either IndependentBranches or IndependentBranchesPatronModifications is enabled

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

Behaviour now is:
IndependentBranches = Prevent
or
IndependentBranches = Don't prevent,
IndependentBranchesPatronModifications = Prevent:
You will always only see the modification requests of your branch's patrons.

IndependentBrnaches = Don't prevent,
IndependentBranchesPatronModifications = Don't prevent
All modification requests are shown.

Link to patron record works and cardnumber is shown.

IndependentBranches = OFF - use the new preference.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10904: (QA followup) would like to limit patron update request management by...
Kyle M Hall [Fri, 22 Nov 2013 18:50:38 +0000 (13:50 -0500)]
Bug 10904: (QA followup) would like to limit patron update request management by branch

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10904: Limit patron update request management by branch
Kyle M Hall [Thu, 10 Oct 2013 14:46:17 +0000 (10:46 -0400)]
Bug 10904: Limit patron update request management by branch

By not limiting the patron modification lists by branch, it can quickly
become overwhelming for a librarian. This patch makes the following
modifications:

* Only superlibrians will see the full list of borrowers with pending
  modifications.
* Adds the patron cardnumber after the patrons name on the modification
  list.
* Adds a link to the patron's record from the modification list.

Test Plan:
1) Apply this patch
2) Set up some pending modifications for two branches
3) Log in to the staff intranet as one of those branches
4) You should note the number of pending modifications counts
   only your logged in branch's patrons
5) Click the link, you should only see your logged in branches
   patrons in the pending modifications list.
6) You should note the cardnumber is displayed next to the patron name
7) You should note the "View record" link below each patron's name

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>