Commit graph

8555 commits

Author SHA1 Message Date
DeAndre Carroll
e3e84a747f Bug#: 1989
Changed date popups in scheduler.tmpl to a date picker element
Made corresponding changes to scheduler.pl

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:29 -05:00
Andrew Moore
86239ea689 bug 2275: making SMS::Send module optional
I wrapped the use of the SMS::Send module in an eval to make failures graceful if it
is not present.
I also fixed an error with the number of tests in the SMS::Send tests.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:27 -05:00
Galen Charlton
3c844e0cb3 test suite: way to run single test file
Added support for a new target in the test Makefile
to run a single test module.  If you do (for example)

make test-single TEST_FILES=lib/KohaTest/Biblio.pm

only the tests in that module will be run.  Unlike
the full test suite as run via 'make test', 'make test-single'
does not clear the test database before running the
tests.

Please note that "TEST_FILES=path/to/test/class.pm" is
required when using 'make test-single'.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:24 -05:00
Joe Atzberger
46a43c0a93 Barcodes - OO replacements, extensible module, tests.
This code is intended to replace current value_builder code in 3.2, but
it does not affect it directly (yet) and is safe to include in 3.0.
This structure will be used to handle more complicated formats, like those
with checkdigits.  Please note that "incremental" format is still STRONGLY
recommended because it will always perform the best, and most flexibly.
The desire to include other information (like branchcode) should compel
the proper use of the barcode generator to print the info ON the barcode,
not IN the barcode.

One of the nicer features of this structure is that you are able to
create a new barcode (of the same type) based on any previous Barcodes object.
That means you can create an array of 51 consecutive barcodes like:
	my $x = C4::Barcodes->new('annual'); # for example
	my @set = ($x);
	for (1..50) {
		push @set, $x=$x->new;
	}
Importantly, this can happen without referencing the database after the
first constructor.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:22 -05:00
Galen Charlton
1aed87679d bug 2171: remove cancel transfer
The "transfers to receive" report included
unused code to delete a transfer.  Since the
"transfers to receive" report is still useful
to give a library a report of items that it should
expect to receive, I am retaining the report.  However,
since the cancel transfer functionality would not
work even if it were uncommented in the template, that
portion is removed.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:19 -05:00
Galen Charlton
fecf5c38bb bug 2171: removed "Transfers to do" report
This hold request and transfer report no longer
works now that hold requests are processed via
checking items in.

This patch removes the report; please consult
the koha-devel message re "RFC - remove circ/transferstodo.pl prior to general release"
for more details.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:16 -05:00
Galen Charlton
3efe32efc7 bug 2305: install tags/* to intranet CGI directory
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:14 -05:00
Galen Charlton
ed1cadcd3d bug 2297: improve ModBiblio() to avoid duplicate item fields
Prior to this patch, ModBiblio() would append
item tags from the previous version of the bib record
to the incoming bib record before saving the results,
even if the incoming bib record already has embedded
item tags.

For example, if a bib is retrieved using GetMarcBiblio() then
saved using ModBiblio(), the caller was obliged
to delete any item tags first to avoid duplication.

ModBiblio() now deletes item tags supplied in the
incoming MARC record.  This eliminates the possibility
of duplication, and removes any implication that
ModBiblio() can or should be used to modify item
records - ModItem() should be used for that.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-04 09:22:13 -05:00
Paul POULAIN
c50265d238 commenting warn
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 13:29:22 -05:00
Galen Charlton
ed2e2857f9 test suite add_biblios: don't use zebraqueue_daemon
The add_biblios() routine now reindexes all bibs
in batch instead of waiting for zebraqueue_daemon - this
is moderately faster.  A separate set of test
cases for zebraqueue_deamon will be witten.

No documentation changes.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:26:03 -05:00
Galen Charlton
f80b5569d7 SimpleSearch test cases - make more robust
Test cases in KohaTest/Search/SimpleSearch.pm assumed
that they were the first to call add_biblios(); as
this is not necessarily true when the entire test
suite is run, test now counts how many 'Finn Test'
bibs already exist.

No documentation changes.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:26:01 -05:00
Galen Charlton
b8e404700a bug 2293: better validation in overdue rules editor
If a rule should not be saved because a delay is
given but no letter or debar action is specified
for that delay, an error message is now reported.

Also:

* use "dialog alert" CSS class for confirmation
  that form was saved
* if form input is saved, retrieve the settings from the
  database again when displaying the form - this will
  help turn up any bugs where the script is not
  saving the overdue rules correctly.
* fix display of patron category in error messages

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:50 -05:00
Galen Charlton
bf12bc05e1 overdue rules - added JavaScript for branch selector
This makes the overdue notice rule editor consistent
with the branch selector for the circulation rules
editor.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:41 -05:00
Galen Charlton
b4e457c84d bug 2292: save overdule rules to correct branch
Save overdue rules to the selected branch, not always
to the default branch.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:40 -05:00
Galen Charlton
a3bdf666f9 bug 2291: sort branches and letter types
The drop-down lists of branches and letter templates
in the overdue notice/status triggers tool are now
sorted in ascending alphabetical order.

No documentation change.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:37 -05:00
Andrew Moore
1316aa2f69 spelling correction in comment in javascript file
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:35 -05:00
Philippe Jaillon
4022ca8dd2 OAI package handle correctly unicode content
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:32 -05:00
Andrew Moore
6546a1506a bug 2176: spelling correction
correcting spelling in opac messaging tab.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:30 -05:00
Paul POULAIN
6ed47e433f OPACUserCSS has wrong default value (fix for 2211, for french)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:27 -05:00
Paul POULAIN
55b9589295 french updated
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-02 12:25:24 -05:00
Galen Charlton
d57ce0380d bug 2278 - fix results pagination in auth_finder
Fix same as for 2205 - the orderby parameter is
currently required for authority searches.

Also set default results per page to 20 instead of
19.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 16:20:06 -05:00
56b9c60e8d Documents translator dependency on 'gettext' Linux tools and add it to debian.packages
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:35 -05:00
Joe Atzberger
2ba17314ab Fix alternating "highlight" to use __odd__ and combine consequetive
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:34 -05:00
Chris Nighswonger
299e74b334 Bugfix Correcting opac-shelves template to allow patron to set list category to public or private
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:31 -05:00
Chris Nighswonger
95d7594438 Bugfix correcting 'New List' behavior on opac-search.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:30 -05:00
Chris Nighswonger
4baae3370e Correcting mistyped var names and adding error trapping to C4::VirtualShelves::Page
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:29 -05:00
Joe Atzberger
1de9cb26a2 Script to correct faulty statistics table entries.
This is the first iteration of this script, likely to be expanded
if other mappings are determined.  Currently it populates the
itemtype for all statistics that have itemnumbers and then pulls
borrownumbers from old_issues (or issues).  This has the benign
side effect of ignoring whether or not itemtype was a different
value at the time of the transaction.

It then tries to populate null borrowernumbers using a fairly
conservative approach, only where exactly one match exists, else warns.

The process of updating statistics is needlessly complex based on the
lack of a reliable primary key.  ALL such tables should have a numerical
primary key.  The impression that the timestamp and any other fields
are enough to combine for a "unique enough" key is wrong.  For example,
running SIP tests will add multiple transactions that might share
borrowernumber, itemnumber and timestamp.  Key uniqueness should be
logically inherent, not de facto.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-26 05:51:26 -05:00
Joshua Ferraro
a6246ca669 adding 'gettext' as this is requred by the translation utility 2008-06-26 05:33:47 -05:00
Galen Charlton
d8e0f61f0e bug 2176: fix typo in column name (DB rev 096)
In borrower_message_preferences, wants_digets => wants_digest

Note that the typo is present only in databases that had
borrower_message_preferences created via updatedatabase.pl.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 15:33:46 -05:00
Andrew Moore
c0279eab5f bug: 2269 - adding a perltidyrc file
This patch adds xt/perltidyrc, a suggested perltidy configuration file.

It's in the xt directory because I'd like to eventually tie it in with Test::Perl::Critic
to run automated tests on tidyness and other Perl::Critic policies. That stuff belongs in
the xt directory since it's testing for developers use only.

I have only turned on a few directives based on the suggestions by MJ, historical discussion on
the mailing lists, and what I was told when I started contributing to koha. There are many other
directives in this file that are commented out. They are supposed to represent the defaults and
can be adjusted in the future if desired.

Use of this file is encouraged, but not required. It would be really nice if you could at least run
it on new files that you contribute. I would recommend not running it on files that are already
part of koha without writing some tests for those files and discussing your intentions to reformat
entire files in bulk.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:47:30 -05:00
Andrew Moore
06720cd3cf bug: 2272 - remove warning from C4::Koha::getitemtypeimagedir
I changed getitemtypeimagedir to set a default on its argument so that it would not complain if not passed 'opac'.
I improved the documentation on the method.
I edited the t/icondirecotries.t test script to explicitly pass an argument to both getitemtypeimagedir calls.
 - and I adjusted one line of whitespace to make similar things look similar
I added a test module for C4::Koha
I added a test module for C4::Koha::getitemtypeimagedir.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:47:28 -05:00
Galen Charlton
8ff29dda19 fix Date::ICal typo
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:46:07 -05:00
Joe Atzberger (siptest
99efcf83f0 Interactive tests for SIP abstraction representation and Members.
The test for members is useful to compare against the SIP (ILS)
representation.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:45:30 -05:00
Joe Atzberger (siptest
3e7013d174 Bugfix Circulation, Expand ILS::Patron mapping.
ILS::Patron is where most of the intelligence for SIP's representation
is lodged.  Currently there is difficulty with C4::Members functions.
GetMemberDetails is required for the needed flags, but it returns
empty structure on bad barcodes, where it should be undef.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:45:29 -05:00
Galen Charlton
91b47af583 bug 2254 [3/3]: add authority type check
Added a test to the MARC framework checks to
verify that all authority types used in a framework
are defined.

Documentation changes: possible new screenshots
and text to describe the new test.

NOTE: This patch adds strings to the checkmarc template, and thus
      violates the string freeze for 3.0.  I'm submitting anyway
      because 2254 is a blocker, but if no exception is made,
      it is safe to not apply this patch for 3.0.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:30 -05:00
Galen Charlton
10127d15a6 bug 2254 [2/3]: fix authority types in MARC21 frameworks (DB rev 095)
Corrected two errors found in the authority types used
in the MARC21 frameworks:

* one subfield that used "Meeting Name" instead of "MEETI_NAME"
* various subfields that used "CORP0_NAME" instead of "CORPO_NAME"

The biggest visible consequence of this change is that corporate
name headings (110, 610, 710, 810, etc.) will now link correctly
to their authority records.

In addition, brought the fr-FR MARC21 framework scripts up-to-date
with respect to the changes made to the English versions.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:28 -05:00
Galen Charlton
98f638bb14 bug 2254 [1/3]: fixed GetAuthType(); avoid crash
Improved C4::AuthoritiesMarc::GetAuthType() so that
it returns either a hashref (if the authority type exists)
or undef (if it does not exist).  The same
accessor should not be used to either return a single
value or all values of a settings list.  Note that
all existing clients of GetAuthType are expecting
either a single hashref or undef; none of them
expected the arrayref that could be returned by
the previous version of the accessor.

When BiblioAddsAuthorities is ON, addbiblio.pl
now checks the return value of GetAuthType and
no longer crashes as follows if the MARC framework
specifies an invalid authority type for a given subfield:

Can't coerce array into hash at .../cataloging/addbiblio.pl line 738.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:24 -05:00
Galen Charlton
8894d28779 bug 2206: always have $9 for headings fields
If a field can be linked to an authority record (i.e.,
an authtypecode is defined for subfield $a), always
include the subfield $9 in a (readonly) input element even
if it is marked hidden per the MARC framework.

Prior to this patch, a $9 marked hidden per the framework
would not be included in the form, causing the authority record
number link to not be added when choosing a heading from the authority
finder.  In other words, with BiblioAddsAuthorities OFF,
any authorized headings in bibs added via the MARC editor
would not have the subfield $9, and thus would appear
to not be used by any bibs.

Note that subfield $9 is set to be readonly, as changing the
authority number link does not currently change the
heading stored in the bib record.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:23 -05:00
Galen Charlton
c80b328aae clean up old-style calls to GetMemberDetails
GetMemberDetails() returns only one hashref now,
not two.  In all cases where the caller was
expecting two output values, the $flags return
was ignored anyway.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:22 -05:00
Galen Charlton
3104120b13 POD fixes - C4/Members.pm
Corrected and improved the description of the
return values of GetMemberDetails.

Also fixed errors reported by the podcorrectness
test.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:21 -05:00
Galen Charlton
d79f050ce3 bug 2252: item-level hold not waiting until priority = 0
When returning an item that has an item-level hold on it,
CheckReserves() will not consider it waiting unless the
priority has been set to 0 (i.e., the item has specifically
been marked as filling the request.)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:20 -05:00
Galen Charlton
98e2db8278 bug 2273: not-for-loan item should not fill hold request
If an item is not for loan (i.e., items.notforloan is not null),
do not use it to fill a title-level hold request when
item is checked in.  Prior to this patch, a notforloan item
could fill a request - CheckReserves() was checking only
the item's item type's not for loan flag.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:19 -05:00
MJ Ray
4bc2303598 Note optional modules, for later reference.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:33:37 -05:00
Joshua Ferraro
d4cf37450f removing maxItemsInSearchResults syspref from script 2008-06-24 07:30:43 -05:00
Joshua Ferraro
5623574b86 slef's patch for 'Algorithm::CheckDigits' => 0.50, 2008-06-23 10:35:55 -05:00
Galen Charlton
5122c4b1d8 new automated test for template translatability
This test verifies that the English OPAC and staff templates
can be processed by the string extractor (tmpl_process3.pl)
without error.  If a template contains a parsing error
(at least as far as tmpl_process3.pl is concerned), it may
not be correctly converted when a language translation
is applied.

To run this test, do

prove -v xt/author/translatable-templates.t

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-23 10:34:31 -05:00
Joshua Ferraro
bed151991b Updating release number 2008-06-23 08:05:49 -05:00
Joshua Ferraro
7ec3695cf2 Updating translations prior to RC1 release 2008-06-23 08:04:10 -05:00
Ryan Higgins
67e20d82ff DB Bump 094 - bug 2268 -- allow mixed case subfield labels in MARC21 by changing db column collation.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-23 08:00:03 -05:00
Chris Nighswonger
c1b67b7b0d Correcting Release notes to read RC1 rather than Beta
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-23 07:59:58 -05:00