Commit graph

3153 commits

Author SHA1 Message Date
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
Brendan Gallagher
b99731e2e0 Updating the DBrev for a new dev track (unstable).
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-30 10:02:31 +00:00
Brendan Gallagher
6d3396ab25 Final DBRev for the 3.23 dev to 16.05
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-26 03:14:05 +00:00
Bernardo Gonzalez Kriegel
e64f01ce0d Bug 13669: (alternative) use DBIx::RunSQL
Alternative POC solution, on top of
previous patches, feel free to obsolte.

This patch use DBIx::RunSQL->run_sql_file
to procees each sql file.

To test:
1) Apply all patches
2) Same test plan of patch 1

Timing test running web installer, marc21,
all sample data, time in seconds

a) without patch
structure   data
59.7        66.5
58.6        66.0

b) SQL::SplitStatement (patch 1+2)
59.4        101
59.7        102

c) DBIx::RunSQL (patch 3)
60.7        66.8
59.4        66.2

Tomas' version is a bit slower loading sample data,
all give similar results processing kohastructure.

New dependency to package: DBIx::RunSQL

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-23 16:47:32 +00:00
2358185379 Bug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted
The current table creation order is left to mysql's strategy, which is not
suitable for parsing the SQL files and passing one statement at a time in
the current order.

This patch just moves table creation statements around so FK constraints are
defined for previously created tables.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-23 16:47:32 +00:00
Bernardo Gonzalez Kriegel
4043e39240 Bug 16470: Update MARC21 es-ES frameworks to Update 22 (April 2016)
Same test plan of Bug 16460

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem, for es-ES files
3) Check new fields/subfields

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
es-ES frameworks updated

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:57:21 +00:00
Bernardo Gonzalez Kriegel
353dc0b0d7 Bug 16460: Update MARC21 frameworks to Update No. 22 (April 2016)
Update No. 22
Bibliographic
    New 382$r, 382$t, 753$0, 753$2
    Modified 382$e

Authority
    New 382$r, 382$t
    Modified 382$e

Also added final 'S' on 654 description

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
For comparison:
https://www.loc.gov/marc/bibliographic/bdapndxg.html
https://www.loc.gov/marc/authority/adapndxf.html

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:54:47 +00:00
Katrin Fischer
d58f9c2f45 Bug 16382: Update German web installer sample files for 16.05
Easy this time, only sample notices have been changed:
- Changed discharge to match the English sample notice.
- Translated new PASSWORD_RESET e-mail

To test:
- Start with an empty database
- Install de-DE
- Run the web installer in de-DE/German
- Verify all files, especially sample notices, load
  without any problems.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested removing all from letter table and loading file.
File loads Ok, notices look good.
No errors

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:48:19 +00:00
e07a68a6e7 Bug 15086 - DBRev 3.23.00.064
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:39:40 +00:00
Mark Tompsett
d6ac9270b0 Bug 15086: Creators layout and template sql has warnings
When doing a hacked install off the master branch:
use ... {koha database name}
truncate creator_layouts;
truncate creator_templates;
truncate printers_profiles;
source installer/data/mysql/... {name of a sample_labels type file}
Warnings are generated, which may not be visible in the UI.

Most of the warnings were triggered by:
-/*!40000 ALTER TABLE `creator_layouts` DISABLE KEYS */;
-/*!40000 ALTER TABLE `creator_layouts` ENABLE KEYS */;
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_illegal_ha

In the Russian, the layout_name was truncated, because the layout_name was only 20. An atomic update sql and kohastructure.sql update were provided to widen it to 25.
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_warn_data_truncated

Also fr-FR, ru-RU, and uk-UA were slightly different in structure, so the structure was made the same as the other files.

See comment #1 for the test plan.

NOTE: pl-PL is likely very out of date, but is not affected in this regard.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no more warnings
mysql> show warnings;
Empty set (0.01 sec)

No errors

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:33:04 +00:00
7b8bb85d5e Bug 16288: (QA followup) Remove the syspref INSERT line
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-05-16 17:14:57 +00:00
Colin Campbell
8ed1333d1d Bug 16288: Remove unused EDI Shipping Budget syspref
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-05-16 17:14:56 +00:00
85410cc9bc Bug 16402 - DBRev 3.23.00.063
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:09:53 +00:00
4e1b0e0242 Bug 16402: (QA followup)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:07:28 +00:00
74937f9c89 Bug 16402: Fix fox existing installations
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:07:28 +00:00
1960ba7e5b Bug 16402: Make kohastructure.sql valid for MySQL v5.7
A primary key should not contain null value, and MySQL v5.7 is now more
strict and won't accept our errors in the DB structure.

Test plan:
  mysql < installer/data/mysql/kohastructure.sql
should work using MySQL v5.7

QA:
- letter.branchcode should not be NULL, the default (all) is an empty
string
- permissions.code should not be NULL, it's always a string

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Clean install of Ubuntu 16.05, MySQL 5.7.11
kohastructure.sql loads ok, just one warning
No errors

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:07:28 +00:00
Brendan Gallagher
b18f3eddf6 DBRev Bug 16414 - aqorders.budgetgroup_id has never been used and can be
removed

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-06 04:06:56 +00:00
Katrin Fischer
ae289d95d7 Bug 16414: Follow-up - change to kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-06 03:57:37 +00:00
3d55706b3b Bug 16414: Drop aqorders.budgetgroup_id
This column has never been used and can be removed.

Test plan:
1/ update the schema
2/ prove t/db_dependent/Acquisition.t
should return green

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

Test green pre & post patch
No errors

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-05-06 03:57:36 +00:00
Francois Charbonnier
b09460de90 Bug 14622 - New data in French Canadian for the web installer. Add "fr-CA" folder.
TEST PLAN :
 - install Koha
 - choose fr-CA as the installation language
 - check every options in the web installer
 - every file should load smoothly

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, no problem/warning loading all sample files.
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 14:03:37 +00:00
e7eac39e96 Bug 16170 - DBRev 3.23.00.061
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-03 15:04:20 +00:00
Mark Tompsett
503cc30d9a Bug 16170 - Corrected to make work more smoothly
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-03 15:01:13 +00:00
33694a8faa Bug 16170: Pseudo foreign key in Items
While many of us would like to get rid of biblioitems one day, the current
scheme includes a biblioitemnumber and a biblionumber in Items.
(Which is not so great..)

But also note that biblionumber is NOT defined as a foreign key in Items,
although a belongs_to relation has been added to the DBIx scheme!
This inconsistency should be resolved. The "remove biblioitem table"
operation is a large one, but in the meantime we better make biblionumber
a regular FK not a 'pseudo' one.

Note: If in an (very) exceptional case biblionumbers are found in items,
that do not exist in biblio, this patch prints a warning at upgrade
time and does not add the constraint.

@RM: Please update the DBIx scheme accordingly.

Test plan:
[1] Run the upgrade. Check if the FK constraint has been added.
[2] Remove the FK constraint. Change the biblionumber of one item to an
    unexisting record. Run the upgrade again. Notice the warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested both cases: constraint added as well as warning printed.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-03 15:01:12 +00:00
62231de7f2 Bug 16418: Remove duplicate of EnhancedMessagingPreferencesOPAC
Test plan:
  mysql < installer/data/mysql/sysprefs.sql
should work

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-03 14:38:17 +00:00
7922ff0368 Bug 12528 - DBRev 3.23.00.060
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 17:58:30 +00:00
7896665fc9 Bug 12528: Add IGNORE to the INSERT statement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 17:54:10 +00:00
e71dd6fdc2 Bug 12528: Bug 9254: Followup - Rename pref to EnhancedMessagingPreferencesOPAC
If the new pref is named EnhancedMessagingPreferencesOPAC, it will show
up adjacent to EnhancedMessagingPreferences

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-04-29 17:54:10 +00:00
Bouzid Fergani
243662824a Bug 12528 - fix problem when insert OPACEnhancedMessagingPreferences
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 17:54:10 +00:00
Bouzid Fergani
aa14476ebc Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
- Change the preference Enhancedmessagingpreference description.
  - Enable default EnhancedMessagingPreferences and OPACEnhancedMessagingPreferences.
  - not sent e-mail it's necessary, when user call opac-messaging.pl directly..

Testing:

I Apply the patch
II Run updatedatabase.pl

0) Search OPACEnhancedMessagingPreferences preference;
1) Validate "OPACEnhancedMessagingPreferences show patron messaging
   setting on the OPAC (NOTE: EnhancedMessagingPreferences must be
   enabled).";

2) Disable OPACEnhancedMessagingPreferences preference;
3) Enable EnhancedMessagingPreferences preference;
4) On the OPAC -> user's settings, validate "your messaging" is not
   showed.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Works as expected. With the new syspref, patrons can be forbidden to
  modify themselves their own messaging preferences.

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

Also, I like sysprefs
http://www.quickmeme.com/img/d9/d99723bc544e8d33572dc92f242a6f6e2dbe0126a2e35fe3de073d30d62002e6.jpg

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 17:54:09 +00:00
db1e5db285 Bug 15533 - DBRev - Fix typo
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 15:25:03 +00:00
0aa787615a Bug 15533 - DBRev - Change INSERT to INSERT IGNORE for new syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 14:13:10 +00:00
bed7eb4762 Bug 16041 - DBRev - Fix print line
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 14:04:57 +00:00
1b6a3d85a9 Bug 16167 - DBRev 3.23.00.059
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 14:02:52 +00:00
85e7d186ec Bug 16167: Remove Authorised value images prefs
There are 2 prefs to drive this feature: StaffAuthorisedValueImages and
AuthorisedValueImages. AuthorisedValueImages is not added by
sysprefs.sql and does not appear in updatedatabase.pl, we could easily
imagine that nobody uses it.

With XSLT enabled, the feature is only visible on a record detail page
at the OPAC, if AuthorisedValueImages is set. Otherwise you need to turn
the XSLT off. In this case you will see the images on the result list
(OPAC+Staff interfaces) and OPAC detail page, but not the Staff detail
page.

This patch suggests to remove completely this feature as it does not
work correctly.

The ability to assign an image to an authorised value is now always
displayed, but the image will only be displayed on the advanced search
if defined.

Test plan:
Confirm that the authorised value images are no longer visible at the
opac and the staff interfaces.
The prefs should have been removed too.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:59:58 +00:00
d60c96c891 Bug 16167: Atomic update
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:59:58 +00:00
c22934c3e6 Bug 16041 - DBRev 3.23.00.058
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:51:29 +00:00
78605bceb3 Bug 16041: Turn off StaffAuthorisedValueImages by default
This feature is enabled by default, but the users are not aware of it
and it costs a lot of time processing to get the images.

There are 2 prefs to drive this feature: StaffAuthorisedValueImages and
AuthorisedValueImages. AuthorisedValueImages is not added by sysprefs.sql and
does not appear in updatedatabase.pl, we could easily imagine that
nobody uses it.
With XSLT enabled, the feature is only visible on a record detail page
at the OPAC, if AuthorisedValueImages is set.
Otherwise you need to turn the XSLT off. In this case you will see the
images on the result list (OPAC+Staff interfaces) and OPAC detail page,
but not the Staff detail page.

The idea of this patch is to introduce a quick switch if the feature is
not used by the library.

Test plan:
1/ Turn the pref on and set authorised_values.imageurl to NULL
Execute the DB entry
=> The pref have been turned off
2/ Turn the pref on and set an image for an authorised value
Execute the DB entry
You will get a warning
3/ Turn the pref off and set an image for an authorised value
Execute the DB entry
You will get a warning
4/ Turn the pref off and set authorised_values.imageurl to NULL
Execute the DB entry
You won't get a warning

Note that the opac detail page now checks the pref before retrieving the
images.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed update message 'that means'.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:47:26 +00:00
3615c7b34b Bug 15531 - DBRev 3.23.00.057
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:14:50 +00:00
Jesse Weaver
26297903e4 Bug 15531: (QA followup) Fix several small issues
* Add `AFTER` to DB update
  * Change "Is standing order basket:" to "Orders are standing:"
  * Disable item creation when adding from a staged file
  * Correctly show is_standing for existing baskets

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:07:18 +00:00
Jesse Weaver
9501ac2fef Bug 15531: Add support for standing orders
This allows creation of special baskets that include standing orders.
These orders do not have a known quantity (and may not have a known
price in advance). Upon receipt, the received items are split into a new
completed order.

Test plan:
  1) Run updatedatabase.pl.
  2) Run prove t/db_dependent/Acquisition/StandingOrders.t . (and the
     other Acquisition tests).
  3) Create a new basket, mark it as a standing order basket.
  4) Add an order to this basket, and notice that the quantity field is
     missing (and thus not required).
  5) Receive items for this order, and notice that the original order is
     unchanged. The new child order line should have the correct price
     and quantity information.

(Note: the QA tools output what seems to be a spurious spelling error
for Test::More's "isnt" in StandingOrders.t.)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:07:17 +00:00
df5b1b70aa Bug 14577 - DBRev 3.23.00.056
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 11:58:29 +00:00
caa753388a Bug 14577 - Allow restriction of checkouts based on fines of guarantor's guarantees
This enhancment allows a library to prevent patrons from checking out
items if his or her guarantees own too much.

Test Plan:
1) Apply this patch
2) Find or create a patron with a guarantor
3) Add a fine to the patron's account
4) Set the new system preference NoIssuesChargeGuarantees to be less
   than the amount owed by the patron
4) Attempt to check out an item to the guarantor, you will either
   be warned or prevented from checking out based on your system
   settings.

Signed-off-by: Cathi Wiggin <CWIGGINS@arcadiaca.gov>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 11:54:23 +00:00
1a0ca2874f Bug 15533 - DBRev 3.23.00.055
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 10:31:19 +00:00
cc77269694 Bug 15533 [QA Followup] - Add a system preference
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 10:26:04 +00:00
fc81ee5004 Bug 15533 - Allow patrons and librarians to select itemtype when placing hold
Some libraries would like the ability to select the itemtype to request
when placing holds. For example, if a record has 3 copies of BookA and 3
copies of BookA in large print, this feature would allow a person to
place a hold on the record, but still be able to target only the Large
Print edition so that the first Large Print copy that becomes available
is targeted, rather than forcing the patron to select a particular copy
to hold.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create a record with items of two or more itemtypes
4) Place a record level hold on the record while choosing one particular
   itemtype
5) Check in an item from the record that is not of that itemtype
6) Notee it is not trapped for the hold
7) Check in an item from the record that does match the selected itemtype
8) Note the item is trapped for the hold

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 10:26:03 +00:00
e27bca77c7 Bug 15532 - DBRev 3.23.00.054 2016-04-29 10:23:47 +00:00
456348aba9 Bug 15532: Add ability to allow only items whose home/holding branch matches the hold's pickup branch to fill a given hold
Some libraries would like to be able to limit hold filling to items that
match the pickup library for a hold based on the item's home or holding
library. The patron's home library should not affect whether a patron
can place the hold, instead the hold will only be fillable when an item
matching the pickup location becomes available.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Note the new "Hold pickup library match" rules for "checkout, hold,
   and return policy" and for "holds policy by item type"
4) Set the policy to "item's holding library"
5) Place a hold where the item's holding branch does not match
   the pickup branch
6) Check in the item
7) Note it is not trapped for the hold
8) Update the item's holding branch to match the pickup branch
8) Check in the item
9) Note the item is trapped for the hold
10) Repeat steps 4-9 but for home branch instead

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2016-04-29 09:49:07 +00:00
Brendan Gallagher
68235527aa DBRev Bug 16217 - Notice' names may have diverged
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-29 02:26:46 +00:00
f04e991975 Bug 16217: Resync names of notices
Bug 12752 has fixed a bug for installations upgrading from 3.14, but has
not fixed the problem for new installations.
Because of some wrong data manipulations, the names for a given letter
code may diverge.

In particular OVERDUE and PREDUE names of phone notices have been
wrongly modify by bug 11867: they have been set to the name of the first HOLD
notice.

Trying to be back on our feet, this update DB entry will try to guess
and set back up the correct name.

To know if your install is affected by this bug, the following SQL query
can help you:
  SELECT code, name, message_transport_type
  FROM letter
  WHERE code="PREDUE" OR code="OVERDUE";

If the names are different for the same code, something went wrong.
Executing this update DB entry should fix the divergence.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the problem, see comment #6 for test.
No koha-qa errors

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-29 02:16:07 +00:00
6d52cd63f3 Bug 12752: FIX letter names in 3.15.00.041
3.15.00.041 was wrong, the name of the letter should not always been the
name of the first HOLD notice.
PREDUE_PHONE should be updated with the first name of the PREDUE notice,
same for OVERDUE_PHONE and OVERDUE

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-28 23:27:36 +00:00
a63a51381b Bug 14686 - DBRev fix - add missing call to SetVersion
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-27 17:00:22 +00:00
Brendan Gallagher
19d2dfb733 DBRev for Bug 14686 - New menu option and permission for file uploading
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
2016-04-27 16:24:18 +00:00
49a3b581b7 Bug 14686: Add two granular permission for upload under tools
[1] Upload_general_files
    This will allow you to access the tools/upload form via the Tools menu.
    And it will also allow you to add permanent uploads.

[2] Upload_manage
    It will allow you to delete uploads from other users.
    Note that anyone may delete his own uploads.
    It is not meant to include upload_general_files.

In order to not disturb existing users that now have edit_catalogue and are
using the plugin (read: added at least one record to uploaded_files), we
will add the first permission for them. New users will need to be authorized
in the usual way thereafter.

Note: If you only have one of the other permissions checked in allows_add_by,
e.g. stage_marc_import, you can add temporary uploads, but not permanent
uploads.

Test plan:
We are only testing the dbrev here, not if the perm works as advertised.
[1] Run the dbrev and check that you see the perms with a description on
    the Patron/Set permissions page.
[2] If you had records in uploaded_files and a user with edit_catalogue
    *only*, verify that this user now also has upload_general_files.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

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

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
2016-04-27 16:14:17 +00:00
Bernardo Gonzalez Kriegel
a25bfbfc57 Bug 16361: Installer syntax error
Bug 16354 introduces a syntax error on updatedatabase.pl
see comment #5 there

To test
1) Check error on update 3.23.00.051
2) Apply the patch
3) run updatedabase again (perhaps changing 051 to XXX)

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-27 12:55:45 +00:00
Brendan Gallagher
4e6baf6185 Forgot extra $dbh
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-27 02:38:35 +00:00
Brendan Gallagher
ee652b07ca DBREv Bug 16354 - Fix FK constraints for edifact_messages table
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 23:14:02 +00:00
9b866b91af Bug 16354 - TestBuilder.t fails due to key constraints
Test Plan:
1) prove t/db_dependent/TestBuilder.t
2) Note failure
3) Apply this patch
4) prove t/db_dependent/TestBuilder.t
5) Tests should now pass!

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Failure noted and corrected.
No errors

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 23:05:18 +00:00
Brendan Gallagher
ca405ec114 Bug 12478: (RM followup) fix syntax error in updatedatabase.pl
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2016-04-26 15:03:26 -06:00
Brendan Gallagher
f24dd95e5d DBRev for Bug 12478 - Elasticsearch support for Koha
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:55:25 +00:00
Jesse Weaver
37ea74669c Bug 12748: (QA followup) fix several tiny QA tools warnings
* admin/searchengine/elasticsearch/mappings.yaml:
    * Fix indentation so QA tools believe it's valid YAML
  * C4::AuthoritiesMarc: Remove tab character
  * C4::Search: Fix POD
  * Koha::BiblioUtils: remove "return undef"
  * Koha::Schema::Result::Search*: rename type to _type
  * Koha::SE::ES::Search:
    * Fix spelling/@_[0]
    * Add my to loop variable
    * Remove unused var $error
    * Add use Modern::Perl
    * Fix undefined variables
  * Koha::ES::Indexer: fix POD
  * Koha::SE::ES::QueryBuilder:
    * Don't define variables in conditionals
    * Fix POD
  * Koha::SE::Zebra::Search:
    * Fix debug warns/POD/barewords
    * Koha::SE::Zebra::Search: add use Modern::Perl
  * kohastructure.sql: remove old, unused elasticsearch_mappings table,
    add new tables
  * labels/label-item-search.pl: remove C4::Dates
  * opac/elasticsearch.pl: remove old file

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:13 +00:00
Chris
253f8bac3f Bug 12478: Making sure the syspref is set to Zebra by default
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:13 +00:00
Chris
bc21573db4 Bug 12478 : Remove the rest of the references to the old mapping tables
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:13 +00:00
Chris
2e18cca19f Bug 12478 : Remove reference to deprecated table elasticsearch_mapping.sql
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:12 +00:00
adccfdb9f9 Bug 12478: Remove previous mappings file (sql)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:12 +00:00
24f72bd12a Bug 12478: Move mapping attributes to the join table
To make things consistent, the attributes of the mappings (sort,
suggestible, facet) should be moved to the join tables
(search_marc_to_field).
Indeed the search_marc_map could represent a mapping for several search
fields with different attributes. Before this change it was not
possible.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:11 +00:00
Robin Sheat
9cddc7ab16 Bug 12478: "fix" notforloan
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:11 +00:00
Robin Sheat
8365f9e9fd Bug 14899: schema changes to make the database better
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:10 +00:00
7d10460156 Bug 14899: DB changes
This patch applies several changes to the DB structure introduced by
the previous ES patch set:

1/ Add a search_field.label column
=> It will be easier to understand what the search_field does.
Indeed, some are not user friendly: acqdate, an, pl, ff8-23, ln, etc.
TODO later: Update the labels with correct values (at the moment
label=name)

2/ Update the foreign key search_marc_to_field.search_marc_map_id with
on delete cascase. This will permit to automatically remove the entries
in search_marc_to_field when they are deleted in search_marc_map.

3/ Remove the index_name_2 unique constraint on the search_marc_map table.
I don't understand how this could be useful, it was defined like (index_name,
marc_type, marc_field), so it means a mapping cannot be defined twice with
different values for facet, suggestible and sort.
This limitation does not seem to make sense.
Robin, please correct me if I am wrong :)

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:10 +00:00
Robin Sheat
8c76e99fca Bug 12478: add location, su-geo, se to facets
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:09 +00:00
Robin Sheat
0b9483a691 Bug 12478: fix some issues on rebase
There were rebase conflicts that it was just easier to postpone until
afterwards.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:09 +00:00
c369095f80 Bug 12478: Remove Solr occurrences reintroduced by a previous patch
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:09 +00:00
4493493da0 Bug 12478: Fix the UNIMARC and NORMARC indexing
1/ This patch fixes a major issue on UNIMARC and NORMARC installations
(Compulsive c/p on insert into insert into search_marc_to_field for unimarc and normarc)

2/ After fixing that, I got
invalid marc path at /usr/share/perl5/Catmandu/Fix/marc_map.pm line 35.
on reindexing.
It was caused by some "" values instead of NULL.

3/ Then, a "duplicate entry" error was caused by 3 lines for Local-number.
It seems to be an error, 1 is enough (I suppose 0909 was an error too).

Note that the following is not fixed by this patch:
MariaDB [koha_es_unimarc]>  insert into search_field (name, type) select distinct mapping, type from elasticsearch_mapping;
Query OK, 73 rows affected, 57 warnings (0.05 sec)
Records: 73  Duplicates: 0  Warnings: 57

MariaDB [koha_es_unimarc]> show warnings;
+---------+------+--------------------------------------------+
| Level   | Code | Message                                    |
+---------+------+--------------------------------------------+
| Warning | 1265 | Data truncated for column 'type' at row 1  |

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:08 +00:00
Robin Sheat
2e79ea0f74 Bug 12478: allow more granular sorting configuration
This allows sorting to be configured within a field. For example, while
many values are included for search on author, sorting should only be
done on the main entry values. This permits that by have a sort value,
which can be true, false, or null. true and null are pretty much the
same, but false means that a field isn't available for sorting on. By
default (null), fields can be sorted on.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:08 +00:00
Robin Sheat
364b5870ed Bug 12478: pull the SQL updates from the browse interface
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:08 +00:00
Robin Sheat
374f1e6384 Bug 12478: ES is now updated when records are updated/deleted
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:07 +00:00
Robin Sheat
b4392018bc Bug 12478: make things using SimpleSearch use the new version
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:07 +00:00
Robin Sheat
8349e6955e Bug 12478: fix issues with the conversion SQL
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:06 +00:00
Robin Sheat
bc3b0daaa4 Bug 12478: change the schema for storing mappings
This makes the mapping schema a proper many-to-many relational
structure, which is a little more fiddly to work with, but will make
things like editors for it easier to write.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:06 +00:00
Robin Sheat
e00fadad67 Bug 12478: working on authority results
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:05 +00:00
Robin Sheat
90efe994c9 Bug 12478 - fix error in SQL
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:03 +00:00
Robin Sheat
0536ef37cc Bug 12478 - authorities can now be stored in ES
(Not fetched yet though.)

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:03 +00:00
Robin Sheat
1d22202fb1 Bug 12478 - set up database tables for elasticsearch
This sets up the database changes needed to run ES. This isn't intended
to be ready for upstreaming, just to make testing easier.

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

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:03 +00:00
Robin Sheat
7dbd13e66f Bug 12478 - pile of elasticsearch code
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 20:20:03 +00:00