Commit graph

479 commits

Author SHA1 Message Date
Jonathan Druart
e31768aab1 Bug 8102: DataTables integration in acquisition module [14]
supplier.tt

http://bugs.koha-community.org/show_bug.cgi?id=8102
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Corrected bug number.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:06:02 +02:00
Dobrica Pavlinusic
47be784f96 Bug 8183 - acqui/parcels.pl plack scoping
Scope our $template for plack to prevent following error:

Can't call method "param" on an undefined value at /srv/koha_ffzg/acqui/parcels.pl line 177.

Test scenario:

1. Home > Acquisitions > Search for vendor
2. click on "Receive shipment"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:39:13 +02:00
Aleksa Vujicic
f2ca89b30e Bug 7129: Added a sprintf to format the actual cost.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Rebased to current master, please test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>

QA note: changed call to use $order instead of @$results[0], for consistency
with surrounding variables

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:10:01 +02:00
Matthias Meusburger
7f957077dd Bug 5337: EAN management : Adds ean for various searches
- in various acquisition pages and serials home
  - in database : biblioitems.ean
  - adds ean and its mapping in default english bibliographic framework
  - adds ean mapping in default french bibliographic framework
  - ean search is not enabled for MARC21

The required mapping between the ean marc field and the biblioitems.ean
database field will be automatically added on an existing unimarc installation.

However, if you already have records with ean, you will have to
run misc/batchRebuildBiblioTables.pl to populate biblioitems.ean

Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA at second run. Removed a merge marker only.
2012-06-09 18:26:34 +02:00
Chris Cormack
0aecb2c2b3 Bug 4330 : Fixing FSF address and copyright headers for acqui/
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-28 17:54:18 +02:00
285f06e394 Bug 7112 - Having two prices in 020$c causes basket creation to fail from staged marc import
The root problem here is that the price is being pulled from the MARC record
and is then run through Number::Format::unformat_number. This routine is
really being misused, and should only be used to reverse the effects of
Number::Format on a number string. We are apparently using it to strip
out currency characters and the like.

Number::Format::unformat_number will choke if there is more than one period (.)
in the price field. MARC standards do not limit this field to a single period,
so unless there is only one period, we should skip number unformatting.
Examples of that break unformat_number include '18.95 (U.S.)', and
'$5.99 ($7.75 CAN)', both of which are perfectly valid.

This commit adds the function MungeMarcPrice that will better handle
find a real price value in a given price field. It does a very good
job at finding a price in any currency format, and attempts to find
a price in whichever currency is active before falling back to
the first valid price it can find.

The variable $price may fail to have an actual price, in which case
the price then defaults to '0.00', which would be rarely if ever the
correct price. To combat this, I have added highlighting to any
price in the Order Details table that begins with 0 ( i.e. '0.00' ).

Also, fixed the incomplete table footer, adding a new td with a
span of 3 to fill in the nonexistant cells.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-05-24 15:59:21 +02:00
d6c3cb2934 Bug 7757 - Edit basket vendor after it has been created
Signed-off-by: mveron <veron@veron.ch>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-24 13:35:52 +02:00
Julian Maurice
2338d02e9e Bug 7175: Allow to choose which items to receive
If AcqCreateItem=ordering, when you receive an order, you now have a
list of all created items and checkboxes that permit you to choose which
items you want to receive.
A 'Edit' link open additem.pl page in a popup to allow you edit the
items before receiving them (popup is automatically closed after
modification, and items table is automatically updated)
If quantity is set manually in the text box, the appropriate number of
checkbox are checked from top to bottom and a warning shows up if
quantity is greater than order quantity

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-21 17:46:07 +02:00
Julian Maurice
b156055ad2 Bug 7175: orderreceive.pl cosmetic changes
- use warnings
- replace @$results[0] by $order when $count == 1
2012-05-21 17:46:04 +02:00
Paul Poulain
a598b10061 Merge remote-tracking branch 'origin/new/bug_7178' 2012-05-14 16:18:46 +02:00
d83596ad1b Followup 7178: Remove warning on uninitialized value in sprintf for neworderempty
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-14 16:17:05 +02:00
Julian Maurice
7a81b89357 Bug 7178: Follow-up Improve order item creation
Move SQL code from Perl script to Perl module
Replace SHOW COLUMNS by $dbh->column_info()
Update total on neworderempty.pl when adding or deleting items

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested ok for ordering and receiving items.
Total updated correctly.

Note: There are lots of errors in the logs before and after applying
the patch. A follow up is needed.
2012-05-14 16:16:13 +02:00
Jonathan Druart
f15d3de96c Bug 5347: Followup: FIX 2 bugs in lateorders
1/ Failed to claim late orders (Can't use string as a HASH ref)
2/ Don't show the red error message after submit the form for claims

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1/ Fixed.
2/ Also fixed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-18 17:05:23 +02:00
Colin Campbell
b5ac4a852f Bug 7831 : Sort budgets for selection in new order
The select budget dropdown list should be presented in
an ordered fashion. To achieve this sort the budget array
by the visible text.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-12 18:24:39 +02:00
Jonathan Druart
763d69732e Bug 7756: FIX send email for late orders
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- sending claim mails works now
- claim counter is not increased when vendor has no email address

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-12 16:50:27 +02:00
Jonathan Druart
d76dbace5e Bug 7291: Adds new field aqbooksellers.deliverytime
New field deliverytime in aqbooksellers table. It is an estimated
delivery time for orders (in days).
You can set this delay on the supplier modification page.
It is used in the late orders search.

The order estimated date is the aqbasket.closedate +
aqbooksellers.deliverytime

If you set a delay, the query check if closedate <= today - delay

If you set a "delivery time from" and a "delivery time to", the query check if
$delivery_time_from <= aqbooksellers.deliverytime is not NULL and if
closedate + deliverytime >= $delivery_time_to
if there is not a time_to then $delivery_time_to = the current date.
2012-04-03 18:19:46 +02:00
Julian Maurice
eefc774e27 Bug 7178: Acquisition item creation improvement
- Display a unique item block at once

On orderreceive.pl when AcqCreateItem is 'receiving', and on
neworderempty.pl when AcqCreateItem is 'ordering' it displays an
item block with item infos to fill, and a '+' button.
When user clicks on '+', the block is hidden and a list shows up with
the items that will be received. User can then edit or delete items in
the list and click 'Save' to receive items.

- PrepareItemrecordDisplay is now used for cloning block

Previous cloning function was duplicating ids, the side effect is that
plugins didn't work when several items were displayed.
PrepareItemrecordDisplay regenerate the form with new ids

- New system preference UniqueItemFields

Contains a space-separated list of sql column names (of items table).
This syspref is used in two ways:
 - Values corresponding to fields in syspref are not duplicated when
   adding a new item (button 'Add')
 - When saving the form, a check is made on fields in syspref for
   detecting duplicate (in DB and in the form)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests done are noted on the bug report.

2012-03-23: Fixed conflict in updatedatabase.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 11:07:23 +02:00
Dobrica Pavlinusic
fb3f624f09 Bug 7767 - acqui/basketgroup.pl: our $template scoping for plack
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 17:52:03 +01:00
Dobrica Pavlinusic
ccce4f0f60 Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 17:48:42 +01:00
Adrien Saurat
31175cbdab Bug 7737: applies date filters on vendor pages
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 17:18:03 +01:00
Adrien Saurat
58e3065af4 Bug 7748: use of TT date filter on addorderiso2709
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 18:23:39 +01:00
Julian Maurice
f3197e20eb Bug 7169: Follow-up: Change booksellers search results display
- List of booksellers changed to a drop-down list
- Baskets columns renamed and reordered to make them consistent with
  acqui/parcels.pl
- warning in log removed
- changed a '&' to '&amp;' to pass W3 validator

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 17:54:00 +01:00
Julian Maurice
d09e428a7d Bug 7169: Change booksellers search results display
- Replace vendor table by a div (avoid table in a table)
- Add two columns in basket tables: biblio count and expected (not
  received) items)
- Replace tablesorter by datatables
- Add a list of all returned bookseller names in top of the page (easier
  to find a bookseller in a large list of results)
2012-03-21 17:53:57 +01:00
Adrien Saurat
813648526d Bug 7744: use of TT date filters on basket pages
TT date filters added on basket.pl and neworderempty.pl

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 14:38:23 +01:00
Adrien Saurat
d266ccb81f Bug 7735: removal of C4::Dates when unused
Removes use of C4::Dates in acqui/ordered.pl and acqui/spent.pl

Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-20 18:11:04 +01:00
Jonathan Druart
692ee0e9da Bug 7166: Adds edit order notes when the basket is closed
When you are on parcel.pl or basket.pl you can now add or edit a note
 for each order.

 To test:
 Create orders with and without note.
 Edit/Add the note on basket.pl page

 Close the basket.
 Check you can add/edit the order note on parcel.pl page

+ From Owen:
Correcting markup issues with modordernotes.pl:

- Adding "rows" and "cols" attributes to <textarea> (required)
- Converting cancel button to link to stay consistent with
  other pages
- Changing page layout to fixed & centered (not sidebar needed)
- Expanding information in breadcrumbs to match information
  on basket.pl

Changing markup around note add and edit links: Moving output
of order note to the end of the table cell, putting it in its
own paragraph, and adding a "Note:" label

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-20 16:45:37 +01:00
Jonathan Druart
f3ba35c0a0 Bug 7301: 'From' field is 1 year ago by default
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-19 18:28:17 +01:00
Robin Sheat
4cbeeedbe8 Bug 6296: allow users to be authenticated by SSL client certs
This adds a new syspref: AllowPKIAuth. It can have one of three states:
* None
* Common Name
* emailAddress

If a) this is set to something that's not "None", and b) the webserver
is passing SSL client cert details on to Koha, then the relevant field
in the user's certificate will be matched up against the field in the
database and they will be automatically logged in. This is used as a
secure form of single sign-on in some organisations.

The "Common Name" field is matched up against the userid, while
"emailAddress" is matched against the primary email.

This is an example of what might go in the Apache configuration for the
virtual host:

    #SSLVerifyClient require # only allow PKI authentication
    SSLVerifyClient optional
    SSLVerifyDepth 2
    SSLCACertificateFile /etc/apache2/ssl/test/ca.crt
    SSLOptions +StdEnvVars

The last line ensures that the required details are
passed to Koha.

To test the PKI authentication, use the following curl command:
    curl -k --cert client.crt --key client.key  https://URL/
(look through the output to find the "Welcome," line to indicate that a user
has been authenticated or the "Log in to Your Account" to indicate that a
user has not been authenticated)

To create the certificates needed for the above command, the following series
of commands will work:
    # Create the CA Key and Certificate for signing Client Certs
    openssl genrsa -des3 -out ca.key 4096
    openssl req -new -x509 -days 365 -key ca.key -out ca.crt
    # This is the ca.crt file that the Apache config needs to know about,
    # so put the file at /etc/apache2/ssl/test/ca.crt

    # Create the Server Key, CSR, and Certificate
    openssl genrsa -des3 -out server.key 1024
    openssl req -new -key server.key -out server.csr

    # We're self signing our own server cert here.  This is a no-no in
    # production.
    openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key \
        -set_serial 01 -out server.crt

    # Create the Client Key and CSR
    openssl genrsa -des3 -out client.key 1024
    openssl req -new -key client.key -out client.csr

    # Sign the client certificate with our CA cert. Unlike signing our own
    # server cert, this is what we want to do.
    openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key \
        -set_serial 02 -out client.crt
    openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12
    # In theory we can install this client.p12 file in Firefox or Chrome, but
    # the exact steps for doing so are unclear, and outside the scope of this
    # patch

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested with Common Name and E-mail authentication, as well as with PKI
authentication disabled. Regular logins continue to work in all cases when
SSL authentication is set to optional on the server.

Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA comment: synchronized updatedatabase.pl version of syspref with sysprefs.sql
version, to avoid divergent databases between new and upgrading users.
2012-03-19 17:02:44 +01:00
Katrin Fischer
6ce3169ebf Bug 7602: Spent and ordered pages require full acquisition permissions
Changes permissions on these pages so that one acquisition permission
will make it possible to access the pages. Currently pages are only
accessible for users with full (all checkboxes checked) acquisition
permissions.

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

Tested with only one acquisitions permission (various choices) and
patron can access the ordered and spent pages.
2012-03-13 16:00:46 +01:00
Adrien Saurat
b2180b8bd4 Bug 4969: deletion of suppliers
If a vendor/bookseller has no basket/subscription link, it can now
be deleted (after a JS confirmation).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified that I can only delete vendors without linked orders or
subscriptions.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-13 15:12:26 +01:00
Srdjan Jankovic
a9ded4fa00 bug_7001: Issue and Reserve slips are notices.
Branches can have their own version of notices - added branchcode to
letter table.
Support html notices - added is_html to letter table.
Support for borrower attributes in templates.
GetPreparedletter() is the interface for compiling letters (notices).
Sysprefs for notice and slips stylesheets
Added TRANSFERSLIP to the letters

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-09 10:11:20 +01:00
Jared Camins-Esakov
5207699f98 signed off Bug 7284: Authority matching improvements
Squashed patch incorporating all previous patches (there is no functional
change compared to the previous version of this patch, this patch merely
squashes the original patch and follow-up, and rebases on latest master).

=== TL;DR VERSION ===
*** Installation ***
1. Run installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1
and installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2
2. Make sure you copy the following files from kohaclone to koha-dev:
etc/zeradb/authorities/etc/bib1.att,
etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml,
etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl,
etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl, and
etc/zebradb/marc_defs/unimarc/authorities/record.abs
3. Run misc/migration_tools/rebuild_zebra.pl -a -r

*** New sysprefs ***
* AutoCreateAuthorities
* CatalogModuleRelink
* LinkerModule
* LinkerOptions
* LinkerRelink
* LinkerKeepStale

*** Important notes ***
You must have rebuild_zebra processing the zebraqueue for bibs when testing this
patch.

=== DESCRIPTION ===

*** Cataloging module ***
* Added an additional box to the authority finder plugin for "Heading match,"
  which consults not just the main entry but also See-from and See-also-from
  headings.

* With this patch, the automatic authority linking will actually work properly
  in the cataloging module. As Owen pointed out while testing the patch,
  though, longtime users of Koha will not be expecting that. In keeping with
  the principles of least surprise and maximum configurability, a new syspref,
  CatalogModuleRelink makes it possible to disable authority relinking in the
  cataloging module only (i.e. leaving it enabled for future runs of
  link_bibs_to_authorities.pl).  Note that though the default behavior matches
  the current behavior of Koha, it does not match the intended behavior.
  Libraries that want the intended behavior rather than the current behavior
  will need to adjust the CatalogModuleRelink syspref.

*** misc/link_bibs_to_authorities.pl ***
Added the following options to the misc/link_bibs_to_authorities.pl script:
--auth-limit        Only process those headings that match the authorities
                    matching the user-specified WHERE clause.
--bib-limit         Only process those bib records that match the
                    user-specified WHERE clause.
--commit            Commit the results to the database after every N records
                    are processed.
--link-report       Display a report of all the headings that were processed.

Converted misc/link_bibs_to_authorities.pl to use POD.

Added a detailed report of headings that linked, did not link, and linked
in a "fuzzy" fashion (the exact semantics of fuzzy are up to the individual
linker modules) during the run.

*** C4::Linker ***
Implemented new C4::Linker functionality to make it possible to easily add
custom authority linker algorithms. Currently available linker options are:
* Default: retains the current behavior of only creating links when there is
  an exact match to one and only one authority record; if the 'broader_headings'
  option is enabled, it will try to link to headings to authority records for
  broader headings by removing subfields from the end of the heading (NOTE:
  test the results before enabling broader_headings in a production system
  because its usefulness is very much dependent on individual sites' authority
  files)
* First Match: based on Default, creates a link to the *first* authority
  record that matches a given heading, even if there is more than one
  authority record that matches
* Last Match: based on Default, creates a link to the *last* authority
  record that matches a given heading, even if there is more than one record
  that matches

The API for linker modules is very simple. All modules should implement the
following two functions:
<get_link ($field)> - return the authid for the authority that should be
linked to the provided MARC::Field object, and a boolean to indicate whether
the match is "fuzzy" (the semantics of "fuzzy" are up to the individual plugin).
In order to handle authority limits, get_link should always end with:
    return $self->SUPER::_handle_auth_limit($authid), $fuzzy;

<flip_heading ($field)> - return a MARC::Field object with the heading flipped
to the preferred form. At present this routine is not used, and can be a stub.

Made the linking functionality use the SearchAuthorities in C4::AuthoritiesMarc
rather than SimpleSearch in C4::Search. Once C4::Search has been refactored,
SearchAuthorities should be rewritten to simply call into C4::Search. However,
at this time C4::Search cannot handle authority searching. Also fixed numerous
performance issues in SearchAuthorities and the Linker script:
* Correctly destroy ZOOM recordsets in SearchAuthorities when finished. If left
  undestroyed, efficiency appears to approach O(log n^n)
* Add an optional $skipmetadata flag to SearchAuthorities that can be used to
  avoid additional calls into Zebra when all that is wanted are authority
  records and not statistics about their use

*** New sysprefs ***
* AutoCreateAuthorities - When this and BiblioAddsAuthorities are both turned
  on, automatically create authority records for headings that don't have
  any authority link when cataloging. When BiblioAddsAuthorities is on and
  AutoCreateAuthorities is turned off, do not automatically generate authority
  records, but allow the user to enter headings that don't match an existing
  authority. When BiblioAddsAuthorities is off, this has no effect.
* CatalogModuleRelink - when turned on, the automatic linker will relink
  headings when a record is saved in the cataloging module when LinkerRelink
  is turned on, even if the headings were manually linked to a different
  authority by the cataloger. When turned off (the default), the automatic
  linker will not relink any headings that have already been linked when a
  record is saved.
* LinkerModule - Chooses which linker module to use for matching headings
  (current options are as described above in the section on linker options:
  "Default," "FirstMatch," and "LastMatch")
* LinkerOptions - A pipe-separated list of options to set for the authority
  linker (at the moment, the only option available is "broader_headings," which
  is described below)
* LinkerRelink - When turned on, the linker will confirm the links for headings
  that have previously been linked to an authority record when it runs. When
  turned off, any heading with an existing link will be ignored.
* LinkerKeepStale - When turned on, the linker will never *delete* a link to an
  authority record, though, depending on the value of LinkerRelink, it may
  change the link.

*** Other changes ***
* Cleaned up authorities code by removing unused functions and adding
  unimplemented functions and added some unit tests.

* This patch also modifies the authority indexing to remove trailing punctuation
  from Match indexes.

* Replace the old BiblioAddAuthorities subroutines with calls into the new
  C4::Linker routines.

* Add a simple implementation for C4::Heading::UNIMARC. (With thanks to F.
  Demians, 2011.01.09) Correct C4::Heading::UNIMARC class loading. Create
  biblio tag to authority types data structure at initialization rather than
  querying DB.

* Ran perltidy on all changed code.

*** Linker Options ***
Enter "broader_headings" in LinkerOptions. With this option, the linker will
try to match the following heading as follows:
=600  10$aCamins-Esakov, Jared$xCoin collections$vCatalogs$vEarly works to
1800.

First: Camins-Esakov, Jared--Coin collections--Catalogs--Early works to 1800
Next: Camins-Esakov, Jared--Coin collections--Catalogs
Next: Camins-Esakov, Jared--Coin collections
Next: Camins-Esakov, Jared (matches! if a previous attempt had matched, it
would not have tried this)

This is probably relevant only to MARC21 and LCSH, but could potentially be of
great use to libraries that make heavy use of floating subdivisions.

=== TESTING PLAN ===

Note: all of these tests require that you have some authority records,
preferably for headings that actually appear in your bibliographic data. At
least one authority record must contain a "see from" reference (remember which
one contains this, as you'll need it for some of the tests). The number shown
in the "Used in" column in the authority module is populated using Zebra
searches of the bibliographic database, so you *must* have
rebuild_zebra.pl -b -z [-x] running in cron, or manually run it after running
the linker.

*** Testing the Heading match in the cataloging plugin ***
1.  Create a new record, and open the cataloging plugin for an
    authority-controlled field.
2.  Search for an authority by entering the "see from" term in the Heading Match
    box
3.  Confirm that the appropriate heading shows up
4.  Search for an authority by entering the preferred heading into the Main
    entry or Main entry ($a only) box (i.e., repeat the procedure you usually
    use for cataloging, whatever that may be)
5.  Confirm that the appropriate heading shows up

*** Testing the cataloging interface ***
6.  Turn off BiblioAddsAuthorities
7.  Confirm that you cannot enter text directly in an authority-controlled field
8.  Confirm that if you search for a heading using the authority control plugin
    the heading is inserted (note, however, that this patch does not AND IS NOT
    INTENDED TO fix the bugs in the authority plugin with duplicate subfields;
    those are wholly out of scope- this check is for regressions)
9.  Turn on BiblioAddsAuthorities and AutoCreateAuthorities
10. Confirm that you can enter text directly into an authority-controlled field,
    and if you enter a heading that doesn't currently have an authority record,
    an authority record stub is automatically created, and the heading you
    entered linked
11. Confirm that if you enter a heading with only a subfield $a that fully
    *matches* an existing heading (i.e. the existing heading has only
    subfield $a populated), the authid for that heading is inserted into
    subfield $9
12. Confirm that if you enter a heading with multiple subfields that *matches*
    an existing heading, the authid for that heading is inserted into
    subfield $9
13. Turn on BiblioAddsAuthorities and turn off AutoCreateAuthorities
14. Confirm that you can enter text directly into an authority-controlled field,
    and if you enter a heading that doesn't currently have an authority record,
    an authority record stub is *not* created
15. Confirm that if you enter a heading with only a subfield $a that *matches*
    an existing heading, the authid for that heading is inserted into
    subfield $9
16. Confirm that if you enter a heading with multiple subfields that *matches*
    an existing heading, the authid for that heading is inserted into
    subfield $9
17. Create a record and link an authority record to an authorized field using
    the authority plugin.
18. Save the record. Ensure that the heading is linked to the appropriate
    authority.
19. Open the record. Change the heading manually to something else, leaving
    the link. Save the record.
20. Ensure that the heading remains linked to that same authority.
21. Change CatalogModuleRelink to "on."
22. Open the record. Use the authority plugin to link that heading to the
    same authority record you did earlier.
23. Save the record. Ensure that the heading is linked to the appropriate
    authority.
24. Open the record. Change the heading manually to something else, leaving
    the link. Save the record.
25. Ensure that the heading is no longer linked to the old authority record.

*** Testing link_bibs_to_authorities.pl ***
26. Set LinkerModule to "Default," turn on LinkerRelink and
    BiblioAddsAuthorities, and turn AutoCreateAuthorities and
    LinkerKeepStale off
27. Edit one bib record so that an authority controlled field that has already
    been linked (i.e. has data in $9) has a heading that does not match any
    authority record in your database
28. Run misc/link_bibs_to_authorities.pl --link-report --verbose --test (you may
    want to pipe the output into less or a file, as the result is quite a lot of
    information)
29. Look over the report to see if the headings that you have authority records
    for report being matched, that the heading you modified in step 2 is
    reported as "unlinked," and confirm that no changes were actually made to
    the database (to check this, look at the bib record you edited earlier, and
    check that the authid in the field you edited hasn't changed)
30. Run misc/link_bibs_to_authorities.pl --link-report --verbose (you may want
    to pipe the output into less or a file, as the result is quite a lot of
    information)
31. Check that the heading you modified has been unlinked
32. Change the modified heading back to whatever it was, but don't use the
    authority control plugin to populate $9
33. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
    of the record you've been editing)
34. Confirm that the heading has been linked to the correct authority record
35. Turn LinkerKeepStale on
36. Change that heading to something else
37. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
    of the record you've been editing)
38. Confirm that the $9 has not changed
39. Turn LinkerKeepStale off
40. Create two authorities with the same heading
41. Run misc/migration_tools/rebuild_zebra.pl -a -z
42. Enter that heading into the bibliographic record you are working with
43. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
    of the record you've been editing)
44. Confirm that the heading has not been linked
45. Change LinkerModule to "FirstMatch"
46. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
    of the record you've been editing)
47. Confirm that the heading has been linked to the first authority record it
    matches
48. Change LinkerModule to "LastMatch"
49. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
    of the record you've been editing)
50. Confirm that the heading has been linked to the second authority record it
    matches
51. Run misc/link_bibs_to_authorities.pl --link-report --verbose
    --auth-limit="authid=${AUTH}" (replacing ${AUTH} with an authid)
52. Confirm that only that heading is displayed in the report, and only those
    bibs with that heading have been changed

If all those things worked, good news! You're ready to sign off on the patch
for bug 7284.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master and squashed follow-up, 16 February 2012
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master, 21 February 2012

Signed-off-by: schuster <dschust1@gmail.com>
2012-03-07 17:34:11 +01:00
Katrin Fischer
baec1daa10 Bug 7606: Editing a vendor in acq creates a new vendor
To test:

Before patch:
- editing a new vendor will create a new vendor

After patch:
- editing a vendor saves changes correctly, no new vendor is created

Also:
- after saving or cancelling an edit page redirects correctly
- adding new vendors works correctly

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

Followed test plan and all tests pass.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This is a follow-up for 7113
2012-02-27 11:14:48 +01:00
Srdjan Jankovic
39def35275 bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-02-20 22:18:10 +01:00
Paul Poulain
f7a525fa09 Merge remote-tracking branch 'origin/new/bug_6875' 2012-02-20 16:45:42 +01:00
Paul Poulain
49b167e848 Bug 6875 de nesting C4::Biblio
C4::Biblio is used in many many places. The goal of this cleaning is to do from C4::Biblio a package with as many dependancies as possible.

* C4::Heading is called only in 1 place, highly rarely used (only in 1 misc/link_bibs_to_authorities.pl), moving to require
* PrepareItemrecordDisplay is a sub that is more related to Items, moving it here. It means some scripts that used this sub must be checked against use C4::Items
* C4::Items is needed in EmbedItemsInMarcBiblio, moving it only in this sub, and switching to require
* 2 subs are totally useless z3950_extended_services and set_service_options, removing them

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No test plan included, but tested some opac and cataloging functions.
Code looks good. Marked as Passed QA.
2012-02-20 16:35:17 +01:00
7fcff602f5 Bug 7113: Standardize vendor id name in templates and scripts
New revision updates for current master and cleans up new
instances introduced by recent commits.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2 problems found, fixing those in follo up patches:
- late orders don't allow more than 1 order to be selected
- basketgroups: 'Edit vendor' does the same as 'Manage orders'
2012-02-17 19:04:00 +01:00
Jonathan Druart
cf999c10a4 Bug 7289: Adds editionstatement field in neworderempty
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Tested:

Database update
- existing mapping
- no pre existing mapping

Frameworks
PROBLEM: some languages are still missing, I think only untranslated
frameworks are included in this patch.

Acquisition
- created a new order with edition filled out
- checked edition was saved to the correct field in cataloguing
- modified edition and checked display in acquisition
- edition also displays on basket summary page

http://bugs.koha-community.org/show_bug.cgi?id=7280
2012-02-17 11:13:34 +01:00
Jonathan Druart
0200639b00 Bug 5346: Linking suggestions and orders.
Display suggestion info in acquisition module:
  basket.pl
  neworderempty.pl
  orderreceive.pl
  parcel.pl

To Test:
Create a suggestion and accept it.
Create a new order from this suggestion
Receive this order

For each step, check if suggestion info are visible.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test provides more unit tests, all complete successfully.
perl t/db_dependent/Suggestions.t
Note: test case should be cleaned up after running tests.

Display changes are consistent and information about the suggestion
is shown on every important screen now.

I created an order from a suggestion and one from an existing record.

No problems found.
2012-02-17 10:27:52 +01:00
0d037efd35 Bug 7018 - need all acq permissions to search
Single line fix. Changes permissions required for histsearch.pl
from requiring * for acquisitions to only requiring
group_manage, order_manage, and order_receive

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-16 18:44:56 +01:00
Adrien Saurat
19d6339c26 Bug 7457: log cleaning on basket.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-10 15:35:12 +01:00
MJ Ray
d4b132136c Bug 7476 Remove executable bit from files that probably should not be executed
Signed-off-by: Aleksa Vujicic <aleksa@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to replace some copy-and-paste comments only with consent of MJR.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-03 14:22:15 +01:00
952bfc6f07 Fix for Bug 7148 - Add some error handling to Acquisitions' Z39.50 search to match Cataloging's
- Copying over error handling for timeout(10007) and refused(10000)
- Copying over error handling for submission with no targets chosen
- Correcting "cancel" link in the template which was not modified
  when it was copied from cataloging's popup window template.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-02 14:02:53 +01:00
Alex Arnaud
37c446b7ac bug 7343 - Fix empty values in statistic 1 and 2 dropboxes in neworderempty
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested. Comments have been incorporated. Marked as Passed QA.

http://bugs.koha-community.org/show_bug.cgi?id=7342
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-23 18:15:09 +01:00
Paul Poulain
f961638465 Bug 5473 follow-up : removed warn & replace some tabs by 4 spaces 2012-01-20 16:30:48 +01:00
Srdjan Jankovic
92ca5a13e5 bug_5473: Update items when receiving shipments
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested by recieving multiple items with the AcqCreateItem
preference set to 'placing and order' and 'receiving an item'
In both cases the pricing and vendor is brought over to the
item record so I'm signing off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-20 15:43:11 +01:00
Jonathan Druart
6c2984e78a Bug 5347: Set translatable the "no email" error
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This bookseller has no email shows up correctly, when vendor has
no email address.

Small change made: Changed bookseller to vendor.
2012-01-20 14:12:28 +01:00
Katrin Fischer
3e282ff91b Bug 5347: Follow up - Fix warnings, check/uncheck all and makes error message translatable
This patch fixes some minor problems found in late order management:

 1) Silences 2 warns in Letters.p
After patch is applied no more warns should show up in the logs.

 2) Fixes check/uncheck al
When limiting on one vendor the checkbox in the last header column
was doing nothing. I changed the checkbox to 2 links 'check all' and
'uncheck all' as it's done in other templates.

 3) Email has been sent
The message was hardcoded into the lateorders.pl file and not
translatable.
I moved it to the template and changed the wording slightly.

Note: The error message 'The bookseller has no email' comes from
Letters.pm. I didn't change that, because I was not sure where it is
used. The error message as is can not be translated and should be
moved into the templates too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-20 14:12:27 +01:00
Jonathan Druart
b8e9829be5 Bug 5347: Adds columns claims_count and claimed_date in aqorders
This patch adds 2 columns in the aqorders table :
- claims_count : number of claims for an orders
- claimed_date : date of the lastest claim

In the lateorders.pl table, you can not select orders from different
supplier because there is just one letter sent after clicking the "Claim
order" button. So, it's logic that you want to select only orders from
this supplier.

Modification in C4/Letters.pm:
refactoring code for claimacquisition and claimissues letter type.
Now, fields for theses letters check the table name. It's not possible
to chooce aqorders.title, this field doesn't exist !
Furthermore, you can add a <order> tag around your item fields, like
this :

-- Begin example
<<LibrarianFirstname>>
<<LibrarianSurname>>

<<aqbooksellers.contact>>
<<aqbooksellers.address1>>
<<aqbooksellers.phone>>
<<aqbasket.basketno>>
<<aqbooksellers.phone>>
<order>Library : <<items.homebranch>>
In your possesssion : <<biblio.author>>. <<biblio.title>>.
<<biblioitems.publishercode>>, <<biblioitems.publicationyear>>.
Callnumber : <<items.itemcallnumber>>. doc type : <<items.itype>>
Barcode : <<items.barcode>>
Date for the return : <<items.onloan>>.</order>

<<LibrarianSurname>>
-- End example

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-01-20 14:12:27 +01:00
Paul Poulain
79b0b76481 Merge remote-tracking branch 'origin/new/bug_929' 2012-01-13 17:47:30 +01:00