Commit graph

1857 commits

Author SHA1 Message Date
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
Bernardo Gonzalez Kriegel
12874c4cf7 Bug 9826 - Missing fields in MARC21 authority framework
This patch updates MARC21 authority framework adding
missing tags/subtags up to Update No. 15 (September 2012)

Missing tags and corresponding subtags only added to
default authority framework.

For present authtypes only missing subtags are added.

Also updates a few legends to match those from LOC.

No deletions except for a few not relevant tags in
present authtypes without subfields.

Only to new installs.

To test:
1) Delete present authority frameworks
2) Load new frameworks. On default there are
many new tags/subtags. On present authtypes
only a few new/renamed subtags.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-18 07:53:23 -07:00
Galen Charlton
7b21025e6b Bug 10443: DBRev 3.13.00.008 - make sure borrower_files exists
This schema update ensures that the borrower_files table
will exist for libraries who first installed Koha at
3.10.x.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-14 07:53:56 -07:00
Galen Charlton
43b17feed6 Bug 10443: (follow-up) make sure borrower_files has FK constraint
This follows the example of the DBrev that introduced
this table.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-14 07:53:55 -07:00
Juan Romay Sieira
2e86612a15 Bug 10443 - Table borrower_files does not exists in kohastructure.sql file
As a consequence, the borrower_files table would not exist
in Koha databases that were installed starting at 3.10.0
or later.

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-06-14 07:52:42 -07:00
Galen Charlton
a588325ed6 Bug 10343: DBRev 3.13.00.007
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-07 10:06:36 -07:00
168cd232f8 Bug 10343: dbrev for rename OpacShowHoldNotes to OpacHoldNotes
Renames the pref for install and upgrade.

Test plan: See the other patch.

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-06-07 10:01:38 -07:00
Galen Charlton
022e5974a3 Bug 10120: DBRev 3.13.00.006
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-24 08:47:41 -07:00
fc61bd3018 Bug 10120: Adding a syspref to control if overdue charges are updated on return
On by default.

To Test

1/ Create an overdue item, that should get fines
2/ Return the item
3/ Check the borrowers record to see if the fine has been added/updated

Apply patch
1/ Make sure preference is set to do
Repeat steps 1-3 above

2/ Switch the preference to don't
Repeat stes 1-2
3/ Check the fine hasn't been added/updated

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass, works as described.
I would categorize this a bug fix for libraries that don't want
the new changed  behaviour that was introduced by recalculating
fines on return.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-24 08:47:12 -07:00
Galen Charlton
27a1017e44 bug 10052: DBrev 3.13.00.005
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-23 09:04:44 -07:00
81937d1d79 Bug 10052: Db revision for intranetstylesheet
Report 10052 makes the intranetstylesheet prefs behave like the opac ones.
This patch contains an optional db revision: If the pref intranetstylesheet is
not blank, and does not start with http, https or /, then prefix it with a
slash to make it an absolute path.

Test plan:
Before applying this patch:
1) Put intranet-tmpl/prog/en/css/staff-global.css into intranetstylesheet.
This works in the current staff client, but will be interpreted as relative as
soon as both patches for this report have been applied.
Apply the patch. And run: /cgi-bin/koha/installer/install.pl?step=3&op=updatestructure
Check the webinstaller warning and the pref value. There should be a slash
in front now. The css should still work.

Continue after applying this patch with:
2) Clear the intranetstylesheet pref. Run updatestructure again. No message: OK
3) Put /intranet-tmpl/prog/en/css/staff-global.css in intranetstylesheet.
Run updatestructure again. No message: OK
4) Prefix intranetstylesheet with http://[your-server-here]. Test again.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-23 08:55:05 -07:00
Galen Charlton
3a29a06955 bug 9722: DBrev 3.13.00.004 to add OpacShowHoldNotes syspref
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-23 08:29:24 -07:00
847cc15650 Bug 9722: Allow users to add notes when placing a hold in opac (dbrev)
Database revision for report 9722, adding new pref OpacShowHoldNotes.
This development is part of a larger one (see umbrella report 9721).

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.
And run from command line:  mysql -p [yourdatabase] < [your-clone]/installer/data/mysql/sysprefs.sql

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2013-05-23 08:12:53 -07:00
Galen Charlton
ec3c8e95e0 prefer CheckVersion in updatedatabase.pl
Fixes an inconsistency with a couple recent
DBrev patches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 11:57:33 -07:00
Galen Charlton
c62c36508d bug 7718: DBRev 3.13.00.003
- remove serial.itemnumber column

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 08:51:33 -07:00
67fb83d525 Bug 7718 - Remove itemnumber column from serials table
Remove the column 'itemnumber' from the table 'serial'. This is
a 1 to many relationship, and this reference does not make sense.
The 'serialitems' table handles the relationship between the 'items'
table and the 'serial' table.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Verify serial.itemnumber has been removed from the database

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

Column removed. No errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 08:44:31 -07:00
Galen Charlton
33b6ed32b4 Bug 10080: DBRev 3.13.00.002
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 08:14:23 -07:00
b00ec06968 Bug 10080 - Change system pref IndependantBranches to IndependentBranches
Test Plan:
1) Enable IndependantBranches
2) Apply this patch
3) Run updatedatabase.pl
4) Verify that the system preference still functions correctly

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 07:58:23 -07:00
Galen Charlton
c199cc6ef9 bug 8215: DBRev 3.13.00.001 for course reserves
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-21 15:54:25 -07:00
be869ab279 Bug 8215 - Course Reserves
Adds a course reserves system for academic libraries.

The course reserves system allows libraries to create courses
and put items on reserves for those courses.

Each item with at least one reserve can have some of its attributes
modified while it is on reserve for at least one active course.
These attributes include item type, collection code, shelving location,
and holding library. If there are no active courses with this item
on reserve, it's attributes will revert to the original attributes
it had before going on reserve.

Test Plan:
  1) Create new authorised value categories DEPARTMENT and TERM
  2) Create a new course, add instructors to that course.
  3) Reserve items for that course, verify item attributes have changed.
  4) Disable course, verify item attributes have reverted.
  5) Enable course again, verify item attributes again.
  6) Delete course, verify item attributes again.
  7) Create two new courses, add the same item(s) to both courses.
  8) Disable one course, verify item attributes have not reverted.
  9) Disable both courses, verify item attributes have reverted.
 10) Enable one course, verify item attributes are again set to the
     new values.
 11) Edit reserve item attributes, verify.
 12) Disable all courses, edit reserve item attributes, verify
     the item itself still has its original attributes, verify
     the reserve item attributes have been updated.
 13) Verify the ability to remove instructors from a course.
 14) Verify new permissions, top level coursereserves, with
     subpermissions add_reserves and delete_reserves.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>

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

http://bugs.koha-community.org/show_bug.cgi?id=8125
2013-05-21 15:50:55 -07:00
Galen Charlton
d51d6c5feb DBrev 3.13.00.000 -- onwards to Koha Pi!
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-20 10:18:03 -07:00
Jared Camins-Esakov
d28d1ef0fa Increment version for 3.12.0 release
(cherry picked from commit 85a1b8a50b)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-19 17:57:28 -04:00
Magnus Enger
e7571a1a1c Bug 10134 - set XSLT usage ON as default, for new Koha installs
Currently, new installs are created with XSLT display set to "off",
but XSLT seems to be the preferred way to display records, so
having the default be "on" instead seems to make sense. This patch
will of course only affect new installs.

To test:
- Apply the patch
- Run through the webinstaller on an empty database
- Log in to the staff client and search for "xslt" in system
  preferences
- Verify that XSLTDetailsDisplay, XSLTResultsDisplay,
  OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay are all set to
  "default"

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

Passes test plan correctly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes syspref.sql for new installations to use XSLT views
by default. No changes to existing installations, no
string changes.
Passes all tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-12 10:05:18 -04:00
Jared Camins-Esakov
5a9a82dcc3 Bug 9681: Increment version number
Database update for bug 9681 has been given version 3.11.00.301
2013-05-08 10:03:26 -04:00
Paul Poulain
68ff49bb7d Bug 9681: Add some indexes in database
Some table columns should have an index to speed SQL queries :
- statistics table has only one index (used to make heavy queries for reports)
- itemtype should have an index in items and biblioitems (this is used in circulation to check the number of existing issues of a specific item type)
- issue.branchcode and issue.issuingbranch

Test plan :
- Create a new database using kohastructure.pl
=> check there is no SQL error and that new indexes are present (mysql> show create table)
Apply update database on a master version
=> check there is no SQL error and that new indexes are present (mysql> show create table)

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

Comment: Indexes created as described. No errors.
Fixing small merge conflict.
Test presence of new indexes on all affected tables.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-08 10:03:23 -04:00
Julian Maurice
30d067400e Bug 10185: Add missing columns in update 3.09.00.025
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
SQL only changes fixing an important database update.

IMPORTANT: Patches must be backported to all versions containing
the database update 3.09.00.025.

I used the test plan provided by Julian with some additions:
1/ Do a fresh 3.8 install
2/ Do some reserves
3/ Check your old_reserves table is empty
4/ Update your sources to 3.10
5/ Run updatedatabase.pl
6/ Your reserves table is now empty!

I made sure I had item level and title level holds, also
suspended holds.

I repeated the test with entries in my old_reserves table
(cancelled and filled holds) to make sure this is also still
working correctly.

Before the patch we lost all suspended holds and when the
old_reserves table was empty also all holds in general.
After the patch the reserve_id is added but the other data
in both tables is not altered.

NOTE: Adding the reserve_id first to old_reserves and then
to reserves we are missing one id in between.
old_reserves: 1,2,3
reserves: 5,6
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-08 10:00:10 -04:00
Julian Maurice
37c52367b0 Bug 10185: Fix update 3.09.00.025
It can remove all reserves from reserves table when there is no entries
in old_reserves.
This is due to @ai which is set to NULL in
  SET @ai = ( SELECT MAX( reserve_id ) FROM tmp_reserves )
and reserve_id > NULL returns no results in
  INSERT INTO reserves SELECT * FROM tmp_reserves WHERE reserve_id > @ai

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan and comments on second patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-08 10:00:10 -04:00
Jared Camins-Esakov
fa69f553ee Increment version for 3.12.0-beta3 release
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 23:07:40 -04:00
Galen Charlton
308237541b Merge remote branch 'origin/new/bug6554_reverts' 2013-05-01 11:22:30 -07:00