Commit graph

1985 commits

Author SHA1 Message Date
Mathieu Saby
e5fe771cc9 Bug 10138: Add some authorized values in French installer; small fixes in frameworks
This patch adds some categories of values in French installer :

- SUGGEST
- OPAC_SUG
- REPORT_GROUP
- LOST
- DAMAGED

SUGGEST and OPAC_SUG are used by Suggestions module.
REPORT_GROUP is used by Reports module.

It also adds a new status for "ETAT" (en commande)

It creates a 995$2 subfield in french frameworks when it did not exist.
It links existing 995$2 subfield with LOST category.

It cleans up the list of authorised values installed with "Lecture
publique" framework :

- some codes are moved in general 1-Obligatoire/authorised_values.sql
  (SUGGEST, REPORT_GROUP)
- some are suppressed, because they are also defined in
  1-Obligatoire/authorised_values.sql (langue, COUNTRY, statut)
- the code for inserting the ones left is changed (I suppress the `id`
  column)

To test :
1. Take a fresh new Koha
2. Install Koha choosing French installer and UNIMARC Lecture publique
3. Check the authorised values are imported
4. Check the cataloguing frameworks are usable :
   especially 995 $2 field, which must be mapped with LOST values :
   Perdu, Long retard, Perdu et remboursé, Introuvable
   you can also check 101$a (language codes), 102$a (country codes)
5. In OPAC, make a suggestion. See if you can select a cause for your
   suggestion ("Bestseller" or "'L'exemplaire en rayon est endommagé")
6. In staff interface, manage some suggestions. See if you can select a
   cause for rejection or acceptation ("Bestseller", "Budget
   insuffisant" etc)
7. In reports, see if you can sort reports according to values of
   REPORT_GROUP ("Circulation", "Catalogue", "Adhérents" etc)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-27 14:46:11 +00:00
Galen Charlton
612e7e5b7e Bug 8018: DBRev 3.15.00.011
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-27 00:37:19 +00:00
b5eab7c20b Bug 8018: (followup) make the default more explicit
This patch:
- Makes the new subfield tab show maxlength=9999 as default (instead of
  empty-then-zero).
- Updates the help to make exlpicit that 0 or empty defaults to 9999.
- Assumes all the subfields created with maxlength=0 inadvertedly are
  meant to mean "no limit" and hence update the database to reflect
  that.

To test (this patch and Pablo's):
- Edit a MARC framework, edit some field's subfields.
- Use the 'New' tab to create a new subfield (choose an unused letter).
- See in "More constrains" that the "Max length" field is empty. Leave
  it as-is.
- Save the changes (the new subfield).
- Edit the field again, verify that "Max length" is 0.
- Try tu use the framework and the the field/subfield just created
  > FAIL
- Apply the patches, upgrade
- Try to use the framework/field/subfield > SUCCESS (0 was converted to
  9999)
- Repeat from the begining, "Max length" should show 9999 on the new
  subfield tab.
- Leave it empty, it is saved as 9999.

Edit: small typo

Sponsored-by: Universidad Nacionald de Cordoba
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests in t and xt.
Tested:
- deleting an existing subfield
- adding a new subfield with new default 9999
- editing the new subfield, changing value to 8888
- deleting new subfield
- adding new subfield, using 8888 as length

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-27 00:34:50 +00:00
Galen Charlton
2d46dc9503 Bug 6331: DBRev 3.15.00.010
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:38:20 +00:00
Fridolyn SOMERS
e1fb1a658c Bug 6331: remove obsolete column deleteditems.marc
There is a difference between "items" and "deleteditems" tables
in "kohastructure.sql"
"deleteditems" has a field "marc" not existing in "items".

This patch removes this obsolete column.

Test :
- after deleting an item, check that the deleted item is properly
  stored in deleteditems table
- check that the column marc has been deleted from deleteditems table

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:33:47 +00:00
Galen Charlton
be55359877 Bug 11391: DBRev 3.15.00.009
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:21:44 +00:00
Galen Charlton
a6b2f6a161 Bug 11391: drop default value on suggestions.suggesteddate column
The 'default 0' clause got translated as an invalid constant
default of '0000-00-00' when DBIx::Schema is used to deploy
the suggestions table into a Pg database.  This patch drops
the default.

To test:

[1] Apply the patch and run the SQL specified in the database
    updated.
[2] Verify that the suggestions table no longer has an
    explicit default value for the suggesteddate column.
[3] Verify that prove -v t/db_dependent/Suggestions.t
    passes.
[4] Verify that installer/data/mysql/kohastructure.sql runs
    cleanly in an empty database.
[5] Verify that there are no visible regressions of the
    purchase suggestions functionality.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Having a default of 0 on a date seems like a mad thing to do anyway,
so good to get rid of it

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:20:43 +00:00
Galen Charlton
930f4f393e Bug 11384: DBRev 3.15.00.008
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:17:21 +00:00
Galen Charlton
5f015d0502 Bug 11384: rename the collections_tracking.ctId column
'ctId' as a column name conflicts with one of the system
columns that PostgreSQL uses for each table, and consequently
needs to be renamed to enable deploying the schema to a Pg
database.  This patch makes this change.

To test:

[1] Apply the patch and run the SQL specified in the database
    updated.
[2] Verify that the collections_tracking table no longer has
    a ctId column, but now has collections_tracking_id.
[3] Verify that prove -v t/db_dependent/RotatingCollections.t
    passes.
[4] Verify that installer/data/mysql/kohastructure.sql runs
    cleanly in an empty database.

This patch does not affect user-visible behavior given the fact
that the rotating collections feature is currently disabled.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:14:57 +00:00
Galen Charlton
458ef35a6a Bug 11155: remove old PostgreSQL schema and MARC framework scripts
This patch removes the legacy Pg schema and MARC framework scripts
as they're out of date.  They will be replaced by use of DBIx::Class
to deploy the schema.  Loading the sample data and settings will be
accomplished either by making the current scripts in installer/data/mysql
DBMS-independent (or, at least, able to be processed by both MySQL and Pg),
converting them to flat text files and writing code to load them, or a
combination of the two approaches.

To test:

[1] Verify that installer/data/Pg is removed.  There is some code
    in C4::Installer that refers to that directory, but it cannot
    be reached through normal means.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-23 16:12:45 +00:00
Galen Charlton
41ef046768 Bug 9673: DBRev 3.15.00.007
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-19 06:28:01 +00:00
Jonathan Druart
e6807a29af Bug 9673: QA followup
This followup fixes the wthdrawn typo exist in updatedatabase.pl and
does not display the lostitem date if the lostitem value is not set (!=
"").

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-19 06:27:46 +00:00
0debe12061 Bug 9673 - Track when items are marked as lost or withdrawn
Add date fields to track when an item was marked as lost or withdrawn.
Display those fields on catalogue/moredetail.pl

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Pick a record with items, browse to the 'items' tab ( moredetail.pl )
4) Mark an item as lost, verify the field "Lost on:" displays below
   the "Lost status" field with todays date.
5) Mark the item as not lost, verify the field no longer displays
6) Repeat steps 4 and 5 with the Withdrawn field.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-19 06:27:09 +00:00
Galen Charlton
20589801e0 Bug 11249: DBRev 3.15.00.006
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-17 15:32:17 +00:00
Fridolyn SOMERS
19b5c9b4ce Bug 11249: Add Db indexes on borrowers names
The borrowers search is by default on columns surname, firstname,
othernames and cardnumber.

(See C4::Members::_express_member_find).

Adding DB indexes will really increase the query speed.

This patch adds DB indexes on surname, firstname, othernames (cardnumber
has already an index).

Those indexes must be defined with a size because columns are mediumtext.

Test plan :
Test with mysql client :
mysql> explain select * from borrowers where surname like 'A%';
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
| id | select_type | table     | type  | possible_keys | key         | key_len | ref  | rows | Extra       |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
|  1 | SIMPLE      | borrowers | range | surname_idx   | surname_idx | 767     | NULL |  395 | Using where |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
=> key show the index is used

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, changes from updatedatabase and in kohastructure match.
I think deletedborrowers can be left out, as it's not queried when doing
patron searches. Patron deletes still work as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-17 15:25:55 +00:00
Galen Charlton
c5a6ee4000 Bug 8230: DBrev 3.15.00.005
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-13 23:23:31 +00:00
Jonathan Druart
7180eb1153 Bug 8230: Display acquisition details on the catalogue detail page
This patch adds a new tab "Acquitition details" on the catalogue detail
page. It provides a list of order made for this biblio.

New system preference:

AcquisitionDetails: Hide/Show the new tab.  The default for
new and upgraded installations is to display the new tab.

Test plan:
1/ Apply the patch.
2/ Select the "placing an order" value for the AcqCreateItem pref.
3/ Create a new order with X items.
4/ Go on the catalogue detail page for the selected biblio.
5/ Click on the "Acquisition details" tab and check that your order is
displayed. Itemnumbers are present in the last column. Check that links
are not broken.
6/ Close your basket.
7/ Status become "Ordered"
8/ Receive X-1 items.
9/ Come back on the catalogue detail page. There are 2 orders: 1
complete and 1 partial. The complete one has a receive date.
10/ Receive the last item.
11/ Now you have 2 orders with a complete status.
12/ Cancel the last receipt.
13/ You have 1 ordered and 1 complete (2 items).
14/ Cancel the first receipt.
15/ You have 1 ordered (3 items).
16/ Delete your order
17/ You have 1 deleted order.
18/ Switch the AcqCreateItem pref to "receiving an order"
19/ Do again steps 3 to 17.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-13 23:22:05 +00:00
Jonathan Druart
97b270aa2e Bug 11261: make sample serial frequencies mandatory during installation
Test plan:
Verify all sample_frequencies.* files have been moved from optional
to mandatory directories.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-13 18:34:05 +00:00
Jonathan Druart
3c2e45a058 Bug 11261: make sample serial numbering patterns mandatory during installation
Test plan:
Verify all sample_numberpatterns.* files have been moved from optional
to mandatory directories.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All sample files for numbering patterns are moved from optional
to mandatory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-13 18:33:57 +00:00
Galen Charlton
142acaf8df Bug 10970: DBRev 3.15.00.004
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-06 15:53:22 +00:00
Galen Charlton
6203bbaa55 Bug 10970: (follow-up) update framework only for MARC21 installations
This patch ensures that the new MARC21 subfields don't accidentally
appear in the default MARC framework for UNIMARC or NORMARC Koha
catalogs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-06 15:46:12 +00:00
Bernardo Gonzalez Kriegel
f37a163e75 Bug 10970 - Update MARC21 frameworks to Update Nr. 17 - DB update
Database counterpart of Bug 10962. Updates existing MARC21
default frameworks to Update Nr. 17 (September 2013)

To test
1) Apply patch
2) run updatedatabase.pl
3) Verify new subtags

biblio
    015_q 020_q 024_q 027_q 800_7 810_7 811_7 830_7

authorities
    020_q 024_q

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-06 15:38:44 +00:00
Galen Charlton
ac4b12ca93 Bug 2546: DBRev 3.15.00.003
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-05 18:45:37 +00:00
Jonathan Druart
8aa0e6856d Bug 2546: make description of standard fine types translatable
The descriptions for fines are stored in English in the DB
(accountlines.description). So they are not translatable.

This patch removes the descriptions automatically added and generates
the string in the template.

Test plan:
1/ Execute the updatedatabase entry.
2/ Verify in the following pages the description is consistent:
    - members/pay.pl?borrowernumber=XXXX
    - members/boraccount.pl?borrowernumber=XXXX
    - opac-account.pl
3/ Launch the translate script and update the po files in order to
translate the new strings.
4/ Verify the strings are translated in the interface.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Corrected few typos in the commit message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-05 18:44:33 +00:00
Galen Charlton
a838acf6a6 Bug 11275: DBRev 3.15.00.002
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 17:50:53 +00:00
Fridolyn SOMERS
8aa6e51b6f Bug 11275: make deleteditems.materials be of type text
Bug 7278 has made items.materials of type text.
It must be the same in deleteditems column.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested:
- definition of materials now matches between items and deleteditems
- database update works correctly

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The only difference between tables items and deleteditems is
deleteditems.marc
Amended patch: Add a missing SetVersion in updatedb.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 17:49:13 +00:00
Galen Charlton
17b78abc7f Bug 11040: DBRev 3.15.00.001
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-24 18:47:39 +00:00
Peggy Thrasher
2131c78618 Bug 11040: Add CircAutoPrintQuickSlip option to print regular slip
This patch adds a third option to the CircAutoPrintQuickSlip system
preference.  The three options are now:

* print quick slip
* print regular slip
* clear the screen

Test plan:
1.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

2.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

3.  Apply the patch
    Update the database using UpdateDatabase.pl

4.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

5.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

6.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

7.  Reload the database using sysprefs.sql
    Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

8.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

9.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

10.  Verify that the Checkout Help includes information about printing Slips.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-24 18:37:42 +00:00
Galen Charlton
c7ca5ad5af DBRev 3.15.00.000: on to what comes after Pi
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-21 15:09:36 +00:00
Galen Charlton
44eba3f046 DBRev 3.14.00.000: Koha 3.14.0
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-21 00:53:22 +00:00
Galen Charlton
cf5cfcbe34 Bug 11196: DBrev 3.13.00.043
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-14 19:06:46 +00:00
Jonathan Druart
bb8098cb4b Bug 11196: Add SearchEngine syspref in the DB if missing
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-14 19:03:46 +00:00
Srdjan
5fb7c2aac8 bug 11196: put SearchEngine to sysprefs.sql
To test:

Check that sysprefs.sql runs correctly.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-14 19:03:18 +00:00
Galen Charlton
0cb4f09eb2 DBRev 3.13.00.042: mark Koha 3.14 beta
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 14:22:26 +00:00
Galen Charlton
af4b6c8420 Bug 8307: (follow-up) fix discrepancy in name of the new syspref
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:46:16 +00:00
Galen Charlton
42579892b7 Bug 8307: DBrev 3.13.00.041
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:40:54 +00:00
Galen Charlton
1846deb055 Bug 9044: (follow-up) fix merge conflict typo that broke this script
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:39:17 +00:00
Jonathan Druart
4b36244c73 Bug 8307: Set a value for subfields when receiving
If items are created when ordering, this patch allows to add a value for
some items subfields.

Test plan:
Define status for items.notforloan (mapping 995$o in unimarc), for
example 4:On order, 5:On treatment

Set the Syspref AcqCreateItem on "ordering".

ACQ framework : set default value = 4 for 995$o (in unimarc)

Syspref AcqItemSetSubfieldsWhenReceived : set "o=5|b='foo bar'"

When ordering the item, default status will be 4 ; when receiving the
item, status will be changed from 4 to 5. The subfield b have to contain
'foo bar'

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 23:36:59 +00:00
Galen Charlton
b686fa0073 Bug 8015: DBRev 3.13.00.040
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:51:13 +00:00
3952c20289 Bug 8015: QA Followup
* Add bug number to database update
* Fix capitalization errors
* Fix JavaScript string translation errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:39 +00:00
f75c878e87 Bug 8015: (follow-up) add user permissions to all languages
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:18 +00:00
Jonathan Druart
5d170aa268 Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 8015: Fix complains from qa tools

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

Bug 8015: Get rid of the eval in ModifyRecordWithTemplate

This patch removes the use of eval in the
C4::MarcModificationTemplates::ModifyRecordWithTemplate routine.

Now this routine call the wanted modification routine with the list of
parameters.
This call is done only if the condition is respected.

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

Bug 8015: Get rid of eval for evaluating =~ m//

Koha::SimpleMarc::field_equals uses eval in order to check if a string
matches a pattern.
Now this eval is removed and the "regex" variable does not contain the
regex separated character (/ or |).

Regression: Before this patch, the user was able to user a modifier. Now
it is not possible.

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

Bug 8015: Get rid of the eval for substitution

Before this patch, the regex substitution was contain into only one
variable (e.g. my $regex = "/foo/bar/i").
Now each member of the regex is stored into a field in the
marc_modification_template_actions sql table.

In order to avoid a complex code, only modifiers i and g are take into
account.

Note: If you already add the mmta table, you have to drop it.
This patch also adds a foreign key from mmta to mmt tables.

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

Bug 8015: FIX ui issue

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

Bug 8015: The template name is a required field

Test plan:
Try to add a template with an empty string as name.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:11 +00:00
622430cfb5 Bug 8015: Add MARC Modifications Templates
The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.

This tool is useful for altering MARC records from
various venders work with your MARC framework.

The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.

Each action can also have an optional condition to check
the value or existance of another field.

The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.

Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).

At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:47:08 +00:00
Galen Charlton
c6323e96f3 Bug 11178: Make the Bootstrap OPAC theme the default for new installs
This patch implements the proposal adopted by the community to
make Boostrap be the default OPAC theme for new Koha installs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 17:03:32 +00:00
e8c73f6d6c Bug 10523: Remove two obsolete routines from Installer.pm
The routines sql_file_list and marcflavour_list in Installer.pm are not used.
There are some references to them in probably obsolete '/lib' test units.
I changed these test units for the record too.

Also: removed the not-existing marcflavour parameter of sample_data_sql_list
in its call in install.pl.

Test plan:
Run a new install.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:51:47 +00:00
Galen Charlton
021b629975 Bug 7295: DBRev 3.13.00.039
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:37:35 +00:00
Galen Charlton
950b403efe Bug 7295: (follow-up) fix syntax error in kohastructure.sql
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:37:34 +00:00
Julian Maurice
fe777ef937 Bug 7295: (follow-up) several fixes
- List of libraries in basket.pl is now sorted by branch name, not code
- When IndependantBranches is ON, user has only the possibility to set
  basket branch to its own branch, or to no branch at all.
- When basket do not belong to any branch, selected branch by default is
  connection branch (was 'no branch')
- added id attributes to both added li elements
- change description of 'order_manage_all' permission to make it
  clearer.
- remove Test::MockModule dependency

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:37:08 +00:00
Julian Maurice
54616c37e2 Bug 7295: More granular permissions for baskets
- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:35:35 +00:00
Galen Charlton
0838287630 Bug 8435: DBRev 3.13.00.038
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:30:12 +00:00
Jonathan Druart
d2052311cb Bug 8435: add permission to enable editing other library's serials if IndependantBranches is on
In the serial module, we want to hide serials from others libraries.
However, to permit central serials manage, this patch introduces a
new permission, 'superserials'. If a staff member has this permission,
that person can override the restriction.

Test plan:
- Switch on the IndependantBranches syspref
- Add the permission 'superserials' for a patron and test you can
  navigate and see all serials
- Remove this permission and test you cannot manage/view subscriptions
  from others libraries

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:27:19 +00:00
Galen Charlton
0f6882896d Bug 10572: DBrev 3.13.00.037
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:45:47 +00:00
320afd2fc5 Bug 10572: (follow-up) ensure SQL for all translations has the phone transport type
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:45:02 +00:00
2eb34034df Bug 10572: (follow-up) DBrev to ensure presence of phone transport type
Test plan:
Run the updatestructure step of web installer.
Check if you have a phone message_transport_type.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:44:27 +00:00
568f32606c Bug 10572: Add phone to message_transport_types table for new installs
In connection to bug 4246, commit 591bae324 added
phone to the message_transport_types table in updatedatabase.pl

This should be done also for new installs via the .sql files of the web
installer.

I am adding it only to English now, basing this change upon the work in
reports 10509 and 10520. (I discovered this tiny omission there too.)

Test plan:
Apply patches 10509/10520.
Run new install or run this particular sql file from command line.
Note: If you only run this particular file, you do not need patch 10509.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:41:49 +00:00
Galen Charlton
0476b6da32 Bug 9044: DBRev 3.13.00.036
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:23 +00:00
Jonathan Druart
0c2fa7a570 Bug 9044: QA followup
1/ Remove filter and sort for the checkboxes column.
2/ Enable the pref by default.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:30:36 +00:00
Julian Maurice
8848863b7b Bug 9044: Provide item selection in record detail page (staff client)
This patch add a column in the items table of catalogue/detail.pl that
contains checkboxes for item selection and a drop-down list of actions
that can be executed for the selection of items.

Currently available actions are:
- Delete selected items: redirect to batch items deletion
- Modify selected items: redirect to batch items modification

Item selection is only enabled if the new syspref
StaffDetailItemSelection is ON.
Actions are not displayed if user doesn't have the right permissions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Further testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:29:35 +00:00
Galen Charlton
da9c4cab1f Bug 2720: (follow-up) fix error that prevented sysprefs from being loaded
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:51 +00:00
Galen Charlton
6c632637e1 Bug 2720: (follow-up) add new table to kohastructure.sql
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Galen Charlton
eff4815991 Bug 2720: (follow-up) add foreign key from new table to borrowers
Foreign keys should be added as a matter of course for new tables.

Argubably, borrower_debarments.manager_id could also be linked to
borrowers, but this patch does not do that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Galen Charlton
965b2c7d58 Bug 2720: DBRev 3.13.00.035
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Jonathan Druart
3804b17745 Bug 2720: (follow-up) change license version to GPLv3+
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:10 +00:00
80897930b7 Bug 2720 - Overdues which debar automatically should undebar automatically when returned
This patch adds a more extensible and flexible debarments system to Koha. The fields
borrowers.debarred and borrowers.debarredcomment are retained for compatibility and
speed.

This system supports having debarments for multiple reasons. There are currently
three types of debarments:
OVERDUES    - Generated by overdue_notices.pl if the notice should debar a patron
SUSPENSION  - A punative debarment generated on checkin via an issuing rule
MANUAL      - A debarment created manually by a librarian

OVERDUE debarments are cleared automatically when all overdue items have been returned,
if the new system preference AutoRemoveOverduesRestrictions is enabled. It is disabled
by default to retain current default functionality.

Whenever a borrowers debarments are modified, the system updates the borrowers debarment
fields with the highest expiration from all the borrowers debarments, and concatenates
the comments from the debarments together.

Test plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Verify the borrower_debarments table has been created and
    populated with the pre-existing debarments
 4) Run t/db_dependent/Borrower_Debarments.t
 5) Manually debar a patron, with an expiration date
 6) Verify the patron cannot be issued to
 7) Add another manual debarment with a different expiration date
 8) Verify the 'restricted' message lists the date farthest into the future
 9) Add another manual debarment with no expiration date
10) Verify the borrower is now debarred indefinitely
11) Delete the indefinite debarment
12) Verify the debarment message lists an expiration date dagain
13) Enable the new system preference AutoRemoveOverduesRestrictions
14) Set an overdue notice to debar after 1 day of being overdue
15) Check out an item to a patron and backdate the due date to yesterday
16) Run overdue_notices.pl
17) Verify the OVERDUES debarment was created
18) Return the item
19) Verify the OVERDUES debarment was removed
20) Disable AutoRemoveOverduesRestrictions
21) Repeat steps 15 though 18, verify the OVERDUES debarment was *not* removed
22) Add issuing rules so that an overdue item causes a temporary debarment
23) Check out an item to a patron and backdate the due date by a year
24) Return the item
25) Verify the SUSPENSION debarment was added to the patron

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:53:22 +00:00
Galen Charlton
59d1d48f0e Bug 7131: DBRev 3.13.00.034
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 04:35:16 +00:00
805bec0a65 Bug 7131: (follow-up) allow overlaying by barcode
This patch adds the ability to overlay by either itemnumber,
or barcode. Itemnumbers take precendence over barcodes, which
allows us to batch update item barcodes with an overlay.

Test Plan:
1) Create a new record with 2 items, make sure to give it a unique ISBN
2) Download the record as MARCXML
3) Edit the MARC XML
   a) Delete one of the two items
   b) Change the barcode in the barcode field to something unused
4) Transform the xml file into marc with xml2marc
5) Browse to 'Stage MARC records for import'
6) Upload the binary marc file
7) Choose the following options:
    Record matching rule: ISBN
    Action if matching record found: Ignore incoming record
    Action if no match is found: Ignore incoming record
    Check for embedded item record data: Yes
    How to process items: Replace items if matching bib was found
8) Click 'Stage for import' button
9) Verify a matching record was found, then click 'Manage staged records' link
10) Verify the rules are still set correctly
11) Click 'Import this batch into the catalog'
12) The import should tell you:
    1 record was ignored
    1 item was replaced
13) View the record details and verify the item's barcode was replaced
    with your updated barcode value
14) Download the record as MARCXML
15) Edit the MARC XML
    a) Delete one of the two items
    b) Delete the itemnumber field for the remaining item
    c) Alter the item's callnumber to a new value
16) Repeat steps 4 through 12
17) View the record details and verify the item's callnumber was replace
    with your updated callnumber value

Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 04:34:04 +00:00
Elliott Davis
1dba9c6409 Bug 7131: teach MARC import how to overlay items
When staging biblios with items attached you previously had only two
options, add or don't add.

This patch adds a third option to replace an item record if a match is
found on itemnumber or barcode, else it adds the item.

Test Plan:
1) Stage a file of biblios with items attached.
2) Import the batch into the catalog.
3) Run the indexer so the matcher will match
4) Modify the item data for at least one bib in the file
5) Re-stage the file with the item matching option set to "Replace
   items if matching bib was found"
6) Let the indexer run again
7) You should see updated item information after the overlay

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 04:31:07 +00:00
Bernardo Gonzalez Kriegel
2234ef3ebd Bug 10962 - Update MARC21 frameworks to Update Nr. 17 (September 2013)
This patch updates MARC21 default bibliografic
framework and authorities frameworks to
Update Nr. 17 (September 2013)

Source

Bibliographic: http://www.loc.gov/marc/bibliographic/bdapndxg.html
Authorities: http://www.loc.gov/marc/authority/adapndxf.html

Only to new installs.

To test
1) Remove default MARC21 framework
2) Load marc21_framework_DEFAULT.sql
3) Verify new subtags

    015_q 020_q 024_q 027_q 800_7 810_7 811_7 830_7

4) Remove authorities frameworks
5) Load authorities_normal_marc21.sql
6) Verify new subtags

    020_q 024_q

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 03:25:24 +00:00
Galen Charlton
98706270cd Bug 7688: (follow-up) correct SQL to create the subscription table
Columns referring to a foreign key must have matching
types.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 02:40:14 +00:00
Galen Charlton
e36db6c247 Bug 7688: DBRev 3.13.00.033
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 00:39:11 +00:00
Julian Maurice
e1593c898f Bug 7688: (follow-up) set firstacquidate in updatedatabase if it's not set
firstacquidate is now a mandatory field, so it must be set.

The updatedatabase process set firstacquidate value to one of:
- the planned date of the first serial for this subscription, or if not
  found,
- the subscription start date.

+ auto-select the numbering pattern when modifying a subscription.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 00:35:07 +00:00
Julian Maurice
48b0472a63 Bug 7688: Change subscription numbering pattern and frequencies
Serials numbering pattern and frequencies are no longer hard-coded. Now
it's possible to create, edit and delete numbering patterns (and
frequencies). This patch adds two new sql tables
(subscription_numberpatterns and subscription_frequencies)

Numbering patterns behave almost as before, there are still the same
values to configure (addX, everyX, settoX, whenmorethanX). lastvalueX
and innerloopX remain in subscription tables.

There is a new value in numbering patterns: numberingX. For each
"column" (X, Y or Z) you can tell how to format the number. Actually
numberingX can be set to:
 - 'dayname' (name of the day) (0-6 or 1-7 depending on which day is the
   first of the week)
 - 'monthname' (name of the month) (0-11)
 - 'season' (name of the season) (0-3) (0 is Spring)

These names are localized by using POSIX::setlocale and POSIX::strftime
and setting a 'locale' value to the subscription. Locale have to be
installed on the system.

Note that season names are not localized using POSIX::strftime (it can't
do this), so names are hardcoded into the code (available languages: en,
fr). This could be fixed in the future by using a Perl localization
framework.

Frequencies can be configured using 3 parameters:
 - 'unit': one of 'day', 'week', 'month', 'year'
 - 'issuesperunit': integer >= 1, the number of received issues per
   'unit'
 - 'unitsperissue': integer >= 1, the number of 'unit' between two
   issues
One of 'issuesperunit' and 'unitsperissue' must be equal to 1.
Examples:
  unit = 'day', issuesperunit=3, unitsperissue=1 => 3 issues per day
  unit = 'week', issuesperunit=1, unitsperissue=3 => 1 issue each 3
  weeks

Prediction pattern is now computed server-side and is more consistent
with what Koha will do. The publication date is displayed alongside the
serial number.

Irregularities can now be checked one by one, in the prediction pattern
table, or if frequency is 'day-based' (unit is 'day'), there is the
possibility to check all issues for a week day at once.

When an irregularity is found, there is the possibility to keep the
serial number unchanged, or to skip it. It is configured at subscription
creation or modification.

For instance, with a daily subscription you can have:
  skip serial number  |  keep serial number
----------------------+----------------------
 2012-01-01  ¦  No 1  | 2012-01-01  ¦  No 1
 2012-01-03  ¦  No 3  | 2012-01-03  ¦  No 2

To lighten the subscription modification page, manual history has been
moved in its own page subscription-history.pl which is accessible on
subscription-detail.pl, tab 'Planning'.

Important note: updatedatabase.pl script takes into account existing
subscriptions and create appropriate numbering patterns for them (it
tries to create as few patterns as possible). Frequency is
mapped to the correct entry in subscription_frequencies table.

This patch includes kohastructure.sql and updatedatabase.pl changes
+ sample frequencies data and sample numberpatterns data for fresh
installs (sample data is included in updatedatabase.pl)

=== TEST PLAN: ===

Create a new subscription:

  - Go to Serials module and click "New subscription" button
  - On the first page, choose a biblio and click next to go to the
    second page
  - Pick a first issue publication date
  - Choose frequency '1/day'
  - Choose a subscription length of 15 issues
  - Choose a subscription start date
  - Choose numbering pattern 'Volume, Number'
  - A table appears, fill 'Begins with' cells with '1'
  - Click on 'Test prediction pattern' button

The prediction pattern is displayed at the right of the page. You can
see in it the serial number, the publication date and a checkbox to
allow you to choose which serials will not be received (irregularities).

You can see that serial number start from "Vol 1, No 1" continue to "Vol
1, No 12" and then restart with "Vol 2, No 1".

Frequency is '1/day' so you can see that publication date is incremented
by one day line after line.

  - Now you can play a little with frequencies and numbering patterns,
    change one of them (or both) and click again on 'Test prediction
    pattern'
  - For example, choose frequency '3/weeks' and click on 'Test
    prediction pattern' button'.

There is a little behaviour change compared with current master.
Publication date will not be guessed within the week. Koha can't know
when you will receive issues. So the publication date stay the same
(monday of each week) for 3 consecutive issues and then jump to the next
week.

  - Now choose frequency '1/3 months' and numbering pattern 'Seasonal'
  - Fill 'Begins with' cells with '2012' for Year and '0' for Season
  - Click on 'Test prediction pattern'
  - You should have something like 'Spring 2012', 'Summer 2012', ...,
    'Winter 2012', 'Spring 2013'
  - Note that you can have seasons for south hemisphere by entering '2'
    in 'Year/Inner counter'
  - 2nd note: if you have some locales installed on your system, you can
    type its name in the 'Locale' field (actually it does not work for
    seasons name, only for month names and day names)

If you want to modify the numbering pattern you can still do it here:

 - Click on 'Show/Hide advanced pattern' link. The advanced pattern
   table is shown but all fields are readonly
 - Click on 'Modify pattern' button. All readonly fields are now
   editable. Note that 'Begins with' and 'Inner counter' line are
   repeated here and any modifications in the small table will be
   replicated in the big table, and vice versa.
 - Pattern name is emptied, if you type a new name, a new pattern will
   be created, and if you type the same name as an existing numbering
   pattern, this one will be modified (with a confirmation message)
 - There is two new lines in this table:
   - Label: it's what is displayed in the smaller table headers above
   - Numbering: used to format numbers in different ways. can be
     'seasons', 'monthname' or 'dayname'. Month name and day name can be
     localized using the 'Locale' field. Seasons can't (values for
     English and french are hard-coded in Serials.pm)
 - You can modify what you want in the table and click on 'Test
   prediction pattern' button each time you want to see your
   modifications. (Note that checkboxes for irregularities aren't displayed
   in this mode, and you can't save the subscription until you have saved
   or cancelled your changes).
 - To cancel your modifications, just click on 'Cancel modifications'
   button.
 - To save them, click on 'Save as new pattern'. If the pattern name is
   already existing, a confirmation box will ask you if you want to
   modify the existing numbering pattern. Otherwise a new pattern will be
   created and automatically selected.

Once you have finished modifying numbering pattern, you can click again
on 'Test prediction pattern' to define irregularities, and then click on
'Save subscription'.

Now you can check the serials module still works correctly:

 - Check the subscription detail page to confirm that nothing is
   missing. Especially the 'Frequency' and 'Number pattern' information.
 - Try to receive some issues. Check that the serial number is correctly
   generated and if irregularities you have defined are taken into
   account (if you have defined some).
 - Check that receiving is blocked once you have reached the number of
   issues you have defined in subscription length (or once you have
   reached the subscription end date)

In serials menu (to the left of almost each page of serials menu) you
have two new links: 'Manage frequencies' and 'Manage numbering
patterns'.

'Manage numbering patterns' lead to a page which list all numbering
patterns and allow you to create, edit or delete them. The interface is
almost the same as numbering pattern modification in subscription-add.pl

'Manage frequencies' lead to a page which list all frequencies and allow
you to create, edit or delete them.

Try to create a new frequency:
 - Click on 'Manage frequencies' link in the serials menu and then click
   on 'New frequency':
 - Fill in the description (mandatory).
 - Unit is one of 'day', 'week', 'month', year' or 'None' ('None' is for
   an irregular subscription)
 - If unit is different from 'None' you have to fill the two following
   fields (Issues per unit, and Units per issue)
 - Note that at least one of those must be equal to 1
 - Issues per unit is the number of received issues by 'unit' and Units
   per issue is the number of 'unit' between two issues
 - Display order is used to build the drop-down list. Leave empty and it
   will be set to 0 (top of the list)
 - Then click on 'Save'
 - Check that this new frequency appears in the frequencies table and in
   the drop-down list in subscription-add.pl

Subscription history has been moved in its own page. To test if it still
works, choose a subscription with manual history enabled (or modify an
existing subscription to turn on manual history).

 - On the detail page, tab 'Planning', you should have a link 'Edit history'.
 - Click on it
 - Modify history and click on Save
 - In tab 'Summary' you should have the infos you just entered

And finally, you can check that old subscriptions (by old I mean
subscriptions that existed before the update) are correctly linked to an
existing numbering pattern and an existing frequency. Numbering patterns
should be named 'Backup pattern X' where X is a number.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Great development! Work as described. No koha-qa errors
(with all patches applied). Please QA this fast.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

Squashed commits:
-----------------

Bug 7688 follow-up: Small fixes for QA

- # Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s) in
  C4::Serials::GetSubscriptionIrregularities
- Bad template constructions fixed in serials/subscription-add.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

----

Bug 7688 follow-up: Small fixes for QA #2

- "return undef" -> "return"
- ":utf8" -> ":encoding(UTF-8)"
- TAB -> SPACES

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

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

----

Bug 7688: Translate sample frequencies for french

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

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

----

Bug 7688: Fix generating next serial when there is no 'Expected' issue

It can happen when the Expected issue is claimed. In this case the
status of the last serial is 'Claimed'

This patch change the API of GetNextSeq and GetSeq

Test plan:
- Create a subscription which starts a long time ago so that serials
  automatically appear in late issues
- Receive the first serial
- Go to claims page and claim the 2nd serial.
- Go back to the subscription page and click on 'Serial collection'
- You should have 2 serials, one 'Arrived' and one 'Claimed'.
- Click on Generate Next. This should fail with a software error message
  ("can't call method output ...")
- Apply this patch and click again on Generate Next. A new issue must be
  created with status 'Expected'.

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

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

----

Bug 7688: Followup FIX perldoc

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

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-30 00:29:38 +00:00
ffa2fbc93d Bug 11086: (follow-up) editing the database files also
Signed-off-by: David Noe <drnoe@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes permission description in en and untranslated
installer files.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-29 16:06:59 +00:00
Galen Charlton
f22431c2a1 Bug 10889: fix comment describing biblioitems.serial
biblioitems.serial is not a foreign key; it's a Boolean indicating
whether the biblio record is a serial, which in turn influences how
serial items are displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-23 14:13:41 +00:00
Galen Charlton
eb0e1e6bba Bug 5336: (follow-up) improve setting 'partial' order status during upgrade
This patch modifies the logic to set the partial status for an
order to verify that:

- at least one item has been received already
- the order belongs to a closed basket

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:49:32 +00:00
Galen Charlton
00fb4ee905 Bug 5336: DBRev 3.13.00.032
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:31:22 +00:00
Jonathan Druart
10548eba61 Bug 5336: (follow-up) fix case where partial status was not correctly set
An order (o1) is considered as partially received if (at least) another
order (o2) has the o1.ordernumber == o2.parent_ordernumber and the
quantity received is < to the quantity (to receive) and o1.ordernumber
!= o1.parent_ordernumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:30:09 +00:00
Jonathan Druart
1afd7fe270 Bug 5336: (follow-up) use understandable codes rather than magic numbers for orderstatus
This patch uses understandable codes instead of magical numbers for the
aqorders.orderstatus field.

+ execute sql queries in unit tests into a transaction.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:29:23 +00:00
Jonathan Druart
2fb3193dc7 Bug 5336: (follow-up) miscellaneous changes
- fix capitalization
- fix update database message

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:29:00 +00:00
Jonathan Druart
8a2b3bc0c8 Bug 5336: Order search (search and UI enhancements)
You can now search orders by

- order status
- fund

The patch series also adds a new field, aqorders.orderstatus, which can
contain following values:

  new
  ordered
  partial (for partially received orders)
  complete
  cancelled

To test: Search and check if results are consistent in histsearch.pl
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Note: status are no longer numeric, but strings now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 13:24:52 +00:00
Katrin Fischer
e9d45e4f6a Bug 10969: Fix sample itemtypes for translated installers
To test:
- Install the specific language and run the web installer.
Or:
- Truncate or delete all from the itemtypes table in your database.
- Try to run the complete SQL in the itemtypes sample files.

Verify the table is filled correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works for all languages. No koha-qa errors.

Tested removing itemtypes, then loading new file,
and checking on staff.

For de, es, nb, and pl no problems. For ru I disable foreign
keys constraint before TRUNCATE and reenable it afterwards.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-20 18:46:45 +00:00
Galen Charlton
a10773dc77 Bug 10565: (follow-up) add new user permission for patron list management
This patch adds a new user permission for patron list management,
tools => manage_patron_lists.

This closes a security issue with the original patch series where
patron lists and their contents could be retrieved and modified
without requiring authentication of any sort.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:43:03 +00:00
Galen Charlton
ae4411a58a Bug 10565: DBrev 3.13.00.031
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:32:36 +00:00
3b70e7e62c Bug 10565: Add a "Patron List" feature for storing and manipulating collections of patrons
The patron lists feature is somewhat similar to the record lists feature
in that it allows a librarian to create a list of patrons for later
retrieval and manipluation. These lists can then be used with the batch
patron modification tool.

Test Plan:
 0) Apply the patch for Bug 8798
 1) Apply this patch
 2) Run updatedatabase.pl
 3) Access the patron lists feature from Koha's Tools menu.
 4) Create a new list via the "New patron list" button.
 5) For this list, click the "Edit" button, and change the list name.
 6) For this list, click the "Add patrons" button, and search for and
    add some patrons to your list.
 7) For this list select some patrons to remove them.
 8) Try both adding some new patrons, and removing some old patrons
    as a single action.
 9) Click the "Patrons" link on the Koha toolbar
10) Search the patrons, or browse by letter to get patron results
11) Check the checkboxes next to one or more patrons, and add the
    selected patrons to your existing list.
12) Change the "Selected patrons" pulldown to "All resultant patrons"
    and add them to your list.
13) Check the checkboxes next to one or more patrons, and add the
    selected patrons to a new list.
14) Try manipulating a list of patrons using the batch patron
    modification tool.
15) Go back to the Patron Lists feature and delete your lists.
16) Run 'prove t/db_dependent/PatronLists.t'

Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:29:44 +00:00
Galen Charlton
79e3a884ae Bug 10636: DBrev 3.13.00.030
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:08:03 +00:00
09b8ce2a5f Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:08:02 +00:00
Galen Charlton
728670f467 Bug 10854: DBrev 3.13.00.029
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:55:36 +00:00
Galen Charlton
412995b522 Bug 10854: (follow-up) language tweaks
- adjust description of the default profile
- adjust description of the sample data SQL
- adjust description of the download link

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:52:59 +00:00
Jonathan Druart
383b2a75de Bug 10854: add ability to export serial claims using CSV profile.
Test plan:
- Create a CSV profile (or use the default one) with a type 'sql'.
- Go to serials/claims.pl, select the wanted CSV profile and click on
  the "Export selected items data".
- Verify the CSV file is correctly generated.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

On top of 10853 (solving merge conflict)

Need to do homework to test. Add subscription and serial claim
notice.

1) Create a new CSV profile, type SQL, copy sample fields
2) Go to claims, select vendor
3) Go to Export selected items with created profile
4) CSV (in my case I use | as separator) download successfully
5) All fields present, file correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as advertised, keeps existing format by porting it to
a SQL profile.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:33:30 +00:00
Galen Charlton
537068f969 Bug 10853: DBrev 3.13.00.028
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:25:42 +00:00
Jonathan Druart
0bf14c2d3a Bug 10853: Add DB field export_format.type ('marc' or 'sql').
This patch:
- adds a new column 'type' to the export_format table.
- renames the field name export_format.marcfields with
  export_format.content.

Test plan:
- Check that existing profiles have the type "marc" selected by default
- Create a new profile with a type "sql"
- Save and verify the profile is correctly displayed when you select it.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. koha-qa reports Small tabs errors,
corrected in followup

Test:
1) go to Tools > CSV profiles, Create profile, current
2) Apply patch, run updatedatabase
3) Go to Tools > CSV profiles, new option present
old profile with type MARC
4) Create new profile MARC, save and show correct
5) Create new profile SQL, save and show correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass with all 3 patches applied.
Works as described. Functionality for SQL profiles will be
added by another patch. For now it's possible to add/edit/delete
them.
Existing CSV profiles can still be exported correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 02:12:41 +00:00
Galen Charlton
280b0df19d Bug 10240: DBRev 3.13.00.027
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 01:57:05 +00:00
Jared Camins-Esakov
44d0ad451f Bug 10240: Offline circulation using HTML5 and IndexedDB
This patch adds an HTML5-based offline mode to Koha's existing
circulation module, allowing librarians to check out items using a
basically familiar interface. The feature will be implemented using
the Application Cache and IndexedDB features of the HTML5 specification,
both of which are fully supported on Firefox 10+ and Chrome 23+, with
limited support going back to Firefox 4 and Chrome 11. The basic
workflow enabled by this patch is as follows:

Part 1: While connected to the Internet
1. Enable offline functionality by turning on the
   "AllowOfflineCirculation" system preference.
2. Sync the offline circulation database on the computer that will be
   used for offline circulation by following the "Offline circulation
   interface" link on the Circulation home page, choosing "Synchronize (must be online)",
   and clicking the "Download records" button. This process may take a while.
3. Bookmark /cgi-bin/koha/circ/offline.pl (the page you are currently
   on) for easy access when offline.

Part 2: While disconnected from the Internet
4. Navigate to /cgi-bin/koha/circ/offline.pl using the bookmark you
   created while online.
5. Start checking books in by scanning the barcode of an item that has
   been returned into the box in the "Check in" tab.
6. Scan the barcodes of any additional items that have been returned.
7. Start checking out books to a patron by scanning the patron's barcode
   in the box in the "Check out" tab.
8. Set a due date (the "Remember for session" box will be checked by
   default, since circulation rules are not computed during offline
   transactions and therefore a due date must be specified by the
   librarian).
9. Scan an item barcode (if you did not set a due date, it will prompt
   you) to check the item out to the patron.
10. If a patron has a fine you can see the total amount (current to when
    the offline module was synced), and record a payment. Unlike when in
    online mode, there will be no breakdown of what item(s) fines are
    for, and you will only be able to record the payment amount and not
    associate it with a particular item.

Part 3: While connected to the Internet
11. Click the "Synchronize" link and choose "Upload transactions" to
    upload the transactions recorded during the offline circulation
    session.
12. Navigate to /cgi-bin/koha/offline_circ/list.pl (there will be a
    link from the Offline circulation page) and review the
    transactions, as described in the documentation for the Firefox
    Offline circulation plugin:
    http://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin

RM note: the IndexedDB jQuery plugin bundled with this patch is
copyright 2012 by Parashuram Narasimhan and other contributors and is
licensed under the MIT license.  The home page for the plugin is
http://nparashuram.com/jquery-indexeddb/.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Works very well, no koha-qa errors

Test with Firefox 24.0
1) did some checkouts pre sync
2) synchronize database (Download)
3) go offline
4) Proceed to checkin some items from patron
5) Proceed to checkout items to patrons, setting date
6) Proceed to checkout to expired patron, warning appears
7) go online
8) Upload records
9) go to review transacctions and proceed
10) verified on patrons that checkin/out are done

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 01:53:34 +00:00
Galen Charlton
5307d10a91 Bug 10602: DBrev 3.13.00.026
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:30:26 +00:00
Jonathan Druart
e273e11b08 Bug 10602: Set default value for authority fields via the framework
This patch allows to define default values in the authorities framework.

Some code already existed but the feature did not work.

Test plan:
1/ Choose a framework, field and subfields.
2/ Define a default value.
3/ Create a new authority and check that the subfield is
automatically filled with the default value.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. koha-qa reports some tabs, fixed in followup

Test
1) Apply patch, run updatedatabase.pl
2) Edit auth framework, put default value someware, save
3) Add new auth, default value present

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Verified database update is done correctly.

Controlfields 0xx
- Edited an existing field (001)
- Set a default value for subfield @
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Fields
- Edited an existing field (100)
- Set a default value for subfield e
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:25:47 +00:00
Galen Charlton
81cdaf131f Bug 9295: DBRev 3.13.00.025
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:06:47 +00:00
Mirko Tietgen
8369aa8431 Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value.
In OAI set mappings, the value "is equal to" is hardcoded. This
enhancement changes it to a dropdown menu to choose between "is equal
to" and "not equal to".

To test:

* define a set
* define a mapping for said set with "is equal to"
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;
* change mapping to 'not equal to', save
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Fix bug id in updatedb.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:03:30 +00:00
Galen Charlton
5aae737e7e Bug 10096: (follow-up) add LC authority Z39.50 targets to 'en' sample data
The LC NAF and SAF authority Z39.50 database are indeed production
services, so we may as well showcase the new authority Z39.50 search
functionality.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:59:29 +00:00
Galen Charlton
076e537986 Bug 10096: DBRev 3.13.00.024
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:37:37 +00:00
264de29621 Bug 10096 - (follow-up) various QA improvements
- improve POD
- remove extraneous comments
- correct license statement in new files
- remove backticks in database update SQL

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:29:18 +00:00
1e0b890b0c Bug 10096 - Add a Z39.50 interface for authority searching
This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.

These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.

To test this patch:

1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.

2) Go to the Authorities module

3) Click on the new "Z39.50 search button"

4) Select your authority search targets from the list.

5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)

6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".

7) Click on "MARC" next to the results of interest to review the MARC
authority record.

8) When you're satisfied with a record, click on "Import".

9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).

10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)

11) When you're satisfied, click save.

12) Presto! You've imported your first authority record via Z39.50!

--

Here is the info for the LibrariesAustralia test Z39.50 authority
database:

Z39.50 server: LibrariesAustralia Authorities
Hostname: z3950-test.librariesaustralia.nla.gov.au
Port: 210
Database: AuthTraining
Userid: ANLEZ
Password: z39.50
Syntax: MARC21/USMARC
Encoding: utf8

-

The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).

Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8

Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8

(N.B. Both of these databases also include title authorities.)

-

For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.

To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:

unix:/zebra/koha/var/run/zebradb/authoritysocket

(N.B. You might be using a different scheme than unix sockets...)

To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".

To set up this Z39.50 client target in Koha...

Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching

This patch adds the "recordtype" column to the "z3950servers" table.

The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).

I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.

Test Plan:

1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch

N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:26:29 +00:00
Galen Charlton
d17bdf26dd Bug 9611: DBRev 3.13.00.023
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-03 23:01:47 +00:00
4159e55a1a Bug 9611: Database update, changing password from varchar(30) to varchar(60)
This is necessary because Bcrypt hashes are longer than MD5 hashes.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-03 23:01:46 +00:00
Bernardo Gonzalez Kriegel
090ba4902c Bug 10965: fix breakage when loading sample itemtypes during install
Bug 10513 added two columns to table itemtypes,
but sample_itemtypes can't be loaded because
it relies on old structure.

This patch rewrites sample_itemtypes.sql, stating
explicitly columns, removing backticks and consolidates
all in one insertion.

To test:
1) On master with current DB structure, delete item types

2) try loading sample_itemtyes.sql
It fails with "ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1"

3) apply patch

4) try again, this time it will load and itemtypes created

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
SQL change only.
Tested by running the web installer on an empty database.
All sample data loads without errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-02 14:35:44 +00:00
Galen Charlton
6b8f716ccf Bug 10687: DBRev 3.13.00.022
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 15:12:27 +00:00
Galen Charlton
a1c5d280f6 Bug 10687: (follow-up) remove authority 68a/68b tags from translated MARC21 framework scripts
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 15:10:40 +00:00
Bernardo Gonzalez Kriegel
15f28461e0 Bug 10687: Delete erroneous tags 68a and 68b on default MARC21 auth framework
This patch deletes information for default
MARC21 auth framework on tags 68a and 68b.
Also added update for current installs.

RM note: The 68a and 68b fields were defined in an attempt to include
both MARC21 classification and MARC21 authority records in the same
default framework, but I don't think this has turned out to be useful,
as to my knowledge nobody tries to use MARC21 classification records
in Koha, and if one were to want to, a distinct record type (or at
least auth_type) would be a better way to do it.

To test with current authorities_normal_marc21.sql loaded

1) apply the patch
2) run updatedatabase
3) check on database that there are no more
references to tags 68a and 68b

To test for new installs
1) remove auth frameworks
2) load authorities_normal_marc21.sql
3) check that load without problem
4) check on database that there are no more
references to tags 68a and 68b

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 15:02:38 +00:00
Galen Charlton
ec3c09cbb0 Bug 9761: DBRev 3.13.00.021
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 00:33:23 +00:00
e23ef9c930 Bug 9761: dbrev for ConfirmFutureHolds
Db rev for new pref ConfirmFutureHolds.

Test plan:
Run [your server]/cgi-bin/koha/installer/install.pl?step=3&op=updatestructure
Optionally, run a new install to test sysprefs.sql.
Or:
Edit sysprefs.sql, leave at least the last few lines including the new one.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 00:27:15 +00:00
Galen Charlton
88d1e14728 Bug 7639: DBRev 3.13.00.020
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-17 15:22:33 +00:00
30c5d8ddc0 Bug 7639: QA Followup - Fix update description
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With these patches we now have 3 preferences that deal with
fines/fees and lost items:

Replacement price
- On marking lost:  WhenLostChargeReplacementFee
- On return: RefundLostItemFeeOnReturn (preexisting)

Overdue fines
- On marking lost: WhenLostForgiveFine

System preferences work according to their description.

Further notes:
- Patches pass all tests and QA script.
- LostItem is changed and needs unit tests.
  All occurrences of LostItem have been changed.
- Database update is ok. I had to fix the sysprefs.sql
  file that has been recently rewritten and alphabetized.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-17 15:21:36 +00:00
Meenakshi.R
0005f6bad3 Bug 7639: add option to forgive overdue fines when declaring items lost
This patch adds functionality to forgive overdue fine when an item is
set to lost status.  Fines are forgiven only when the syspref
WhenLostForgiveFine is set to yes. Item can be set to lost status from:

- catalogue/moredetail.pl
- cataloguing/additem.pl
- tools/batchMod.pl
- misc/cronjobs/longoverdue.pl

Changed subroutine C4::Circulation::LostItem to forgive fines on the
item depending on the value of syspref WhenLostForgiveFine. This
routine is currently used to return an item and charge a replacement
cost.

Also added a new syspref in C4::Circulation::LostItem -
WhenLostChargeReplacementFee.  The replacement fee will now be charged
only if this syspref is set to yes.  The default value of the
WhenLostChargeReplacementFee is yes, meaning that current behavior
will not change during upgrade.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-17 15:10:46 +00:00
Galen Charlton
1303ad28b2 Bug 10513: DBRev 3.13.00.019
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:32 +00:00
Magnus Enger
9dca7096c8 Bug 10513: display a warning/message when returning a chosen item type
This patch adds a new column to item types. Text in this column is
displayed as a warning when an item of the given type is checked in.
The type of message can also be chosen, affecting how the message is
displayed.

Use case: Items that are on inter-library loan can have a separate
item type, and when items of this type are checked in a message
saying something like "ILL! Remember to return it to the owning
library!" can be displayed.

To test:
- Apply the patch
- Go to Home > Administration > Item types administration
- Check that there is a new column, called "Check in message"
- Edit an item type and add a check in message
- Check that the check in message you added is displayed in the table
- Check in an item with an item type that has a check in message
- Check that the message is displayed
- Repeat the steps above, but select "Alert" instead of the default
  "Message" as the "Check in message type". Check that the message
  is displayed in a yellow alert box, not a blue message box.
- Check in an item with an item type that does *not* have a check
  in message, and make sure no false messages are displayed
- Create a new item type from scratch and check that it works
  the way it is supposed to
- Run the tests in t/ItemType.t, which are updated by this patch

This patch also removes backticks around column names in the
itemtypes table in installer/data/mysql/kohastructure.sql

UPDATE 2013-07-22
- Rebased on current master (no changes)
- Added "AFTER summary" to the SQL statement in updatedatabase.pl
- Added another placeholder on line 170 of admin/itemtypes.pl
Thanks Katrin!

UPDATE 2013-07-29
- Make this message independent of all other messages - thanks Owen!
- Make it possible to choose the type of message ("alert" or
  "message")

Sponsored-by: Kultur i Halland - Regionbibliotek
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs to make the QA script happy.
All old and new tests pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:31 +00:00
Galen Charlton
5480a3ca2b Bug 5349: DBrev 3.13.00.018
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:21:02 +00:00
Julian Maurice
905306efb1 Bug 5349: Create a table for order line transfers
This allow to keep transfers informations without having untranslatable
strings in database.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:38:28 +00:00
Julian Maurice
12f62ba1db Bug 5349: add ability to transfer order lines from one basket to another
On basket.pl and parcel.pl there is a 'Transfer' link which allow you to
transfer order lines from a basket to another.

The link leads to a new page which allow you to search for a bookseller,
then display this bookseller's baskets. Then you can pick a basket and
the transfer will be done.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:38:19 +00:00
Galen Charlton
7bc1077763 Bug 10320: DBrev 3.13.00.017
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:04:49 +00:00
Galen Charlton
0a304e52e7 Bug 10320: (follow-up) tidy up new system preferences
- added to sysprefs.sql
- fixed typo in updatedatabase.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:04:49 +00:00
Jesse Weaver
2d0bdc80fd Bug 10320 - Integrate OverDrive search into OPAC
Show any relevant results from the OverDrive ebook/audiobook service
on the OPAC search. This is done by showing a link with "Found xx
results in the library's OverDrive collection" at the top of search
results and linking to a page that shows the full results.

This requires an OverDrive developer account, and is enabled by
setting the OverDriveClientKey and OverDriveClientSecret
system preferences.  In addition, this patch adds the
OverDriveLibraryID system preference.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:00:40 +00:00
Galen Charlton
9dc7c37822 Bug 10550: DBRev 3.13.00.016
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:59:00 +00:00
Jonathan Druart
eb76026a68 Bug 10550: Merge 2 updatedatabase entries into 1
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:58:56 +00:00
dbaefb626c Bug 10550: Fix database typo wthdrawn
This patch updates the wthdrawn field in items and deleteditems to be
withdrawn instead. No functional changes are made.

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

Comment: Save for translation files (that will be fixed on next release),
only occurrence of wthdrawn is on updatedatabase.pl
No koha-qa errors.

This touch many files, and I did not test everything,
but all seems normal. I think that any problem could
be fixed later.

Perhaps both entries in updatedatabase.pl could be joined
into one, but thats for QA.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:58:41 +00:00
0cfe0fa923 Bug 10593: make AuthoritiesLog default to yes
This trivial patch set the default to 'yes' for this system preference.
To test,
On a clean install
- Navigate Home > Administration > Global System preferences > Logs
- AuthoritiesLog is set to "Don't log"
Apply the patch, install koha on a new DB.
- Navigate Home > Administration > Global System preferences > Logs
- AuthoritiesLog should be set to "Log"

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line patch, changing the default for new installations only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:44:57 +00:00
Jonathan Druart
e94e379698 Bug 10610: sort sysprefs.sql by syspref names
By sorting the sql syspref file, the frequency of merge conflicts
when dealing with it should be reduced.

Test plan:
- create a new DB with a new table named systempreferences (with the
  same structure as the one you know).
- insert the current sysprefs.sql file into this table.
- note the number of rows in the systempreferences table.
- Create a dump of the system preferences, e.g.,
  mysql> \T sysprefs-1
  mysql> SELECT * FROM systempreferences ORDER BY variable;
  mysql> exit
- apply this patch.
- delete all rows of the systempreferences table.
- insert the new sysprefs.sql file.
- verify the number of rows is the same as the previous.
- Create a new dump of the system preferences, e.g.,
  mysql> \T sysprefs-2
  mysql> SELECT * FROM systempreferences ORDER BY variable;
  mysql> exit
- Verify that the two dumps (sysprefs-1 and sysprefs-2) are
  identical.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 18:41:47 +00:00
Nicole C. Engard
09e802c793 Bug 10703: Document borrower_files table
Add db documentation to borrower_files table.

To test:

apply
review kohastructure.sql to be sure documentation is there

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No errors. Tested loading on new database.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 14:41:15 +00:00
Nicole C. Engard
6823c74537 Bug 10703: Document quotes table
Add db documentation for the quotes table

To test:

apply patch
review kohastructure.sql to be sure documentation is there

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 14:41:15 +00:00
Nicole C. Engard
801d8237d8 Bug 10703: Add db documentation for biblioimages table
This patch adds db documentation to the biblioimages table.

To test:

Apply patch
Review kohastructure.sql to be sure that the documentation is there

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 14:41:15 +00:00
Galen Charlton
8230cdea97 bug 7494: DBRev 3.13.00.015'
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 15:12:52 +00:00
Galen Charlton
383fe59871 bug 7494: (follow-up) tweak description of itemBarcodeFallbackSearch syspref
Thanks to MJ Ray for helping with the wordsmithing on #koha.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 15:12:45 +00:00
MJ Ray
84c2e7c1e5 bug 7494: optional checkout-time fallback search for a book
When issuing a book, some libraries want to issue by title or other details.
This patch adds a systempreference and code that allows it.

To test:
1) scan a patron card or enter a surname to start checking out;
2) enter title or other keywords;
3) the circulation screen should display a warning allowing to choose between copies.

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 15:12:38 +00:00
Galen Charlton
f9d3e02b83 Bug 10604: DBRev 3.13.00.014
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:47:02 +00:00
Galen Charlton
3793bfe9ed Bug 10604: increase width of two columns in the courses table
The department and term columns in the courses table started
as varchar(20), but since they refer to authorized values, need
to be varchar(80) to match authorised_values.authorised_value.  This
patch increases the width of those columns.

To test:

[1] Create two DEPARTMENT authorised values, one whose code
    is shorter than 20 characters and one whose code is longer
    than 20 characters.
[2] Create two courses; give one course the short department and
    the other the long department.
[3] Go to the courses list.  Observe that the department column is
    displays the department name only for the short course.
[4] Apply the patch.
[5] Edit the course with the long department and assign that long
    department to it again.
[6] Go back to the courses list.  Observe that both of the courses
    now display their assigned department.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified changes are consistent for new installations
and updated installations.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:46:58 +00:00
Galen Charlton
057297e2bf Bug 9576: DBRev 3.13.00.013
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 15:27:50 +00:00
835f745b55 Bug 9576: can now control whether max loans limit can be overriden
Adds a new system preference AllowTooManyOverride to control whether
a librarian can override the 'Too many checked out' message which is
currently always overridable.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Attempt to check out 1 more item to a patron than the max issues
4) You should be allowed to override by default ( current behavior )
5) Set AllowTooManyOverride to "Don't allow"
6) Repeat step 3
7) You should be blocked from being able to issue the item

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

The new system preference is activated by default, which mean there
will be no change in behaviour on update.

The system preference is correctly added to the database and .pref
files.

Test plan and QA script passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 15:07:42 +00:00
Galen Charlton
e504b6f53c Bug 10490: DBrev 3.13.00.012
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-12 20:08:44 +00:00
Katrin Fischer
16c5794044 Bug 10490: Overdue fines cap can't store decimal values
When overduefinescap was added to the issuingrules the datatype
given was decimal. This translates in MySQL to decimal(10,0).
This doesn't allow you to store decimal values and therefore
values like 4.5 are saved as 5 in the database.

To test:

On a current installation:
1) Try to enter 4.5 as Overdue fines cap. Verify that the value
   is not correctly saved.
2) Apply patch and run database update.
3) Try adding/changing an issuing rule setting Overdue fines cap
   to 4.5 again.
4) Verify the value is saved correctly.

Create a new Koha installation from scratch:
1) Verify that the issuingrules table has been created correctly
   and that you can add/mofidy issuingrules correctly.

Because this bug can create data loss, the old database update
has also been changed to avoid this problem for people updating
at a later point in time. Checkout an older version of Koha
pre 3.09.00.027.

1) Run the database updates.
2) Verify again, that adding/modifying issuingrules works correctly.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-12 20:08:35 +00:00
Fridolyn SOMERS
c6bf267050 Bug 6898: fix DB update that assigns the circulate/overdues_report permission
This patch fixes a bug that prevented the circulate/overdues_report
permission from being assigned to staff users during upgrade.  This
patch will not affect databases that are already running 3.12.x
or later.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This will only fix the permissions for updates done
after the patch has been applied. But I agree with
Fridolyn, that we can not safely update permissions for
existing installations.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-11 14:51:04 +00:00
bf9eccfeb8 Bug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql
Changes 8 INSERTs into INSERT IGNOREs.
This allows current installs to benefit easier from the new tags/subfields.
Note that running with --force will not achieve the same! The multi-value
inserts will still be aborted, though execution continues.

Test plan:
Run the file or do a new install.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran the file on a current install manually.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-08 15:01:01 +00:00
Bernardo Gonzalez Kriegel
45669b2566 Bug 5858: update default MARC21 framework to April 2013 revision
Applies to new installs, although with the follow-up
patch, users can run the installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
script through the mysql client to add new tag and
subfield entries.

To test:
1) Delete MARC21 default framework
2) Apply patch
3) Test that new default framework loads without problem

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run this file with and without this patch.
This patch adds 24 tags (338 vs 314) and 323 subfields (3951 vs 3628).
Verified that last QA comments were incorporated.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-08 14:58:48 +00:00
Galen Charlton
570209ec13 Bug 9519: DBRev 3.13.00.011
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-08 14:03:37 +00:00
Sonia LEMAIRE
707733ed29 Bug 9519: fix code for Italian language search limiter
'ind' rather than 'ita' was set as the ISO639-2 language
code for Italian in the fr-FR, it-IT, pl-PL, ru-RU, and uk-UA
installation SQL.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked nb-NO and de-DE - language code there had already
been corrected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-08 14:02:32 +00:00
Galen Charlton
35d888643f Bug 10366: DBRev 3.13.00.010 - add AcqWarnOnDuplicateInvoice syspref
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-06 17:14:00 +00:00
Jared Camins-Esakov
2d47b85692 Bug 10366: Alert librarian if an invoice number is duplicated
Some vendors ship materials from the same invoice in multiple packages.
In those cases, it would be good to notify the librarian when they enter
a duplicate invoice number, so that they can continue receiving on the
previously-created invoice, rather than creating an invoice with a
duplicate number.

To test:
1) Apply patch and run database update.
2) Make sure that you have created at least one invoice on
   acqui/parcels.pl and take note of the invoice number.
3) Try to create an invoice with the same invoice number.
4) Note that without changing your configuration this works exactly
   the same as before.
5) Turn on the AcqWarnOnDuplicateInvoice system preference.
6) Try to create a new invoice with the same number as the one you
   noted earlier.
7) Make sure you get a warning about a duplicate invoice.
8) Choose to receive on the existing invoice.
9) Confirm that you are receiving on said existing invoice.
10) Start the receiving process over, and this time choose "Create new
    invoice anyway."
11) Confirm that you are now receiving on a new invoice.

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

I have followed the test plan, but also checked some more things:
- Checking the duplicate check works when you have the entered
  invoice number in your database multiple times already.
- Checking that no duplicate message is shown if you enter the
  invoice number and it's already been used for an invoice from
  another vendor.

Looks all good. I think the only thing we could argue about here
is if this could be activated by default for new installations.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-06 17:13:45 +00:00
Katrin Fischer
aecb163f69 Bug 10474: Translate some English strings in German sample notices
This translates 2 strings missed doing the initial translation in
ISSUESLIP.

To test:
- Run the web installer in German.
Altnernatively:
- Truncate your letters table and run the SQL against the database.

Check that the notices were added correctly, especially ISSUESLIP.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-05 07:00:55 -07:00
14babcecf6 Bug 10488: Followup replacing DELETEs by more restricted INSERTs
Instead of inserting followed by deleting, this patch combines the two where
clauses of both sql statements, meanwhile leaving the separation intact.

As suggested by Galen, removed all 162's from the non-default types.
The 162 calls for a new authority type. We can add that later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran this .sql script after deleting all auth records.
The former version had 9 types, 1148 tags and 11621 subfields.
This one has 9 types, 1140 tags and 11597 subfields.
That is expected: 8 tags 162 less and 8x3 subfields less.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-03 04:20:40 -07:00
Bernardo Gonzalez Kriegel
61103a1f82 Bug 10488 - New MARC21 authority tags and subfields should be propagated to non-default frameworks
As proposed by the report creator, this patch
rewites authorities_normal_marc21.sql
using default authority framework to build all
current authtypes, then deleting irrelevant tags.

It also updates default authority framework
to last update (April 2013) adding new or
updated tags/subtags.

All new tags/subtags from Bug 9826 and this
one are included in all authtypes.

Deleted tags reflect current situation except
for 7XX tags thatl must be present for all authtypes.

Only for new installs

To test:
1) Apply patch
2) Delete all authtypes
exec in database
    delete from auth_types;
    delete from auth_tag_structure;
    delete from auth_subfield_structure;
3) Insert new auth framework
4) Verify absent tags. This can be done running

    select tagfield as from auth_tag_structure
    where authtypecode ='' and tagfield not in
    (select tagfield from auth_tag_structure
    where authtypecode = 'AUTH_TYPE')

for each authtype ( UNIF_TITLE, TOPIC_TERM, etc.)
The attached PDF could be used as a reference,
all that is white or green for each authtype must be
in the list (except for white 7XX tags)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-03 04:18:32 -07:00
Galen Charlton
9598f6365e Bug 9987: DBRev 3.13.00.009 - remove acqorders.biblioitemnumber
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-02 18:46:27 -07:00
Jonathan Druart
da0337b374 Bug 9987: Remove DB field aqorders.biblioitemnunmber
The DB field aqorders.biblioitemnumber seems to be unused except to get
the itype on the spent.pl page.

This information can be retrieved uising another SQL join.

Test plan:
Try a complete workflow in the acquisition module: create an order,
receive it, play with the syspref AcqCreateItem.
Check that no regression is found and that the data for existing
orders don't change.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-02 15:18:50 -07:00
2bcec70262 Bug 7368: Followup for columns names in userflags.sql
An insert statement should contain the column names to avoid confusion and
future problems with table definition changes.

This patch updates the English userflags.sql.

Will send updates for the other languages in connection with replacing inserts
by updates for the additional languages (where possible). For userflags this
will be possible.

Test plan:
Do an install (English).

Or -- as a dangerous(!) alternative--:
Do this ONLY on a restorable database.
Delete all records in userflags. (Note: This cascades to permissions a.o.)
Run this file from command line.
Check if you have records again in userflags. (You also messed up your Koha.)
Restore your database.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested both ways myself :)

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

Comment: Work as described. No errors.
Tested using second alternative

Just a note: if you update other lang files replacing INSERTs for UPDATEs
then you must install using EN and later apply lang files by hand.
If you do a translate first before webinstaller, and finish your install
in your lang, then that kind of file will fail.

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

mysql> create database test;
Query OK, 1 row affected (0.00 sec)

% mysql -u koha -p test < installer/data/mysql/kohastructure.sql
% mysql -u koha -p test < installer/data/mysql/en/mandatory/userflags.sql

mysql> select count(*) from userflags;
+----------+
| count(*) |
+----------+
|       19 |
+----------+
1 row in set (0.00 sec)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-27 08:29:26 -07:00