]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 17755: Introduce Koha::Patron::Attribute::Type(s)
Tomas Cohen Arazi [Mon, 31 Oct 2016 18:09:43 +0000 (15:09 -0300)]
Bug 17755: Introduce Koha::Patron::Attribute::Type(s)

This patch introduces the Koha::Object-based classes for handling
patron attribute types.

It also adds branch limitation handling to the
Koha::Patron::Attribute::Type class.

It is built on top of the new Koha::Object::Library::Limit class
that extends Koha::Object so it handles library limits.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17755: Unit tests
Tomas Cohen Arazi [Mon, 12 Dec 2016 14:15:45 +0000 (11:15 -0300)]
Bug 17755: Unit tests

This patch introduces unit tests for Koha::Object::Library::Limit. It is
done this way because it needs to be instantiated to be usable.

To test:
- Run:
  $ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17755: Introduce Koha::Object::Limit::Library
Tomas Cohen Arazi [Mon, 12 Dec 2016 17:17:44 +0000 (14:17 -0300)]
Bug 17755: Introduce Koha::Object::Limit::Library

This patch introduces a new class for extending Koha::Object using
multiple inheritance. It cannot be used standalone, it needs to be
used in Koha::Object implementations like this:

use base qw( Koha::Object Koha::Object::Limit::Library );

Its goal is to provide a single way and place to deal with this common
pattern in Koha's codebase.

As it happened with Koha::Object, that needed to be tested in a real object
class, this work was done on top of Koha::Patron::Attribute::Type implementation
and it is fully covered by the tests that are introduced for it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18066: Update Schema
Jonathan Druart [Thu, 23 Mar 2017 16:32:34 +0000 (13:32 -0300)]
Bug 18066: Update Schema

This patch basically reverts 85a21dd9715518746dd93defd4803a81d23a5b18

7 years agoBug 18066: Add the new geolocation column to kohastructure.sql
Jonathan Druart [Thu, 23 Mar 2017 16:31:24 +0000 (13:31 -0300)]
Bug 18066: Add the new geolocation column to kohastructure.sql

7 years agoFix updatedatabase.pl syntax error
Jonathan Druart [Thu, 23 Mar 2017 16:14:59 +0000 (13:14 -0300)]
Fix updatedatabase.pl syntax error

7 years agoBug 15854: Use a READ and WRITE LOCK on message_queue
Jonathan Druart [Thu, 9 Feb 2017 11:44:38 +0000 (12:44 +0100)]
Bug 15854: Use a READ and WRITE LOCK on message_queue

To make sure we will not never get a race conditions for these kinds of
notices, we need to add a LOCK on the message_queue table.

This does not smell the best way to do that, but I faced deadlock issues
when I tried to use "UPDATE FOR"

https://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html
https://dev.mysql.com/doc/refman/5.7/en/lock-tables.html
https://dev.mysql.com/doc/refman/5.7/en/commit.html

To test this patch, or another solution, you need to apply manually this
change:

         my $message = C4::Message->find_last_message($borrower, $type, $mtt);
         unless ( $message ) {
+            sleep(1);
             C4::Message->enqueue($letter, $borrower, $mtt);
         } else {

And repeat the test plan from first patch.
Do not forget to truncate the message_queue table.

Followed test plans, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 15854: Simplify the code to limit race conditions
Jonathan Druart [Thu, 9 Feb 2017 11:13:07 +0000 (12:13 +0100)]
Bug 15854: Simplify the code to limit race conditions

There is an obvious race condition when CHECKIN and RENEWAL are
generated from circulation.pl calling svc/renew or svc/checkin in AJAX.

The 2 first queries will try to get the id of the last message
(find_last_message) and if it does not exist, they will insert it.
Theorically that could be lead to have several "digest" messages for a
given patron.
I did not recreate more than 2 messages, from the third one at least one
of the two firsts existed in the DB already.

This patch just simplifies the code to make the SELECT and INSERT or
UPDATE closer and limit the race condition possibilities.

Test plan:
0. Set RenewalSendNotice and circ rules to have a lot of renewals available
1. Use batch checkouts (or one by one) to check out several items to a
patron
2. Empty message_queue (at least of this patron)
3. Renew them all at once ("select all" link, "renew or check in"
button)
4. Check the message_queue
Without this patch you have lot of chances to faced a race condition and
get at least 2 messages for the same patron. This is not expected, we
expect 1 digest with all the messages.
With this patch apply you have lot of chances not to face it, but it's
not 100% safe as we do not use a mechanism to lock the table at the DBMS
level.

Tested both patches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 17605: [MASTER] Add currency to orders generated by quotes
Colin Campbell [Wed, 9 Nov 2016 14:37:33 +0000 (14:37 +0000)]
Bug 17605: [MASTER] Add currency to orders generated by quotes

Sets the vendors currency in the edi generated order
The currency used is agreed between vendor and library
and the value in the quote is optional

Edifact potentially allows the currency to be overwitten
by specifying another currency in the CUX segment but
we know currently of no supplier doing this

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoUpdating the Schema
Brendan A Gallagher [Thu, 23 Mar 2017 00:39:22 +0000 (00:39 +0000)]
Updating the Schema

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 17995 - HOLDPLACED notice should have access to the reserves table
Nick Clemens [Wed, 25 Jan 2017 17:00:34 +0000 (17:00 +0000)]
Bug 17995 - HOLDPLACED notice should have access to the reserves table

To test:
1 - Add reserves.reservenotes to HOLDPLACED message
2 - Enable emailLibrarianWhenHoldIsPlaced OpacHoldNotes sysprefs
3 - Place a hold via OPAC with a note
4 - view the messagequeue and note the reservenotes is blank
5 - Apply patch
6 - Place a hold with a note
7 - view the messagequeue and note the reservenotes is populated

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: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18010: Remove potential exposure from gettemplate
Marcel de Rooy [Sun, 29 Jan 2017 14:40:14 +0000 (15:40 +0100)]
Bug 18010: Remove potential exposure from gettemplate

A similar bad template check from C4::Auth::get_template_and_user
should be applied in C4::Templates::gettemplate.

Before this patch it would be possible to expose files like:
my $template = C4::Templates::gettemplate(
    '/etc/passwd', 'intranet', CGI::new, 1
);
print $template->output;

Note that the is_plugin flag in the above call is the culprit. This patch
provides a quick security fix without touching get_template_and_user, and
can be backported to stable branches.
I will provide an enhanced and centralized check on report 17989, also
removing the is_plugin flag.

Note: We allow .pref here too for use in admin/preferences.pl.

Test plan:
[1] Run t/db_dependent/Auth.t (triggering get_template_and_user and
    gettemplate).
[2] Run t/db_dependent/Templates.t again (see first test plan).
    The tests should no longer fail.
[3] Open a page on opac or intranet.
[4] Open a systempreferences tab.
[5] Add a book to the cart and send it ([opac-]sendbasket uses gettemplate).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18010: Unit test for gettemplate
Marcel de Rooy [Sun, 29 Jan 2017 14:52:22 +0000 (15:52 +0100)]
Bug 18010: Unit test for gettemplate

A trivial test, similar to the ones in Auth.t.
Without the check in gettemplate (added in the second patch), the passwd
file will be exposed and the test fails.

Test plan:
Run t/db_dependent/Templates.t without second patch. The two tests in the
last subtest should fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18028: Remove outdated install_misc directory
Jonathan Druart [Wed, 1 Feb 2017 11:42:43 +0000 (12:42 +0100)]
Bug 18028: Remove outdated install_misc directory

This directory is no longer maintained and contain outdated information
on how to install Koha.
On the Internet there are tutos using them and that can create confusion
to new user (yes it could be confusing as well to execute a file that
does no longer exist).

NOTE: last tweak was mid 2016, but before that 2015. So I agree with
      the deletion.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoDBREV for Bug 18066 - Hea - Version 2
Brendan A Gallagher [Thu, 23 Mar 2017 00:18:10 +0000 (00:18 +0000)]
DBREV for Bug 18066 - Hea - Version 2

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Fix map positioning in admin/usage_statistics.pl
Julian Maurice [Tue, 21 Mar 2017 11:01:45 +0000 (12:01 +0100)]
Bug 18066: Fix map positioning in admin/usage_statistics.pl

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Fix tests
Jonathan Druart [Tue, 21 Mar 2017 10:21:38 +0000 (07:21 -0300)]
Bug 18066: Fix tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Use https for ws
Jonathan Druart [Tue, 28 Feb 2017 17:13:07 +0000 (17:13 +0000)]
Bug 18066: Use https for ws

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Do not use token for OSM tiles
Jonathan Druart [Tue, 28 Feb 2017 11:16:56 +0000 (11:16 +0000)]
Bug 18066: Do not use token for OSM tiles

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Add the leaflet library
Jonathan Druart [Tue, 7 Feb 2017 08:31:28 +0000 (09:31 +0100)]
Bug 18066: Add the leaflet library

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18066: Hea V2
Jonathan Druart [Thu, 2 Feb 2017 15:53:58 +0000 (16:53 +0100)]
Bug 18066: Hea V2

This patch is the Koha part of the Hea v2 project.
You can find the (testing) code for the server at
  hea-ws  - https://github.com/joubu/hea-ws/commits/v2
  hea-app - https://github.com/joubu/hea-app/commits/v2
They contain the different pull requests made over the last 6 months.

More information on Hea at https://wiki.koha-community.org/wiki/KohaUsageStat_RFC
The goal of this commit message is to provide an overview of what could
be a new version of Hea.

Prior to these changes, the Hea database was filled with 1 line per Koha
installation. System preferences were filled by the libraries and a
cronjob (share_usage_with_koha_community.pl) collected these values to send
them to a webservice (hea-ws/upload.pl).

With the need to collect more data we would want to collect data at the library
level (branch) and not at the installation level.
For instance the geolocation, the url or the country can be different from one
library to another, even if managed from the same Koha installation.
The Hea DB has been upgraded to reflect that change (see hea-app/sql/schema.sql).

The hidden goal of this patch is to make Hea sexier and explain
better to libraries how it can be useful to share their information
with the Koha community. I guess the main problem is the lack of
communication and explanations about what we are doing we these data.
To fill this gap I'd like to (TODO)
  1. Communicate on the ML about this new version of Hea (once it got
pushed and backported)
  2. Link the Privacy_Policy.md from the Hea interface
  3. Get help from a native English speaker to add
popup/help/info/whatever on "Home › Administration › Usage statistics",
to clearly explain what happens (and what will not happen!) when an option or
another is set.

You can find screenshot of this whole enhancement on bug 18066, comment 2.

What this patch does:
- Create a new branches.geolocation DB field
- Add 3 new sysprefs:
  * UsageStatsGeolocation
  * UsageStatsLibrariesInfo
  * UsageStatsPublicID
- Integrate the Leaflet JS library to get a fancy map to pick
geolocations

How does it works:
On the new administration page where statistics to share are configured,
there are several new things. It is now possible to share information either
per Koha installation or libraries. If UsageStatsLibrariesInfo is set,
the info at library level (url, name, country, geolocation) will be
sent to the Hea webservice. If it is not set, you can decide to fill
UsageStatsLibraryUrl, UsageStatsLibraryName, UsageStatsCountry,
UsageStatsGeolocation to share these information. Note that even if the
data are retrieved at installation level, it's better to fill the prefs
as well: On the Hea website the different libraries defined for a given
Koha installation could be displayed on the same page.
This page is a public page which will be attributed to every
installation (with the pref UsageStatsPublicID). On this page all the
info available publicly will be displayed.

TODO later:
- Add a button on the administration page to delete the info shared
publicly. It will be easy to show that the info are no longer displayed
on the public page.
- Add an icon per Koha installation to get a better "public page"
- Any suggestions?

Test plan:
We will need to test hea-ws, hea-app and the Koha-side code to test the
whole enhancement.
1/ To start, clone the hea-ws and hea-app project and checkout the
'master' branch (*not* 'v2')
2/ Create the hea database and user
  CREATE DATABASE hea
  CREATE USER 'hea'@'localhost' IDENTIFIED BY 'hea';
  GRANT ALL PRIVILEGES ON hea.* TO 'hea'@'localhost';
  FLUSH PRIVILEGES;
3/ Fill the DB with some data
  mysql hea < hea-app/sql/schema.sql
  mysql hea < hea-app/sql/sql/mock-data.sql
4/ Checkout the 'v2' branch for both hea-ws and hea-app
5/ Execute the upgrade DB script
  % cd hea-app
  % perl -p -i -e 's/REPLACE_ME/hea/' sql/upgrade.pl # Fill the DB info
  % perl sql/upgrade.pl
Now the DB is using the v2 structure. That means we have 1 installation
row per library previously defined. 1 library row has also been created.
5/ Configure hea-ws
% echo '192.168.50.1 hea.koha-community.org' >> /etc/hosts
<VirtualHost *:80>
  DocumentRoot "/path/to/hea-ws"
  ServerName "hea.koha-community.org"
  <Directory "/">
    Options +ExecCGI
    Require all granted
    AddHandler cgi-script .pl
  </Directory>
</VirtualHost>

And enable it with a2ensite, then restart apache.
The copy the database.yml.sample to database.yml and edit it to fill the
DB info.

6/ Launch the hea-app
  % cd hea-app
  % edit README.md # to install the missing modules
  % cp environments/config.yml environments/development.yml
  % edit environments/development.yml # to fill the DB info
  % perl bin/app.pl
Then hit localhost:3000
You should see a local version of Hea with sample data

7/ Back to Koha side
A. We will test that the webservice still works with previous version of Koha (without v2)
a. Do not configure Hea
  % perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
Then hit localhost:3000
=> Nothing added
b. Configure Hea on admin/usage_statistics.pl
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> New library added
c. Modify the Hea configuration
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> Info are modified

B. Not we will test that it works with the new version (much more fun ;))
% git checkout hea-v2 # koha
a. Configure Hea using /admin/usage_statistics.pl
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
=> Check the result on localhost:3000
b. Share libraries's info
perl misc/cronjobs/share_usage_with_koha_community.pl -f -v
c. Continue to play a bit and share the info.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 14608: Move country list to an include file
Jonathan Druart [Sun, 12 Mar 2017 22:54:58 +0000 (19:54 -0300)]
Bug 14608: Move country list to an include file

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 14608: Follow up on labels and search box
Mark Tompsett [Fri, 13 Jan 2017 18:33:05 +0000 (13:33 -0500)]
Bug 14608: Follow up on labels and search box

This addresses concerns raised in comment #26 and comment #27.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 14608: Add a reference to Hea at the end of the installer process
Jonathan Druart [Tue, 20 Dec 2016 22:31:41 +0000 (22:31 +0000)]
Bug 14608: Add a reference to Hea at the end of the installer process

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 14608: Add a link from the admin home page
Jonathan Druart [Tue, 20 Dec 2016 22:31:25 +0000 (22:31 +0000)]
Bug 14608: Add a link from the admin home page

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 14608: Add a page to configure shared statistics
Jonathan Druart [Tue, 20 Dec 2016 22:29:53 +0000 (22:29 +0000)]
Bug 14608: Add a page to configure shared statistics

This patch set adds:
- a reference to Hea at the end of the installation process
- a link to the new page from the admin home page
- a new page to easily configure shared statistics

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoUpdate DB Schema
Kyle M Hall [Thu, 23 Mar 2017 13:33:59 +0000 (13:33 +0000)]
Update DB Schema

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoDBREV for Bug 8010 - Search history can be added to the wrong patron
Brendan A Gallagher [Wed, 22 Mar 2017 22:16:10 +0000 (22:16 +0000)]
DBREV for Bug 8010 - Search history can be added to the wrong patron

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18069: Remove residue of rebuild_zebra -x
Jonathan Druart [Tue, 7 Feb 2017 08:10:42 +0000 (09:10 +0100)]
Bug 18069: Remove residue of rebuild_zebra -x

Bug 17731 removed the -x option of rebuild_zebra but koha-rebuild-zebra
still cals the script with this option.

"Warning: You passed -x which is already the default and is now deprecated"

Test plan:
sudo koha-rebuild-zebra -f
should no longer raise the warning

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18094: Only search in searchable patron attributes if searching in standard fields
Jonathan Druart [Tue, 14 Feb 2017 15:22:40 +0000 (15:22 +0000)]
Bug 18094: Only search in searchable patron attributes if searching in standard fields

Test plan:
- Add a new patron attrbute and mark it searchable
- Populate a new patron with 'potato' in that field
- Add/edit another patron to have email potato@invalidemail.com'
- Perform a patron search with query 'potato' (in standard fields)
=> Both patrons are returned
- Perform a patron search with filters 'Email' and query 'potato'
=> Only 1 patron is returned and you are redirected to the patron detail page.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18094: Add tests to highlight the problem
Jonathan Druart [Tue, 14 Feb 2017 15:19:25 +0000 (16:19 +0100)]
Bug 18094: Add tests to highlight the problem

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18215: Third case which was missed.
Mark Tompsett [Fri, 10 Mar 2017 20:04:15 +0000 (15:04 -0500)]
Bug 18215: Third case which was missed.

Git install old-school style a pre-tls koha
Drop the DB
Create the DB
change branch to master
Run a web install.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18215: Fix another tls warning
Marcel de Rooy [Fri, 10 Mar 2017 08:17:02 +0000 (09:17 +0100)]
Bug 18215: Fix another tls warning

Resolve warning:
Use of uninitialized value in string eq at C4/Installer.pm line 79.

Test plan:
Add a trivial .sql file in atomicupdate (comment is sufficient).
Run updatedatabase.pl
Without the patch you have the warning.
Apply the patch and repeat (no warning).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18246: Patron card creator: Unit not always displays properly in layouts
Marc Véron [Sat, 11 Mar 2017 18:17:37 +0000 (19:17 +0100)]
Bug 18246: Patron card creator: Unit not always displays properly in layouts

To reproduce:

1) Create a new layout
2) Select an unit in "Units selection"
3) Save
4) Edit layout again
5) Select other unit, e.g. 'SI Centimeter'
6) Save
7) Repeat
8) Edit again
Error: Latest unit seems to stick and can no longer be changed, because
in units drop down, multiple untis are marked as selected.

To test:
1) Apply patch
2) Repeat steps above, verify that value for units always display as expected.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 8603: Patron card creator - 'Barcode Type' doesn't stick in layouts
Marc Véron [Sat, 11 Mar 2017 16:18:10 +0000 (17:18 +0100)]
Bug 8603: Patron card creator - 'Barcode Type' doesn't stick in layouts

To reproduce:

1. Make a new layout
2. Tick "Print card number as barcode"
3. Change 'Barcode Type' to anything other than Code39
4. Save
5. Edit it again
6. Its back to Code39

To test:
1. Apply patch
2. Repeat steps above
3. Verify that 'Barcode type' is selected as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=18063

https://bugs.koha-community.org/show_bug.cgi?id=8063

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 17169 - Use CCODE descriptions instead of codes
Nick Clemens [Thu, 16 Feb 2017 14:26:20 +0000 (14:26 +0000)]
Bug 17169 - Use CCODE descriptions instead of codes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 17169: (QA followup) Add NORMARC and UNIMARC definitions for CCODE
Tomas Cohen Arazi [Mon, 6 Feb 2017 19:49:49 +0000 (16:49 -0300)]
Bug 17169: (QA followup) Add NORMARC and UNIMARC definitions for CCODE

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 17169: Add a facet for ccode fields to ElasticSearch
Nick Clemens [Tue, 11 Oct 2016 09:01:12 +0000 (09:01 +0000)]
Bug 17169: Add a facet for ccode fields to ElasticSearch

To test:
1 - Apply patch
2 - Backup your db
3 - Drop and create a new db to ensure your mappings are refreshed from
the patch
4 - add some titles with items with collection codes
5 - search and see collection code facets
6 - sign off

Work to be done:
1 - Replace codes with descriptions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18256: Koha::Items - Remove GetItemsCount
Jonathan Druart [Mon, 13 Mar 2017 04:11:54 +0000 (01:11 -0300)]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18264 - (QA Followup) Remove use of GetBiblioFromItemNumber Replace <blank> with...
Nick Clemens [Mon, 20 Mar 2017 11:22:41 +0000 (07:22 -0400)]
Bug 18264 - (QA Followup) Remove use of GetBiblioFromItemNumber Replace <blank> with (blank)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18264 - Course reserves - use itemnumber for editing existing reserve items
Nick Clemens [Tue, 14 Mar 2017 14:16:09 +0000 (14:16 +0000)]
Bug 18264 - Course reserves - use itemnumber for editing existing reserve items

This patch alters the crouse reserves module to use itemnumber as the
lookup method for existing reserves as opposed to barcode

To test:
1 - Apply patch
2 - Add some items to a course reserves - all should work as expected
3 - Delete the barcode for an item on reserve
4 - Note the edit link still resolves to the correct item

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: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBUG 8010: Removed Auth2.t
Baptiste Wojtkowski [Mon, 20 Mar 2017 08:35:17 +0000 (08:35 +0000)]
BUG 8010: Removed Auth2.t

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBUG 8010: Correct a few syntax errors, and moved tests
Baptiste Wojtkowski [Fri, 17 Mar 2017 16:12:59 +0000 (16:12 +0000)]
BUG 8010: Correct a few syntax errors, and moved tests

- Tests are now in t/db_dependent/Search/History.t
- There were 2 differents sysprefs in sysprefs.sql and in atomicupdate => fixed

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoAdded a new syspref to Load history to the next user
Baptiste Wojtkowski [Mon, 13 Feb 2017 15:21:57 +0000 (15:21 +0000)]
Added a new syspref to Load history to the next user

Added a syspref LoadHistory addSearchHistoryToTheFirstLoggedUser to select if you want the system to add the history of searches performed without session when you log in as registered user.
TEST PLAN
1 - Search in the catalogue, check you are not logged
2 - Log in : your last history should appear
4 - Log out
5 - Apply the patch
6 - Repeat 1 and 2
7 - Desactivate the syspref addSearchHistoryToTheFirstLoggedUser
8 - Repeat 1 and 2 : your last history shouldn't appear

The Unit test doesn't rollback but delete the added lines : the function get_template_and_user allway sets the autocommit to 1.

https://bugs.koha-community.org/show_bug.cgi?id=8010

Tested 3 patches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18115 - Fix use of Objects as hashref in acqui/addorderiso2709.pl - Bug 15503...
Nick Clemens [Fri, 3 Mar 2017 16:10:09 +0000 (16:10 +0000)]
Bug 18115 - Fix use of Objects as hashref in acqui/addorderiso2709.pl - Bug 15503 followup

Fix use of 'gstrate' for 'tax_rate'

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18150 - CanItemBeReserved doesn't work with (IndependentBranches AND ! canreserve...
Nicolas Legrand [Wed, 22 Feb 2017 09:11:18 +0000 (10:11 +0100)]
Bug 18150 - CanItemBeReserved doesn't work with (IndependentBranches AND ! canreservefromotherbranches)

The variable $item used to be a hash, but at the end of the function,
it's a Koha object. As $item->{homebranch} doesn't yield anything and
should be $item->homebranch. It prevents people using different
branches without holds between branches from placing a hold on an item
they should be able to place hold on.

Test plan:

1. Before patch

  a. with IndependantBranches off
  b. try to place hold on an item you should be able to place hold on
  c. it should work
  d. put IndependantBranches on and canreservefromotherbranches off
  e. shouldn't work

2. after patches redo steps from (1) and everything should be working
fine.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: Item is fetched twice, it's not necessary. But out of the scope of
this patch.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18305 - jquery.fixFloat.js breaks advanced MARC editor
David Gustafsson [Mon, 20 Mar 2017 14:13:13 +0000 (15:13 +0100)]
Bug 18305 - jquery.fixFloat.js breaks advanced MARC editor

Remove use of ECMASCRIPT 2015 default parameter syntax in
jquery.fixFloat.js to be compatible
with a wider range of browser versions.

Test plan:
  1. Usa a not so modern browser, for example Chrome/Chromium < 49, any version of IE
  besides Edge, Opera, or Firefox < 15.0.
  2. Edit a bibliographic record in staff client and try switching to
  advanced MARC editor (check console, no errors should appear).

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18242: [SOLUTION 2]Handle correctly move to old_issues
Jonathan Druart [Thu, 9 Mar 2017 19:58:17 +0000 (16:58 -0300)]
Bug 18242: [SOLUTION 2]Handle correctly move to old_issues

The table old_issues has a primary key defined on the issue_id column.
This issue_id comes from the issues table when an item is checked in.

In some case the value of issue_id already exists in the table

Basically this happens when an item is returned and mysqld is restarted:
The auto increment value for issues.issue_id will be reset to
MAX(issue_id)+1 (which is the value of the last entry of old_issues).
See also the description of bug 18003 for more informations.

In this solution the change is done at code level instead of DB
structure: If old_issues.issue_id already exists before moving from
the issues table, the issue_id is updated (not on cascade for
accountlines.issue_id, should it?) before the move.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18242: [SOLUTION 2]Add tests
Jonathan Druart [Thu, 9 Mar 2017 19:41:31 +0000 (16:41 -0300)]
Bug 18242: [SOLUTION 2]Add tests

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
7 years agoBug 18284: [QA Follow-up] Add test descriptions
Marcel de Rooy [Fri, 17 Mar 2017 09:52:46 +0000 (10:52 +0100)]
Bug 18284: [QA Follow-up] Add test descriptions

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.coml>
7 years agoBug 18284: (bug 17196 follow-up) Move biblio metadata when a biblio is deleted
Jonathan Druart [Thu, 16 Mar 2017 18:20:10 +0000 (15:20 -0300)]
Bug 18284: (bug 17196 follow-up) Move biblio metadata when a biblio is deleted

There is a deletedbiblio_metadata table but it is not populated when a
biblio is deleted. Since we have a ON DELETE constraint on
biblio_metadata.biblionumber, the row is deleted when the biblio entry
is deleted => data lost!

Test plan:
- Create a biblio
- Delete it

=> Without this patch the deletedbiblio_metadata table is not populated
with the biblio_metadata row related to the biblio

=> With this patch applied you should see that the row has been moved.

Followed test plan, behaves as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.coml>
7 years agoBug 18222 - Fix tests broken by Buug 18026
Olli-Antti Kivilahti [Tue, 7 Mar 2017 11:26:51 +0000 (13:26 +0200)]
Bug 18222 - Fix tests broken by Buug 18026

root@koha_ci_1:/home/koha/Koha# KOHA_CONF=$KOHA_CONF perl t/Koha_Template_Plugin_Koha.t
1..3
ok 1 - use Koha::Template::Plugin::Koha;
ok 2
    1..2
    ok 1 - Correct development version
    ok 2 - Correct maintenance version
ok 3 - Koha::Template::Plugin::Koha::Version tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18243: 16034 follow-up: Conditionally test Koha::ExternalContent::* modules loading
Srdjan [Mon, 13 Mar 2017 23:24:42 +0000 (12:24 +1300)]
Bug 18243: 16034 follow-up: Conditionally test Koha::ExternalContent::* modules loading

To test:
1 - Make sure you don't have WebService::ILS installed
2 - prove t/00-load.t
3 - You should get a failure to load module and tests are skipped
4 - Apply patch
5 - prove t/00-load.t
6 - Module is not loaded, test are skipped
Optional:
7 - Install WebService::ILS
5 - prove t/00-load.t
6 - Module is loaded, test passes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18243: 16034 follow-up: better handling of absence of WebService::ILS::OverDrive...
Srdjan [Thu, 2 Mar 2017 00:31:14 +0000 (13:31 +1300)]
Bug 18243: 16034 follow-up: better handling of absence of WebService::ILS::OverDrive::Patron at testing

To test:
1 - Make sure you don't have WebService::ILS::OverDrive::Patron
installed
2 - prove t/Koha_ExternalContent_OverDrive.t
3 - You should get a failure to load module and tests are skipped
4 - Apply patch
5 - prove t/Koha_ExternalContent_OverDrive.t
6 - Module is not loaded, test are skipped

Fixed small typo 'cannot filnd' -> 'cannot find'
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18275: Do not rely on CGI param userid to log a user in if auth is not required
Jonathan Druart [Wed, 15 Mar 2017 17:52:49 +0000 (14:52 -0300)]
Bug 18275: Do not rely on CGI param userid to log a user in if auth is not required

From opac/opac-memberentry.pl, authnotrequired is set.
That means a patron can access the page without being logged in. It is
used on this page for the self registration feature.

From C4::Auth::get_template_and_user, we have
  $userid = $q_userid;
$q_userid is previously set to the 'userid' CGI param.

We end up here if authonotrequired is set AND CGISESSID does not exist.

Test plan:
- Run:
  $ prove t/db_dependent/Auth.t
=> FAIL: Regression test for checkauth fails
- Apply this patch
- Run:
  $ prove t/db_dependent/Auth.t
=> SUCCESS: Tests pass.
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18275: Regression test
Tomas Cohen Arazi [Thu, 16 Mar 2017 12:23:24 +0000 (09:23 -0300)]
Bug 18275: Regression test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7143: Replace Santallan by Santellan
Marcel de Rooy [Thu, 19 Jan 2017 14:43:38 +0000 (15:43 +0100)]
Bug 7143: Replace Santallan by Santellan

Missed one typo in about.tt.
Can go along with the next patch here.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18215: Resolve warning on $tls in Database.pm
Marcel de Rooy [Mon, 6 Mar 2017 09:39:18 +0000 (10:39 +0100)]
Bug 18215: Resolve warning on $tls in Database.pm

Resolve this warning:
updatedatabase.pl: Use of uninitialized value $tls in string eq at /usr/share/koha/masterclone/Koha/Database.pm line 63.

Test plan:
[1] Check if you do not see the warning anymore.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Warning disappears after applying the patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16202: GetIssuingCharges should return a collectable amount
Colin Campbell [Tue, 5 Apr 2016 11:56:24 +0000 (12:56 +0100)]
Bug 16202: GetIssuingCharges should return a collectable amount

Charges should not include elements less than a penny/cent
they are not displayed but can be saved to the database
causing "odd" behaviour down the line

Make the routine round the resultant charge to nearest cent,
so consistent values are returned.
Removed the one case where it was rounded post call.
Although the main danger is values generated by the discount
calculation apply the rounding to all returned charges in case
the item charge is defined using the 3rd or 4th decimal
places.

NOTE: prove -v t/db_dependent/Circulation.t triggers the change.
      Though, all the returned amounts are 0.00 only.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18135: Show alert if no authorities selected in batch record deletion
Aleisha Amohia [Thu, 16 Feb 2017 22:19:59 +0000 (22:19 +0000)]
Bug 18135: Show alert if no authorities selected in batch record deletion

To test:
1) Go to Tools -> Batch record deletion
2) Select Authorities as record type, put in an auth id, click Continue
3) Unselect the authorities and click Delete selected records
4) Confirm an alert shows up
5) Clear the alert and confirm deleting the authority still works as
normal

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16530 - DBRev 16.12.00.013
Kyle M Hall [Fri, 3 Mar 2017 18:36:55 +0000 (18:36 +0000)]
Bug 16530 - DBRev 16.12.00.013

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16530: Add a new method to the Branches TT Plugin to avoid c/p
Jonathan Druart [Wed, 1 Feb 2017 16:54:43 +0000 (17:54 +0100)]
Bug 16530: Add a new method to the Branches TT Plugin to avoid c/p

We should do the same for the other check (FA exists), but cannot find a
good and quick way to implement.

Doing it this way will avoid regression later, we will no have to check
if the variable is correctly passed to the template.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16530: Adding a circ sidebar navigation menu and circSidebar syspref to activate...
Aleisha [Tue, 17 May 2016 04:35:46 +0000 (04:35 +0000)]
Bug 16530: Adding a circ sidebar navigation menu and circSidebar syspref to activate/deactivate

Edit: Fast cataloging link should now show on all pages, removed offline circulation links
Edit 2: Creates the syspref to activate or deactivate the sidebar
Edit 3: Fixing merge conflicts, using Koha::BiblioFrameworks to find FA
framework and adding sidebar to on-site checkouts

This adds a sidebar to
circ/branchoverdues.tt
circ/circulation.tt (I also fixed up some of the indentation in this file to make it easier to see where the divs started and ended)
circ/renew.tt
circ/returns.tt
circ/selectbranchprinter.tt
circ/transferstoreceive.tt
circ/view_holdsqueue.tt
circ/waitingreserves.tt
circ/branchtransfers.tt
circ/on-site_checkouts.tt

To test:
1) Confirm syspref CircSidebar is activated
2) Go to all of the above pages and confirm the sidebar menu shows up
3) Confirm fast cataloguing link and transfer link are there
4) Trigger any error messages you can possibly think of (i.e. on renew.pl: barcode does not exist). Confirm that this does not mess up the layout of the page
5) Go to a user account page, Check out tab. (Since this is a circ/circulation.pl page). Ensure the circ nav sidebar doesn't show up (confirm it looks as it usually does)
6) Deactivate circSidebar
7) Confirm pages all look normal

Sponsored-by: Catalyst IT
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 15427 : Enable TLS support for MySQL
Dimitris Kamenopoulos [Sun, 27 Dec 2015 03:01:43 +0000 (16:01 +1300)]
Bug 15427 : Enable TLS support for MySQL

In summary, changes are:
1) If you have chosen MySQL, Makefile.PL will ask you if you want TLS (default:
"no"), and then the locations for CA cert, client cert and client key
(reasonable defaults are provided). Settings <tls>, <ca>, <cert> and <key> are
added in koha-conf.xml
2) If <tls>yes</tls> in koha-conf.xml, the installer and database connection
scripts add the TLS options in both DBI connection strings and mysql command
line

To test
1/ Apply patch
2/ Check everything still works and db connections are the same as before
3/ Either run Makefile.PL and step through the options or edit your koha-conf.xml to
enable TLS
4/ Check db connections are still working

Patch provided to me by Dimitris Kamenopoulos and I reformatted it into a git patch,
any errors are probably mine

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14764 - DBRev 16.12.00.012
Kyle M Hall [Fri, 3 Mar 2017 18:30:01 +0000 (18:30 +0000)]
Bug 14764 - DBRev 16.12.00.012

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14764 - [followup] Addressing QA concerns
Liz Rea [Thu, 2 Feb 2017 21:18:51 +0000 (10:18 +1300)]
Bug 14764 - [followup] Addressing QA concerns

* removed Policy:
* put the syspref in alpha order with the others
* added els to the if.

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14764: OPAC news selector
Liz Rea [Wed, 2 Nov 2016 21:18:45 +0000 (10:18 +1300)]
Bug 14764: OPAC news selector

Test plan:

1) Add more than one library, at least two in total is needed. Make note
   of which is your current user's home branch.
2) Go to Tools -> News and add one global ("All") news item and one
   specific for each branch.
3) Apply the patches.
4) Perform database upgrades when you log in.
5) Go to OPAC main, it should work as before: Showing global news as
   well as the news for your home branch once logged in.
6) Go to System Preferences -> OPAC and set 'OPACNewsBranchSelect' to
   yes.
7) Go to OPAC main, you should see the global news item plus any items
   for your home branch for the current user if logged in.
8) Above the news, you will see a dropdown that lists the branches.
   Select one, and click "Change library."
9) You should now see global news and the news for the selected branch,
   regardless of whether logged in or not.

Sponsored-By: Halland County Library
Fixes QA comments:

* Keep the current selected branch selected

* Change OPACNewsBranchSelect -> OPACNewsLibrarySelect

* fix 'system wide only' view for logged in user. We still show system
  wide even when a library is selected.

* Removed the "change library" link

* Added a label to the field.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 10978: Redirect to basket list of a supplier after deleting a basket
Aleisha Amohia [Wed, 15 Feb 2017 00:30:57 +0000 (00:30 +0000)]
Bug 10978: Redirect to basket list of a supplier after deleting a basket

This patch redirects to the vendor's list of baskets after deleting a
basket, fixes breadcrumbs after deletion and also hides the toolbar
actions after deletion (seeing as you can't edit/export etc a basket
that no longer exists).

To test:
1) Go to Acquisitions -> find a vendor -> view a basket or create a new
basket
2) Delete the basket. Notice you are taken to a list of all vendors and
baskets
3) Apply patch and do step 1 again
4) Delete the basket. Notice appropriate breadcrumbs, no toolbar, and
confirm link to return to baskets for the vendor works.

Sponsored-by: Catalyst IT
Followed test plan, works as expected (links to vendor's baskets and all baskets)
Signed-off-by: Marc Véron <veron@veron.ch>
Re-tested. Wording of buttons "Show baskets for vendor..." and "Show all
active baskets" makes sense.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7663: Fix bad merge conflict with bug 15584
Jonathan Druart [Fri, 24 Feb 2017 07:46:19 +0000 (07:46 +0000)]
Bug 7663: Fix bad merge conflict with bug 15584

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7663 (QA Followup)
Nick Clemens [Fri, 24 Feb 2017 01:29:22 +0000 (01:29 +0000)]
Bug 7663 (QA Followup)

    Ignore empty entries

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7663 - batch add barcodes to a list
Nick Clemens [Thu, 1 Dec 2016 11:47:31 +0000 (11:47 +0000)]
Bug 7663 - batch add barcodes to a list

This patch changes the barcode input on add list to a textarea and
process multiples barcodes to allow for adding many items to a list
at once

To test:
 1 - Create a list
 2 - Add some items
 3 - Verify items are added and success reported
 4 - Add these items again
 5 - Verify you are notified they were not added
 6 - Type invalid barcodes into the text area and submit
 7 - Verify you are notifed of failure to add
 8 - Try going to a list that doesn't exist and adding barcodes
  i.e. http://localhost:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=add_biblio&shelfnumber=9999&barcodes=4
 9 - Verify correct error
10 - Try the above but with a list that exists while signed in as a patron
     without lists permission:
     i.e. http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=3
11 - Verify correct error: "You do not have permission to view this list."

Signed-off-by: Chris Kirby <chris.kirby@ilsleypubliclibrary.org>
Works as advertised.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18169: Add test without before parameter for search_patrons_to_anonymise
Jonathan Druart [Mon, 27 Feb 2017 13:28:20 +0000 (13:28 +0000)]
Bug 18169: Add test without before parameter for search_patrons_to_anonymise

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18169: Make 'before' param non mandatory for Koha::Patrons->anonymise_issue_history
Jonathan Druart [Fri, 24 Feb 2017 12:26:29 +0000 (13:26 +0100)]
Bug 18169: Make 'before' param non mandatory for Koha::Patrons->anonymise_issue_history

From opac-privacy.pl:

    # delete all reading records for items returned
    # uses a hardcoded date ridiculously far in the future

    my $rows = eval {
        Koha::Patrons->search({ 'me.borrowernumber' => $borrowernumber })->anonymise_issue_history( { before => '2999-12-12' } );
    };

It sounds better to make this before parameter not mandatory, and remove the condition from the sql query if it is not passed.

Test plan:
1. Anonymise your reading history at the OPAC.
2. Confirm that all your reading history has been anonymised

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18122 - Audio alerts: Add hint on where to enable sounds
Marc Véron [Wed, 15 Feb 2017 09:24:56 +0000 (10:24 +0100)]
Bug 18122 - Audio alerts: Add hint on where to enable sounds

This patch adds a hint to page Home > Administration > Audio alerts
and related help page about where to enable the sound system
(syspref 'AudioAlerts').

To test:
- Apply patch
- Disable syspref 'AudioAlerts'
- Go to Home > Administration > Audio alerts
- Note hint below title 'Audio alerts'
- Enable syspref 'AudioAlerts'
- Go to  Home > Administration > Audio alerts
- Hint is no longer visible (since audios are enabled)
- Open Help page (top right)
- Verify that hint on help page makes sense.

Amended to add alert class as requested by comment #2 2017-02-21 mv

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 13685: Sorting by author in opac reading history
Aleisha Amohia [Tue, 14 Feb 2017 19:42:15 +0000 (19:42 +0000)]
Bug 13685: Sorting by author in opac reading history

opac-readingrecord.pl was actually already set up to do this, the option
to sort by author was just not put into the tt file. This patch adds
that.

To test:
1) Log into OPAC, go to your reading history
2) Confirm that 'Order by author' shows in the dropdown
3) Confirm it works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18108: Sorting by author in opac summary
Aleisha Amohia [Tue, 14 Feb 2017 01:21:01 +0000 (01:21 +0000)]
Bug 18108: Sorting by author in opac summary

To test:
1) Log into OPAC, go to your summary
2) Notice 'author' is in Title column, therefore unable to sort by
author
3) Apply patch and refresh page
4) Notice author has now been moved into Author column
5) Confirm sorting by author works as expected and sorting of all other
columns works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18070: Correct error from podchecker on line 1376
Marcel de Rooy [Tue, 7 Feb 2017 13:03:54 +0000 (14:03 +0100)]
Bug 18070: Correct error from podchecker on line 1376

Resolves:
 *** ERROR: Spurious =cut command at line 1376 in file C4/AuthoritiesMarc.pm

Test plan:
[1] Run podchecker on C4/AuthoritiesMarc.pm

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18070: [Follow-up] What should DelAuthority return?
Marcel de Rooy [Tue, 14 Feb 2017 15:41:26 +0000 (16:41 +0100)]
Bug 18070: [Follow-up] What should DelAuthority return?

Script tools/batch_delete_records.pl only checks the return value of
DelAuthority. The return value depends on DBI rows, which is not always
reliable. It may return -1 when it 'does not know'.

Testing $@ in tools/batch_delete_records.pl should actually be enough.
The return value was discarded in C4/ImportBatch.pm. Removing an unused
variable.

Test plan:
[1] Pick an authority record with a few linked biblios.
    Delete this authority record via tools/batch_delete_records.pl.
    Check if the linked biblio records are cleaned up.
[2] Bonus: Make a typo in the SQL statement of DelAuthority. Check
    if batch_delete_records shows you the error message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18070: Extend sub merge to remove fields for deleted authorities
Marcel de Rooy [Tue, 31 Jan 2017 12:01:58 +0000 (13:01 +0100)]
Bug 18070: Extend sub merge to remove fields for deleted authorities

In order to accomplish this, we need to add some additional checks in
the merge routine. The actual change to remove the field, is quite
small.

Furthermore, we need to add a merge call in DelAuthority and adjust
the merge cron job accordingly.

The change is well supported by additional tests, including a simulation
of postponed removal via cron, if dontmerge is enabled.

Note: Deleting an authority with linked biblios is tested on the next
patch.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
[2] Delete an authority without linked biblios from the Authorities
    module. If the indexer is not fast enough, wait a bit and refresh to
    verify that the authority is gone on authorities-home.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18070: Deleting an authority should update the linked biblio records
Marcel de Rooy [Tue, 31 Jan 2017 10:46:21 +0000 (11:46 +0100)]
Bug 18070: Deleting an authority should update the linked biblio records

Adding a test where we delete an authority and prove that the linked
biblio still contains a reference to it.

Note: Currently, you can only delete a used authority from Tools,
batch record deletion. If you do, the biblio records will still
contain references to the deleted authority.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
    Last test should fail: not ok 1 - Field 609 should be gone too

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18037: Hold notes template cleanup (from 15545)
Marcel de Rooy [Mon, 15 Dec 2014 13:10:56 +0000 (14:10 +0100)]
Bug 18037: Hold notes template cleanup (from 15545)

From the second patch of bug 15545:
Removing some unused template code related to a former approach.
Adding some changes for future extension by bug 15545.

This patch was tested by Liz Rea when the routine IsHoldNoteRequired was
called by opac-reserve.pl. The only change here is that we do not yet
call this routine; so leaving her original signoff.

Test plan:
[1] Enable OPACHoldNotes.
[2] Place a hold on a serial record. No behavior change.

Signed-off-by: Liz Rea <liz@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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17840: adding classes to notes in checkouts
Emma Smith [Tue, 17 Jan 2017 03:23:18 +0000 (03:23 +0000)]
Bug 17840: adding classes to notes in checkouts

Test Plan
1) Add an internal and a public note to an item.
2) Check out the item.
3) Verify that both notes are shown in between title and barcode in the
second column of the details table.
4) Verify there is an empty class="" in the HTML source code for each
5) Apply patch and refresh page
6) View page source, confirm that class has been changed

I tested this by first applying the patch for bug 17919 to catch the
check-in software error. Patch working as expected :)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17334: Format the date according to the system preference
Jonathan Druart [Thu, 26 Jan 2017 11:43:14 +0000 (12:43 +0100)]
Bug 17334: Format the date according to the system preference

- Use KohaDates TT plugin to format the date correctly
- Do not use a temporary variable
- Replace:
    patron's info Requested: Datetime
  with
    patron's info - Requested on Datetime

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17334- Added a timestamp to the members-update.tt To show the user when the pendi...
Alex Buckley [Fri, 20 Jan 2017 03:59:24 +0000 (03:59 +0000)]
Bug 17334- Added a timestamp to the members-update.tt To show the user when the pending modifications were requested.

Test plan:
1.Log into OPAC and click on Lists->Your Lists->your personal details

2. Change/add a value in that form

3. Select the 'Submit update request'

4. Log into the Koha staff interface, then go to the url:
cgi-bin/koha/members/members-update.pl

5. You will see near the top of each box containing a pending request the following are displayed: surname, firstname,
    patron category, branch, and cardnumber but no timestamp.

6. Apply this patch

7. Repeat steps 1,2, 3, 4

8. You will now see timestamp in the format "Requested: YYYY-MM-DD
HH:MM:SS" next to each patrons details near the top of each pending
request box.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: [QA Follow-up] Check count, not size in template
Marcel de Rooy [Mon, 27 Feb 2017 12:21:18 +0000 (13:21 +0100)]
Bug 16966: [QA Follow-up] Check count, not size in template

The method size is not covered by tests at koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt line 163.
The method size is not covered by tests at koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt line 183.

Script cleanborrowers passes patrons_to_delete and patrons_to_anonymize to
the template. One is an array ref where we should use 'size', the other is a
Koha::Patrons object where we should use 'count'.
If we don't, we will not anonymize a lot of records ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: move parameters to hashref
Jonathan Druart [Fri, 24 Feb 2017 11:34:26 +0000 (12:34 +0100)]
Bug 16966: move parameters to hashref

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: Fix small QA issues
Jonathan Druart [Fri, 24 Feb 2017 11:25:33 +0000 (12:25 +0100)]
Bug 16966: Fix small QA issues

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: Teach K::S::R::OldIssue its Koha objects class
Jonathan Druart [Fri, 17 Feb 2017 09:39:09 +0000 (10:39 +0100)]
Bug 16966: Teach K::S::R::OldIssue its Koha objects class

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: The method should return a Koha::Patrons object
Jonathan Druart [Tue, 20 Dec 2016 11:15:10 +0000 (12:15 +0100)]
Bug 16966: The method should return a Koha::Patrons object

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: Make the tests pass again
Jonathan Druart [Tue, 20 Dec 2016 10:08:35 +0000 (10:08 +0000)]
Bug 16966: Make the tests pass again

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: Koha::Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patr...
Jonathan Druart [Fri, 22 Jul 2016 16:25:24 +0000 (17:25 +0100)]
Bug 16966: Koha::Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patrons_to_anonymise

The C4::Members::GetBorrowersWithIssuesHistoryOlderThan subroutine is supposed
to return the patrons with an issue history older than a given date.

It would make more sense to return a list of Koha::Patrons.

On the way, the code from AnonymiseIssueHistory will be moved as well to
anonymise_issue_history.

Note that these 2 subroutines are strongly linked: one is used to know the
number of patrons we will anonymise the history, the other one is used to
anonymise the issues history. The problem is that the first one is not used to
do the action, but only for displayed purpose.

In some cases, these 2 values can differ, which could be confusing.
Case 1:
The logged in librarian is not superlibrarian and IndependentBranches is set:
if 2+ patrons from different libraries match the date parameter, the interface
will display "Checkout history for 2 patrons will be anonymized", when actually
only 1 will be.
Case 2:
If 2+ patrons match the date parameter but one of them has his privacy set to
forever (privacy=0), the same issue will appear.

This patch moves the code from C4::Members::GetBorrowersWithIssuesHistoryOlderThan
to Koha::Patrons->search_patrons_to_anonymise and from
C4::Circulation::AnonymiseIssueHistory to
Koha::Patrons->anonymise_issue_history

Test plan:
1/ Confirm the 2 issues and make sure they are fixed using the Batch
patron anonymization tool (tools/cleanborrowers.pl)
2/ At the OPAC, use the 'Immediate deletion' button to delete all your
reading history (regardless the setting of the privacy rule)
3/ Use the cronjob script (misc/cronjobs/batch_anonymise.pl) to
anonymise patrons.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: Koha::Patrons - Move AnonymiseIssueHistory tests
Jonathan Druart [Fri, 22 Jul 2016 15:43:56 +0000 (16:43 +0100)]
Bug 16966: Koha::Patrons - Move AnonymiseIssueHistory tests

The next patch will move C4::Circulation::AnonymiseIssueHistory and
C4::Members::GetBorrowersWithIssuesHistoryOlderThan to Koha::Patrons
This patch move the history anonymisation code to the Patrons.t test
file and the entire subtest related to StoreLastBorrower to
StoreLastBorrower.t

It just moves and add some minor adjustements.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16966: GetBorrowersWithIssuesHistoryOlderThan - Highlight the existing issue...
Jonathan Druart [Fri, 22 Jul 2016 14:57:26 +0000 (15:57 +0100)]
Bug 16966: GetBorrowersWithIssuesHistoryOlderThan - Highlight the existing issue in tests

If IndependentBranches is set, the code is buggy. This patch only
highlight the bug by providing a test.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 13968: Follow up - Clean HTML tags for hints
Mark Tompsett [Tue, 21 Feb 2017 18:13:02 +0000 (13:13 -0500)]
Bug 13968: Follow up - Clean HTML tags for hints

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 13968 - Branch email hints are misleading
Marc Véron [Sat, 18 Feb 2017 16:15:06 +0000 (17:15 +0100)]
Bug 13968 - Branch email hints are misleading

This patch replaces missleading notes with Reply-To and Return-Path fields
to reflect indicate falback values if they are empty (ReplyToDefault and
ReturnpathDefault system prefs).

To test:
- Apply patch
- In Home > Administration > Libraties and Groups, edit a library
- Verify that hints display for fields Reply-To and Return-Path, indicating
  their default values.

Amended to remove extra </li> - 2017-02-21 mv

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18087: Handle invalid filetypes
Jonathan Druart [Tue, 14 Feb 2017 09:52:14 +0000 (10:52 +0100)]
Bug 18087: Handle invalid filetypes

If an invalid file is used as biblionumber list, we should display a
message.

Test plan:
1/ Use csv, plain text files
=> Should work
2/ Use invalid files (binary files like pdf, doc*, xsl*, etc.)
=> Should not work and see a warning message.

Amended patch after signoff: Remove one warn debug line

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18087 - Clarification on File type when using file of biblionumbers to export...
Joy Nelson [Thu, 9 Feb 2017 19:42:57 +0000 (11:42 -0800)]
Bug 18087 - Clarification on File type when using file of biblionumbers to export data

Added a line to the screen  detailing the types of files that can be used to upload a list of biblionumbers.

Test plan:
1. Go to tools->export data
2. under File option,  (File types accepted: .csv and .txt)  should appear
3. Check both Bibliographic and Authority Export screens for this new string.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17992: REST api: Remove the use of ->unblessed from Cities controller
Tomas Cohen Arazi [Wed, 25 Jan 2017 12:35:42 +0000 (09:35 -0300)]
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller

As bug 17932 adds TO_JSON to Koha::Object(s), there's no need for using
it. Also, as this is a reference implementation for developers to copy
and paste it is sensible to make this change even when this is not
causing any bug.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18160 [QA Followup] - Correct whitespace
Kyle M Hall [Fri, 3 Mar 2017 16:54:15 +0000 (16:54 +0000)]
Bug 18160 [QA Followup] - Correct whitespace

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18160: Follow up tweak if condition
Mark Tompsett [Thu, 23 Feb 2017 16:47:00 +0000 (11:47 -0500)]
Bug 18160: Follow up tweak if condition

Based on comment #9, moved if condition.
Based on comment #8, tweaked condition to grab preference.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>