More concise and more readable
removing do local $"= using join instead
Adding Caching of queries
Adding Some tests
API between function reorganizing for more consistency
Adding support for string, hash and arrayref in SearchIntable
SearchInTable now add
limits and
sortby
filter on fields to returns (enter an arrayref here)
filter on fields to limit the search on
searchtype which can be exact or wide
GetPrimaryKey now returns an array of all the fields which are primary keys
Adding Internal functions
_Process_Operands
_filter_hash
_filter_string
_filter_fields
This big patch, fix xhtml code, and user interface.
It Delete the term of budget period and use it as "Root Budget".
It add improvment on UI, adding tooltip, and table tree.
Enhancing C4::SearchSuggestion
And changing its API
Changing C4::Suggestions API taking a hashref for NewSuggestion and ModSuggestion
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This update the way Member is added and editing so that import and Edition
could be best automatized
GetMember evolves and allow ppl to serach on a hash of data
Adding SQLHelper A new package to deal with INSERT UPDATE and SELECT
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch does two things to improve the call number splitting algorithms:
1. It makes changes to ensure that cutter numbers are split correctly in ddcns
2. It moves custom/fiction/biography call number splitting to a separate algorithm.
Before they were incorrectly placed in ddcns.
This patch also modifies the call number splitting tests to accept call numbers from the
command line to allow quick testing of any give call number against a particular algorithm.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
* removed lib/KohaTest/Labels.pm, which is now completely outdated
* updated list of database tables to truncate in lib/KohaTest.pm
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
As discussed with Chris Nighswonger on #koha, this patch
removes the calls to syslog and replaces them with warns
so that error messages generated by the labels code
are sent to the Apache error log. This avoids splitting
this sort of logging across multiple files and is consistent
with current practice in most of the rest of Koha.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch also moves the Labels tests into their own sub directory.
Due to a squash mistake this patch also includes the following:
Fixing up POD for C4::Labels modules
Also a minor bugfix and code refactoring.
NOTE: This patch is the first of 40 which almost completely re-factor the
label creator code into a hopefully more scalable form. The new format is
a move in direction of OO handling labels, batches, templates, layouts, and
profiles as objects thus permitting easier implementation of features and
enhancements. It should be possible to export label data in any format one
might choose with the simple addition of a script similar to those included
which produce pdf, csv, and xml format.
One of the larger improvements is a change in workflow that results in template,
layout, and start label selection occurring just before export.
There are also various bugfixes and smaller interface improvements woven into it.
It should be noted that this patch series removes the patron card creator feature
for the present. This feature was only partially completed. A completed variation
will be submitted as a separate patch series to follow in the near future.
The following bugs and enhancements are fixed by this series of patches:
2944 Search to add items to a label batch broken
2061 labels_conf DB values: NULL vs. 0
2511 CSV format string is not cleared when unselected in the label layout editor
2515 Re-factor C4::Labels::DrawSpineText
2823 Label Generator not generating barcodes
3171 Problem due to internationalization in label-create-template.tmpl in de-DE and possibly others
3180 Active settings for label settings should be set at print time only
This work was sponsored by Foundations Bible College & Seminary, Dunn, NC USA
batches, it is now possible to 'clean' a batch by
removing all bib and item records staged in the batch. This
has the effect of helping to reduce database space used
by old import batches as well as removing staged records
from the cataloging reservoir search. Note that 'cleaning'
a batch affects only the copies of the records that were staged;
if the batch was committed, cleaning the batch does not
affect any bibs and items that were committed into the catalog.
Also note that once you clean a committed batch of records, it is
impossible to undo the previous commit operation.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Required for SIP checkin implementation, but also for internal correctness.
AddReturn had too many things going on, with no guarantee of data being
available for the later calls. At some point we started tacking on all the
branch transfer logic without testing edge cases. In particular, $borrower
is not checked to be sure it is defined, considering the item may not have been
checked out so no borrower would be associated. That means that CircControl
of "PatronLibrary" would be inaccurate, Circ Alerts will be totally confused
(untargeted), and the Fix... subs would fail.
Note that *many* errors are still present in _FixAccountForLostAndReturned, including
those where comments are added, such that it might behave strangely even with $borrower.
Renamed the internal subs with leading underscore, per convention. Changed
the arguments to be scalars when only scalars are needed, not entire objects.
Added depth to WrongBranch message that includes Rightbranch.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The following functions are no longer in use:
* old_newsubscription
* old_modsubscription
* old_getserials
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The distributedto column of the subscription table is
no longer used, having been replaced by the serials
routing list table. This patch removes two C4::Serials
functions and a script and template, none of which were
reachable by current code:
C4::Serials::GetDistributedTo()
C4::Serials::SetDistributedTo()
koha-tmpl/intranet-tmpl/prog/en/modules/serials/distributedto.tmpl
serials/distributedto.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Removed routines in C4/NewsChannels.pm that refered
to missing database tables news_channels and news_channel_categories.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Removed routines in C4/NewsChannels.pm that refer to
a missing opac_electronic table.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Essentially, this patch provides the option to overwrite only matching
Extended Attributes, instead of all of them, treating the ext. fields more
like normal fields.
Several functions added to Members::Attributes with corresponding tests.
[ LL ref. 342 ]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Presently 252.051 T147 v.1-2 is split as
252.051
T147
v.1
-2
This patch corrects the algorithm so that it splits as
252.051
T147
v.1-2
It also updates Labels_split_ddcn.t to include this particular case.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Allow a call number of the form MP3-CD F PARKER to be split as
MP3-CD
F
PARKER
instead of
MP
3
-CD
F
PARKER
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Removed opac/opac-dictionary.pl and catalogue/dictionary.pl,
which were not in use and not linked to from any active
template files. According to Henri, the functionality that
these scripts implemented hasn't been working since 2.2.
Also removed C4::Search::findseealso(), which was used
only by the two scripts.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If a call number prefix contains a hyphen, try not to
split on the hyphen. For example, rather than
splitting the call number 'CD-ROM 787.87 EAS'
like this:
CD
-ROM
787.87
EAS
it should be
CD-ROM
787.87
EAS
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Per discussion I had with Henri, removing experimental
bulk editing from the staff search results code, as
feature is incomplete and can be dangerous if
one tries to use it on a large search result
set.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Similar to previous patch for LCCN splitting, this patch incorporates
changes to split_ddcn and supplies a test file for verifying proper
operation. Note that the only previously documented example for intended
operation is included as one of the tests.
This regexps are created to be rather forgiving. For example, the function
will not choke if two spaces were included where the "spec" (such as it is)
expects one. Obviously this is because for CN splitting purposes, it doesn't
matter, we're not going to ever split in the middle of whitespace.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This test establishes what LCCN splitting is required to do
to be considered successful. See Bug 2691.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Also added more feedback and the ability to override KOHA_CONF
"useldapserver" value with ENV variable KOHA_USELDAPSERVER.
This patch should be considered for inclusion to 3.0 stable branch
because it prevents unnecessary failure of test battery.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format. Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV. ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
I added 'use warnings' to C4::Biblio and made a handful of changes to
reduce the number of warnings emitted.
One notable spot is the change in the regex in
C4::Biblio::GetNoZebraIndexes. I have replaced the parens with a character
class. The parens change the way 'split' works, making it return elements
for each delimiter. We did not want those elements returned, and they
only resulted in "'' => undef" being added to the final hash. They also
resulted in two "undefined" warnings for each pass through the loop. I've
included a simple test for this function.
There may be a few warnings still emitted in spots, but either I haven't
seen them yet, or I have chosen to not fix them yet because they require
too much change.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch amends the function to return barcode, in particular when
filter is not defined. It also adds an optional 2nd argument to
allow the filter to be specified by caller, enabling testing.
Non-DB-dependent test script included. Note: T-prefix style
barcode filter is not documented, and drops the first nonzero
digit after the T. This seems mistaken, but is not corrected here
to avoid any surprises.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Tests for C4::Members::GetMemberDetails. Validates both calls
using either borrowernumber or cardnumber.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Tests the functionality of C4::Members::GetMember. Tests exist
for every way that GetMember could be called on to search for an
existing member.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch adds two warning messages to places in the test suite that
may fail. I don't think it changes any functionality, but it sure makes
it easier to figure out what has gone wrong.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Fixes problem where if the IssuingInProcess preference is ON,
the operator is always required to confirm a checkout if
the patron has had any fine transactions at all, even if
the patron's balance is 0.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The upshot is that despite appearances, whe should NEVER use Text::CSV::Unicode
or any CSV module in non-binary mode. Text::CSV works in binary mode
by using Text::CSV_XS, so the behavior is the same for both (in binary).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Changed so that issues.issuedate is never modified
during a renewal, since that column records the original
date of the loan. Changed the name and interpretation
of the $issuedate parameter of AddRenewal() to
$lastreneweddate, allowing (e.g.) offline circulation
to set the date of the renewal without changing the
issue date.
As a result of the original bug, issues.issuedate can be
set to NULL for loans that were renewed via the OPAC,
self checkout, or the staff interface when explicitly
renewing a loan. Loans that were renewed by checking
the item out to the same patron will have the issue date
changed to the date of the last renewal.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
CalcFine returned values that mismatched expectations in fines.pl.
fines.pl refactored: added debugging, prevent needless recreation of
Calendar objects by storing them in hash by branch.
Still outstanding problems with fines, including the output of a field
that has no other references in Koha (so is always undef) and the
incorrect description of FinesMode.
Calendar exported "new" erroneously. I also cleaned up the queries to
avoid needlessly compiling additional statement handles.
Please test and consider application to 3.0 maintenance.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
I'm adding some tests for C4::Circulation methods that I'm altering
to allow the offline circulation tool to use C4::Circulation to upload
its data. These test a bit of the old functionality and try to show
that the new functionality does what I think it does.
C4::Circ::Addissue to tests issuedate
these also test AddRenewal.
tests for C4::Circ::MarkIssueReturned
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
switching from 'prove' to 'perl' to run the test scripts when we're preparing
them to be submitted to smolder. Prove adds an additional summary at the end
of the test run which confuses the TAP parser in smolder. It thinks that an
additional test has been run, and it fails it.
Then, I added a '-' before the command in the Makefile. THat's so that even
if 'perl' returns a failing code (because some tess failed), the rest of the
rules are run and a report gets submitted. Othewise, only passing reports
get sent.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch fixes the tests so that they include the new required parameters for longoverdues.pl.
This patch also doesn't include a test script that accidently got in the last one.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch adds a target in the t/Makefile and a script in t/smolder_smoke_signal
to submit the results of test runs to a smolder server. It will allow users to submit
their own test results to a central location by running "make submit" from the t/
directory.
Smolder is a web-based application that aggregates and presents the output of
tests. We have an instance running at:
http://arwen.metavore.com:8000/app/public_projects/smoke_reports/1
More information about using smolder for Koha is available at:
http://wiki.koha.org/doku.php?id=en:development:smoke_reports
I intend to have the test suite run each night automatically and the results
sent to the smolder server. This will help us keep track of the current state
of the the code and possibly catch bugs introduced by changes. I encourge others
to submit their own test results if they want, especially if they are on an unusual
platform or are with a non-standard configuration.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
The tests I wrote for C4::Items::GetItemsForInventory confused the differences
between biblionumber and itemnumber. That wasn't uncovered on my limited test
database, but I uncovered it later.
This fixes that problem by populating a $self->{'items'} list with details of any items
added by KohaTest::add_biblios. Then, tests can probe there for the details of items
they should expect to find when searching.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This test suite tests the several different ways that we can call C4::Koha::displayServers.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4::Koha::get_itemtypeinfos_of was not using plceholders, opening itself up to
potential SQL injection attacks. This patch refactors it to use placeholders to
bind parameters.
I also had to extend C4::koha::get_infos_of to allow us to pass bind parameters into it.
I'm including a test module for C4::Koha::get_itemtypeinfos_of.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The SQL in C4::Items::GetItemsForInventory wasn't using placeholders and
bind parameters, possibly leaving itself open ot SQL injection attacks. This
patch changes that.
I've also incliuded a test module for C4::items::GetItemsForInventory.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Here are a few improvments to the test suite to make it easier to write some tests
for C4::Items
I extracted "tomorrow" and "yesterday" methods from a test module into the base class
so that they could be used by multiple test modules
Adding callnumber to items added in the test suite.
I recatored KohaTest::add_biblios a bit to remove the manual count of the number of
MARC::Fields that were added.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
&NewOrder did not save the branchcode posted with a new order. This patch adds that param.
Added code to select the branch the order is for in the branch dropdown list on
acqui/orderreceive.pl
Updating POD and tests
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4::Context->preference was not using placeholders and was potentially vulnerable to
a SQL injectin attack. This patch refactors the method to use placeholders.
Added some tests for C4::Context.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I also added a SKIP block in case of constructor failure and improved
the layout of existing diag lines.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
patch to C4::Members::ModMember to prevent it from deleting the dateofbirth field when none is supplied.
I also added a KohaTest::random_date method to help generate randomish dates for the test suite.
Added some tests for Member::ModMember. This is an easy method to test, and this bug shows that it
could use some closer examiniation.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The C4::Date module is deprecated. It is also no longer used anywhere in Koha.
This patch removes it and the associated tests.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch adds the misc/cronjobs/overdue_notices.pl script that is intended to replace
overduenotices.pl, overduenotices-30.pl and overduenotices-csv.pl. It adds messages to
the message_queue to be sent later (by process_message_queue.pl). It also marks borrowers
as debarred if their issues become too overdue.
It is intended to be run from cron nightly with usage something like:
0 2 * * * misc/cronjobs/overdue_notices.pl
C4::Members:
- improved documentation on ModMember
- made ModMember return a useful value (the return value of the database call)
- added a DebarMember method
- adding t/lib/KohaTest/Members/DebarMember.pm to test ModMember
misc/cronjobs/overdue_notices.pl
- designed to replace overduenotices.pl, overduenotices-30.pl, and overduenotice-csv
Changes to C4::Letters:
- EnqueueLetter now lets you pass in to_address and from_address which can override defaults
- _send_message_by_email pays attention to these defaults.
- now handles attachments with MIME::Lite
C4::Overdues
- added GetBranchcodesWithOverdueRules
- added t/lib/KohaTest/Overdues/GerBranchcodesWithOverdueRules.pm to test that.
circ/overdue.pl
- replaced call to obsolete overduenotices-csv.pl with call to overdue_notices.pl
KohaTest:
- added three helper methods: random_phone, random_email, random_ip
- these can be used to populate example records
- you can now pass an optional lengh to random_string
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When generating the display form of a heading that
happens to (invalidly) have a regular expression
metacharacter as a subfield label, do not crash.
An example of such a heading field is:
<datafield tag="650" ind1=" " ind2="0">
<subfield code="a">Dalziel, Andrew (Fictitious character</subfield>
<subfield code=")">xFiction.</subfield>
</datafield>
The error message associated with the crash is:
Unmatched ) in regex; marked by <-- HERE in m/) <-- HERE / at
/home/koha-pro/kohaclone/C4/Heading/MARC21.pm line 220.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
It was observed that the %thash and @formats variables
were not being properly initalized during a make single-test run.
To ensure initialization, created startup and shutdown
methods to initialize those values as part of the
test object.
I have not yet investigated why the original way of
setting up %thash and @formats did not work.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
t/Labels.t was dependent on a working test database, so I'm moving those
tests into t/lib/KohaTest
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The t/Items.t tests were actually dependent on the database, so I'm moving them
into t/lib/KohaTest.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
the icondirectories.t test depends on the database, so it needed to be
moved. But, it's really more of an author test since it's testinging the
correct structure of our distribution, so I'm moving it to xt/author.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
the t/Dates.t tests were actually databasase dependent. This patch replaces
t/Dates.t with t/lib/KohaTest/Dates/Usage.pm that relies on a database.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
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>
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>
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>
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>
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>
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>
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>
I've added methods to to C4::Letters to manage the database table
message_queue. This will let us keep track of messages sent
via email, sms, and rss to patrons. That way, we can show the history,
deal with failures, and reconstruct an RSS feed when needed.
misc/cronjobs/overduenotics.pl has been added. It prepares advance notices
and item due notices and stages messages to be sent in the message_queue
table.
C4::Overdues::Getoverdues now takes two optional arguments to tell it how
old of overdues to fetch.
Also, a C4::Circualtion::getUpcomingDueIssues method was added that
advance_notices.pl uses.
misc/cronjobs/process_message_queue.pl has been added. It sends the email
or SMS messages out of the message queue.
The C4::SMS module didn't work at all, and it has been rebuilt to use
an external perl module from CPAN, SMS::Send.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This routine retrieves the branch/patron category circulation
rules for a given branch and patron category. The return
value is a hashref containing the following key:
maxissueqty - maximum number of loans across all item types
This will first check for a specific branch and
category match from branch_borrower_circ_rules.
If no rule is found, it will then check default_branch_circ_rules
(same branch, default category). If no rule is found,
it will then check default_borrower_circ_rules (default
branch, same category), then failing that, default_circ_rules
(default branch, default category).
If no rule has been found in the database, it will default to
the built in rule:
maxissueqty - undef
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
You can test getnextacctno like:
perl -e 'use C4::Accounts; print getnextacctno(33), "\n";'
where 33 is a borrowernumber out of the accountlines table. Get that number like:
mysql> select borrowernumber,accountno from accountlines LIMIT 100;
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I had these tests laying around for a while. I just forgot to commit them.
No functional or documentation changes needed.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Defined a function attribute for KohaTest and subclasses
called 'Expensive'. When a test method has that attribute,
it is skipped unless the RUN_EXPENSIVE_TESTS environment
variable is true.
To mark a test method, expensive, do this:
sub test_foo : Tests(4) Expensive { ... }
To mark a whole class and its subclasses expensive,
define a SKIP_CLASS sub (with empty body) with the
Expensive attribute:
sub SKIP_CLASS : Expensive { }
Updated the t/Makefile so that 'make test' runs
nonexpensive tests, while 'make fulltest' runs both
cheap and expensive tests.
Marked KohaTest::Installer test class expensive.
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Corrected bug that prevented the 'not' operator
from working consistently - i.e., a search of
'mice not men' would not always work.
Also added test cases for NoZebra, so far focusing on
NZanalyse and adding and deleting bibs. A couple of
the test cases are currently known to fail and
therefore are marked TODO. The tests in question
are to verify that rows in nozebra are removed if
no bib is linked to the relevant word. However, it
looks like such rows are retained, just with
nozebra.biblionubmers set to ''. Is there any
reason to keep these rows?
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
In the course of writing tests for C4::Calendar, I found two bugs and am fixing them here.
One is a documentation bug.
The other prevented C4::Calendar::insert_exception_holiday from working. I was unable
to find anywhere else in the code that depended on the broken behaviour.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I moved C4::Branch::GetBranches to use bind parameters and wrote some tests to demonstrate functionality.
No functional or documentation changes here.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Now handles cases where two SQL scripts in different
directories have the same name, e.g., fr-FR sample_itemtypes.sql.
Bug was masked by existing failure when attempting to load
both sample_itemtypes.sql.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Two new modules to support patron attributes:
- C4::Members::AttributeTypes
OO-module for managing patron attribute types.
- C4::Members::Attributes
Procedural module for retrieving and setting
extended attributes belonging to a patron.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>