Commit graph

189 commits

Author SHA1 Message Date
Henri-Damien LAURENT
09d0a978a7 Fixing Tests on SQLHelper
one test was failing for want of correct parameters
An other one was not correctly described

test on search with a simple string fails because was done with branchcode and start_with includes NULL branches
Removing branchcode from filtercolumns

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:35:28 -04:00
Donovan Jones
23a19c6c9a Bug 2505 - Add commented use warnings where missing in *.t 2010-04-21 20:29:31 +12:00
Colin Campbell
d027e4dcd6 add warnings to Serials.pm
Change obvious warning generators:
     ( use of string comparisons in numeric comparison)
     ( declaration of variable in comnditional )
also some errors caused by undefined values:
    abouttoexpire was not checking for undef values
    Pass a valid planneddate in generation of next expected
    (undef here causes odd results)
Add a basic test script
    test is minimal but I fell over a bug this would have caught
2010-04-08 13:28:40 +01:00
Lars Wirzenius
13af9b6195 Fix FSF address in directory t/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:51 -04:00
Colin Campbell
7ea29365df bugfix Dates.t test plan has wrong value
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 05:53:28 -05:00
f36c042b80 Merge commit 'workbuffer.org-koha/translation' into to-push
Conflicts:
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 19:10:41 -05:00
088b22b8ed More fixes to the shelves test 2010-01-29 08:39:09 +13:00
031a7c8379 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:39:08 +13:00
98e972128a More fixes to the shelves test 2010-01-29 08:13:42 +13:00
af75714431 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:13:41 +13:00
Henri-Damien LAURENT
2086615a35 SQLHelper : InsertInTable enhancement
InsertInTable can now add values to table where primaryKey requires
user input such as branches table
2010-01-28 15:11:54 +01:00
Henri-Damien LAURENT
6a3579b2f3 MT 2285 : enhancement for patronSearch 2010-01-28 15:11:51 +01:00
Henri-Damien LAURENT
67bc72d7bb Test Improvements : Adding Reserves.t 2010-01-28 15:11:49 +01:00
Henri-Damien LAURENT
23a1397419 Dates : improvements string recognition
Dates can now have one digit for month and day
2010-01-28 15:11:47 +01:00
Henri-Damien LAURENT
697e8e7014 SearchInTable : problem with primary key searches
SearchInTable was filtering primary Key thus returning the whole table when asked a search on a primary key
2010-01-28 15:11:45 +01:00
Henri-Damien LAURENT
d339abf0bf Merge branch 'patroncards-wip' of git://git.foundations.edu/koha into community
Conflicts solved:
	Makefile.PL
	installer/data/mysql/en/mandatory/sysprefs.sql
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	installer/data/mysql/updatedatabase.pl
	kohaversion.pl
2010-01-20 23:16:34 +01:00
Chris Nighswonger
278007e847 [3/30] Adding a test script for C4::Patroncards::Patroncard
To be used for development initially and then can be modified for use as a test.

NOTE: This does not work in its present form.
2010-01-11 18:16:17 -05:00
Jesse Weaver
09d153d85a Remove diagnostic output from t/Members_Attributes.t
While this might be useful for developers, is mostly pointless
otherwise. Should be replaced with a true test of these four
functions.
2009-12-20 14:31:39 +01:00
e85b4557f9 C4::Bookfund no longer exists, removing the test 2009-12-20 14:31:37 +01:00
11c0adea4e C4::Boolean has had its' exception changed to warns, the test was erroring falsely 2009-12-20 14:31:36 +01:00
Henri-Damien LAURENT
fc1a5ed318 MT1883 : Serials enddate was not cleanly used
GetExpirationDate should now be used only to get the NEXT expirationdate based on startdate
Perltidying C4/Serials.pm
2009-11-11 14:00:11 +01:00
Henri-Damien LAURENT
1ec6e3df73 Change in API : ordnum becomes ordernumber 2009-10-30 00:30:47 +01:00
Henri-Damien LAURENT
e3a8f1e20d MT 2168 : Logical AND between multiple words strings
C4::SQLHelper was doing an implicit OR of multiple words strings
It is now fixed and does an AND
2009-10-26 15:34:33 +01:00
Henri-Damien LAURENT
e16a034e9c Remove Stopwords bug fixing
in french, les is a stopword

Modèles would match because of the combining and \P{IsAlnum} would not detect that.
2009-10-14 18:19:09 +02:00
Henri-Damien LAURENT
70a6b86c74 Improving SQLHelper
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
2009-09-30 11:30:37 +02:00
Henri-Damien LAURENT
2a4f2098b4 Improving C4::SQLHelper
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
2009-09-30 11:30:36 +02:00
Nahuel ANGELINETTI
d399ff3494 [biblibre-newacq](bug #3611) fix user interface and others
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.
2009-09-30 11:30:34 +02:00
Henri-Damien LAURENT
e53b5e10ed Adding some fields in GetSubscriptions
GetSubscriptions now searches string in
notes
internalnotes
callnumber
title
2009-09-30 11:30:33 +02:00
Henri-Damien LAURENT
e3a9d21d6e Improving and bug fixing admin/aqbudgets
Adding FormatData and FormatNumber in C4::Output
Using them
Adding duplication detection for budget periods
Factorizing some code
2009-09-30 11:30:30 +02:00
Paul Poulain
90141c2b32 Test script, removing Bookfund references 2009-09-30 11:30:22 +02:00
Henri-Damien LAURENT
8802bbf5fe Editing C4::Suggestions.pm
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>
2009-09-30 11:29:23 +02:00
Henri-Damien LAURENT
4271bbb738 Modifying Members : Add Mod and GetMember
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>
2009-09-30 11:29:23 +02:00
Nahuel ANGELINETTI
17c831399f Delete unused function
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-29 19:53:04 -04:00
Chris Nighswonger
c25dc92fd1 Bug 2500 Correcting incorrect splitting of cutter numbers
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>
2009-09-15 20:29:16 -04:00
8b296fc778 updated DB-dependent tests to reflect labels rewrite
* 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>
2009-09-15 08:59:26 -04:00
0bbcfeda0e replace syslog with warns
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>
2009-09-05 21:43:12 -04:00
Chris Nighswonger
6066b79817 [38/40] Misc bugfixs 2009-09-01 15:57:46 -04:00
Chris Nighswonger
9b56b1ead9 [35/40] Work on C4::Labels tests and various bugfixs resulting
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.
2009-09-01 15:54:01 -04:00
Chris Nighswonger
537880591a [3/40] Work on C4::Labels::Profile module and tests 2009-09-01 15:47:52 -04:00
Chris Nighswonger
1c39484c4b [2/40] Work on C4::Labels::Template and associated tests
This commit also contains some work on C4::Labels::Layout as well
2009-09-01 15:47:32 -04:00
Chris Nighswonger
f4d46222e8 [1/40] Work on C4::Labels::Layout module and tests
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
2009-09-01 15:15:45 -04:00
ae5b76c89b bug 2157: add ability to 'clean' staged record batches
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>
2009-08-10 20:34:55 -04:00
Joe Atzberger
51e8fc2cb6 bug 3435: AddReturn overhaul.
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>
2009-07-30 11:06:50 -04:00
Galen Charlton
2d880c73d1 removing disused C4::Serials functions
The following functions are no longer in use:

* old_newsubscription
* old_modsubscription
* old_getserials

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-09 09:31:12 -05:00
Galen Charlton
ecdf595208 bug 3314: remove disused scripts and API functions
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>
2009-06-08 17:03:05 -05:00
Galen Charlton
c53c9ff8c6 bug 3303: removed references to news_channels*
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>
2009-06-07 20:09:18 -05:00
Galen Charlton
456e2a65b3 bug 3302: removed disused references to opac_electronic
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>
2009-06-07 20:09:17 -05:00
Joe Atzberger
82f362673c Allow option to preserve Extended Attributes on patron import update.
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>
2009-05-28 06:50:39 -05:00
Chris Nighswonger
e72a02e08b Bug 2500 Tweaking DDCN Split for Hyphenated Volumn Numbers
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>
2009-05-27 10:45:36 -05:00
Galen Charlton
d8bd2345ed bug 3120: tweak DDCN call number splitting for labels
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>
2009-05-21 08:01:41 -05:00