Commit graph

2877 commits

Author SHA1 Message Date
46085442e0 Bug 17486 - DBRev 16.12.00.003
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 12:35:11 +00:00
e55b38928a Bug 17486: Remove Mozilla Persona
Persona never really took off, and although many browsers currently
support it, very few services actually implement it.

This has lead to it's founders, Mozilla, to end the project. In their
own words:

=============================================================================
Persona is no longer actively developed by Mozilla. Mozilla has
committed to operational and security support of the persona.org
services until November 30th, 2016.

On November 30th, 2016, Mozilla will shut down the persona.org services.
Persona.org and related domains will be taken offline.

If you run a website that relies on Persona, you need to implement an
alternative login solution for your users before this date.

For more information, see this guide to migrating your site away from
Persona:

https://wiki.mozilla.org/Identity/Persona_Shutdown_Guidelines_for_Reliers

=============================================================================

Given the above, and that the Persona authentication methods as a whole
are no longer being actively maintained by anyone anywhere to ensure
ongoing security, we should deprecate the option from koha.

Test plan:
Apply this patch and make sure you do not find any references of Persona
Have a look at patches from bug 9587 and confirm that everything has
been reverted

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Code looks good to me.
Also ran several tests including: Auth.t, Auth_with_shibboleth.t.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 12:32:19 +00:00
a2afebe115 Bug 14187 - DBRev 16.12.00.002
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 12:24:39 +00:00
ac3e4ce671 Bug 14187: (QA followup) Properly check DB structure before altering it
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 12:20:12 +00:00
Olli-Antti Kivilahti
292b9df914 Bug 14187: branchtransfer needs a primary key (id) for DBIx and common sense.
* C4/Circulation.pm (GetTransfers, GetTransfersFromTo): Also return
  branchtransfer_id in return columns.
* installer/data/mysql/atomicupdate/14187.perl: New file.
* installer/data/mysql/kohastructure.sql: Modify branchtransfers structure.
* t/db_dependent/Circulation/transfers.t: Update tests to expect
  branchtransfer_id.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Test plan successful on all steps.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Remove Schema changes from this patch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 12:20:11 +00:00
05fdd855c8 Bug 17234: Need to separate KEY and FOREIGN KEY checks
In the previous patch we use the constraint_exists subroutine to verify
if an index or a foreign key exists.
But the `SHOW INDEX` query does not return foreign keys (as its name
suggests!).
We need another subroutine foreign_key_exists to check the FK existence.

I have found that because t/db_dependent/TestBuilder.t fails on
oai_sets_biblios, because oai_sets_biblios_ibfk_1 has not been removed.

Test plan:
0/ Do not apply this patch
1/ Use a 3.20 DB
2/ update the DB
3/ SHOW CREATE TABLE oai_sets_biblios
will display oai_sets_biblios_ibfk_1

Apply the patch and repeat 1, 2, 3
=> Will not display oai_sets_biblios_ibfk_1
It has been removed as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-12 12:43:10 +00:00
0b15c5e2cc Bug 17234: Move new subroutines to C4::Installer
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-11 10:52:10 +00:00
c08922180e Bug 17234: Add constraint_exists and column_exists to updatedatabase.pl
These 2 subroutines will help us deal with the absense of ALTER IGNORE
TABLE

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-11 10:52:10 +00:00
Mark Tompsett
4ea484677e Bug 17234: Follow up to handle new problems
Bug 16276 added two more ALTER IGNORES. This removes them.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-11 10:52:09 +00:00
Blou
acf425bbbc Bug 17234 - updatedatabase.pl's ALTER IGNORE break with mysql 5.7.4+
The doc says: "As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error."
This fix replaces ALTER IGNORE with ALTER in updatedatabase.pl

To TEST, try an upgrade from 3.18 to 3.22 after installing the latest mysql (at least 5.7.4, by the doc).
Some will fail with error

DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE aqbasket
            ADD KEY authorisedby (authorisedby)' at line 1 [for Statement "
        ALTER IGNORE TABLE aqbasket
            ADD KEY authorisedby (authorisedby)
    "] at ./installer/data/mysql/updatedatabase.pl line 10563.

0) Find a database on 3.18, save it.
1) Set your code base to 3.22(or master)
2) run updatedatabase.pl
3) See the errors.
4) Apply the patch
5) Reload the 3.18 database
6) succeed with updatedatabase.pl

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-11 10:52:09 +00:00
28d81cb7bb Bug 17767 - DBRev 16.12.00.001
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-28 13:59:03 +00:00
af976a7fc6 Bug 17767: Add borrower_modification.extended_attributes
This patch changes the DB structure adding borrower_modifications.extended_attributes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-28 13:53:01 +00:00
c9e95aa22e Bug 17666: Revert "Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp"
This reverts commit 7ac1bc3537.

On a kohadevbox:
Error flock (1) on
'/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/bug_xxxx.perl':
No locks available at installer/data/mysql/updatedatabase.pl line 13637.

This is because Path::Tiny->slurp[_utf8] uses flocks which does not work
with NFS

Test plan:
Execute a .perl atomic update file on a kohadevbox
=> Without this patch you should get the flock error
=> With this patch the update should work fine

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-12-16 11:14:49 +00:00
Katrin Fischer
f0cb5c43dc Bug 17577: Improve sample notices for article requests
- Adds "Dear..."
- Fixes capitalization
- Removes 'E-mail' from the description as you could also have
  a print template

To test:
- Make sure the SQL has no errors
- Install the letters and proof read them

If you agree - sign off!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-29 17:45:44 +00:00
6f4cbc8dad Bug 17676: Update default COLLATE of marc_subfield_structure
(This issue has been raised on bug 17216 comments 93-103)
On bug 11944 (3.19.00.006) we updated the default COLLATE for all our tables to
utf8_unicode_ci but not the marc_subfield_structure table.
Indeed we want to keep tagsubfield a utf8_bin (to allow lowercase and uppercase
of the same letter for subfields).
We should have set the default collate to utf8_unicode_ci for further changes.

This patch updates the DB entry 3.19.00.006 to set the default COLLATE to this
table (for people upgrading from prior to 3.19.00.006) and set this
default COLLATE on 16.06.00.033 (for people upgrading from after 3.19.00.006).

The error is:
DBD::mysql::db do failed: Can't create table `koha_kohadev`.`#sql-306_9f9` (errno: 150 "Foreign key constraint is incorrectly formed") [for Statement "
            ALTER TABLE marc_subfield_structure
            MODIFY COLUMN authorised_value VARCHAR(32) DEFAULT NULL,
            ADD CONSTRAINT marc_subfield_structure_ibfk_1 FOREIGN KEY (authorised_value) REFERENCES authorised_value_categories (category_name) ON UPDATE CASCADE ON DELETE SET NULL;
            "] at installer/data/mysql/updatedatabase.pl line 13175.
Upgrade to 16.06.00.033 done (Bug 17216 - Add a new table to store authorized value categories)

Test plan:
1/ git checkout v3.18.00
2/ Do an install
3/ git checkout master;
4/ perl installer/data/mysql/updatedatabase.pl
=> Without this patch, you get the error
=> With this patch applied you will not get it and the default COLLATE for
marc_subfield_structure will be correctly set. Make sure tagsubfield is
still utf8_bin

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Will put some notes on the Bugzilla report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-29 17:41:34 +00:00
5485f10ed2 DBRev 16.12.00.000 - the road goes ever on
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-29 17:38:30 +00:00
3c9d916641 Bug 17292 Follow-up, fix typos
- wrong assignation
- reference to 'serials' table rather than 'serial'

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-28 11:54:46 +00:00
7636c68d76 DBRev 16.11.00.000
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 17:48:00 +00:00
312783f8fc Bug 8835 - DBRev 16.06.00.050 2016-11-22 17:45:35 +00:00
88b4baceee Bug 8835: New db rev for issn_idx
This db rev reapplies dbrev 3.15.00.049 in case that one failed due to
existence of issn_idx.

Test plan:
If you do not have index issn_idx, recreate it:
    ALTER TABLE biblioitems ADD INDEX issn_idx (issn (255))
Run this db rev. You should see: Removed issn_idx.
Rerun the dbrev. You should see: Everything is fine.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2016-11-22 17:45:29 +00:00
0fee84690e Bug 8835: Drop issn_idx for completeness
When dbrev 3.15.00.049 failed, the still existing issn_idx must have
been the cause.
This patch only adjusts the old db rev.
Still thinking if we also need a new db rev to fix isbn and issn for
those installs where 3.15.00.049 failed too. (In that case the fields
may not have been changed to mediumtext and no indexes were added.)

Test plan:
Ideally, run an upgrade from something older than 3.15.00.49.
But running the added sql command from the command line might convince
you too.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2016-11-22 17:45:21 +00:00
141538fb51 Bug 17391 - DBRev 16.06.00.049
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 11:38:26 +00:00
0a84274f6b Bug 17391 (QA Followup) use INSERT INGORE in atomicupdate
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 11:36:08 +00:00
49f8e05b20 Bug 17391: Fix number of values in sysprefs.sql
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 11:36:07 +00:00
d785cd5b0a Bug 17391: Add atomic update file
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 11:36:07 +00:00
Katrin Fischer
15e57368bb Bug 17391: Add missing prefs to sysprefs.sql
Adds
- ReturnpathDefault
- ReplytoDefault
to the sysprefs.sql file.

To test:
- Run the web installer in any language
- Check all preferences are installed without error
- Check prefs listed above now exsit in your
  systempreferences table

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-22 11:36:07 +00:00
d9be9950b3 Bug 17663 - DBRev 16.06.00.048
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-21 16:34:46 +00:00
9ca72539de Bug 17663: Forgotten userpermissions from bug 14686
Bug 14686 added in a dbrev:
    (13, 'upload_general_files', 'Upload any file'),
    (13, 'upload_manage', 'Manage uploaded files');

But these were not added in userpermissions.sql somehow :)
So, what now?

This patch:
[1] adds them to userpermissions.sql as should have been done,
[2] adds a dbrev to add them for newer installs that did not run the
    14686 dbrev.

Test plan:
[1] Run this sql statement:
    DELETE FROM permissions WHERE code = 'upload_general_files' OR
        code = 'upload_manage'
[2] Run the db rev.
[3] Check if you see Tools/Upload (with sufficient perms).

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-21 16:33:16 +00:00
Katrin Fischer
ccdd661851 Bug 17543: Update German web installer sample files for 16.11
Updates sample files with German translations:
- Sample notices for article requests

To test:
- Make sure the German web installer installs all
  sample files correctly.
- Bonus: check German translations.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested german installer/translation
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch:
- Authorised value HSBND_FREQ
is done by bug 17576 (and correctly translated in German)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-18 15:55:03 +00:00
Alex Sassmannshausen
722d045986 Bug 17576: Add housebound mandatory auth_values.
* installer/data/mysql/de-DE/mandatory/auth_values.sql: Add values.
* installer/data/mysql/es-ES/mandatory/auth_values.sql: Add values.
* installer/data/mysql/fr-CA/obligatoire/auth_values.sql: Add values.
* installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql: Add
  values.
* installer/data/mysql/it-IT/necessari/auth_val.sql: Add values.
* installer/data/mysql/nb-NO/1-Obligatorisk/auth_values.sql: New file.
* installer/data/mysql/pl-PL/mandatory/auth_values.sql: New file.
* installer/data/mysql/ru-RU/mandatory/auth_values.sql: New file.
* installer/data/mysql/uk-UA/mandatory/auth_values.sql: New file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-18 13:55:23 +00:00
ba43bdb4f9 Bug 17659: Fix sample_notices.sql for fr-CA
branchcode and is_html columns are present in this file

Test plan:
mysql < installer/data/mysql/fr-CA/obligatoire/sample_notices.sql
should not return any errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-18 13:54:40 +00:00
674d3875c8 Bug 17518 - DBRev 16.06.00.047
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-02 11:02:09 +00:00
de2ba75c25 Bug 17518: Displayed language name for Czech is wrong
It's "Ceština" and should be "Čeština"

Test plan:
1) apply the patch
1.1) update database
2) install Czech translation for Koha
3) note the language name in language switcher (in staff client and
    opac) is right: "Čeština"

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-02 11:00:35 +00:00
e67c202609 Bug 15581 - DBRev 16.06.00.046
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-02 10:53:35 +00:00
53dfa99727 Bug 15581: Add a circ rule to limit the auto renewals given a delay
This patch adds a new circulation rule (no_auto_renewal_after) to block/allow
auto renewals after a given delay.
For instance, if the issue date is 10 days before today, and
no_auto_renewal_after is set to 10, tomorrow the issue won't be auto
renewed.

Test plan:
0/ Execute the update DB entry
Note: You will have to manually change data in your DB, make sure you
have access to the sql cli.
1/ Define a rule with no_auto_renewal_after (10 for instance) and
norenewalbefore (5 for instance).
(This new rule will behave the same as norenewalbefore: the unit depends
on the lengthunit value).
The automatic renewals will be done from 5 to 10 days ahead.
2/ Modify the issues.issuedate, to simulate a checkout in the past:
    UPDATE issues
    SET issuedate = "yyyy-mm-dd hh:mm:ss"
    WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed (too soon)
4/ Repeat step 2 with a due date set as 11 days before
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed (too late)
6/ Repeat step 2 with a due date set as 7 days before
7/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed (issues.renewals has been
incremented and date_due has been updated according your circ rules).

Sponsored-by: University of the Arts London
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-02 10:28:57 +00:00
81eec722da Bug 14874: (followup) Fix typo introduced in sysprefs.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-11-01 15:59:17 +00:00
10b3bb8f46 Bug 17443 - DBRev 16.06.00.045
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 16:51:58 +00:00
0a85759d33 Bug 17443: Make possible to renew patron by later of expiry and current date
Test plan
1) Apply the patch
2) Go to system preferences and find the BorrowerRenewalPeriodBase and note there is new option "the later of current and expiry date"
3) Try all three options and confirm they work as expected
   3.1) The new options should be tested et least with two patrons - one with expiry date in past and one with expiry date in future

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 16:45:05 +00:00
ade5362586 Bug 17397 - DBRev 16.06.00.044
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 15:43:20 +00:00
3d63c64915 Bug 17397: Show name of librarian who created circulation message
Test plan:
1) Apply the patch
2) Update DB structure
3) Run update_dbix_class_files.pl
4) Select patron for checking out
5) Try to add some circulation and opac messages
6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile)
7) Try to delete messages to confirm that everything works as expected

Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 15:37:27 +00:00
8767434021 Bug 17356: [QA Follow-up] Minor changes to skeleton.perl
Due to the way the snippet is run, there is no need to add a use for
C4::Installer or define $dbh (just like $DBVersion).
The suggested code is commented (column_exists is not defined).
Just as in updatedatabase, CheckVersion is called. The version number
does not need to contain 16.06; if we do so, we should update this
number each release. The XXX's work just fine.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 14:47:05 +00:00
Liz Rea
4be8768a6e Bug 17356 - update README
Test plan:
Look at the README and make sure it makes sense.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 14:47:04 +00:00
3f7098a02f Bug 17356: Add atomic update .perl skeleton file
To show devs how it should be written.

Test plan:
% cp installer/data/mysql/atomicupdate/skeleton.perl
installer/data/mysql/atomicupdate/bug_XXXXX.perl
% perl installer/data/mysql/updatedatabase.pl

You should see:
DEV atomic update: bug_xxxxx.perl
Upgrade to 16.06.00.XXX done (Bug XXXXX - description)

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Very good. I'll submit a patch for the readme to make the instructions better.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 14:47:04 +00:00
25adf52334 Bug 13323 - DBRev 16.06.00.043
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 14:28:40 +00:00
9beffec5aa Bug 13321 - DBRev 16.06.00.042
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 14:23:24 +00:00
Jonathan Druart
1204a7269f Bug 13323: Tax rate can change on receiving - DB changes
This patch adds 4 new DB fields to the aqorders table:
 * tax_rate_on_ordering
 * tax_rate_on_receiving
 * tax_value_on_ordering
 * tax_value_on_receiving

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com>

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 13:46:40 +00:00
Alex Arnaud
6eaf0c0d20 Bug 13321: Adds renaming of gstrate column in kohastructure.sql
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 13:46:09 +00:00
Jonathan Druart
43f93f2ee8 Bug 13321: Tax and prices calculation - DB Changes
This patch adds 7 columns to the aqorders table:
 * unitprice_tax_excluded
 * unitprice_tax_included
 * rrp_tax_excluded
 * rrp_tax_included
 * ecost_tax_excluded
 * ecost_tax_included
 * tax_value

It also renames:
 * aqorders.gstrate with aqorders.tax_rate
 * aqbooksellers.gstrate with aqbooksellers.tax_rate

The new columns are filled with the previous calculation method.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com>

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 13:46:07 +00:00
c7bc14cead Bug 14629 - DBRev 16.06.00.041
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:59:55 +00:00
0790de1321 Bug 14629 - (QA Followup) sysprefs.sql changes
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:58:14 +00:00
68ced964fd Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher
This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match
of ISSNs with or without hyphens. It uses Business::ISSN in order to
follow the use of Business::ISBN and allow for validation of ISSNs

To test:
1 - Find a record in your system with an ISSN (or add one)
2 - Stage a record containing the same ISSN but lacking a hyphen
3 - Matching on ISSN should find 0 matches
4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import
5 - Matching should find 0
6 - Apply patch
7 - Update datbase and install Business::ISSN
8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no
change
9 - Set AggressiveMatchOnISSN as do and repeat original test
10 - You should find a match
11 - prove t/Koha.t - all tests pass

Sponsored by North Central Regional Library System (NCRL) www.ncrl.org

Signed-off-by: Chad Roseburg <croseburg@ncrl.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:58:14 +00:00
2354e41b61 Bug 5260 - DBRev 16.06.00.040
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:54:58 +00:00
28ef209c81 Bug 5260: Insert the new letter for existing installs
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:52:27 +00:00
Katrin Fischer
f8472e1686 Bug 5260: QA follow-up - Add sample ACQORDER notice to sample notices
Adds the new notice ACQORDER to all web installers.

Verify by testing the SQL contains no errors and by running:
perl xt/sample_notices.t

NOTE:
- de-DE is already translated, others are in English.
- xt/sample_notices.t doesn't check fr-CA yet. I didn't fix this here
  as the file is missing other notices as well which should be fixed
  separately.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:52:27 +00:00
Katrin Fischer
9af64aa7d5 Bug 5260 - Add option to send an order by e-mail to the acquisition module
With this patch it will be possible to send order information
to the vendor by e-mail. For now this feature can be triggered
manually with a button before closing the basket.
The order e-mail is based on the acquisition claim feature, but
uses a new notice template.

Test plan:

1) Vendors
A new checkbox "Contact when ordering?" was added to the vendor
page.
- Add a vendor and/or edit an existing vendor
- Verify the new option is saved correctly
- Verify the new option displays on the vendor summary page
  after saving

2) Notices
The feature works with a new notice template: ACQORDER
It works with the same formatting/fields etc. as the acq claim
notice.
- Add a new notice template ACQORDER in module
  'Claim/order aquisition'
- Make sure to use fields from the various offered tables
  in your notice
- Verify it is saved correctly

3) Basket
- Turn on LetterLog system preference
- Create multiple order lines
- Click the 'Send order' button in the toolbar
- Verify error or success message
- Verify you received the e-mail
- Verify there is a new entry with about the sent
  notice in your action_logs table

4) Regression testing...
- Verify order claims still work
- Verify serial claims still work
- Verify new serial issue notices still work
...
(I can provide additional test plans if needed)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:52:25 +00:00
5d5a1509d1 Bug 14598 - DBRev 16.06.00.039
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:30:38 +00:00
3660c451a3 Bug 14598: [QA Follow-up] Small changes
[1] Renames the dbrev version to XXX; adding a my for $sth, although
    not strictly necessary it feels better.
[2] Circulation.t stumbles over:
    Undefined subroutine &C4::Circulation::GetItem called at ... line 1283.
    Somehow this is related to use_ok instead of a regular use.
    Worked around this by require_ok and adding a regular use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:29:59 +00:00
Tomas Cohen Arazi
3fa514133b Bug 14598: (QA followup) use deleted{items|biblioitems} during upgrade
If the 'statistics' table contains circulation information about items
that are no longer on the DB it will raise a warning. This patch
makes the updatedatabase.pl script use the deleteditems and deletedbiblioitems
tables to get information for those items on the statistics table.

To reproduce:
- Have your sample DB contain some circulation data on the statistics table
- Make sure some of them have NULL itemtype:
> UPDATE statistics SET itemtype = NULL WHERE type='return';
- Check the upgrade query catches them:
> SELECT s.itemnumber, i.itype, b.itemtype FROM  ( SELECT DISTINCT itemnumber    FROM statistics    WHERE ( type = "return" OR type = "localuse" ) AND itemtype IS NULL ) s  LEFT JOIN  ( SELECT itemnumber,biblionumber, itype      FROM items    UNION    SELECT itemnumber,biblionumber, itype      FROM deleteditems ) i  ON (s.itemnumber=i.itemnumber)  LEFT JOIN  ( SELECT biblionumber, itemtype      FROM biblioitems    UNION    SELECT biblionumber, itemtype      FROM deletedbiblioitems ) b  ON (i.biblionumber=b.biblionumber);
+------------+-------+----------+
| itemnumber | itype | itemtype |
+------------+-------+----------+
|        732 | BK    | BK       |
|        731 | BK    | BK       |
+------------+-------+----------+
2 rows in set (0.00 sec)

- Delete the items, and some biblio too.
- Re-run the query
=> SUCCESS: Same results
- Go reset to NULL the itemtypes
> UPDATE statistics SET itemtype = NULL WHERE type='return';
- Run the updatedatabase.pl script:
 $ sudo koha-shell koahdev ; cd kohaclone
 $ perl installer/data/mysql/updatedatabase.pl
=> SUCCESS: No warnings

Note: It is possible that on production sites, if the sysadmin is cleaning the
deleted{items|biblioitems|biblio} tables, there will be warnings. This is expected
as they need to know some data lacks information.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:29:59 +00:00
c042307db3 Bug 14598 [QA Followup] - Update localuse statistics also
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:29:58 +00:00
2cdec7ff91 Bug 14598: (DB update) fix NULL itemtypes in statistics on 'return' rows
This patch introduces an updatedatabase.pl entry that takes care of
updating existing statistics rows.

It does so by looping on the statistics rows, collecting itemnumber occurences
that are have NULL itemtypes.
It then chooses the right itemtype following what is proposed on bug 14651, and
then updates the rows in statistics using the calculated itemtype.

Regards

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:29:57 +00:00
239b81c1dd Bug 14874 - DBRev 16.06.00.038
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-27 14:02:19 +00:00
65ed212fae Bug 14874 - Add ability to search for patrons by date of birth from checkout and patron quick searches
This patch adds a new syspef 'DefaultPatronSearchFields' which defines
the fields that should be used when searching for a patron if none are
defined.

To test:
1 - Aply patch, updatedatabase
2 - Ensure patron search has not changed
3 - Add dateofbirth to new pref
4 - Ensure things work wll
5 - Experiment with adding and removing other fields from borrowers
table
6 - prove t/db_dependent/Utils/Datatables_Members.t

Tested together with followup. Works as described.
Signed-off-by: Marc Véron <veron@veron.ch>

Bug 14874 (QA Followup)

    Fix atomicupdate file name

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-27 13:21:13 +00:00
33ff591731 Bug 14610 - DBRev 16.06.00.037
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:22:37 +00:00
Katrin Fischer
d64de2bd0d Bug 14610: Follow-up 2
- Fixes typo "Recieve" in the sample notices
- Adds new notices to it-IT installer
- Turns off feature for existing installations, leaves it
  on for new installations
- Fixes typo "cancelation"
- Fixes ids in <body> of new pages
- Adds/fixes classes in th elements of tables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:25 +00:00
Katrin Fischer
2ae9f78353 Bug 14610 - Follow-up
Patch fixes some smaller problems:

- Adds new notices to the it-IT installer (xt/sample_notices.t)
- Renames one of the classes used in the table to avoid double up
- Fixes POD of Bilbio.pm by removing a doubled up line

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:23 +00:00
0db3058b02 Bug 14610 [QA Followup] - Add notices to all language files
Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:19 +00:00
bbcb2fbeaf Bug 14610 [QA Followup] - Implement staff patron tab
Also fixes a few other minor issues

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:17 +00:00
d2a4c32746 Bug 14610 - Add ability to place article requests in Koha - Update database
Article Requests are somewhat similar to holds, but are not requests for
an item to check out. Instead, article requests are requests for a
photocopy of a particular section of a book ( most often ). This is very
common in academic libraries where researchers may request a copy of a
single article found in a journal.

This patch set adds the ability to place article requests in Koha. It
allows the control of what can be requested via the circulation rules.
Since article requests of electronic resources are not outside the realm
of possibility, the feature will check not only the items for
requstability, but the record itself as well ( i.e. both items.itype and
biblio.itemtype ).

Article requests can be placed for patrons from the opac and staff
intranet and can be viewed in most areas where holds are viewed ( e.g.
patron details, record details, etc ).

There is a script to view article requests in progress within the
circulation module. Article requests can be Open ( i.e. new ), In
Processing, Completed, or Canceled. The status of a given request can be
updated from this script.

Test Plan:
1) Apply the patch set
2) Run updatedatabase.pl
3) Enable the system preference ArticleRequests
4) Set up some required fields in:
    ArticleRequestsMandatoryFields
    ArticleRequestsMandatoryFieldsItemsOnly
    ArticleRequestsMandatoryFieldsRecordOnly
5) Edit your circ rules, set article requests to 'yes' for something
6) Test the ability to add an article request from the opac ( required fields enforced )
7) Test the ability to add an article request from the staff interface ( required fields no enforced )
8) Note you can choose item level or record level requests
9) Change the rule to "record only"
10) Repeat 6 and 7
11) Note you cannot choose items
12) Change the rule to "item only"
13) Repeat 6 and 7
14) Note you must choose an item
15) Note that the 'new request' message is queued for each new request
16) Browse to /cgi-bin/koha/circ/article-requests.pl
17) Note requests are split by pickup branch
18) Test slip printing via the "Print slip" action
19) Process request vai "Process request" action
20) Note an email notice is queued for patron
21) Refresh /cgi-bin/koha/circ/article-requests.pl
22) Note request has moved to "processing" tab.
23) Complete request with "Complete request" action
24) Note message is queued for patron
25) Cancel a request, add cancelation note.
26) Note message is queued for patron

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:12 +00:00
2578d8cd96 Bug 5670 - DBRev 16.06.00.036
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 18:20:44 +00:00
3130827fa6 Bug 5670: Update constraint name to match with the one in updatedatabase
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 18:18:08 +00:00
Alex Sassmannshausen
44524f6a96 Bug 5670: Add auth_val_cat to auth_val_cat.sql.
* installer/data/mysql/atomicupdate/housebound_tables.sql: Insert
  HSBND_FREQ in authorised value categories.
* installer/data/mysql/mandatory/auth_val_cat.sql: Add HSBND_FREQ.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 18:18:07 +00:00
Alex Sassmannshausen
561812597e Bug 5670: [QA Followup] Create housebound roles table.
* installer/data/mysql/atomicupdate/housebound_tables.sql (housebound_role):
  New table.
* installer/data/mysql/kohastructure.sql (housebound_role): New table.
* installer/data/mysql/en/mandatory/auth_values.sql: Remove HSBND_ROLE entries.
* installer/data/mysql/en/mandatory/patron_attributes.sql: Remove
  HSBND_ROLE entry.
* installer/data/mysql/en/mandatory/patron_attributes.txt: Remove
  explanatory text.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 18:18:04 +00:00
A. Sassmannshausen
afb81e6c0f Bug 5670: Housebound Readers Module
New module to handle management of circulation to Housebound readers.

- Ability to create housebound profiles & scheduled visits for patrons.
- Ability to record users as Deliverers or Choosers (or both), using
  extended patron attributes.
- Ability to link choosers and deliverers to individual delivery runs.
- 'Delivery Frequencies' are customizable through authorised
  values ('HSBND_FREQ').

* koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc: add
  Housebound menu if appropriate.
* Koha/Patron.pm (housebound_profile): New method.
* Koha/Patrons.pm (housebound_choosers, housebound_deliverers): New
  methods.
* Koha/Patron/HouseboundProfile.pm: New File.
* Koha/Patron/HouseboundProfiles.pm: New File.
* Koha/Patron/HouseboundVisits.pm: New File.
* Koha/Patron/HouseboundVisit.pm: New File.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: New file.
* members/housebound.pl: New file.
* installer/data/mysql/kohastructure.sql: Add housebound_* tables.
* installer/data/mysql/sysprefs.sql: Add HouseboundModule syspref.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref:
  Add HouseboundModule syspref.
* installer/data/mysql/atomicupdate/housebound_tables.sql: New file.
* t/db_dependent/Patron/Borrower_Housebound.t: New file.
* t/db_dependent/Patron/Borrower_HouseboundProfiles.t: New file.
* t/db_dependent/Patron/Borrower_HouseboundVisits.t: New file.

Test plan:
- Apply patch.
- Run atomic update script.
- Run Unit Tests (t/db_dependent/Patron/Housebound*)
- Optionally, add additional authorised values to 'HSBND_FREQ'.
- Switch on 'HouseboundModule' syspref.
- Ensure 'ExtendedPatronAttributes syspref is on.
- On patron pages, when editing, add some to the Housebound deliverer
  and chooser groups.
- On a patron page, the Housebound menu should now be present.
  - create housebound profile
    + ensure Frequency values seem pulled from 'HSBND_FREQ'.
  - create 'housebound visits' (deliveries)
    + ensure chooser/deliverer lists are populated with patrons that
      have the Chooser or Deliverer Attribute type.
  - edit visits.
  - delete visits.
- Switch off 'HouseboundModule'
  - the Housebound menu should disappear

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Bug 5670: [Followup] Rename test files.

* t/db_dependent/Patron/Borrower_Housebound.t: Rename to
  t/db_dependent/Patron/Housebound.t.
* t/db_dependent/Patron/Borrower_HouseboundProfiles.t: Rename to
  t/db_dependent/Patron/HouseboundProfiles.t.
* t/db_dependent/Patron/Borrower_HouseboundVisits.t: Rename to
  t/db_dependent/Patron/HouseboundVisits.t.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Bug 5670: [QA Followup] Fix category_type ref.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: Replace
  references to `category_type` with `categorycode`.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 18:17:57 +00:00
8b570a8808 Bug 15131 - DBRev 16.06.00.035
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 17:28:42 +00:00
3a73010d09 Bug 15131: Instroduce AllowItemsOnHoldCheckoutSCO syspref
This patch introduces a new syspref AllowItemsOnHoldCheckoutSCO, so the current
AllowItemsOnHoldCheckout syspref can be decoupled for the SCO module, giving
the library more flexibility.

During upgrade, it gets its value from the original AllowItemsOnHoldCheckout syspref.

Sponsored-by: NEKLS

Signed-off-by: George <george@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 17:27:06 +00:00
35101c9127 Bug 10455 - DBRev 16.06.00.034
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 14:37:46 +00:00
3e1923070c Bug 10455: Remove biblioitems.marc - DB changes
Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2016-10-21 14:34:57 +00:00
Brendan Gallagher
3fe925ee19 UPdating the DBREv for Bug 17216 - Add a new table to store authorized
value categories
2016-10-11 11:18:50 +00:00
493d7c30a1 Bug 17216: Move the AV cat list file to the top level
This way it will get used for any languages.

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 07:30:33 +00:00
38d4bffa73 Bug 17216: Add FK on authorised_values.category
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 07:30:31 +00:00
d0f543bd6c Bug 17216: Add FK on mss.authorised_value
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 07:30:31 +00:00
ef19f6705a Bug 17216: Add some other AV categories
Found in
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 07:30:30 +00:00
a79eb3f30a Bug 17216: Add new table authorised_value_categories and populate it
This patch set adds a new table authorised_value_categories to store
authori(s|z)ed value categories into a separate table.
The problematic is explained on bug 15799 comment 4:
We need FK to the AV categories but some may not have authorized values
yet.

What does this patch set:
- Add a new authorised_value_categories table
- Populate it with known categories
- Update FK items_search_fields.authorised_values_category
- Create a new FK marc_subfield_structure.authorised_value (FIXME should
  be authorised_value_categories instead)

They are some problems this patch set do not take into account:
- The .sql installer files won't insert correctly (will have to be
  updated when this patch set will be ready to be pushed)
- All the categories (even the ones without authorized values defined)
  are listed when you edit frameworks (marc_subfield_structure.pl)
- There is no way to delete a category (TODO). But to do so it would be
  good to have a authorised_value_categories.is_internal field to mark
  some categories as "cannot be deleted".

Test plan:
0/ Execute the DB entry to create and populate the new table and set the FK
1/ Create a new AV category from the admin module (admin/authorised_values.pl)
2/ Add/edit subfield linked to a AV category
(admin/marc_subfield_structure.pl)
3/ You won't be allowed to add AV for branches, itemtypes or cn_source.
They are used internally.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 07:30:30 +00:00
Brendan Gallagher
442734b438 Uping DBRev. Bug 17357 - WTHDRAWN is still used in installer files
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 04:52:13 +00:00
ce076e0e75 Bug 17357: Replace WTHDRAWN with WITHDRAWN in installer files
Some installer files still use WTHDRAWN instead of WITHDRAWN as an AV
category.

Test plan:
  git grep WTHDRAWN installer
should not return any results

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 04:30:02 +00:00
75a900d553 Bug 17358: Rename COU with COUNTRY and LAN with LANG
Some installer files use COU and LAN instead of COUNTRY and LANG.

To uniformise these AVs, it would be good to use the same code.

Note that I do not think we should update existing installations

Carefully compared code.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 04:18:25 +00:00
df3df9cf71 Bug 17372: Standardize Elasticsearch paths
What we currently have:
Koha/ElasticSearch.pm
Koha/ElasticSearch/Indexer.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm

What we want:
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/Indexer.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm

Test plan:
  % git grep -i Koha::ElasticSearch
  % git grep ElasticSearch|grep -v Catmandu::Store::ElasticSearch
should not return any result

Do a full reindex and search for records

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 01:07:03 +00:00
a36b643019 Bug 16838: ES - install mappings for new installs
The yaml file is not used to populate ES mapping tables (search_field,
search_marc_map and search_marc_to_field) when doing a fresh install.

We need to insert them, otherwise ES will be unusable.

Test plan:
Create a new install and confirm that the ES tables (search_field,
search_marc_map and search_marc_to_field) are correctly populated.

Bonus points: Use an older DB (prior to 3.23.00.050), execute the
updatedatabase.pl script and confirm that the ES table are correctly
populated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-11 01:01:52 +00:00
Mark Tompsett
6ff836ab31 Bug 17292: Follow up - tweak to make it pass cleaner
remove a 'my'
next if not defined subscriptions.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 10:20:56 +00:00
f11f07a703 Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade
A recent change in the 'subscription' table structure highlighted a
problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when
upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the
subscription.itemtype column to exist. But it is not created until DBRev
16.06.00.025.

To reproduce:
- Have a clean 3.20.00 DB loaded into kohadevbox
- Checkout current master
- Run:
  $ perl installer/data/mysql/updatedatabase.pl
  => FAIL: The upgrade procedure fails due to missing colum.

  The solution: rewrite the updatedatabase.pl entry using plain DBI

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 10:20:56 +00:00
Mark Tompsett
0599ab0076 Bug 17324: Deal with branchcode NULL issue
In a database update we alter the letter table, making a column
(branchcode) not be able to contain NULL values.
However if it already does, this SQL fails. So before changing the
column we change the NULL values

[Tue Sep 20 19:08:10 2016] updatedatabase.pl: DBD::mysql::db do failed:
Invalid use of NULL value [for Statement "
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: ALTER TABLE letter MODIFY
COLUMN branchcode varchar(10) NOT NULL DEFAULT ''
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: "] at
/home/mtompset/kohaclone/installer/data/mysql/updatedatabase.pl line
12638.

Reproduce:
on an ubuntu 16.04 LTS machine with MySQL 5.7 install git koha
development environment.
...
git checkout -b my_3.18.x origin/3.18.x
drop database koha_library;
create database koha_library;
quit;
web install all sample data
(ignore some issues with sample data, and one with mandatory)

git checkout -b bug_17234 origin/master
git bz apply 17292
git bz apply 17320
git bz apply 17260
git bz apply 17234
web install
Two warning messages are expected output from upgrade process, but
the above message is not.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not follow the test plan, but the changes make sense

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 10:16:04 +00:00
Katrin Fischer
130534c424 Bug 17345: Fix typo in sysprefs.sql
This fixes a tiny typo in sysprefs.sql that kept all
systempreferences from being installed.

To test:
- Create a new koha database, run the web installer
- Verify that all systempreferences have been loaded
  select count(*) from systempreferences should be
  no less than 553

or

- Truncate your systempreferences table
- Verify that the repaired sysprefs.sql file loads
  without error

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 10:05:44 +00:00
5eb4b06f5b Bug 16273 - DBRev 16.06.00.031
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:53:57 +00:00
8d0b412b52 Bug 16273: Add the new pref PatronSelfRegistrationPrefillForm
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:51:13 +00:00
82af4da811 Bug 16552 - DBRev 16.06.00.030
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:45:25 +00:00
bd7e4fb0d9 Bug 16552: Add the ability to change the default holdings sort
This new enhancement will add the ability to change the default holdings
sort on OPAC displays to be by library, instead of item type.

This patch adds a new pref OPACHoldingsDefaultSortField with 3 different
possible values:
 - Item type
 - Home library
 - Holding library

Note that if OpacLocationBranchToDisplay is set not to display home libraries,
unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to
"Home library", same for "Holding library".

Test plan:
- Confirm that the default value for OPACHoldingsDefaultSortField is
  'first column' after executing the DB entry and that there is no
  change in the behavior (first column is used to sort the holdings
  table on the detail page).
- Set OpacLocationBranchToDisplay to both and play with the different
  values of OPACHoldingsDefaultSortField
  => Confrm that the default column used to sort the table is correctly
  changed
- Set the pref SeparateHoldings on
  => Confirm that both tables (Holdings and other holdings) are sorted using
  the OPACHoldingsDefaultSortField value.

Sponsored-by: University of the Arts London

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:44:03 +00:00
ab9a082b5f Bug 14707 - Remove atomic update
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 14:06:38 +00:00
7cb3a607d8 Bug 14707 - DBRev 16.06.00.029
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 14:02:13 +00:00
66d669d073 Bug 14707: Update existing installations and correct wrong values
See http://hea.koha-community.org/, the countries are filled is wrong
values.
If we decide to update the free text with a dropdown list, we need to
handle these wrong data.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 13:53:18 +00:00
Julian FIOL
233dfb8c74 Bug 14707 : Replace UsageStatsCountry syspref from free text to a dropdown list.
This will avoid syntax problems with Hea when a user will fill this 2 sysprefs

The default choice for UsageStatsLibraryType and UsageStatsCountry is 'empty'

Test Plan
---------

1. Create a new Koha install
2. Go to the 'Administration' page
3. Go to 'Global system preferences'
4. Go to 'Administration'
5. At the end of this page you should see a dropdown menu for
- UsageStatsCountry with all countries
- UsageStatsLibraryType with all type of library
They both should be empty by default.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Not a complete list but is a start
Lots of new strings to translate :)
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 13:53:18 +00:00
0254fd7a1f Bug 17135 - DBRev 16.06.00.028
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-16 10:50:33 +00:00
bc647bc21b Bug 17135: [QA Follow-up] Changes as to reporting
We should at least report some grand totals when fixing fine records.
This patch also includes some cosmetic whitespace swapping.
Turned one last into an if statement.

Added a copyright statement too.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-16 10:47:03 +00:00
8a7a7a0344 Bug 17135: [QA Follow-up] Change location of new script to fix fines
The location of the script in misc/maintenance would be fine for
running it from the command line. But it will be a problem for several
install types when running it from the web installer.
Files from misc/maintenance go to bin/maintenance in a package install,
not to mention other installs than a dev install.

This patch moves the script to installer/data/mysql. Already there are two
other scripts run by upgradedatabase. I would rather move these three
scripts somewhere else, but we c/should do that on another report.

Fixed a small typo in a message too.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-16 10:47:03 +00:00
Jacek Ablewicz
3ada0d104d Bug 17135 - Maintenance script execution added as part of an atomic DB upgrade
(plus warnings for 16.05+ production setups possibly already affected)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-16 10:47:03 +00:00
Bernardo Gonzalez Kriegel
a9caebc288 Bug 16554: Fix encoding on it-IT file
This patch only fixes encoding of file
installer/data/mysql/it-IT/necessari/sample_numberpatterns.sql

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>
2016-09-15 13:30:22 +00:00
Bernardo Gonzalez Kriegel
9261fb4f5b Bug 16554: rewrite mandatory and sample data - de-DE
More changes to de-DE files

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>
2016-09-15 13:30:22 +00:00
Bernardo Gonzalez Kriegel
be4cd79aea Bug 16554: rewrite mandatory and sample data - it-IT
More changes to it-IT files

Checked marc21 and unimarc files
unimarc_relatorterms.sql had bad encoding, others minor
errors

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>
2016-09-15 13:30:22 +00:00
Bernardo Gonzalez Kriegel
6dc2f1ae7c Bug 16554: More i18n changes - en, es, nb and pl files
Mostly fixes bad values in auth files ( '' -> 0 )

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>
2016-09-15 13:30:21 +00:00
Bernardo Gonzalez Kriegel
28191a538b Bug 16554: rewrite mandatory and sample data - pl-PL
More changes to pl-PL files

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>
2016-09-15 13:30:20 +00:00
Bernardo Gonzalez Kriegel
4742f1035b Bug 16554: rewrite mandatory and sample data - nb-NO
More changes to nb-NO files

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>
2016-09-15 13:30:20 +00:00
Bernardo Gonzalez Kriegel
8cfa6f633a Bug 16554: rewrite mandatory and sample data - es-ES
More changes to es-ES files

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>
2016-09-15 13:30:19 +00:00
Bernardo Gonzalez Kriegel
e38cad45e8 Bug 16554: Fix I18N sample files
Needs Bug 13669

This patch fix web installer for
de-DE, es-ES, fr-CA, nb-NO and pl-PL

To test:
1) Apply patch
2) Try web installer for any/all listed languages.
a) de-DE, es-ES, fr-CA and pl-PL
There must be no problems for marc21 + all sample files
b) nb-NO
There must be no problems for normarc + all sample files

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>
2016-09-15 13:30:19 +00:00
Bernardo Gonzalez Kriegel
b5ae31e7fd Bug 16554: Fix fr-FR sample files
Needs Bug 13669

Rewrite autorites_norme_unimarc.sql to
use only one INSERT IGNORE.

New load method complains about duplicate keys,
and both auth files are mandatory!

Also removed blank space from sample_labels.sql

Tested with unimarc_complet and all sample files.

To test
1) Apply the patch
2) Try fr-FR web installer, unimarc_complet + all sample files
There must be no errors

Don't know if fr-FR marc21 and unimarc_lecture_pub are used,
need a look from french users.

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>
2016-09-15 13:30:19 +00:00
89bae5f368 Bug 16276 - DBRev 16.06.00.027
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-13 17:30:41 +00:00
b6fe9f23cc Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-13 17:27:42 +00:00
8a74bb24f5 Bug 16274 - DBRev 16.06.00.026
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 15:38:46 +00:00
38422f1af6 Bug 16274: Add the new pref PatronSelfRegistrationLibraryList
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2016-09-12 15:36:03 +00:00
0b086d5f9c Bug 7677 - Remove atomic update
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:44:48 +00:00
e63d445e08 Bug 7677 [QA Followup] - Fix issues with kohastructure
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:38:06 +00:00
8ff8e0b8dd Bug 7677 - DBRev 16.06.00.025
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:15:38 +00:00
Matthias Meusburger
99c2513559 BZ7677: New areas in subscriptions and new functions when receiving.
When enabling the makePreviousSerialAvailable syspref, the previously
 received serial's itemtype is set as defined in the subscription.
 (Please note that the item-level_itypes syspref must be set to specific item.)
 It is also made available.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

http://bugs.koha-community.org/show_bug.cgi?id=7767

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:13:54 +00:00
1da2bceb85 Bug 16311 - Fix DBRev description
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:09:59 +00:00
5eaa1cb2ab Bug 16311 - DBRev 16.06.00.024
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:08:27 +00:00
Andreas Roussos
fc9279774f Bug 16311 - Advanced search language limit typo
In the OPAC -> Advanced Search, the Language drop down menu incorrectly
lists Romanian as "Român (Romanian)" while the correct value (as reported
by Barry Cannon) is "Română (Romanian)".

This patch fixes that:
a) for _new_ installations by modifying
   installer/data/mysql/mandatory/subtag_registry.sql (loaded by the web
   installer when koha is installed), and also
b) for _existing_ installations by adding an atomicupdate file in
   installer/data/mysql/atomicupdate/

Test plan:
1) In the OPAC, go to Advanced search (cgi-bin/koha/opac-search.pl).
2) In the 'Language' drop down menu, observe that the value for Romanian
   is "Român (Romanian)".
3) Apply the patch, and run installer/data/mysql/updatedatabase.pl.
4) Refresh the Advanced search page in the OPAC. Confirm that the patch
   worked, i.e. the Language drop down menu lists Romanian as
   "Română (Romanian)" (notice the added 'ă').

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 09:06:18 +00:00
cc1c82edb6 Bug 17187 - DBRev 16.06.00.023
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 14:06:17 +00:00
1f4ea9c627 Bug 17187: Lower the timeout preference from 139 days to 1 day
Default timeout is now 12000000 seconds == almost 139 days !
Surely, your session will be shorter. But we should lower this
value.
Balancing usability and security, I propose 1d (1 day) now.
Current pref value will be affected only if it is NULL or equal
to the old default.

Test plan:
Check your current value. Optionally change to NULL or 12000000.
Run the dbrev and see what happens.
Beware of cached values while testing or flush the cache.

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

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>
2016-09-09 14:04:15 +00:00
1b43b3d7ac Bug 16978 - DBRev 16.06.00.022
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 13:26:20 +00:00
Mark Tompsett
b2ba2fa5ef Bug 16978: Followup - Copy create_report permissions for delete_report
This patch should deal with comment #6's point of where a user who
has create, but not execute permissions, would lose delete ability.
Users with create and execute permissions would already have delete
as well.

TEST PLAN
---------
 1) Back up db
 2) drop database koha_library;
 3) create database koha_library;
 4) web install with all sample data with system user
 6) log into staff client as system user
 7) make sample koha admin user a superlibrarian
 8) set username and password for sample koha admin user
 9) log out and log in as koha admin
10) Create a user (USER_A) with permissions:
        create_reports   and execute_reports.
11) Create a user (USER_B) with permissions:
        create_reports,  but not execute_reports.
12) Create a user (USER_C) with permissions:
        execute_reports, but not create_reports.
13) Create a user (USER_D) with no report permissions.
14) Run the atomic update.
15) Check USER_A permissions
    -- should have delete_reports
16) Check USER_B
    -- should have delete_reports
17) Check USER_C
    -- should NOT have delete_reports
18) Check USER_D
    -- should NOT have delete_reports
19) run koha qa test tools
20) restore db

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 13:23:52 +00:00
Mark Tompsett
f56d6530bc Bug 16978: Add delete reports user permission
This splits off the delete capability from the create reports permission.
From a UI perspective there were CSS issues, that this patch set hackily
bypasses. Perhaps someone else can amend this enhancement with the required
changes so that the extra column at the beginning of the table can be
removed when the user does not have delete capability.

TEST PLAN
---------
1) back up db
2) apply patch
3) ./installer/data/mysql/updatedatabase.pl
   -- should run without issue.
4) in mysql:
   > drop database ...
   > create database ...
   -- totally blanks it for fresh web install
5) run web install
   -- installing should have no issues
6) go to a patron
7) set permissions
8) expand the reports permission
   -- should have delete reports now
9) click help and scroll down to
   'Granular Reports Permissions' right at the bottom.
   -- there should be a new delete_reports section
10) Head over to guided reports and build a few reports.
    -- as system account user, delete stuff should all be visible.
11) Find a patron, set all permissions, except delete reports.
12) log out and then log in as the modified patron
13) Head over the save reports
    -- none of the delete options should be available to the user.
14) run koha qa test tools
15) restore db

Followed test plan. Additionally tried to delete using params in URL
(not possible, OK)
Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 13:23:52 +00:00
7ac1bc3537 Bug 16685 [QA Followup] - Use Path::Tiny::slurp instead of File::Slurp
Path::Tiny::slurp is considered better to use than File::Slurp.

RM Note: The package version in wheezy is too old, the package version
         in jessie is just fine and should be added to the community
         repo if wheezy will be supported for the coming release.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 12:53:07 +00:00
954ed80534 Bug 16685 - Use eval instead of do for .perl atomicupdates
If we use eval instead of do for our .perl atomic update files, it will
allow developers to put in the exact code that should go into
updatedatabase.pl. The problem with do is that none of the variables
defined in updatadatabase.pl are available, whereas with eval they are.

Test Plan:
1) Apply this patch
2) Create a .perl file in atomicupdates with the following in it:
say "DBversion: $DBversion";
3) Run updatadatabase.pl
4) Note the output
5) Add a syntax error to your atomic update
6) Run updatedatabase.pl
7) Note the error is displayed

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 12:52:57 +00:00
b8046995ee Bug 16275 - DBRev 16.06.00.021
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 12:04:50 +00:00
f835f1f3bd Bug 16275: Add the new pref PatronSelfRegistrationEmailMustBeUnique
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 11:57:54 +00:00
884954f977 Bug 16272 - DBRev 16.06.00.020
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 11:53:32 +00:00
e018b69dca Bug 16272: Automatically switch an on-site checkout to a regular checkout when checked out
Use case: A patron checks some items out on-site and want to take it home.
To facilitate the librarian work the checkout is directly switched from
on-site to regular when checked out if the new pref SwitchOnSiteCheckouts is on.

Test plan:
0/ Let the new pref SwitchOnSiteCheckouts off
1/ Checkout one items to a patron and tick the "on-site checkout"
checkbox
2/ Check the same item out without ticking the "on-site checkout"
checkbox
=> You should get "This item can not be renewed, it's an on-site checkout"
3/ Switch the pref on
4/ Repeat 2
=> The on-site checkout should be automatically switched to a regular checkout

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
With small changes to apply to master.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 11:43:56 +00:00
d6fba2e2f3 Bug 15839 - DBRev 16.06.00.019
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 10:38:43 +00:00
ac59bed98a Bug 15839: [QA Follow-up] Update existing rows in dbrev
Adding the default is fine for new records; we also should take care
of the pending existing ones.
Trivial addition to atomic update file.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the dbrev again with existing unapproved reviews.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 10:31:05 +00:00
7a10e15dae Bug 15839: Koha::Reviews - Change default value for approved to 0
The reviews.approved column had a default value set to NULL.
It does not make sense, the default value should be 0, this will avoid
to have to specify the approved value when creating a new review.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 10:29:57 +00:00
d331b6de45 Bug 7045 - Fix DBRev 16.06.00.016
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 09:06:51 +00:00
7523ef878d Bug 14695 - DBRev 16.06.00.018
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 12:47:25 +00:00
e825b081d9 Bug 14695 - Update database
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jason M. Burds <JBurds@dubuque.lib.ia.us>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
2016-09-03 00:17:55 +00:00
c4a0be0a68 Bug 10848 - Fix DBRev description
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 16:18:38 +00:00
aef77798a9 Bug 7045 - DBRev 16.06.00.017
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 16:09:43 +00:00
33557a2847 Bug 7045 - DBRev 16.06.00.016
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 16:04:09 +00:00
Jacek Ablewicz
219c0eac8c Bug 10848 - Allow configuration of mandatory/required fields on the suggestion form in OPAC - part 2
Add 'OPACSuggestionMandatoryFields' syspref definition plus
an atomic DB update for the new preference.

Signed-off-by: barbara johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 16:00:50 +00:00
547b5f95f6 Bug 7045: Update default value placeholders for existing installs
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-02 14:21:29 +00:00
8a7266cd0d Bug 16615: Update OPACSearchForTitleIn to access openlibrary.org via https
Note that we could also update the syspref for existing installs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-18 15:38:26 +00:00
090c0fc6c4 Bug 14642 - DBRev 16.06.00.015
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-17 18:43:19 +00:00
fde83bd73d Bug 14642: (QA followup) Make HoldsLog default to 0
After a couple comments regarding the default value I picked for the
new syspref, I've decided to set it 0, as libraries interested on the
fetarue will just enable it.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-17 18:43:13 +00:00
a6bc706ad1 Bug 14642: Add HoldsLog syspref
This patch introduces a new syspref 'HoldsLog' which is to be used for controlling
holds actions logs.

Sponsored-by: NEKLS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-17 18:43:12 +00:00
0caed05779 Bug 16829 - DBRev 16.06.00.014
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-17 18:09:38 +00:00
8a135fd21a Bug 16829: Add 'interface' column to action_logs
This patch introduces a new column for the action_logs table. It is
called 'interface' and it is intended to store the interface in which
the action was performed.

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-17 18:01:48 +00:00
e16019f27b Bug 7741 - DBRev 16.06.00.013 - Add IGNORE to insert in case of backporting
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 14:20:06 +00:00
01e041ca40 Bug 7441 - DBRev 16.06.00.013
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 13:28:20 +00:00
4db2e745e2 Bug 7441 - search results showing wrong branch?
When you search in the OPAC it shows you the HOME branch on the location
in XSLT, but if you click through to the detail page it shows you the
CURRENT BRANCH in the holdings table which is very confusing to patrons.
I don't know what's the right solution - home or holding branch, but they
should be the same in both places for the patron's sake. If you do the same
search in the staff client you see the right branch info on the search results
and on the detail page.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Search the catalog, you search should include results with items
   that have different home and holding libraries.
4) The results should look the same as before the patch
5) Change the system preference OPACResultsLibrary to "current location"
6) Refresh your page of search results
7) The results show now show the holding library instead of the home library

Signed-off-by: Barbara Walters <bwalters@ncrl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 13:14:19 +00:00
Mirko Tietgen
3964fac311 Bug 17064 - Delete backup marc21_framework_DEFAULT.sql~ file
This .sql~ backup file should not have been committed.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-08 13:15:29 +00:00
Zeno Tajoli
d0f2bad12e Bug 16585: Update Italian installer sample files for 16.05
With this patch all sample/defintions .sql files are updated and translated into Italian
(if you select italian during web installation).

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-08-05 06:11:11 +00:00
e8b54cb3be Bug 16573 - DBRev 16.06.00.012
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-01 09:54:30 +00:00
44785935bd Bug 16573: Define virtualshelves.created_on as datetime for existing installs
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>
2016-08-01 09:39:15 +00:00
Bernardo Gonzalez Kriegel
162b9015d9 Bug 16573: change created_on type - atomic update
This patch change 'created_on' virtualshelves column to
datetime type

To test:
1) Apply the patch
2) Run updatedatabase.pl
3) Verify type of 'created_on' column

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>
2016-08-01 09:39:15 +00:00
Bernardo Gonzalez Kriegel
36b2b288a7 Bug 16573: fix structure and sample data for MySQL 5.7
Web install on Ubuntu 16.04/Mysql 5.7 fails.

This patch makes small changes to make installation
possible to kohastructure.sql and some sample files.

Sample values for quotes table can't have '0000-00-00 ...' values
nor NULL values, now() is perhaps an option.

Depends on Bug 16572

To test:
1) System with MySQL 5.7, for example Ubuntu 16.05
2) Apply 16572
3) Try web install, it fails
4) Apply this and next patch
5) Try again, now it succeed

This is only for English install, i18n files needs revision
I can do that if this is accepted.

Perphaps a change is needed to updatedatabase.pl

Ammended patch, 'created_on' field on virtualshelves
can't be timestamp default null, mysql 5.5 complains
that only one timestamp column can be defined as
default not null. Changed to 'datetime' type.

Can provide followup with updatedabase change,
but need an opinion if this type change makes sense.

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>
2016-08-01 09:39:14 +00:00
Bernardo Gonzalez Kriegel
d00d46112d Bug 16573: fix linkid value on marc_subfield_structure
followup to previous patch.

This patch fixes linkid value. It was set to '', but
declared as tinyint.
Mysql < 5.7 replaced this with nearest right value, i.e 0
Mysql 5.7 gives error here.

Also some normalization, all lines with data begins with two tabs

To test:
On top of Bug 16572 and previous patch

1) Run webinstaller
2) Add mandatory values
3) There must be no problems on MySQL 5.7

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>
2016-08-01 09:39:14 +00:00
6ac4b20d3a Bug 11606 - DBRev 16.06.00.011
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-22 17:21:42 +00:00
ca4f4c6680 Bug 11606: Add Novelist client to staff
To test:
1 - Apply patches
2 - Update database
3 - View detail pages for some records and ensure no changes have been made
4 - Enable NovelistSelectStaffEnabled (and enter or have info in the
        Profile and password)
5 - Set NovelistSelectStaffView to 'above'
6 - View detail pages for some records, verify that if novelist info is
available it is displyaed and nothign is displayed if not
7 - Repeat with all staff view options

Sponsored by:
   Walla Walla Public Library (http://www.wallawallapubliclibrary.org/)
   Los Gatos Library (http://www.losgatosca.gov/42/Los-Gatos-Library)

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Internal signoff.

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Dwayne Nance <dnance@ebsco.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-22 17:16:12 +00:00
Mark Tompsett
bfac6c29e4 Bug 16920: sysprefs.sql - missing comma for MaxOpenSuggestions
TEST PLAN
---------
1) back up DB
2) drop database koha_library;
3) create database koha_library;
4) run web browser install, choose ALL defaults
   -- notice the SQL syntax warning.
5) apply patch
6) repeat steps 2-4
   -- notice SQL syntax warning is gone.
7) run koha qa test tools
8) restore db

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-15 14:05:02 +00:00
d951ba620c Bug 15128 - DBRev 15128
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 14:11:42 +00:00
7445b8f897 Bug 15128 - Add ability to limit patrons open purchase suggestions
To test:
1 - Define a number of MaxOpenSuggestions
2 - Add some suggestions for a patron
3 - Note they cannot add any more suggestions if limit is reached
4 - Delete a suggestion and note you can add another
5 - Add them to limit again
6 - Accept a suggestion in the staff client and note user can add more
7 - Repeat above with rejecting or deleting
8 - Sign off.

Sponsored by:
    North Central Regional Library (http://ncrl.org/)

Signed-off-by: Barbara Walters <bwalters@ncrl.org>

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>
2016-07-08 14:09:48 +00:00
f65cf574d0 Bug 14902 - Fix issues with updatedatabase.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 14:01:41 +00:00
80921b10f5 Bug 14902 - DBRev 16.06.00.009
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 13:59:37 +00:00
99acd38edb Bug 14902 - Add qualifier menu to staff side "Search the Catalog"
To test:
1 - Apply patch and update dabase
2 - Check that Search the Catalog links throughout the staff interface
have not changed
3 - Set "IntranetCatalogSearchPulldown" to 'Show'
4 - Verify that 'Search the catalog' links through staff client now have
a dropdwon to  select search index

I think viewing one file each that includes updated header should be
sufficient, but please check as many as you can:

cgi-bin/koha/admin/aqbudgetperiods.pl
cgi-bin/koha/admin/admin-home.pl
cgi-bin/koha/cataloguing/addbooks.pl
cgi-bin/koha/circ/returns.pl
cgi-bin/koha/circ/circulation-home.pl
cgi-bin/koha/admin/cities.pl
cgi-bin/koha/admin/aqcontract.pl
cgi-bin/koha/admin/currency.pl
cgi-bin/koha/mainpage.pl
cgi-bin/koha/tools/letter.pl
cgi-bin/koha/members/members-home.pl
cgi-bin/koha/admin/categories.pl
cgi-bin/koha/admin/preferences.pl
cgi-bin/koha/admin/printers.pl
cgi-bin/koha/serials/serials-home.pl
cgi-bin/koha/acqui/newordersuggestion.pl
cgi-bin/koha/admin/z3950servers.pl

Sponsored by:
  Northeast Kansas Library System (http://nekls.org/)

Signed-off-by: Heather Braum <hbraum@nekls.org>

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 13:57:59 +00:00
46b7d5e4c6 Bug 6906 - DBRev 16.06.00.008
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 13:40:42 +00:00
Alex Sassmannshausen
6a493842cf Bug 6906 - show 'Borrower has previously issued...
New feature: provide granular means to configure warnings about items
that have been issued to a particular borrower before, according to
their checkout history.

- Global syspref ('CheckPrevCheckout'), set to 'hardno' by default,
  allows users to enable this feature library wide.
- Per patron category pref allows libraries to create overrides per
  category, falling back on the global setting by default.
- Per patron pref allows switching the functionality on at the level
  of patron. Fall-back to category settings by default.

* Koha/Patron (wantsCheckPrevCheckout, doCheckPrevCheckout): New
  methods.
* C4/Circulation.pm (CanBookBeIssued): Introduce CheckPrevCheckout
  check.
* admin/categories.pl: Pass along checkprevcheckout.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt: Expose
  CheckPrevCheckout per category setting.
* koha-tmpl/intranet-tmpl/prog/en/modules/preferences/patrons.pref:
  Expose CheckPrevCheckout syspref.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:
  Expose per patron CheckPrevCheckout preference.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt: Expose
  per patron CheckPrevCheckout preference.
* koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt: Add
  'CHECKPREVCHECKOUT' confirmation message.
* installer/data/mysql/kohastructure.sql: Modify structure of
  'categories', 'borrowers', 'oldborrowers'.
* installer/data/mysql/sysprefs.sql: Add 'CheckPrevCheckout'.
* installer/data/mysql/atomicupdate/checkPrevCheckout.sql: New file.
* t/db_dependent/Patron/CheckPrevCheckout.t: New file with unit tests.

Test plan:
- Apply patch.
- Run updatedatabase.
- Regenerate Koha Schema files.
- Run the unit tests.
- Verify 'CheckPrevCheckout' is visible in Patrons sysprefs and can be
  switched to 'hardyes', 'softyes', 'softno' and 'hardno'.
  + Check out previously checked out items to a patron, checking the
    message appears as expected.
- Verify no 'Check previous checkouts' setting appears on the borrower
  category pages if the syspref is set to a 'hard' option.
- Verify 'Check previous checkouts' setting appears on the borrower
  category pages and can be modified per borrower category.
  + Issue previously issued items to a borrower, checking the message
    appears as expected (This setting should override the default
    setting if that is set to a 'soft' option).
- Verify no 'Check previous checkouts' setting appears on the individual
  borrower pages if the syspref is set to a 'hard' option.
- Verify 'Check previous checkouts' setting appears on individual
  borrower pages and can be modified.
  + Issue previously issued items to a borrower, checking the message
    appears as expected (This setting should override the category
    setting and the default setting if the latter is set to a 'soft'
    option).

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: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 13:40:08 +00:00
6398d1b242 Bug 3534 - DBRev 16.06.00.007
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-07 18:37:13 +00:00
71d1e1727c Bug 3534 - Patron quick add form
This patch adds a new system preference:
    PatronQuickAddFields

When either this pref or BorrowerMandatoryField is populated this will add a new dropdown to the bew patron toolbar.
When a category is chosen from this dropdown the fields in PatronQuickAddFields and BorrowerMandatoryField will be displayed.
There will be a button allowing a user to switch from the quickadd to the full form and fields will be copied between the forms when toggling.

The Quick add will only be displayed on add of a new patron, future edits should display the full form.

Test plan:
 1 - Apply patch
 2 - run updatedatabase.pl
 3 - Add a new patron and ensure nothing has changed
 4 - Populate either PatronQuickAddFields or BorrowerMandatory fields
 and note the new button for adding a patron
 5 - Click the Quick add and choose a type
 6 - Only required or quick add fields should be displayed
 7 - Verify toggling forms copies information
 8 - Ensure you cannot save patron without filling required fields
 (quick add fields should be optional)
 9 - Ensure you can save patron with fields filled out
10 - Ensure that a duplicate patron brings up the duplicate/add new
buttons with full form displayed
11 - Verify that subsequent edits use only full form
12 - Verify that data on form submitted is the data saved to patron
13 - Test with various values in both MandatoryBorrowerFields and PatronQuickAddFields

Sponsored by: VOKAL (Vermont Organization of Koha Automated Libraries)

Followed test plan, works as expected.
Re-tested together with followup, works as expected (2016-06-02)
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>
2016-07-07 18:35:01 +00:00
Jesse Weaver
0fda22b824 Bug 14048: (RM followup) DB version 16.06.00.006
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 11:02:53 -06:00
0bb144bbaf Bug 14048: (QA followup) Default to 1 if no default rule
This patch answers Jonathan's request to simplify this patchset a bit.

It removes the need for the .sql file, as _default_rule now defaults to
a fixed value (1, which was set by the removed .sql file).
This allowed to remove the overloaded ->delete method.

The tests have been adjusted to reflect this changes, including tests for
the new 'default'-if-absent situation.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 10:37:01 -06:00
22f727f30e Bug 14048: (QA followup) Fix typo on syspref value
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Margaret Thrasher <p.thrasher@dover.nh.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 10:37:01 -06:00
d4d550237a Bug 14048 [QA Followup] - Delete only the removed system preference
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Margaret Thrasher <p.thrasher@dover.nh.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 10:37:01 -06:00
d8e186a7a9 Bug 14048: Add syspref and atomic update
This patch introduces the changes to the sysprefs and the atomic update
that creates the new table.

It picks the syspref value for RefundLostItemFeeOnReturn and uses it to
create a default (branchcode='*') rule on the new table.

Sponsored-by: DoverNet
Sponsored-by: South-East Kansas Library System
Sponsored-by: SWITCH Library Consortium

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Margaret Thrasher <p.thrasher@dover.nh.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 10:37:01 -06:00
65558f2080 Bug 14048: Add RefundLostItemFeeRule table and classes
This patch introduces new classes for handling refund lost item fee
rules. It introduces a new table for storing this rules.

It is designed so it is possible to define a global rule, and then
branch-specific ones. The specific is prefered if available.

This behaviour is fully tested by unit tests introduced by the following patches.

This cannot be tested on its own.

Sponsored-by: DoverNet
Sponsored-by: South-East Kansas Library System
Sponsored-by: SWITCH Library Consortium

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Margaret Thrasher <p.thrasher@dover.nh.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-07-07 10:37:01 -06:00
40598f8e4f Bug 16768 - DBRev 16.06.00.005
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 14:03:41 +00:00
1c11499788 Bug 16768: Update options in sysprefs.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 14:00:04 +00:00
Marc Véron
0673dc0856 Bug 16768: Update systempreferences.options (additional value CH)
As of comment #5, adding file
installer/data/mysql/atomicupdate/bug_Bug_16768_official_number_format_switzerland.sql

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>
2016-06-24 14:00:03 +00:00
Zeno Tajoli
718a0a7d14 Bug 16601: Update of italian MARC21 files
This is the update for April 2016 changes of Library of Congress
The basic creation of the files is done in http://translate.koha-community.org/files/it/mandatory/

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Both files load without problems.
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:53:21 +00:00
Katrin Fischer
7a3b5ee04b Bug 16472: Update MARC21 de-DE frameworks to update 22 (April 2016)
To test:
1) Start with a fresh database
2) Check mandatory bibliographic and authority files
   load without problem using the German web installer
3) Check new fields/subfields are ok

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Not a german speaker but seems right :)
File loads without problem.
No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:41:13 +00:00
54451b66a1 Bug 15485 - DBRev 16.06.00.004
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:32:35 +00:00
609f537128 Bug 15485: (QA followup) Simplify logic and use *ResultsDisplay value during upgrade
This patch makes the new sysprefs work as the previously defined. Instead of falling back
to what *ResultsDisplay is set, it now has its own 'default' (that still defaults to the
*Results*.xslt).

The default values are set to 'default' as the rest of XSLT-related sysprefs, and the upgrade
picks whatever is set in OPACXSLTResultsDisplay and XSLTResultsDisplay so current behaviour
is preserved.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
New XSLTs for Lists work as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:30:31 +00:00
add61ef614 Bug 15485: (QA followup) Fix behaviour and default values
Jonathan noticed the current behaviour is that the lists rendering
falls back to the XSLTResults, and if not defined (i.e. != 'default' and
!= some_path) it falls back to a legacy display (non-XSLT).

The patchset changed this behaviour because 'default' is not a valid value
for the lists. So it should fallback to the current behaivour (i.e. Results
XSLT configuration) if not defined. This patch fixes this by adding
 || C4::Context->preference('XSLTResultsDisplay')
(and the OPAC counterpart).

It also fixes minor glitches on the update message (oops) and bad default value
in sysprefs.sql  for 'XSLTListsDisplay'.

Thanks Jonathan!

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:30:31 +00:00
e0911b0c4c Bug 15485: Introduce new sysprefs for lists XSLTs
This patch introduces two new sysprefs, allowing the users to
set custom XSLTs for lists display. This is done almost the usual
way.

If none is specified (value='') it defaults to the current behaviour:
using the *Results.xsl file for the corresponding interface.

Sponsored-by: Carnegie Stout Library

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Deb Stephenson <DStephen@dubuque.lib.ia.us>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 13:30:30 +00:00
e5bb0fac3f Bug 16731: Use INSERT IGNORE when inserting a syspref
IGNORE should be used to allow backporting (and local patch)

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 12:03:17 +00:00
2279a2fea0 Bug 11490 - DBRev 16.06.00.003
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 11:53:02 +00:00
20f4235048 Bug 11490: Add prefs MaxItemsToProcessForBatchMod and MaxItemsToDisplayForBatchDel
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 11:50:27 +00:00
f17897fb10 Bug 10459 - DBRev 16.06.00.002
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:15:21 +00:00
Mark Tompsett
f863e478b9 Bug 10459 renamed timestamp to updated_on
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:10:22 +00:00
255596ae6c Bug 10459: Borrowers should have a timestamp
This patch adds a timestamp column to the borrowers table in kohastructure
and updatedatabase. (And also to the deletedborrowers table.)
A timestamp may be useful in synchronizing with external systems (among other
reasons).

Test plan:
Run updatestructure on an existing database, or install a new one.
Verify that the borrowers table has a timestamp now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested updatestructure and running kohastructure.sql.
Passed t/db_dependent/Members.t.

updatedatabase.pl did not apply. I edited and then run it. Columns were added as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

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

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

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Bug 10459: Follow up to update to atomic update methodology

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New column created, no errors.

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

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:10:22 +00:00
Jacek Ablewicz
113adf68e5 Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses
It seems that if subscription_numberpatterns.numberingmethod contains parentheses, updatedatabase.pl crashes when running the 3.23.00.006 DB upgrade snippet, with the following error:

[Mon Jun 6 09:06:54 2016] updatedatabase.pl: Unmatched ( in regex; marked by <-- HERE in m/ ( <-- HERE / at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 11498.

Steps to reproduce:
1/ Have a Koha DB version<3.23.00.006
2/ Create a subscription numbering with parentheses in it:
   ie "Vol. (Month, Year)" with pattern
       Vol. {X} ({Y}, {Z})
3/ Add some serials using that numbering method so that serialseq is filled in DB:
   ie  "Vol. 16 (February, 2015)"
4/ Run the updatedatabase.pl script either from the cli or just start the webinstaller
5/ The error is produced

To test:
1/ apply patch
2/ try to reproduce this issue once again, should be fixed now
3/ have a look at the code, make sure the changes are consistent

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: I have not tested the patch, but the diff looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:39:26 +00:00
a01cd77e19 Bug 16565: Drop additional_fields and additional_field_values before creating them
These 2 tables should be dropped before trying to create them

Test plan:
From the SQL CLI, source the kohastructure.sql file
source it again
=> Without this patch you get 2 warnings
ERROR 1050 (42S01) at line 3580 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_fields' already exi
sts
ERROR 1050 (42S01) at line 3596 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_field_values' alrea
dy exists

=> With this patch, you won't get them

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-06-03 08:56:44 +00:00
Brendan Gallagher
bae0eb9ab7 DBRev up for Bug 16200 - 'Hold waiting too long' fee has a translation
problem

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-31 08:56:42 +00:00
Lari Taskula
09de19c427 Bug 16200: Convert all existing expired holds accounttype to HE
Before Bug 16200 expired holds have used accounttype F which is also used by
other type of fines. This patch updates all existing expired holds to new
accounttype HE (Hold Expired).

To test:
-1. Make sure you translated the string in previous patch of this buug
1. Find a Patron with "Hold waiting too long" fines and go to his Fines tab
2. Change Koha's language to some other than English
3. Observe that "Hold waiting too long" is still in English
4. Apply patch and run database update
5. Go back to Patron's Fines tab
6. Observe that "Hold waiting too long" is now translated

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-31 08:50:36 +00:00
Liz
3311ab44cf Bug 16619 - installer stuck in infinite loop
To test: run the web installer on master, it should not get stuck in an infinite loop.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-31 08:47:30 +00:00