Commit graph

64 commits

Author SHA1 Message Date
Joshua Ferraro
482a87eaf9 Revert "Add missing to and from email addresses to user and admin EnqueueLetter calls, respectively. Add extra level to verbosity."
This reverts commit 67f229cba7.
2008-08-08 10:51:45 -05:00
Southeastern University
67f229cba7 Add missing to and from email addresses to user and admin EnqueueLetter calls, respectively. Add extra level to verbosity.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-08 06:10:31 -05:00
Galen Charlton
6e1869abcf bug 2473: correct display of items.content
Correct bug in output of overdue notices that has
items.content displaying only the number of columns
in each items.content structure (currently, 4).

Patch inspired by patch submitted by Paul Poulain.

[LL bug 31]

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-05 15:12:02 -05:00
Joe Atzberger
830d1f19b4 Rename crontab.example
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-04 15:28:15 -05:00
Jesse Weaver
ac0d340bd5 kohabug 2345: bad comparisons pervade reports
This patch changes all $foo eq undef's to !defined($foo). It also makes misc/spellcheck_suggest/build_spellcheck_suggest.pl have proper syntax.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:11:08 -05:00
Joe Atzberger
4998eeed4a Example cronjob file.
We have 5 or 6 different cron'd tasks for a single installation now,
so an example is in order.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:05:11 -05:00
Andrew Moore
cd6d0c5d60 bug 2386: adding newline between items in overdue notices
The lines for each item in the overdue notices were not separated by newlines. This cause them to
all be smashed together. I'm putting a newline between them.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 11:22:03 -05:00
Andrew Moore
b5697e6fd1 bug 2274 [4/5]: removing obsolete misc/cronjobs/overduenotices*.pl programs
These three programs have been replaced by misc/cronjobs/overdue_notices.pl:

 overduenotices-30.pl
 overduenotices-csv.pl
 overduenotices.pl

This patch deletes them.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:10:50 -05:00
Andrew Moore
8ae66932cd Bug 2274 [3/5]: consolidating overdue notice cronjobs into one
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>
2008-07-10 09:10:46 -05:00
Andrew Moore
2cae4efa0a Bug 2176 (3/5): adding methods to manage message_queue, new advance_notices.pl, new C4::SMS module
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>
2008-06-20 13:04:52 -05:00
Ryan Higgins
fad67f6ef2 add single-transaction flag to mysqldump in example backup script.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-03 06:00:49 -05:00
Joe Atzberger
cf89f763f5 Fix typo in field name, apply branchcode selector logic from fines-ll.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-31 21:59:39 -05:00
Joe Atzberger
2ba8763bb4 Fines repair. Make fines2.pl work, give feedback, improve comments and perldoc.
Remove $dbh->disconnect statements as counterproductive.
Prevent description field from begining with whitespace.
Added robust debug elements.  Test script behavior with:
    perl misc/cronjobs/fines2.pl -v
and:
	mysql> select * from accountlines;

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:04:42 -05:00
bfcdfb7f45 Interface improvements to Holds Queue report and changes to the script provided by jmf
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-20 14:41:44 -05:00
Joshua Ferraro
2ee27fb1cc Final update to holds queue work: adds link to holds queue
from circulation dashboard, creates new sysprefs, assigns
the sysprefs to the proper tab in sysprefs (Circulation),
updatedatabase changes to do the previous, and fixing one
redundent limit in the query for build_holds_queue.pl

Note: still need to address item-level holds
2008-05-20 12:36:40 -05:00
Joshua Ferraro
a9a4965277 Adds a cron script to be run periodically that populates
the tmp_holdsqueue table. This is an alternative holds
targeting workflow that is more suitable for multi-location
libraries than the default holds picklist report.

Note to documentation writers: this summary should be
added to any holds documentation as an overview of
the avaialable methods for holds fulfillment.

This alternative holds workflow assumes an
expectation that the system should target a specific
item for a given hold request, attempt to fulfill the
hold with that item, and if unable to fulfill, select
an available item at another location to fulfill the
hold.

This is quite different than the default Koha behavior
which uses a 'broadcast' method of hold fulfillment.

How it works:

This script weights available locations for holds based
on options specified in two system preferences:

StaticHoldsQueueWeight
	Allows the library to specify a list of library
	location codes -- if used alone, it will rank the
	list statically, selecting the top-ranking available
	location to be added to the picklist.

RandomizeHoldsQueueWeight
	If RandomizeHoldsQueueWeight and StaticHoldsQueueWeight
	are set, the list of library codes in the
	StaticHoldsQueueWeight syspref are randomized rather
	than statically ranked. If RandomizeHoldsQueueWeight
	alone is set, the list of all available library codes
	is used to randomize the weight.

If neither syspref is set, the list is statically
ranked according to how they are pulled out of the system
database.

NOTE: This has not yet been tested with item-level holds
2008-05-20 10:58:24 -05:00
Paul POULAIN
dfcdc73be6 bugfix : ship utf-8 encoding in mail header
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:07:55 -05:00
Henri-Damien LAURENT
12a828dd21 Bug Fixing : overduenotices wrote a file on disk before sending to browser
this script had quite serious issues :
- it would not use mindays and maxdays variables
- It would send latin1 where utf8 was expected
- It would send data without text delimiters (; was chosen if title contains ; it would have been a problem " used as delimiters now)
- It would write a file when it was not asked
Now stores the results in a string before printing it.
New option added to store result into a file : -o filename

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:06:31 -05:00
Ryan Higgins
b54401ac66 C4::Circulation::FixOverduesOnReturn now handles dropbox mode.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:14 -05:00
Ryan Higgins
a315de5281 Alter Overdues::CalcFine to use Dates objects.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 09:29:12 -05:00
Ryan Higgins
2eed36a08e Fix calls to CalcFine, and make fines obey CircControl syspref (get homebranch withssue data).
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 08:37:01 -05:00
Ryan Higgins
600d479f4e Add a working fines script, some changes to CalcFine and Circulation.pm
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:54 -05:00
Galen Charlton
9222f7a6ca created old_issues and old_reserves tables
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:

* borrowernumber and biblionumber in old_reserves can be
  NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
  set the child column to NULL if the parent row is deleted
  instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
  a branch to be deleted without changing archived requests.

Some miscellaneous cleanup was done as part of this patch:

* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-15 08:36:31 -05:00
Joe Atzberger
b1f620c723 overduenotices-30.pl - Made this work, take command line SMTP, report out errors,
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-22 21:49:07 -06:00
Paul POULAIN
3c58e8faad overduenotices-csv from 2.2 + DL file from overdue.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-11 06:09:59 -06:00
Galen Charlton
3b5c4e0fb9 misc/cronjobs/update_items.pl: fixed syntax errors
Fixed syntax errors preventing compilation; however,
unsure whether this is a dead utility that should be
removed outright.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:22:08 -06:00
Galen Charlton
35f8f65b41 item rework: replace direct SQL update of items
with ModItem calls

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 16:24:38 -06:00
Joshua Ferraro
dd50153f00 moving some files and deleting cataloguing/updateitem.pl, the _real_ updateitem.pl is in catalogue/
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-30 12:09:52 -06:00
Joshua Ferraro
dcb3858ffd Several important commits:
* adding zebra daemons for managing server and queue processes
  * improvements to the README.debian file
  * Fixes to Search.pm since last series of commits broke zebra-based
    searching (again)
  * moving some files to new misc/bin and misc/cronjobs

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-22 18:26:39 -06:00
Galen Charlton
d579648df1 Merge git://git.koha.org/pub/scm/koha 2007-12-18 17:46:54 -06:00
Joe Atzberger
35fa8f148b Delete extraneous empty file.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-17 19:20:58 -06:00
Galen Charlton
b8a58c4934 installer: command-line scripts improve finding C4 modules
Command-line scripts now use a new SCRIPT_DIR/kohalib.pl
to put installed location of Koha's Perl modules
into @INC.
2007-12-17 09:13:54 -06:00
Galen Charlton
f5903fbbb5 installer: location of koha-conf.xml
* rewrite-config.PL now puts in installed location
  of koha-conf.xml in C4/Context.pm so that
  correct config can be found even when
  KOHA_CONF is not set.  Note that setting KOHA_CONF
  will still override path set by installer.
* changed references from koha.xml to koha-conf.xml
2007-12-17 09:13:53 -06:00
Joe Atzberger
377db43117 C4 and misc: permissions fixes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 19:00:34 -06:00
Joshua Ferraro
8619dfc0e2 cleanup of misc/ for Dates integration 2007-12-04 19:08:50 -06:00
Joe Atzberger
28159f04de misc subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 18:21:13 -06:00
Joshua Ferraro
5e469596da fixing limit by availability, using nifty _ALLRECORDS in Zebra
to handle NULL values

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:26:20 -06:00
Paul POULAIN
0c8b69237d better to have verbose=0
or the sysadm will get zillions of mails ;-)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-20 16:23:48 -06:00
Chris Cormack
4a634069ee Couple of little fixes to the zebraqueue daemon
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-18 12:30:36 -06:00
Joshua Ferraro
55f3444429 adding xisbn support
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-17 10:49:30 -06:00
Galen Charlton
5c882558a4 bugfixes for reindexing problems
* now properly deletes deleted authorities from index
* now actually ignores duplicate work
* standardized on recordDelete instead of delete_record
  for bibs and recordDelete for authorities

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-12 18:32:33 -06:00
Paul POULAIN
23c79b8229 bump to 3.00.00.017 : adding columns to zebraqueue
The zebraque_start scripts works, but it not friendly when you try to track what he did
as records are deleted after done.
This commit changes the behaviour : 2 columns are added done & timestamp.
done is set to 1 when a line have been done. And the timestamp contains the timestamp of the last action (either line creation if done=0 or operation if done=1)

should be helpfull to track problem.

the table will grow, but i'll add soon a DELETE FROM zebraqueue WHERE timestamp > 30 days or something like that

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-31 19:43:00 -05:00
Joshua Ferraro
76064f4623 adding SMS stuff so we don't forget about it
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-29 21:21:20 -05:00
Paul POULAIN
f2031566bb #1447 : avoid a SQL message when filling the table
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-05 19:40:05 -05:00
Paul POULAIN
6f7efca7e1 BUGFIX for browser and nozebra tables
- adding browser and nozebra table definition to kohastructure & updatedatabase
- bumping to 3.00.00.005

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 04:35:49 -05:00
Paul POULAIN
62ae21903c removing a lot of useless files in misc
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-03 03:44:41 -05:00
Joshua Ferraro
e9ae8c0686 patches from paul 2007-08-08 07:41:19 -05:00
Chris Cormack
2e4a11773c Merge branch 'master' of /home/jmf/repos/koha-rm-root.git/ 2007-08-08 07:36:43 -05:00
Paul POULAIN
813d2f3359 removing an old test script
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-08 07:25:11 -05:00
Paul POULAIN
8542e06b25 reservelist.pl is now in Koha itself, in circ/transfertodo.pl, removing the old script
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-08 07:25:11 -05:00