Commit graph

30910 commits

Author SHA1 Message Date
b76ee62eed Bug 9573: Add missing KOHA_VERSION in js paths
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
618b15a569 Bug 9573: Add missing use statement
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
8b5b1a0358 Bug 9573: (follow-up) Lost items report - add KohaTable to itemlost
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
abbd0eeea9 Bug 9573: Lost items report - Add the CSV export ability
Finally we add the ability to export the list of lost items.
The items will be export in CSV format using a CSV profile defined.

Test plan:
0/ Apply all the patches from this patch set
1/ Define a CSV profile (type=SQL, Usage=Export lost items in report)
Try something like that to get the same columns as the default table:
Title=biblio.title
|Author=biblio.author
|Lost status=items.itemlost
|Lost on=items.itemlost_on
|Barcode=items.barcode
|Call number=items.itemcallnumber
|Date last seen=items.datelastseen
|Price=items.price
|Rep. price=items.replacementprice
|Library=items.homebranch
|item type=items.itype
|Current location=items.holdingbranch
|Location=items.location
|Not for loan status=items.notforloan
|Notes=items.itemnotes
2/ Use the filters and select items to export
3/ Export the list of items you want and make sure the CSV is correctly
formatted and contains the items you selected

QA Notes:
- I think we should add default CSV profiles for the different "usage",
but I would consider it as a separate enhancement since none of them is
defined yet
- Most of the code to export CSV is no reusable. We should make
Koha::Exporter::Record support CSV export for type=SQL (it only
supports MARC type so far).

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
17948b0c37 Bug 9573: Lost items report - Add a new "Export selected items" link
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
8a118d01bf Bug 9573: Lost items report - Add a new itemlost_on column
This patch adds a new "Lost on" column to the result table

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
c2eb7633ca Bug 9573: Lost items report - add KohaTable to itemlost
Before this patch set, we used KohaTable to display a table with the
column visibility plugin, and an usual dataTable initialisation for the
filters.
For the lost items report table we will need both.
To do so we need to reorganize the code a bit

We cannot pass a selector but the id of the node which represents the
table. Indeed it is how works currently the filters (we may want to
improve that later)

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:14 -03:00
771de35a2b Bug 9573: Lost items report - Move filters code to a separate js file
For the next patches we will need to reuse what is already done on the
bibliographic record detail page. This patch moves the code to make it
reusable easily and avoid copy and paste.

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:13 -03:00
61c832a507 Bug 9573: Lost items report - Add items.notforloan as a filter
This patch adds a new "Not for loan" status filter to the lost items
report.

Test plan:
0/ Apply all patches from this patch set
1/ Use the new "Not for loan" filter to search lost items
2/ The table result must be consistent and a new "Not for loan" column
should be there
3/ Confirm that you are able to hide/show this column with the column
settings tool.

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

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-17 18:32:13 -03:00
f6378a8fb3 Bug 15794: Add emojiarea to the license area of the about page
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 18:12:55 -03:00
294c1dc1eb Bug 15794: Add [% KOHA_VERSION to .css and .js
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 18:12:55 -03:00
e11fd3060f Bug 15794: Add an emoji picker to tag entry in OPAC
This patch introduces an emoji picker int othe OPAC's tag entry form.
It relies on the emoji-picker library [1]

To test:
- Apply the patches
- Restart all services (just in case some caching is taking place):
  $ restart_all
- Log into the OPAC
- Do a search, pick a record
- On the detail page for the record, click on 'Add tags'
=> SUCCESS: An input form is displayed, with an emoji picker on the
    right.
=> SUCCESS: Choosing an emoji populates the input with it
- Set 'TagsModeration' and retry
=> SUCCESS: Proposed tags are displayed correctly on the staff interface
    for tag moderation
- Sign off :-D

Sponsored-by: Hotchkiss School

[1] https://github.com/OneSignal/emoji-picker

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 18:12:55 -03:00
358d5f2ab2 Bug 18336: DBRev 17.12.00.016
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 18:12:55 -03:00
052572cd1e Bug 18336: DBIC Schema changes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 18:12:55 -03:00
46a39cf4fb Bug 18336: Library groups fix
Library groups were added after this patchset was submitted.
This patch adjusts kohastructure.sql entry for library_groups.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:44 -03:00
340042dbae Bug 18336: Shift *TEXT columns size
Because of the 3-byte vs. 4-byte char size change in utf8mb4, altering a
column's encoding from utf8 into utf8mb4 results in this changes:

TEXT => MEDIUMTEXT
MEDIUMTEXT => LONGTEXT

The column size in the rows (the text itself goes to a separate object
storage) shifts by 1 byte, because all chars are shifted in bytes size
too, so there needs to be room for the byte-count in the column.

This is a debatable change, but the path needs to be included along with
the rest of the patchset for consistency.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:43 -03:00
f45d606e10 Bug 18336: Fix missing utf8_bin > utf8mb4_bin translation in kohastructure.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:43 -03:00
ac77cc5349 Bug 18336: Add explicit index names to kohastructure.sql
This patch just adds an explicit index name to the search_marc_map
table. The atomicupdate on this patchset is a good example of why we
better have them.

Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:43 -03:00
5c09a18ade Bug 18336: Atomic update
Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:43 -03:00
d6e444198f Bug 18336: DBIC update
Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:43 -03:00
c655a2000a Bug 18336: Convert schema from utf8 to utf8mb4
This patch adapts the DB structure so it uses utf8mb4 encoding and
utf8mb4_generic_ci collation.

Indexes for columns of type VARCHAR with prefix lenght higher than 191
are shortened because of the smaller max index lenght for utf8mb4

Note: please beware that testing this patchset risks your data and the
patchset includes reinitializing the DB.

To test:
- Be on the master branch
- Have a clean DB:
  $ reset_all
  (y)
- Apply the first patch (Unit tests)
- Run:
  $ kshell
 k$ prove t/db_dependent/www/search_utf8.t \
          t/db_dependent/www/auth_values_input_www.t
=> FAIL: Tests fail because Koha doesn't support supplemental (UTF-8)
         chars.
- Apply the rest of this patchset
- Upgrade the schema:
  $ kshell
 k$ perl installer/data/mysql/updatedatabase.pl
- Run the tests:
 k$ prove t/db_dependent/www/search_utf8.t \
          t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!
- Now start from a clean DB
- Run:
  $ reset_all
  (y)
- Run the tests:
 k$ prove t/db_dependent/www/search_utf8.t \
          t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!

Verify you can use emojis all over the place (MARC records, AV
        descriptions, etc).

Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
6a7341c98d Bug 18336: SET NAMES utf8mb4 in Koha::Database
Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
d74c5393ed Bug 18336: Full stack tests for supplemental UTF-8 chars
This patch introduces tests for Koha's support for 4-byte supplemental
UTF-8 chars. encoding/decoding tools handle this gracefuly. The missing
piece is the MySQL DB backend.

The tests in this patch:
- Adds a couple records for each flavour (MARC21 and UNIMARC) so
  search_utf8.t tests 4-byte chars are handled correctly
- Adds emoji testing in auth_values_input_www.t

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/www/search_utf8.t \
          t/db_dependent/www/auth_values_input_www.t
=> FAIL: It should fail if the DB hasn't been migrated into using
utf8mb4

Sponsored-by: Hotchkiss School

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
d1ccd5ed35 Bug 20004: Fix POD
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
dfbadc70d4 Bug 20004: Adapt /v1/cities to new naming guidelines
This patch implements the changes required by the cities endpoint RFC
[1].

It uses the objects.search helper, and relies on bug 19686.

To test:
- Apply the patches
- Compare the spec with the RFC (api/v1/swagger/definitions/city.json)
=> SUCCESS: It makes sense
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> Tests pass!
- Sign off :-D

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
3afbbdf48c Bug 20004: Unit tests
This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:41 -03:00
1b16c0b35d Bug 20229: Explicitly list the SQL modes we support
In our installation procedure we ask the administrator to edit the
MySQL|MariaDB configuration file to specify the SQL modes we support
(see bug 17258 comment 6 and 7 for more information).

We are on the way to catch and fix all these issues and support these
stricter modes (as they highlight problem in our codebase/DB structure)
but in the meanwhile it may be good to remove this step and revert the
changes when we are ready.

TODO:
- Remove that for dev installations (to let developers catch these bugs)
- Edit the wiki page to remove this step

Test plan:
0. Do not apply this patch
1. Edit your MySQL|MariaDB config and add:
sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to the [mysqld] section (or edit it)
2. Restart your DBMS
3. Try to make the app explode (watch the logs)
(tips: you should get "'koha_kohadev.me.id' isn't in GROUP BY" when
editing an order)
4. Apply the patch, restart_all, restart your DBMS
5. Try to recreate the failure
=> You should no longer see the error in the logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 16:46:18 -03:00
f34dcf3658 Bug 18789: (follow-up) Fix page title when creating a new patron
This has been caught by selenium test, the category name must be
displayed when we are creating a new patron, and so does not depends on
the "patron" variable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 15:05:40 -03:00
c48ac7a05a Bug 18789: (follow-up) Fix perlcritic issue - housebound.pl
"$branch" is declared but not used at line 65, column 1.  Unused
variables clutter code and make it harder to read.  (Severity: 3)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 15:05:34 -03:00
ae7f0ae4b5 Bug 19686: (follow-up) Add to_api param for completeness
This patch adds (yet) another param to objects.search: a reference
to a to_api function to be applied when processing the search results
for output.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Test count raised, and tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:20 -03:00
4bd62d0a8c Bug 19686: Add objects.search a 'to_model' param
This patch introduces a new parameter to the objects.search Mojo helper.
The idea behind this, is that if there's any attribute name mapping
between the DB objects and the API exposed ones, we should be able to
pass it to objects.search so the filtering query params are mapped
correctly for building the DBIC query, like this example:

  my $patrons_set = Koha::Patrons->new;
  my @patrons = $c->objects->search( $patrons_set,
                                     \&to_model
                                    )->as_list;
  # and probably
  @patrons = map {to_api($_)} @patrons;

The to_model function needs to avoid autovivification, to prevent
messing with the query parameters (undef params).

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass! Params get mapped!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:20 -03:00
37ed1111ce Bug 19686: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:19 -03:00
b3434ebb3d Bug 19947: Update popup window templates to use Bootstrap grid: Acquisitions transfer order
This patch updates the acquisitions transfer order template to use the
Bootstrap grid instead of the YUI grid.

Also fixed: Corrected footer include for popup window.

To test, apply the patch and go to Acquisitions -> Vendor -> Open order
-> Transfer.

In the popup window search for a vendor, select, and choose a basket.

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:19 -03:00
f88a68e993 Bug 19932: (follow-up) Add fixed footer to cataloging Z39.50 popup
This patch adds additional Bootstrap framework markup to the search form
so that the "Save" and "Cancel" controls are in a fixed footer at the
bottom of the window. This prevents the controls from disappearing down
off screen.

To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
In the popup window, both the search form and search results pages
should look correct.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:19 -03:00
9a6ef80a3d Bug 19932: Update popup window templates to use Bootstrap grid: Cataloging Z39.50 search
This patch updates the cataloging Z39.50 search template to use the
Bootstrap grid instead of the YUI grid.

Also fixed: Several un-quoted HTML attributes have been corrected.

To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
In the popup window, both the search form and search results pages
should look correct.

Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
4339291f44 Bug 20227: Check for categorycode in default_borrower_circ_rules
Fixes silent crash when adding the same category twice.
DBD::mysql::st execute failed: Duplicate entry 'ST' for key 'PRIMARY' [for Statement "
                INSERT INTO default_borrower_circ_rules
                    (categorycode, maxissueqty, maxonsiteissueqty, max_holds)
                    VALUES (?, ?, ?, ?)
            " with ParamValues: 0="ST", 1=undef, 2=undef, 3="3"] at /usr/share/koha/devclone/admin/smart-rules.pl line 309.

(Line number affected by bug 15524.)

Very trivial solution.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
Kyle M Hall
427b9a70ba Bug 12598: Fix POD
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
2b07298991 Bug 12598: Use Pod::Usage and make the help more explicit
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
bd122369dc Bug 12598: Remove warnings from tests and make them pass
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
29e4291718 Bug 12598: Add use Koha::Patron::debarments statement
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:17 -03:00
2cd0f388fa Bug 12598: Re-add bug 18555: Create patron list from patron import
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:17 -03:00
Colin Campbell
8f8eb35c2f Bug 12598: Allow matched patron to be updated
When a test was introduced to not add duplicate userids
it overlooked that if you were matching on userid you
do not want the update to be rejected.

Add a test to overcome this logical flaw if updating
by matching userid

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:14 -03:00
b361ff2d7d Bug 12598: Re-add some missing stuffs
This patch will have to be squashed with previous ones, but for
readability I prefer to let it alone for now.

It reintroduces 2 missing changes:
  commit fd12390365
    Bug 15010: Import patron tool creates 'duplicate' restrictions (
    debarments )
  commit 011d8e9855
    Bug 12543 - Add userid as matchpoint for "Import patrons" tool

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:58 -03:00
c9c0697ca5 Bug 12598: Fix conflict with 17829 - GetMember
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:58 -03:00
70c45c3781 Bug 12598: Fix conflict with bug 16911
Tests will have to be written for this change

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:58 -03:00
e1476578f2 Bug 12598: Update code to use new modules
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:58 -03:00
c2066bcadc Bug 12598: New misc/import_borrowers.pl command line tool
Test Plan:
1) Apply this patch
2) Test importing patrons from command line,
   options are availble with --help.

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

Tested with minimal csv
(cardnumber,surname,firstname,categorycode,branchcode,password,userid)

Overwrite does not change category or branch.
Patrons are loaded, userid & password works

Updated license to GPLv3
No other koha-qa errors.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

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

Bug 12598 - Tidy import_borrowers.pl

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

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

Bug 12598 - Move importing code to a subroutine

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

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

Bug 12598 - Update command line script to use patron import subroutine

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

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

Bug 12598 [QA Followup]

* Fix copyright on import_borrowers.pl
* Changes -c --csv to -f --file
* Adds -c --confirm option
* Renames misc/import_borrowers.pl to misc/import_patrons.pl
* Restore userid matchpoint option

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

Bug 12598 - Fix merge to master. Backport 3 updates from latest import_borrowers.pl

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

Bug 12598 - Started regression tests. Fix missing C4::Members::Attributes package

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

Bug 12598 - More refactoring and regression tests in Koha::Patrons::Import

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

Bug 12598 - Creating objects in misc/import_patrons.pl and tools/import_borrowers.pl

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

Bug 12598 - Refactoring Koha::Patrons::Import includes bug fixed for critical date types and header column parsing

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

Bug 12598 - Rebase + backport of 16426 plus fixing 16426

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

Bug 12598: catch warnings raised by import_patrons in tests

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:57 -03:00
97bfd4be33 Bug 18789: Add POD for is_adult and is_child
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:57 -03:00
249736a67f Bug 18789: (QA follow-up) Fix viewlog when accessed via circulation
Test plan:
Go to any patron and then to Modification log of this patron
-- without patch you will not see the left side menu and patron information
-- with patch menu and patron information is here, and should be fully
working (links)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:59 -03:00
0b2c4ff551 Bug 18789: (QA follow-up) Update holdshistory.pl, fix is_child, is_adult, patron->image, clear template params
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:58 -03:00