The MARC21 framework uses $0 for the item withdrawn status. Because
of how the tool had marked the barcode and stocknumber as being
uneditable, this resulted in an off-by-one error, causing the wrong
item fields to be updated.
Fixed by simply not including the uneditable fields in list
of item fields that can be edited - if you can't change the barcode,
there's no point in displaying it in the list of fields.
Also fixed how the bib title/author/ISBN got displayed so that the
withdrawn column gets displayed after an item update.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Liz Rea <lrea@nekls.org>
This brings it more in line with the size limit placed on other images
uploaded for use on patron cards.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This also changes the storage image format to PNG which is lossless (an important factor when using these
images for patroncards).
NOTE: In the end, this script was *not* used for uploading images for patron cards. However, these changes
are left as an improvement upon this script which is used for patron image uploads.
This script could be greatly reduced in size by using Graphics::Magick and working along the same lines
as the upload code found in patroncards/image-manage.pl
Notes :
Permissions themselves were already added in commit 50ef9288606077dfc2b457db490f6fc2a5461c6c : (bug #3396) This add batch deletion of items and fixes permissions for batch modification by Jean-André Santoni
Javascript for bolding currently selected page in tools-menu.inc enhanced to support url with parameters
IndependantBranches set and user is kohaadmin
I think we can escape defaulting to the userenv Branch with
restricting the list to the user branch
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>
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>
Fixed inconsistent usuage of primary key in delete
Refactored:
Moved operations to separate subroutines to clarify data flow
Removed unnecessary redirects to self
Renamed confusingly named else variable passed to template
Other changes for code clarity
NB Outstanding:
database reading/writing should live in appropriate module
not duplicate it here.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
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>
Adds another radio button to the edit holiday form. This is a partial fix, because you cannot make an edit to a single holiday for multiple branches.
Also fixed a small XHTML error and a wording error from my previous patch on holidays.tmpl (bug 3274).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.
I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.
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>
Coding by Rick Welykochy <rick@praxis.com.au>
[1] Three new system preferences to enable particular
bib record views in the staff interface:
viewMARC
viewLabeledMARC
viewISBD
Implements enhancement 2642.
[2] New button in the regular and cataloging search results
pages in the staff interface to allow the operator to redo
the search against Z39.50 targets instead of the Koha database.
[3] Added copyright date and edition to cataloging and Z39.50 search results.
Implements enhancement 2640.
Feature sponsored by MassCat.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch adds a select box to the new holiday form that allows the user to copy the holiday to all branches. If a holiday for a particular location already exists for a location, that holiday and location is not changed.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If the EnhancedMessagingPreferences option is ON, when
creating a new patron record via the patron import, set
the default messaging preferences to the applicable values
the default preferences for the patron category.
Messaging preferences are currently changed only when
*adding* a patron record via the import; if the import
updates an existing record, the patron's existing
preferences are not changed.
API changes:
SetMessagingPreferencesFromDefaults() is a new function
in C4::Members::Messaging to unconditionally replace
the current messaging preferences of a patron with the
default preferences from a specified patron category.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If a user adds or edits a holiday, the calendar will now return to the month in which the user was working. Also after an add or an edit, if the user selects another location, the calendar remains in the same month for which the add or edit took place. The user sees a 'calendardate' parameter in the URL in the format that is chosen as the system preference. If an invalid date is entered in the url, the current date is used.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch fixes the date formats in the holiday display tables. They are now based on the syspref for date formats.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch adds default blank values for a couple of params the script might receive which were producing warns in the error log. Also wraps GetMarcBiblio in an eval.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch starts improving export.pl by adding warnings, skipping invalid records, and not trying to access fields which don't exist.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
When importing a patron file where new records
do not have a card number *and* autoMemberNum is
off, make sure that bororwers.cardnumber is set to NULL
for those new patrons rather than '' - otherwise, only
one patron with an empty barcode can be created, as there is
a uniqueness constraint on borrowers.cardnumber
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Reworked ViewLog.pl and the template. Eliminated html errors, cleaned up
the template, change mime type to text/csv and other minor changes.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
execute_query now refactored, returns reliable results, does
zero presentation-layer crap. Arguments reduced, client scripts
adapted to new API and performance improved. Text::CSV now used
to generate CSV output, ensuring portability, encoding and accuracy.
Replaced tools/runreport.pl with misc/cronjobs/runreport.pl:
~ security fixed
~ documentation improved
~ TODO: finish sendmail option.
Bug 3077 also fixed.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch is writted by Paul Poulain.
It auto-select the marcflavour from syspref in the stage marc import.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
A REPLACE statement in tools/letter.pl was indirectly corrupting data
in the message_transports table. It has been replaced with code that
does an UPDATE or INSERT depending on whether the row existed or not.
Also, to protect data in the message_transports table further, letters
which have entries in the message_transports table are no longer
deletable.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds an option to the inventory tool causing it to ignore copies
currently on loan. This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This changes the setting if default values in the inventory tool where
the min and max call number are concerned. Also changes how the query
is formed in C4/Items so that these two are not required.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds notification code to Reserves.pm to send notifications through email
or SMS to patrons when their hold is filled. It does not send the letter
directly, but instead uses EnqueueLetter. Also, it relies on
EnhancedPatronMessaging being on and the hold notification being turned on for
the specific patron through the 'Messaging' tab.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Apparently my git skills are lacking, since I intended this one-liner
to be amended into the patch I resent.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
* I added some code to detect the rows which were blank,
and I deleted them upon saving the form.
* Updated to get the categories from the database
instead of hardcoding them.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This repurposes the Reports module for general reports, and moves its functionality to a different module, Reports::Guided. It also updates all of the reports that can export to correctly treat the 'tabulation' value of the 'delimiter' syspref.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Date fields are now checked against syspref and iso regexps before attempting
to convert or insert them. The problem characters were non-ASCII diacriticals.
Note: this may rely on improvements in the current 0.54 version of Text::CSV and
Text::CSV_XS, rather than the Koha minimum of 0.01 and 0.32, respectively.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Most Perl scripts (as opposed to modules) do
not need to require Exporter.
No user-visible or documentation changes.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Added the zipcode to display along with the patron address when you are viewing a Patron from the intranet.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
When an imported patron matches an existing one, keep data in the original record unless our import file
includes that column. Also, check for branch & categorycodes, and produce error if invalid. Finally,
auto-calculate expiry date if not given.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This incorporates and extends the patch from MJ Ray attached to bug 2287.
Added feedback of up to 25 lines, including for errors at the Text::CSV
parsing level. This allows feedback for problems than involve encoding.
Added link to download "starter" CSV file (with all the columns).
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch removes Image::Magick as a dependency and replaces it with
the (much) lighter GD. Functionality of patronimage code has not changed with
this conversion.
Adding errorhandling for corrupted image file and link to return to moremember.pl when called from there
Added notes about supported image mime types.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Due to the logic of the underlying picture-upload.pl depending upon the "value" of the
form input controls and this value being translated, the script then failed to function.
This patch changes the input controls so that this should not be an issue.
This issue should be kept in mind, though, so that it can be avoided in the future.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
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>
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>
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>
[1] Removed hardcoded path to original developer's
Koha configuration file; now checks KOHA_CONF.
[2] Now attempts to figure out if a task was successfully
added to the task queue; if it wasn't, the failure
is now reported in the task scheduler page.
[3] When traveling to the task scheduler page from a
saved report, the report in question is now
selected by default.
[4] Removed the button to edit a queued task; this is
not supported.
This patch is essentially a bandage; I've added a BUGS
section and some FIXMEs to the POD for C4::Scheduler
detailing some issues - a refactoring of the task
scheduler is in order at some point.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
[1] Display the "No records have been staged" message only
if no import batches exist.
[2] When displaying a batch that has no bibs in it, display
a "There are no records in this batch to import". Also,
do not display the "import record into catalogue" button
for an empty batch.
[3] Add CSS class "problem" to both messages.
Documentation changes: minor; only required if screenshots
exist of the manage staged MARC records page that has no
import batches on it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When both the patron delete and patron anonymize checkboxes
were selected, the patron cleaning tool would not
properly register the number of patrons to delete. Fixed
by correcting form input handling.
Also, count of patrons to delete or anonymous now correct
when running with IndependentBranches = ON.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When ExtendedPatronAttributes is ON, the batch
patron import tool's behavior changes as follows:
[1] A new (required) column is added to the input CSV
format. This column should contain a list of
attributes to set for the record, each value
preceded by its type code. For example, if
the superlibrarian has defined two types,
a unique identifier INSTID and a repeatable
BASEBALL, this field could contain:
"INSTID:12345,BASEBALL:Cubs"
This field must be wrapped in quotes if multiple
values are defined. Since values can contain
spaces, additional doubled-quotes may be required:
"INSTID:12345,BASEBALL:Cubs,""BASEBALL:White Sox"""
When replacing a patron record, any attributes specified
in the input file replace all of the attribute values
of any type that were previously assigned to the patron
record.
[2] It is possible to specify a field other than the
cardnumber to use for looking for matching patrons.
Specifically, any attribute marked as a unique ID
can be used. The operator is asked to specify
which ID type to use; if an input record has an
attribute value of that type, and exactly one patron
record in the database has that value, then the
record will be overlaid or ignored according to the
overlay setting.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Enhanced the ability of catalogers to specify how
bib and item records should be added, replaced, or
ignored during a staging import.
When an import batch of bib records is staged and commit,
the user can now explicitly specify what should occur
when an incoming bib record has, or does not have, a match
with a record already in the database. The options are:
if match found (overlay_action):
create_new (just add the incoming record)
replace (replace the matched record with the incoming one)
use_template (option not implemented)
ignore (do nothing with the incoming bib; however, the
items attached to it may still be processed
based on the item action)
if no match is found (nomatch_action):
create_new (just add the incoming record)
ignore (do nothing with the incoming bib; in this
case, any items attached to it will be
ignored since there will be nothing to
attach them to)
The following options for handling items embedded in the
bib record are now available:
always_add (add the items to the new or replaced bib)
add_only_if_match (add the items only if the incoming bib
matches an existing bib)
add_only_if_add (add the items only if the incoming bib
does *not* match an existing bib)
ignore (ignore the items entirely)
With these changes, it is now possible to support the following use cases:
[1] A library joining an existing Koha database wishes to add their
items to existing bib records if they match, but does not want
to overlay the bib records themselves.
[2] A library wants to load a file of records, but only handle
the new ones, not ones that are already in the database.
[3] A library wants to load a file of records, but only
handle the ones that match existing records (e.g., if
the records are coming back from an authority control vendor).
Documentation changes:
* See description above; also, screenshots of the 'stage MARC records
for import' and 'manage staged MARC records' should be updated.
Test cases:
* Added test cases to exercise staging and committing import batches.
UI changes:
* The pages for staging and managing import batches now have
controls for setting the overlay action, action if no match,
and item action separately.
* in the manage import batch tool, user is notified when they
change overlay action, no-match action, and item action
* HTML for manage import batch tool now uses fieldsets
Database changes (DB rev 076):
* added import_batches.item_action
* added import_batches.nomatch_action
* added 'ignore' as a valid value for import_batches.overlay_action
* added 'ignored' as a valid value for import_records.status
* added 'status' as a valid value for import_items.status
API changes:
* new accessor routines for C4::ImportBatch
GetImportBatchNoMatchAction
SetImportBatchNoMatchAction
GetImportBatchItemAction
SetImportBatchItemAction
* new internal functions for C4::ImportBatch to
determine how a given bib and item are to be
processed, based on overlay_action, nomatch_action,
and item_action:
_get_commit_action
_get_revert_action
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Updated all scripts appearing on the tools page
to respect a granular permission defined for
each of them.
The tools menu and home page have been changed so
that only the specific tools that a user has
access are displayed. This is simple, but depending on
the module and circumstance, it may be better to
display functions that the user has does not have
access to, but disable the links and do some sort
of visual styling to indicate that a function exists
but requires additional privileges to access.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch should reduce the occurrence of the following
message in the error log:
Illegal Date '2008-3-14' does not match 'iso' format: yyyy-mm-dd
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
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>
+ let the superlibrarians choose their branch even if IndepBranches is ON
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If viewlog.pl is called from the circulation menu, then the circulation menu is displayed.
If viewlog.pl is called otherwise, the tools menu is displayed.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This corrects the major template issues once files are uploaded.
The changes need dressing up a bit still.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Replaced direct "update items" with ModItem call
* fixed problem in template that prevent barcode file upload
from working
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Introduced C4::Items module to separate items API
from biblio API. Details on changes will be
put in later commit messages.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Staging job now gets moved to background so that
it does not get killed if it takes longer
than the Apache timeout.
Added AJAX monitoring of job status.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Added C4::BackgroundJob to monitor tracking of
background jobs
* start modifying stage-marc-import to use it
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Introduced C4::UploadedFile to handle management and
progress tracking of uploaded files.
* Modified stage-marc-import.pl to handle new upload
mechanism
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Refactoring to provide single place to get CGI::Session ojbject;
fixes bug for DB storage method other than 'mysql'.
This refactoring is also part of the patch series for
handling large input files for staging and processing
MARC records.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Enhancement to store the matching rule associated with an
import batch and to allow the current matching rule in
effect to be changed and the duplicate detection redone.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Revamps the import options on the tools menu to have two parts:
[1] Staging (load file into reservoir)
[2] Managing (review the list of staged batches, then
choose to commit or undo a given batch.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* Completely removed old marc_breeding table
* Started updated Tools import function to stage records
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
per 2006-02-24 comment, breeding.pl had been renamed to import.pl, but
not all of the affected files were changed accordingly.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
the 3 parameters :
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),
are filled by Auth.pm automatically, removing them in templates
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
+ minor change in Languages in order not to have problems with eq
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- reindenting
- upcasing SQL
- the script at least compiles...
... but it does seem not work yet
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Rule :
- always format_date() before sending date to template
- always format_date_in_iso immediatly after reading a date coming from a parameter
- deal internally only with dates in iso
Note that :
- I could not test things related to issues stats due to the my DB -issues.issuedate not filled, see commit about 3.00.00.006
- acquisitions_stats does not work when you filter on date
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
- checkaccount and getborraccountno => GetBorrowerAcctRecord
Many changes in names,
some changes in function signature.
Will be detailed in a mail to kohadevel.