Commit graph

468 commits

Author SHA1 Message Date
Julian Maurice
4dea59847a Bug 5600: Command line interface for tools/export.pl
export.pl [--format=format] [--date=date] [--dont_export_items]
  [--deleted_barcodes] [--clean] --filename=outputfile

    * format is either 'xml' or 'marc' (default)
    * date should be entered as the 'dateformat' syspref is set
      (dd/mm/yyyy for metric, yyyy-mm-dd for iso, mm/dd/yyyy for us)
    * records exported are the ones that have been modified since 'date'
    * if --deleted_barcodes is used, a list of barcodes of items deleted
      since 'date' is produced (or from all deleted items if no date is
      specified)
    * --clean removes NSE/NSB

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-03 16:57:08 +02:00
Paul Poulain
949fcd04ba Merge remote-tracking branch 'origin/new/bug_8315' 2012-07-13 14:17:59 +02:00
Dobrica Pavlinusic
130e3d9c10 Bug 8315 - remove use C4::* version
This patch touches a lot of code, but basically it removes version
information from use C4::* in our code.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
All script still compiles after the patch (confirmed by pre-applypatch hook)
2012-07-13 14:17:20 +02:00
Jared Camins-Esakov
8affddc52d Bug 8268 follow-up: incorporate QA comments
Fixes the following things:
1. Sanitizes log output to prevent an attacker from using a specially
   crafted POST to add extra lines to the log
2. Simplify a regular expression since "..file" cannot be used to
   escape the current directory
3. Makes sure directories are consistent
4. Correct logic issues in misc/cronjobs/backup.sh

Thanks to Frere Sebastien Marie for catching these issues.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-12 17:40:22 +02:00
Jared Camins-Esakov
bbcb1d784b Bug 8268: Add database dump to export tool
This patch builds on work by Lars Wirzenius for the Koha packages.

To date, the only way for a Koha librarian to obtain a complete backup
of their system has been to log into the system via SSH (or FTP) to
download the mysqldump file. This patch makes it possible for
superlibrarians in properly configured systems to download night backups
via the staff client's Export tool.

Recognizing that this is functionality with potentially very grave
security implications, system administrators must manually enable these
features in the koha-conf.xml configuration file.

The following configuration settings have been added to the koha-conf.xml
file:
* backupdir => directory where backups should be stored.
* backup_db_via_tools => whether to allow superlibrarians to download
  database backups via the Export tool. The default is disabled, and
  there is no way -- by design -- to enable this option without manually
  editing koha-conf.xml.
* backup_conf_via_tools => whether to allow superlibrarians to download
  configuration backups via the Export tool (this may be applicable to
  packages only). The default is disabled, and there is no way -- by
  design -- to enable this option without manually editing koha-conf.xml.

This commit modifies the following scripts to make use of the new
backupdir configuration option:
* koha-dump and koha-run-backups in the Debian packages
* The sample backup script misc/cronjobs/backup.sh

Note that for security reasons, superlibrarians will not be allowed
to download files that are not owned by the web server's effective user.
This imposes a de facto dependency on ITK (for Apache) or running the
web server as the Koha user (as is done with Plack).

To test:
1. Apply patch.
2. Go to export page as a superlibrarian. Notice that no additional
   export options appear because they have not been enabled.
3. Add <backupdir>$KOHADEV/var/spool</backup> to the <config> section
   of your koha-conf.xml (note that you will need to adjust that so that
   it is pointing at a logical directory).
4. Create the aforementioned directory.
5. Go to export page as a superlibrarian. Notice that no additional
   export options appear because they have not been enabled.
6. Add <backup_db_via_tools>1</backup_db_via_tools> to the <config>
   section of your koha-conf.xml
7. Go to the export page as a superlibrarian. Notice the new tab.
8. Go to the export page as a non-superlibrarian. Notice there is no
   new tab.
9. Run: mysqldump -u koha -p koha | gzip > $BACKUPDIR/backup.sql.gz
   (substituting appropriate user, password, and database name)
10. Go to the export page as a superlibrarian, and look at the "Export
    database" tab. If you are running the web server as your Koha user,
    and ran the above command as your Koha user, you should now see the
    file listed as an option for download.
11. If you *did* see the file listed, change the ownership to something
    else: sudo chown root:root $BACKUPDIR/backup.sql.gz
11a. Confirm that you no longer see the file listed when you look at the
     "Export database" tab.
12. Change the ownership on the file to your web server (or Koha) user:
    sudo chown www-data:www-data backup.sql.gz
13. Go to the export page as a superlibrarian, and look at the "Export
    database" tab. You should now see backup.sql.gz listed.
14. Choose to download backup.sql.gz
15. Confirm that the downloaded file is what you were expecting.

If you are interested, you can repeat the above steps but replace
<backup_db_via_tools> with <backup_conf_via_tools>, and instead of
creating an sql file, create a tar file.

To test packaging: run koha-dump, confirm that it still creates a
usable backup.

------

This signoff contains two changes:

10-1. If no backup/conf files were present, then the message telling you
so doesn't appear and the download button does. Made them behave
correctly.
10-2. The test for a file existing required it to be owned by the
webserver UID. This change makes it so it only has to be readable.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
2012-07-12 17:40:21 +02:00
f380a6c804 Bug 7848 - Issues data missing from circulation notices
For the CHECKIN and CHECKOUT notices, any data that is issue specific
does not show. For example, date due.

For CHECKOUT, this is caused not passing in the issues table as part
of the 'table' hash used by C4::Letters::GetPreparedLetter.

For CHECKIN notices, we need the old_issues table instead, as the item
has already been returned.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes tests, correct information shows in notices.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-10 13:50:10 +02:00
Paul Poulain
74f6e97396 Bug 8202 follow-up UNIMARC authority support
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-07-04 16:21:07 +02:00
Jared Camins-Esakov
986b887159 Bug 8202: Add authority export to tools/export.pl
Adds a separate tab on tools/export.pl for exporting authority records.

To test:
1. Try exporting authority records from the "Export data" tool

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tried different exports and everything worked nicely:
- removing fields from export (example: 942)
- limiting to one authority type
- changing the given file name
- exporting as MARC or XML
2012-07-04 16:21:06 +02:00
Dobrica Pavlinusic
622967b323 Bug 7961 - Local cover images should support CSV link files
Corrent code doesn't have support for filenames which contain spaces
or commans which breaks CSV files saved from spreadsheet similar to:

  12345, "conver image, with spaces.jpg"

This patch tweaks file parsing a bit. We are always splitting line to
only two values (to support commas as part of filename) and removing
spaces only on beginning and end of filename (to cover space after
comma in CSV example above while preserving spaces in filename).

With this change only invalid character in picture filename left
are quotes (") which are commonly used to quote strings with spaces.

Covers added will be logged in action_log, using CATALOGUING / MODIFY
action (which is shown as "Catalog" in tools > Log viewer)

Test scenario:

1. collect pictures with spaces and commas in name
2. dump file list into CSV file and add biblio number as first column
   (name of file is idlink.txt or datalink.txt)
3. create zip with CSV file and pictures
4. verify that all pictures got uploaded and linked to biblio records
5. verify that modification log includes cover image name

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 09:42:25 +02:00
Chris Nighswonger
f328a32402 Bug 7977: Fixing a bug which results in quote fields being incorrectly offset when saving uploaded quotes
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:15:05 +02:00
Chris Nighswonger
5c6129687b Bug 7977: Removing unused code from quotes_ajax.pl
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:59 +02:00
Chris Nighswonger
d78641e7c0 Bug 7977: Followup patch addressing items pointed out by Jonathan Druart
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:53 +02:00
Chris Nighswonger
12cb095bac Bug 7977: QOTD uploader to enable uploading csv files containing quotes
This series will add a DataTable's based upload/editor with which
to upload csv files containing quotes to be used by the QOTD
feature.

The file should be formatted thusly:

"source","text-of-quote"
"source","text-of-quote"
...

Note: This work serves as a good example of potential improvements
in all other "editor" and file upload areas of Koha.

This patch is a squash of the following work:

--Adding code to parse CSV file contents and push it into a DataTable
--Adding in jEditable to enable table editing
--Adding ajax to post data back to the server to be saved
--Fixing edit and adding delete functionality
--Adding some missing css as well as server feedback on save
--Fixing a bug which limited the number of quotes which could be uploaded
--Also fixing a minor bug with fnCSVToArray and doing some style cleanup.
--Adding sanity checks to verify file type and size
--Implements YUI button widget/toolbar
--Improved handling of hiding uploader UI
--Adds row selectability
--Adds multi-delete capability
--Adds YUI button/toolbar widget
--Fixing capitalization in quote uploader
--Implements improvments suggested by jcamins and oleonard

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:09 +02:00
Chris Nighswonger
eb7e930eea Bug 7977: Quote-of-the-day (QOTD) Feature for OPAC
This feature will add the option of displaying a select quote
for the day on the OPAC homepage. It will include the addition
of a QOTD editor in the tools section of the staff interface
which will allow the addition, editing, and deletion of quotes.
A single system preference will enable/disable the display of
the QOTD on the OPAC homepage. A new granular permission will
also be added to conrol user access to the QOTD editor tool.

Possible extentions to this would be code to allow alternate
quote selection algorithms to be added to vary how the currently
displayed quote is selected from the table of quotes.

This patch is a squash of the following work:

--Adding quotes table to kohastructure.sql and updatedatabase.pl

Note: This patch is intended for a MySQL based installation only.
That means that it includes backticks because that is what is required
at this point in history to install Koha correctly on a MySQL based
installation.

Feel free to port this over to the Pg stuff in the data/Pg directory.

--Adding system preference to control display of QOTD on OPAC main page
--Adding sample quote data

These quotes are taken from various US presidents. I'm not sure these
are applicable to the rest of the world, so I'm leaving it to translators
and others to add sample quote data for other languages.

--Adding edit_quotes user permissions
--Squash with other db related patches in this series
--Adding quotes editor pages to tools
--Adding QOTD editor link to tools homepage
--Integration of DataTables into QOTD Editor
--Impleminting jEditable into the quote editor
--Adding delete and add option to editor
--Fixing OPAC display so the QOTD div does not show if no quote is returned
--Also removing useless code from tools/quotes.pl
--Adding spans around QOTD foo in opac-main.tt
--Also fixing quote selection logic to accomodate the possibility of
    a single quote in the db a litte better.
--Changing timestamp column header to a more user-friendly 'Last Displayed'
--Fixing bug in quote selection logic. This bug caused a situation where
    when the table had only a single quote with an id greater than 1 in it,
    no quote would be selected.
--Fixing up sorting in the quote editor table. --jcamins
--Adding span element to quote separator --jcamins
--Overriding the default empty table message supplied by datatables-strings.inc
--Adds missing page heading
--Adds beginning of click-for-help elements.
--Refactors delete functionality to allow selecting of quotes to delete,
    enabling multi-delete.
--Refactors saving added quote functionality so that striking <Enter>
    saves the new quote.
--Refactors canceling aded quote functionality so that striking <Esc>
    cancels the new quote.
--Removing debug console.log statements
--Implementng the YUI button widget/toolbar used on other pages.
--Adds a 5px radius to all YUI buttons to bring them into
    conformity with the general trend toward rounded corners
--Fixes capitalization in quote editor
--Implements improvements suggested by jcamins and oleonard
--Adds DataTables Plugin dataTables.fnReloadAjax.js

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:05 +02:00
Jonathan Druart
b35d34e2ae Bug 5742: Followup: sort* fields can to be filled with an input text
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-15 17:45:12 +02:00
Jonathan Druart
a6c6946dfc But 5742: Batch edit patrons
new permission : edit_patrons

Plan test:
- Go on the page: tools > Patrons modification (modborrowers.pl)
- Enter a list of cardnumbers (or use a file)
- Modify one or more patron's fields (you can modify surname, firstname,
branchname, category, sort1, sort2, date of enrollment, date of expiry,
debarred date, debarred comment and borrower note)
- Save
- Check on the result page (or in database for non-displayed fields) if
modifications have been correctly made.
- re test with different attributes. For each attributes filled with an
authorized value category, you can select a value in a drop-down list.
Else it's a free input text. If your attribute is filled with a patron
category, the modification performs only on patrons belonging to this
category
- Save
- Verify on the result page

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Stéphane Delaye <stephane.delaye@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-15 17:44:19 +02:00
Amit Gupta
fcc9fcea4f Bug 7739 - Batch edit items of a title
A new option - Edit items in batch - is made available under the menu - Edit - in the catalog detail page. When this option is selected the tool batch item modification is called with all items under this biblio passed as parameters.

User can then edit all items of this biblio in batch. Once changes are saved the "done" link takes the user back to the catalog detail page of this biblio.

To test:
    Navigate to catalog detail page of any biblio with one or more item records. Use the option "Edit items in batch" from the "Edit" menu. Modify the items in batch, say the collction code or lost status. Press "Save", verify that changes have been effected in the confirmation screen. Use the "Done" link to navigate back to the catalog detail page.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-11 12:16:22 +02:00
Lyon3 Team
81f63a4d5d Replace itemnumber by barcode in links of patron modification log
in the ISSUE and RETURN links to item

http://bugs.koha-community.org/show_bug.cgi?id=7870
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Passes tests, works as expected. Perhaps for followup - items that have been deleted are linked, but do not work. If an itemnumber doesn't exist, it should not be linked.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-11 11:24:57 +02:00
Srdjan
b9f4a8cac6 bug 6372: moved background-job.inc to background-job-progressbar.js
Check for div 0 when calculating percentage

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
div0 no longer appears on 0 size jobs.
Passes t xt

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-07 23:00:34 +02:00
Katrin Fischer
b302e4a525 Bug 7833 - unique holiday link broken
As Nicole stated on the bug the branchcode was missing from the links.

To test:
- add unique holidays to calendar for different branches
- click on link and check that the date is opened in the right calendar

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Clicked links for unique holidays and exceptions for
multiple branches and everything works perfectly.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-19 10:54:00 +02:00
Srdjan
12ff7355bb bug_7613: OCLC Connexion gateway
svc/import_bib:
* takes POST request with parameters in url and MARC XML as DATA
* pushes MARC XML to an impoort bach queue of type 'webservice'
* returns status and imported record XML
* is a drop-in replacement for svc/new_bib

misc/cronjobs/import_webservice_batch.pl:
* a cron job for processing impoort bach queues of type 'webservice'
* batches can also be processed through the UI

misc/bin/connexion_import_daemon.pl:
* a daemon that listens for OCLC Connexion requests and is compliant
  with OCLC Gateway spec
* takes request with MARC XML
* takes import batch params from a config file and forwards the lot to
  svc/import_bib
* returns status

ImportBatches:
* Added new import batch type of 'webservice'
* Changed interface to AddImportBatch() - now it takes a hashref
* Replaced batch_type = 'batch' with
  batch_type IN ( 'batch', 'webservice' ) in some SELECTs

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
2012-04-06 17:26:20 +02:00
Dobrica Pavlinusic
db312526b2 Bug 7775 - tools/upload-file.pl: scoping for plack
$uploaded_file is now scoped with our, and we set correct filename

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:17:45 +02:00
Dobrica Pavlinusic
8d7d8af618 Bug 7790 - tools/manage-marc-import.pl breaks with plack
transfer $template to add_matcher_list for correct scoping
and score $dbh and $runinbackground with our

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:10:20 +02:00
Dobrica Pavlinusic
843aabf5c1 Bug 7779 - tools/letter.pl: scope vars for plack
Signed-off-by: Alex Arnaud <alex@stephane-E5420>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 18:17:28 +01:00
2dc8a260c5 Bug 7310: Improving list permissions: Deleting patron
Implements following points from the wiki page List permissions:
5) Delete or move list information when deleting a patron.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
2012-03-21 16:47:03 +01:00
4d26038dd2 Bug 6027 - Delete biblios if deleting all their items in batch deletion
Optionally delete bibliographic record when batch deleting items, if no items remain on the record.

Adds deleting of reserves to DelBiblio. Since subscriptions are deleted automatically,
it made sense for deletion of reserves to maintain the same behavior.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I like the way this works, and it does. Passes tests.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 14:31:38 +01:00
Srdjan Jankovic
c5b878697e Bug 7477: Copy holidays from one branch to another
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-03-19 18:10:44 +01:00
Srdjan Jankovic
38e5e15153 bug_7001: protected are only all libraries letters
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
solves my comment 89: when you have a "mandatory" notice defined for a given library, it's not possible to delete it (and switch back to the "default" notification). isn't this a (small) bug ? was it intended ?

thanks!
2012-03-13 12:07:58 +01:00
Srdjan Jankovic
a9ded4fa00 bug_7001: Issue and Reserve slips are notices.
Branches can have their own version of notices - added branchcode to
letter table.
Support html notices - added is_html to letter table.
Support for borrower attributes in templates.
GetPreparedletter() is the interface for compiling letters (notices).
Sysprefs for notice and slips stylesheets
Added TRANSFERSLIP to the letters

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-09 10:11:20 +01:00
Sophie Meynieux
11efb334c2 Bug 3916 [follow-up] : Adding a default choice in every dropdown list, not only branches, to let the corresponding value unchanged
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Patch works as advertised

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-27 11:22:49 +01:00
Robin Sheat
5dd94487ac Bug 5373 - allow 'cardnumber' to appear on the patron import field list
For some reason, it was explicitly removed, however you need it if you
want to match up on cardnumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Easy to test and works nicely.
Before patch cardnumber is not shown in the list of fields on the
patron import page. After applying the patch it is.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-21 17:04:18 +01:00
78f2ac2862 Bug 7505 Superlibrarian can't export all biblios when IndependantBranches is enabled
When a Koha user has superlibrarian permissions, and if
IndependantBranches is enabled, in Tools > Export bibliographic and
holdings, this user can't export all biblio records. He will just export
the biblio from the branch he belongs to.

This patch fix that.

To test:

  - Do a ALL records export as superlibrian on a multi-branches Koha instance
  - Examine the resulting MARC file with the tool of your choice (MArcEdit,
    yaz-marcdump, etc.)
  - You will see that 952/995 contains exlusively items from your branch (as
    Koha user)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-10 15:56:15 +01:00
Colin Campbell
263dded818 Bug 6752: Be stricter with utf-8 encoding of output
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-27 12:11:06 +01:00
Jared Camins-Esakov
587e2e920e Bug 1633: QA follow-up
* Show the "Upload images" button when OPACLocalCoverImages is enabled but
LocalCoverImages (i.e. local cover images on the staff client) is not
* Correct copyright and license comments in new files
* perltidy and replace tabs by four spaces

Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-24 11:16:10 +01:00
Koustubha Kale
585a0024a1 Bug 1633: [SIGNED-OFF] Display local cover images
This patch adds display of local cover images in the following places:
1. OPAC Results page
2. OPAC Details page
3. Separate image viewer page for the OPAC
4. Intranet Details page
5. Separate image viewer page for the Intranet

Display in the Details and (OPAC) Results pages is handled via Javascript
rather than via direct embedding, to better handle the situation where most
records have local cover images, but a few do not.

Local cover images do not currently display in the Intranet Results page

How to use/test :
Assign user permission to the user Tools > (upload_local_cover_images Upload
local cover images).  In order to upload local  images, login to the staff
client. Go to Home > Tools > Upload Cover Images. Here you can upload cover
images either singly or in bulk in the form of a zip file.  If uploading
singly, click on image file, browse the image from your local disk, type in
the biblio number of the catalogue entry and press upload.  If uploading in
bulk as a zip file, the zip file must contain (in addition to cover images)
one text file named either datalink.txt OR idlink.txt. This file should
have mapping of biblionumber to image file name in the zip one per line
with comma or tab as delimiters. For example:

1, scanned_cover_image_of_bib_no_1.jpg
2, scanned_cover_image_of_bib_no_1.jpg

Cover images will be resized to a large image of 800x600 and a thumbnail of
200x140. Depending on the setting of AllowMultipleCovers, it is possible to
upload multiple images for a single bibliographic record. However, even if
multiple covers are permitted, you have the option of replacing the existing
covers by checking the "Replace existing covers" option on the upload screen.

1. The patch adds a menu link in Tools from where you can upload local cover
   images
2. It adds a user permission to enable access control to this menu item under
   Tools
3. It adds a system preference OPACLocalCoverImages under Enhanced Content.
   This needs to be turned on to show local cover images in OPAC.

Once you have uploaded local images, if you search for the biblio, the local
cover should show up in search as well as search detail pages in the OPAC, and
the details view in the Intranet.

Koustubha Kale is working on another patch which will allow us to set a cover
image source priority in system preferences, and which will then gracefully
fail over to the next source if image is not available from the first choice
source.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>

Rebased the patch because it was failing with koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css due to changes pushed in master.
Applies cleanly now.
2012-01-24 11:16:04 +01:00
Jared Camins-Esakov
b4fb5d4095 Bug 1633: [SIGNED-OFF] Add support for uploading images to Koha
A frequently-requested feature for Koha, especially by special libraries, is
the ability to upload local cover images into Koha.

This patch adds a bibliocoverimage table, and image handling code in the
C4::Images module. Key features of the implementation include:
1. The ability to have multiple cover images for a biblio
2. Handling for "full size" (800x600) and thumbnail-size (200x140) images
3. Uploading images directly from the record view

The image display functionality by Koustubha Kale of Anant Corporation will
follow in a second patch.

Special thanks to Koustubha Kale and Anant Corporation for the initial
implementation of local cover images, and to Chris Nighswonger of Foundation
Bible College for his prior work on patron images.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Will add comments on Bugzilla.

Patch failed to apply because installer/data/mysql/sysprefs.sql had changed in master.
Corrected the same with this new patch.
2012-01-24 11:16:02 +01:00
Jonathan Druart
b8e9829be5 Bug 5347: Adds columns claims_count and claimed_date in aqorders
This patch adds 2 columns in the aqorders table :
- claims_count : number of claims for an orders
- claimed_date : date of the lastest claim

In the lateorders.pl table, you can not select orders from different
supplier because there is just one letter sent after clicking the "Claim
order" button. So, it's logic that you want to select only orders from
this supplier.

Modification in C4/Letters.pm:
refactoring code for claimacquisition and claimissues letter type.
Now, fields for theses letters check the table name. It's not possible
to chooce aqorders.title, this field doesn't exist !
Furthermore, you can add a <order> tag around your item fields, like
this :

-- Begin example
<<LibrarianFirstname>>
<<LibrarianSurname>>

<<aqbooksellers.contact>>
<<aqbooksellers.address1>>
<<aqbooksellers.phone>>
<<aqbasket.basketno>>
<<aqbooksellers.phone>>
<order>Library : <<items.homebranch>>
In your possesssion : <<biblio.author>>. <<biblio.title>>.
<<biblioitems.publishercode>>, <<biblioitems.publicationyear>>.
Callnumber : <<items.itemcallnumber>>. doc type : <<items.itype>>
Barcode : <<items.barcode>>
Date for the return : <<items.onloan>>.</order>

<<LibrarianSurname>>
-- End example

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-01-20 14:12:27 +01:00
Christophe Croullebois
806fac60f4 Bug 6663: Features for holidays.pl with datepicker
Allow to select a range between 2 dates and in one "submit" creates holidays only on these days.
I have added also Holidays repeated yearly on a range.
On suggestions I have added a datepicker for "To Date".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-13 15:07:05 +01:00
d3c02c6bb6 Bug 7259 - Show a count of items pending approval on staff client home and tools pages
This patch adds count indicators on the staff client home page and
the tools page for the number of items pending approval. On the
home page this includes suggestions, comments, and tags. On the tools
page a count of pending comments and tags is shown.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Counts appear for all types of actionable items listed, all are clickable through to the proper place.

Nice work!
2011-12-08 12:04:28 +01:00
Srdjan Jankovic
1713133fdd bug_5211: LostItem() - added charge_fee param to control fee charging
Pass charge_fee = yes wherever is LostItem() called, which effectively
means tha there's no change.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:36:34 +01:00
Srdjan Jankovic
2b2e544f05 Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as advertised, doesn't affect display for non-organisational patrons.

Note: Display change in OPAC only affects the summary tab.
It would be a little bit more consistent to make the name show the
same on all tabs in OPAC patron account.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I repeated Katrin's signoff here (with permission). The patch only changed for some minor rebasing and cosmetic QA requests. Passed QA now.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 11:30:08 +01:00
Frédérick Capovilla
906ef4b28c Bug 6854: Correct a double password encryption problem in import_borrowers.pl
When the CSV file has no password column and no default value was set for
the password :
If we try to modify an existing user, the password from the BD is sent
to ModMember, which then encrypts the already-encrypted password a
second time.

http://bugs.koha-community.org/show_bug.cgi?id=6854

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug on current master.
1) Import new patron with password provided
> OPAC login works
2) Overwrite patron record, password provided
> OPAC login works
3) Overwrite patron record, password not provided
Before patch: OPAC login broken, password in database changed
After patch: OPC login works with same password as before

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-21 04:47:05 +13:00
Srdjan Jankovic
4770555855 bug_5533: Slightly improved marking items as lost
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:01:39 +13:00
Ian Walls
973371a68b Bug 6733: change branchcode call in Labels to use userenv instead of LoginBranchname
In the 5 places in the label editor, the user's current branch is determined by taking
the LoginBranchname and doing a reverse look up for the branchcode.  This is an unnecessary
query, since C4::Context->userenv has the immediate access to the branchcode; this is how
it's summoned in all other points in the Koha code.

This addresses bug 6673 because, since the move to T:T, the call in tools/manage-marc-import.pl
has used in correct syntax:  $template->param('LoginBranchname') instead of $template->{VARS}->param('LoginBranchname')

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-28 20:29:39 +13:00
c9905750e5 Bug 6869 Batch item modification fails whit accented characters
Corrects a problem in batchMod.pl when accented characters are used.

When modifying multiple items in batchMod.pl, the batch modification
fails if accented characters are used in any of the fields of the
modification form.

This is a port of Frédérick Capovilla patch from 3.2 to 3.4 version

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-27 08:27:01 +13:00
MJ Ray
a746e11c14 Bug 6460: alternative fix, updating template and script instead of C4::Log
Add some test cases and fix a bug in C4::Log found by in review.
Thanks-to: Katrin Fischer.

Signed-off-by: Liz Rea <lrea@nekls.org>
Passes test, interface works as expected.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-24 10:01:09 +12:00
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
eb7456c685 Fix for Bug 4419 - cannot change module for notice templates
Adding a hidden form field to contain the original module
so that it can be used in the check for an existing entry.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-27 19:35:44 +12:00
Alex Arnaud
6466f57197 Bug #6068 - New feature: capability to blanking subfields in BatchMod
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Nicole Engard <nengard@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-16 09:10:54 +12:00
Chris Nighswonger
57155db213 Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Adding support for including fields from the Issues table in advanced due notices.
This is primarily to allow the inclusion of the due date for each item in the
advanced due notice, but will allow the inclusion of any field from the ISSUES
table.

This also adds code to exclude timestamp fields as these are irrelevant to the
end user in this context.

Note: Documentation should be updated to reflect the availability of the additional
fields in all circulation notices.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-02 12:44:42 +12:00
Colin Campbell
b5b71339f3 Bug 5453 Move declarations out of conditionals
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:23 +12:00
Chris Nighswonger
ae48ebbcaa Bug 5379 - import_borrowers.pl fails with db insert/update errors
Some spreadsheet programs use smart quotes which causes the db to throw
an error when an insert/update is attempted due to improper processing
of the CSV file. This patch adds code to check for smart quotes and change
them to "dumb" quotes.

This patch also adds more logging of errors and a notice to the user to check
the logs for errors when they occur.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-05 11:15:00 +12:00
Frédérick Capovilla
59c42cd7f3 Bug 6453 Corrects the barcode comparisons in inventory.pl
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-20 11:59:50 +12:00
Frédérick Capovilla
2bdd8ebd1e Bug 6363 : Make the "Item Location" selectbox appears correctly in inventory.pl
The "Item Location" selectbox didn't appear when the only available MARC
framework was the default framework.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-10 15:30:29 +12:00
71d9dfda3c Fix for Bug 6306 - It is not possible edit news
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-05-29 16:05:34 +12:00
Chris Cormack
9573f444fc Merge remote-tracking branch 'kc/new/bug_5449' into kcmaster 2011-05-09 08:25:36 +12:00
6e217d1d21 bug 5579: teach MARC export to embed items when needed
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 22:35:15 +12:00
Jared Camins-Esakov
415ea18007 Bug 5859: Allow user to set encoding for import
Rather than having options for MARC21 and UNIMARC in the "Character encoding"
dropdown, the user should be able to select the appropriate character encoding.
The default retains the current behavior, which is to allow the system to guess
which character encoding is in use. However, it should be noticed that this is
almost always wrong for non-UTF8 records with non-ASCII characters. Specifying
a character set is much more reliable if you're not using UTF-8.

Rebased to use Template::Toolkit instead of HTML::Template::Pro.

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-19 13:05:48 +12:00
Jared Camins-Esakov
f08f67d3f1 Bug 6169: Inventory tool fails when ignoreissued set
Due to incorrect parameters passed to C4::Items::GetItemsForInventory, checking
the "Skip copies on loan" box resulted in the inventory failing to run.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-12 22:19:05 +12:00
Jared Camins-Esakov
9475752f3a Bug 2505: quiet warnings in tools/inventory.pl
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-12 09:57:46 +12:00
e82f88d5d9 Additional fixes for Bug 5422, Separate state field for patron's adresses
Adding state variable to various circ and member pages so that
sidebar display of patron details includes state.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-09 11:52:07 +12:00
Sophie Meynieux
141a52ac30 Bug #6064 Improvement of default value usage in overdue
Change default value in overduerules table for delayn (NULL instead of 0) and fix GetBranchcodesWithOverdueRules function

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 21:33:40 +12:00
Henri-Damien LAURENT
99b49e2b1a Bug 6014 : MT3138 Adding some permission management to viewlog
If user can not access reports, then form to search the logs is not displayed.
It also improves the presentation.

C4/Log.pm
- adds the fact that we can enter multiple actions
- fixes the fact that user information was truncated

circ-menu.inc:
Fixing information passed to the viewlog from circ-menu

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 13:14:17 +12:00
Henri-Damien LAURENT
63f1ea0c2d Bug 6026 : export.pl : removing useless condition
Some conditions added AND items.biblionumber=biblio/biblionumber
where JOIN USING (biblionumber) already added that.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 07:49:45 +13:00
Matthias Meusburger
ff7affdf43 Bug 5996 : MT2926: Fix default values for patron import
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-01 13:13:47 +13:00
b9cee99da4 Bug 5065 Add ability to choose framework on import
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-21 20:36:35 +13:00
Paul Poulain
ddbedbfc2f Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
Julian Maurice
6e85ee6db0 Bug 5449: JSON malformed in Koha - Blocker with jQuery 1.4.x
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-12 08:53:41 +13:00
D Ruth Bavousett
050466ce2b Bug 5230: Call number ranges in export don't give expected results.
If you entered low number and high number, you got only items that *exactly* matched either entry (if any).
If you enter only a low number, you got everying *lower* than that.
If you enter only a high number, you get everything *higher* than that.

This was a greater-than-less-than problem.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-14 09:32:47 +13:00
Chris Cormack
35b47b6ff7 Bug 4931: Stocking can be by homebranch or holding branch
Squashed commit of the following:

commit 105de81639cbac5084e4a5c099b19569043e69ff
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date:   Tue Jul 13 11:58:01 2010 +0200

    (bug #4931) fix forgottens input in buttons

    the previous patch missed an hidden input in next buttons that break next page. This fix it.

commit db00295a6b9d1d36fc888ba6a0558011fd6884ba
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date:   Fri Jul 2 15:27:59 2010 +0200

    (bug #4931) add the ability to choose home or holding branch in stocktaking

    This add radio box in stocktaking to base it on home or holdingbranch

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Bug 4391 Followup: Adding back lost declaration of $branchcode
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-03 13:50:57 +13:00
Ian Walls
12c116236f Bug 5376: Batch Mod and Delete require superlibrarian permissions
This only occurs with IndependantBranches turned on; in an attempt to check that the items being
modified belonged to the user's branch, the code made a simultaneous comparison and assignment,
which is not permitted in all compilations of Perl.

Splitting the assignment of $itembranchcode and the check for its non-null value fixes the problem

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-28 15:46:32 +13:00
d2b9602e53 Fix for Bug 5540, editing slip news changes to librarian interface
The script checks for a language-specific OPAC message and, if none
is found, preselects none of the "display location" options. This
results in the first item in the <select> behing highlighted by
default, "Librarian interface." If we want to select "slip," we
must add an explicit check for it.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-29 20:27:43 +13:00
cb969684da Fix for Bug 5285, Show/hide columns in the output of items in batch operations
Also adds title/author information to output of batch deletions

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-13 09:45:30 +13:00
Liz Rea
61957d07ce Bug 4935: fix for allowing authorized values to be "unset"
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-12 21:07:28 +13:00
e6ebf10bba Fix for Bug 4851 - Batch delete shouldn't show delete button if no items were found
- Adding template flag to indicate valid results (hidden or not)
 - Clarifying warning messages based on various outcomes

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-12-03 12:47:12 +13:00
d056b2f62a bug 4451 followup - don't need /g for this replace
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-30 14:29:17 +13:00
3f5d9537db Fix for Bug 4451 Batch item tool can't process file with Windows line endings
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-30 14:29:04 +13:00
994d6e2aac bug 4211: more fixes to suggestion letter template handling
* Now displays the correct list of fields to choose
  for suggestion letters.
* Clean up mixture of old and new column selection code
  introduced in commit 88bb1b63, thereby restoring
  the intent of the patch for bug 3522.
* Enable suggestion library to be used in suggestion
  letter templates

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-11-30 06:47:52 +13:00
Andrew Elwell
efa66f1f55 Bug 5385: POD Cleanups (part 2)
More podchecker cleanups to eliminate warnings / errors

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:56 +13:00
Andrew Elwell
9fa574f609 Bug 5385: POD Cleanups (part 1)
working through the master branch to eliminate all
podchecker warnings/errors

Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:55 +13:00
Colin Campbell
a9010530a3 Bug 5105 - Remove use of depreciated Switch module
Use of switch generates errors in perl 12 and above
Replaced uses of the Switch module by if- else constructs
Removed some mixed space+tab indentation around these where
it generated visual confusion

As of perl 10 you can use given/when constructs but this is not
supported in earlier perls.
2010-11-11 11:32:02 +13:00
1117f6920c Fix for Bug 4991, Overhaul of Calendar interface
- Put hints, key, and existing holidays into right column
- Style entry form for added clarity and consistency with other
  forms in Koha
- Change the way dynamically displayed hints are shown to better
  match existing static hints in Koha's interface
- Add branch name (instead of branch code) for clarity
- Add the ability to add and edit holiday titles (previously
  only description could be edited).
- Add links to the list of existing single-day holidays and
  exceptions which opens the calendar to that month/year

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-11-02 15:02:54 +13:00
ce5e2429db fixing various links to point to *.koha-community.org
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 22:08:24 -04:00
b49a0a30a1 bug 4176: remove references to unimplemented system preference MIME
The intended functionality of this system preference was never
implemented.  To avoid template changes prior to 3.2.0, put in
hard-coded string 'CSV' to (accurately) identify the type of
the output files in the affected reports.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-21 21:36:45 -04:00
8eb7e1cbf7 further correction to the invocation of unzip
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 19:55:01 -04:00
Ian Walls
1125f4f432 Tighten system call to unzip
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 19:22:41 -04:00
Colin Campbell
c02cd2cabf Bug 5205 Fix compile time warnings in tools/batchMod.pl
$dbh was declared twice
prototypes used in a subroutine that was not declared before use

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 05:59:10 -04:00
0d7a33f671 bug 3916: set another "no change" dropdwon in batch item modification
Item type drop-down in the batch item modification tool
now has its default value set to the 'no change' value.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-07-02 14:38:28 -04:00
72d7840f52 bug 3916: set final "no change" dropdwon in batch item modification
Classification source drop-down in the batch item modification tool
now has its default value set to the 'no change' value.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-07-02 13:17:32 -04:00
573ac9488f remove a bunch of unconditional debug warns
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-07-02 10:57:08 -04:00
Henri-Damien LAURENT
a4dab23a41 Bug3916 : Batch Modify tool overwrites branches fields
This was owed to the Item modification construction and the change in GetBranchesLoop behaviour which selects the user branch by default.
Adding a void branch selected
Changing default value to ""

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-23 22:37:44 -04:00
ef58c445d3 removed needless imports of the YAML module
Removed instances of 'use YAML' that were either completely
unnecessary or which were used only in debug code.  Also
removed a needless import of Data::Dumper.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 23:30:48 -04:00
Lars Wirzenius
6a730ce7a3 Convert to UTF-8.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-06 17:58:54 -04:00
Nahuel ANGELINETTI
5d268a83a0 (bug #4295) fix overduerules edition
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 23:57:18 -04:00
Paul Poulain
c2f0fb370f removing AutoCommit=0, the last item is not commited
For an unknown reason, the last item batch updated is NOT updated.
After investigating a LOT (more than 3 hours), it appears the problem comes from the AutoCommit=0
I tried to solve it, but failed. So I remove the AutoCommit=0 option.

this result in a loss of perfs, but it's not a big problem I think. OTH, now everything is updated !

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:59:15 -04:00
Paul Poulain
d0bca1bdd3 Bug Fixing batchmod.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:57:38 -04:00
Matthias Meusburger
c8bf22893e MT 2553 : Adds background job for items batch modification
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:57:04 -04:00
Matthias Meusburger
7f3df2735d MT 2269, Follow-up : Granular permissions for items batch modification and deletion
Change of permissions names
Change of branch title in guided reports
Add a "Select All / Clean All" on items selection
Add a link to item when a given item cannot be deleted

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:55:39 -04:00
Matthias Meusburger
4b027bc4c9 MT2527 : Adds default empty value for branches when batch modifying items
(so they are not modified by mistake)

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:52:17 -04:00
Matthias Meusburger
4dd2086deb MT 2269 : Do not display all the items if there is a large amount of items
Also fix the barcode not found problem (due to empty lines)

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:52:15 -04:00
Garry Collum
a8927736dc Bug 4307: Sorts library locations in inventory drop-down list.
Replacement patch for previous patch submitted.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 21:06:25 -04:00
Donovan Jones
44201a54e1 Bug 2505 - Add commented use warnings where missing in the tools/ directory 2010-04-21 20:26:38 +12:00
Lars Wirzenius
49e0a8fc78 Fix FSF address in directory tools/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:51 -04:00
Lars Wirzenius
9675fcb5f0 Fix wording of 'at your option' in GPL license statement
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:48 -04:00
Matthias Meusburger
0268a58e16 MT2116: Addons to the CSV export
Adds the ability to customize CSV exports through the use of a YAML file.

The following customizations are available :
  - Preprocessing
  - Postprocessing
  - Field-by-field processing

The YAML field should be stored in the tools/csv-profiles/ directory and
named after the id of the CSV profile you want to customize.
An example file is provided in that directory.
(cherry picked from commit 76655b5b94)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 07:51:33 -05:00
9b98fc778d bug 4169: fix item batch modification for MARC21
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>
2010-02-12 15:03:00 -05:00
6672df6de8 bug 4152: fixed call to GetItemsForInventory()
Restores ability to run a report of items for inventory.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 12:45:08 -05:00
Chris Nighswonger
f86b788e3b Bugfix: Upping the byte size limit of patron images
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>
2010-02-03 15:11:23 -05:00
Matthias Meusburger
b40d4052b9 MT2116 : Addons to the CSV Export
Add encoding selection
Add authorised values handling
2010-01-28 15:11:55 +01:00
Matthias Meusburger
a404384b11 MT2116: Addons to the CSV export
Add user-defined headers
Add CSV, field and subfield separator selection
2010-01-28 15:11:54 +01:00
Nahuel ANGELINETTI
e75d26e794 (bug #3667) fix borrowers cleanup
This add a check of borrower expiry date, and don't delete the borrower if he's still active.
2010-01-28 15:11:49 +01:00
Chris Nighswonger
3b1d56ccb5 [4/30] Modifications to picture upload script to accommodate image sizes up to 200 X 300 pixel dimesions.
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
2010-01-11 18:16:17 -05:00
Nahuel ANGELINETTI
e1c2f85c2c (bug #3791) overduerules and numeric categorycodes
this fix overduesrules.pl when library have numeric category codes.
2009-11-18 17:42:22 +01:00
Matthias Meusburger
06c5cb2cf6 MT 2269 : Granular permissions for items batch modification and deletion
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
2009-11-10 22:23:50 +01:00
Henri-Damien LAURENT
1f7f00b626 Adding stocknumber field to items table 2009-11-03 16:06:20 +01:00
Matthias Meusburger
b47c8d4ac9 MT 2067, Follow-up : Description for CSV export not mandatory anymore 2009-11-03 15:43:19 +01:00
Matthias Meusburger
ddf2210554 MT 2073 : Allow to have non-editable fields for item batch modification 2009-10-27 09:58:35 +01:00
Matthias Meusburger
9553788824 MT 2071, 2072 : Check that barcodes are found and that items are allowed to be deleted 2009-10-26 14:40:39 +01:00
Matthias Meusburger
b622a96305 Batch deletion of items enhancements
Separate templates
Status message after deletion
2009-10-23 17:13:43 +02:00
Matthias Meusburger
ee0b0fca49 MT 2068 : Fixed scheduling guided reports 2009-10-16 11:30:58 +02:00
Matthias Meusburger
5bd08a1d7f MT 0002070: Batch item deletion 2009-10-16 09:57:41 +02:00
Henri-Damien LAURENT
472a4cf11f Followup : fb4366cdad
$input->{filecontent} used where never defined
 Replacing with $input->param("filecontent")
2009-10-01 10:48:26 +02:00
Henri-Damien LAURENT
a7ccfbc629 MT 1587 : CSV export for cart and shelves, with the ability to define different export profiles
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-30 11:30:35 +02:00
Paul Poulain
874b95061f Re introducing missing definitions of variables 2009-09-30 11:30:32 +02:00
Matthias Meusburger
32699901b5 MT 1092 : Items table is now sortable ; Not found barcodes are not displayed as empty lines anymore 2009-09-30 11:30:31 +02:00
Matthias Meusburger
fb4366cdad User can upload a file with barcodes or with itemnumbers 2009-09-30 11:30:31 +02:00
Henri-Damien LAURENT
c2406f4577 BatchMod rewriting : Using additem as a base for editing an Item 2009-09-30 11:30:30 +02:00
Henri-Damien LAURENT
88bb1b635b Adding Letters management to Suggestions. 2009-09-30 11:30:28 +02:00
Paul Poulain
d9113bfc92 Fixing item batch modification
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:30:13 +02:00
Henri-Damien LAURENT
ba39761da0 Bug fixing batchmod.pl 2009-09-30 11:30:10 +02:00
Henri-Damien LAURENT
b459a5df5c Bug Fixing : export would export no biblios when
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>
2009-09-30 11:30:08 +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
Henri-Damien LAURENT
dfb495b1b0 Adding Batch edit for items
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:22 +02:00
Henri-Damien LAURENT
c45d61a887 Enhancing Inventory.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:22:22 +02:00
Garry Collum
5707371eda Bug 2505: Enabled warnings in tools-home.pl, holidays.pl, exceptionHolidays.pl, and newHolidays.pl
Tested for warnings after addition of 'use warnings.' No warnings were generated.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-12 08:38:35 -04:00
9890a48800 Merge commit 'origin/master' into labels_recon 2009-09-05 21:45:39 -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
fce5a2f10e bug 2505: remove additional warning messages
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-05 19:52:18 -04:00
Colin Campbell
038c485ba5 enable warnings in overduerules.pl Call GetBranchesLoop instead of duplicating code make countletters a count as it says check for definedness before doing string comparisons do as not to generate warnings 2009-09-05 19:15:51 -04:00
Chris Nighswonger
02822ac805 [26/40] Refactoring auto label batch generation feature in bulk import tool and adding error trapping/handling. 2009-09-01 15:52:22 -04:00
Sébastien Hinderer
f1f833c965 bug 3464: Takes columns country and B_country of table borrowers into account in related operations.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 18:19:20 -04:00
Colin Campbell
c1d4bb641b Bug 3522 Refactor Create Update Delete letter for consistency and readability
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>
2009-08-11 17:51:43 -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
f202faba18 bug 2505: enable warnings in tools/manage-marc-import.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-10 20:34:50 -04:00
Nahuel ANGELINETTI
fc798b0e8d (bug #3329) Dependency missing in inventory.pl
The called function AddReturn is in C4::Circulation which is not loaded, this patch do it.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-15 12:43:29 -05:00
Nahuel ANGELINETTI
9dc44fefaf (bug #3304) fix notices trigger with diacritics in categorycodes
This just utf8::encode the $key if needed to permit categorycodes with diacritics.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 17:51:31 -05:00
Garry Collum
48f958fb19 Bug 2889: Removed toggle variable from overduerules.tmpl - added __odd__
Removed toggle variable from overduerules.pl and overduerules.tmpl. Used template variable __odd__ instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:47:58 -05:00
Galen Charlton
7ce6822973 removed incorrect module import
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:22 -05:00
Garry Collum
e3eeda2fb1 Bug 3268: Adds the ability to edit the description of a holiday.
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>
2009-06-03 13:26:40 -05:00
Paul Poulain
6924e7d6b4 fix for 2997 : superlibrarian's ability to edit item/patron home branch affected if all other privileges are selected
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>
2009-05-28 17:06:46 -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
Galen Charlton
17ab0a7532 bug 3263: Staff Search Results Interface Changes
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>
2009-05-28 06:42:20 -05:00
Garry Collum
34f08ca117 Bug 1687: Can't assign holidays to all branches at once.
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>
2009-05-27 07:06:26 -05:00
Galen Charlton
8e5eea5c4e bug 3222: set messaging preferences during patron import
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>
2009-05-22 13:20:53 -05:00
MJ Ray
5c7ac4047c bug 2287: use defaults when needed even if CSV has correct number of columns
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-21 10:56:28 -05:00
Garry Collum
5a0f7dfc89 Bug 1768: Calendar now retains the month on which the user was entering data.
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>
2009-05-18 16:37:58 -05:00
Garry Collum
ec73dc92f9 Bug 1440: Show a list of holidays. Fix for the date formats.
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>
2009-05-15 09:48:25 -05:00
Ryan Higgins
890f673d64 Bug 3224 : inventory tool fails on DOS newlines
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 06:59:27 -05:00
Chris Catalfo
0a6c834b30 Bug 1907 partial fix: prevent warnings on undefined params.
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>
2009-05-12 05:21:15 -05:00
Nahuel Angelinetti
f4649ab6a3 Add a date field in news edition, and permit to set the "timestamp" field, that is the publication date and modify the GetNewsToDisplay to return only news that timestamp is < to current date that permit to publish news later without any action.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 14:12:59 -05:00
Chris Catalfo
e805deb7ef bug 1907 Partial fix: prevent bad records from truncating output.
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>
2009-05-11 08:03:17 -05:00
Galen Charlton
80eecc3f19 bug 2287: handle case where autoMemberNum is off
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>
2009-05-08 08:46:43 -05:00
MJ Ray
9fb2d09ffc Allow autogenerated cardnumbers again to solve http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2287
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-08 08:26:28 -05:00
David Goldfein
17923b97f6 Modified log reporting to allow multiple modules to be selected.
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>
2009-04-24 13:36:16 -05:00
Joe Atzberger
14be4400d8 Bug 3066 - Overhaul guided reports
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>
2009-04-03 20:17:55 -05:00
Nahuel ANGELINETTI
734cf78be6 Autoselect marcflavour in marc import
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>
2009-03-04 10:57:22 -06:00
John Beppu
1328dc0f4a bug 1546 - REPLACE statements
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>
2009-02-26 13:45:43 -06:00
Michael Hafen
96412f1863 Add option to inventory tool to ignore copies on loan
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>
2009-02-25 16:32:30 -06:00
Mason James
31adf4ef83 patch for feature 2952 - v3
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 16:39:33 -06:00
Michael Hafen
ee7499d9d6 tweak Inventory tool and sub in C4/Items so call number min and max are not required
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>
2009-02-09 13:53:07 -06:00
Jesse Weaver
c9a50403e5 bug 2848 [1/2]: Send notifications to patrons when hold is received
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>
2008-12-08 08:51:12 -06:00
Galen Charlton
33514a4e35 bug 2801 followup
Quell unitialized value warnings emited when
'use warnings' was added.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-20 18:56:40 -06:00
Joe Atzberger
3cd80072f3 Bug 2801 followup... [SQUASHABLE]
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>
2008-11-20 18:30:07 -06:00
Joe Atzberger
5532f6652b Bug 2801 and other cleanup.
In addition to documented bug:
~ SearchString took an unused argument,
~ refactored repeated code into column_picks(),
~ fixed display during delete_confirm, including "name",
~ removed unused C4::Dates dependency.

Resend: typo fixed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-20 18:29:57 -06:00
John Beppu
55eb4efa71 bug 2707 - overdue rules not being deleted
* 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>
2008-11-04 15:29:11 -06:00
Jesse Weaver
b8d8a0ec5a fix for bug 2543: report output by tabulation a bit too literal
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>
2008-10-23 11:44:28 -05:00
Joe Atzberger
c9fd091c14 Bug 2627: Allow Unicode data in import_borrowers, expand feedback on errors.
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>
2008-10-16 16:18:39 -05:00
Ryan Higgins
04c4be5b48 Bug 2622 & 2623 : tools permissions for edit notice triggers and picture upload overly restrictive
removing requirements for parameters &  management respectively for these two tools.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 14:47:31 -05:00
Joe Atzberger
af0fad6a4c Convert to C4::Debug, comment out unused Data::Dumper.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-26 09:10:02 -05:00
Galen Charlton
4bf76c2d77 bug 2615: remove unneeded 'require Exporter'
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>
2008-09-26 09:05:08 -05:00
Galen Charlton
07e30920c3 remove debug warn
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-02 18:19:07 -05:00
Danny Bouman
83b8cfb1ad bug 2569: added the zipcode to display along with the patron address
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>
2008-09-02 16:48:22 -05:00
Ryan Higgins
e3fa9f2d5f Prevent borrower import from overwriting data that it shouldn't, and polish off a couple error conditions.
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>
2008-08-09 19:07:07 -05:00
Joe Atzberger
49e4e7020d Patron import reform - bug 2287 - expanded error catching and feedback
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>
2008-08-06 09:37:03 -05:00
Chris Nighswonger
1baf6348cc kohabug 2404 This patch removes Image::Magick and adds GD
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>
2008-07-30 03:38:18 -05:00
Chris Nighswonger
af288205f5 kohabug 2154 Modifying form input controls to accomodate translations
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>
2008-07-25 08:56:10 -05:00
550801cb5d Fixed bug #2357
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-16 18:26:23 -05:00
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
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
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
Ryan Higgins
ecb8354ebe Fix authentication problem in previous commit; userenv->{} should not be used before check_auth is called.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-10 08:22:21 -05:00
Galen Charlton
d351753d4e kohabug 1993 - task scheduler improvements
[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>
2008-06-09 06:38:03 -05:00
Ryan Higgins
1889fe8383 BUGFIX 2106 - repeatable holidays always on sunday. Also removing an old, unused syspref, and correcting a branch limitation for ind.branches.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:47:45 -05:00
Ryan Higgins
e613ef5a8c Apply item-level_itypes syspref to MARC export.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-02 00:50:36 -05:00
Ryan Higgins
34b4e77507 Independent-branchify MARC export. Add option to remove all holdings except your own, and force that behavior for independent branches. Also add accession date limit to export.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-02 00:50:35 -05:00
Ryan Higgins
fc98d228c2 Sort dropdowns for libraries by name instead of branchcode in several staff-side interfaces.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-02 00:50:33 -05:00
Galen Charlton
57fb7e45b7 kohabug 2186 - improve display of empty import batches
[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>
2008-05-31 21:59:03 -05:00
Galen Charlton
b42b8da0d6 kohabug 1573 - properly count patrons to delete
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>
2008-05-13 17:40:32 -05:00
157b5a1eb6 Adding checks for dateformat preference so that tablesorter script can be passed an extra parameter for proper sorting of metric dates (Bug 2089, dates & table ordering with jquery)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-12 10:06:32 -05:00
Galen Charlton
5cafd551be patron attributes - batch import
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>
2008-05-12 09:03:10 -05:00