Commit graph

16489 commits

Author SHA1 Message Date
Paul Poulain
db6a65eab3 Bug 7955 follow-up DBRev number 2012-06-20 21:30:54 +02:00
Jonathan Druart
5e2001a6f8 Bug 7955: Statistics tab for Patron checkouts
This patch adds a new 'statistics' tab in the Patron module.
For a borrower, this tab contains a table with:
- number of checkout for today
- number of checkin for today
- "precedent state", the number of checkouts the patron had yesterday on
  its library card
- "actual state", the number of checkouts on the borrower card at the current date

A new syspref (StatisticsFields) contains a list of fields (separated by
pipe (|) on which the table results is based. The default value is
location|itype|ccode

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
2012-06-20 21:16:50 +02:00
Claire Hernandez
1a2e242704 Bug 7994: Fix pref yaml errors
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 21:09:29 +02:00
Claire Hernandez
6ee7ad02aa Bug 7994: scripts to check yaml files
$ prove yaml_valid.t
checks a closed list of files
$ perl yaml_valid.pl -f myfile.yaml
try to load a yaml file with YAML::LoadFile and show errors

(both files pertidied)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-06-20 21:07:46 +02:00
c3bcfc4f82 Bug 8006 - Loading offline circulation does not anonymize
Simple, one line fix. Added the privacy parameter to the list
of parameters passed to C4::Circulation::MarkIssueReturned.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:40:41 +02:00
Jonathan Druart
c3f16aa97d Bug : DataTables integration in acquisition module [1]
parcel.tt

http://bugs.koha-community.org/show_bug.cgi?id=8098
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed bug number.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:32:06 +02:00
Jonathan Druart
364b9a2da9 Bug 8099: DataTables integration in acquisition module [2]
acqui-home.tt

http://bugs.koha-community.org/show_bug.cgi?id=8099
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:30:39 +02:00
Jonathan Druart
8a2139e495 Bug 8100: DataTables integration in acquisition module [8]
neworderbiblio.tt

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed bug number.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:26:52 +02:00
Jonathan Druart
e31768aab1 Bug 8102: DataTables integration in acquisition module [14]
supplier.tt

http://bugs.koha-community.org/show_bug.cgi?id=8102
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Corrected bug number.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 19:06:02 +02:00
Jonathan Druart
e76afafb94 Bug 5345: DataTables integration in acquisition module [12]
parcels.tt

http://bugs.koha-community.org/show_bug.cgi?id=8103
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:57:35 +02:00
Jonathan Druart
029d956242 Bug 5345: DataTables integration in acquisition module [7]
lateorders.tt

http://bugs.koha-community.org/show_bug.cgi?id=8104
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:55:46 +02:00
Jonathan Druart
0fbfb44737 Bug 8152: Clicking cancel link on edit suggestion redirect to the suggestions list
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:44:48 +02:00
Dobrica Pavlinusic
dceb14537a Bug 8180 - cataloguing/additem.pl plack scoping
$dbh needs our scoping when using "Add item" to prevent error
Can't call method "prepare" on an undefined value at /srv/koha/cataloguing/additem.pl line 88.

Test scenario:

1. start intranet with plack
2. select one Edit items on one record
3. fill in new item and click on "Add item"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:42:07 +02:00
Dobrica Pavlinusic
47be784f96 Bug 8183 - acqui/parcels.pl plack scoping
Scope our $template for plack to prevent following error:

Can't call method "param" on an undefined value at /srv/koha_ffzg/acqui/parcels.pl line 177.

Test scenario:

1. Home > Acquisitions > Search for vendor
2. click on "Receive shipment"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 18:39:13 +02:00
Colin Campbell
9929c52a57 Bug 8216: Allow SIP modules to pass critic tests
Add C4/SIP to perlcritic tests. Fix those issues that were
generating perlcritic errors

Signed-off-by: Stacey Walker <stacey@catalyst-eu.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:14:00 +02:00
9dc42e9ec4 Bug 8223 - Properly format SQL query in C4::Bookseller::GetBookSeller
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:12:29 +02:00
Matthias Meusburger
cc02d468c3 Bug 8229: Tabs in marc subfield structure is not shown correctly
- Fixed URLs in marc_subfields_structure.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:10:13 +02:00
Katrin Fischer
32c89dfa1a Bug 8232: Comments in OPAC contain untranslatable javascript messages
To test:
- add a new comment to a record in the OPAC
- Your comment (preview, pending approval) is not translatable
- update po files by running 'perl translate update <language>'
- Open po file and check if strings are there, translate
- install language again by running 'perl translate install <language>'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:08:02 +02:00
89c88ba652 Bug 7367 Followup for opac-suggestions template
This small typo was found by Albert Oller.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Very trivial fix.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:06:34 +02:00
adbb477450 7368 Followup for history.txt Only correcting whitespace for correct placement in about form
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Very trivial.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:58:41 +02:00
Robin Sheat
ac5a8ca2df Bug 8222 - make the zipcode no longer mandatory
Having the zipcode field mandatory by default is a bit annoying for
places where no one cares about it. This patch stops it being the case
on new installs.

Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:45:33 +02:00
773b164f41 patch for Bug 8226 - 'OpacFooter' markup/css improvements
Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:41:30 +02:00
Colin Campbell
bcde875b47 Bug 8227 Fix deprecated construct compile time warning in Serials
The perl parser no longer fools itself into sometimes thinking
qw( ... ) is a ( qw( ... )) this adds the required parentheses
for the foreach expression silencing the compile time warning

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:38:25 +02:00
Jared Camins-Esakov
f809e47fd1 Bug 6720: show authority type in auth details
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Authority type on detail page in staff now shows correctly.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:15:22 +02:00
Aleksa Vujicic
f2ca89b30e Bug 7129: Added a sprintf to format the actual cost.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Rebased to current master, please test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>

QA note: changed call to use $order instead of @$results[0], for consistency
with surrounding variables

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:10:01 +02:00
Jared Camins-Esakov
f5974e278b Bug 7943 follow-up: Fix template filename
In preparation for some later work on authorities, the filename for the
OPAC authority viewer changed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:07:32 +02:00
Jared Camins-Esakov
3aaaf2f2e4 Bug 7943: Authority search results are untranslatable
The HTML for authority search results was previously generated in
C4::AuthoritiesMarc::BuildSummary, which meant that it couldn't be
translated. This patch moves the HTML generation into the templates
by introducing a new authorities-search-results.inc include file for
both the OPAC and the Intranet which contains a Template::Toolkit BLOCK
for rendering the authority results. Fixes the authority autocomplete
by removing the untranslatable strings, and returning only data from
the database.

To test:
1. Apply patch.
2. Test authority searching in the authority module in the staff client
3. Test authority searching in the authority control plugin in the
   cataloguing module (and the plugin for UNIMARC field 210$c, if you
   can figure out how)
4. Test authority searching in the OPAC

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with MARC21 data.

1) Applies cleanly on current HEAD.

2) Authority search in staff

Patch works wonderfully, only some small notes found while testing that have
not been changed by this patch:

ENH note: Search terms show up nowhere. So if I want to change the sorting, I have to
repeat typing in my search term. Even if the form does not keep the term, it
should be visible somewhere on the screen what I searched for.

ENH note: The pagination on top and at the bottom of the result list are formatted
differently. Maybe some missing CSS?

ENH note: Also the authority type is not shown at all in the result list.

3) Cataloguing and authority plugins

The autocomplete function works nicely.

ENH note: There is only one small enhancement
I could imagine. If I start my search from 100 it will limit the search to
'persons' but the autocomplete will also suggest other authorities. It would
be a bit cleaner, if the autocomplete could limit by the appropriate authority
type too. Very nice feature.

Plugins overall work nicely. Created links include the authority numbers and work
correctly.

4) Authority search in OPAC

Works nicely. Display is consistent, but translatability greatly improved.

ENH note: In staff we use 'Details' in OPAC we use 'View full heading' - I wonder
if maybe 'details' would be better understandable for users?

Note: Code reveals a system preference 'AuthDisplayHierarchy' that is
not available in the system preference editor. I talked to Jared and he
will work on this feature later on. For now it's no regression, as the
preference has never been visible.
2012-06-20 10:07:30 +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
christophe croullebois
082bb5049d Bug 8136 Changes the expected lenght of 100$a in rebuild_zebra.pl
In rebuild_zebra.pl, if we are in "unimarc" ("marcflavour" syspref), the sub "fix_unimarc_100" is called and checks if 100$a lenght is equal to 35.
If it is not the case, the sub inserts the localtime and more, so we loose the datas in reindexing.
The standart lenght is 36.
I have just changed 35 to 36.

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 09:39:27 +02:00
Sophie Meynieux
533c4c0f46 Bug 7329 [Followup] : when reverting an import, keep matching biblionumber in batch table, if items are not deleted because they are issued.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

http://bugs.koha-community.org/show_bug.cgi?id=7318
2012-06-20 09:38:01 +02:00
Sophie Meynieux
f86ccea202 Bug 7329 [Followup] : when reverting an import, keep matching biblionumber in batch table, if items are not deleted beacause on loan.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-06-20 09:20:41 +02:00
Christophe Croullebois
c13d4faff7 Bug 7329: Items onloan are deleted when undoing import into catalog
this patch checks the "on loan" and "reserved" status before deleting item, and
do noting in this case, so the record can't be deleted due to existing item.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-06-20 09:20:40 +02:00
Dobrica Pavlinusic
d8c909b5cb Bug 8247 - adding basket doesn't save basket name, internal or vendor note
URL: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=32&op=add_form

I'm also getting mysql referential integrity error:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_srvgit`.`aqbasket`, CONSTRAINT `aqbasket_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE) at /srv/koha/C4/Acquisition.pm line 416.

Test scenario:

1. Find vendor and select "New basket"
2. fill in basket name, internal and vendor note
3. press save
4. verify that created basket doesn't have name nor internal or vendor notes

Signed-off-by: Marc Veron <veron@veron.ch>

First tested without patch applied, new basket's name and internal / vendor notes were empty-
Applied patch, new basket's name and notes behave OK.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 09:16:45 +02:00
Paul Poulain
7183a241c4 Merge remote-tracking branch 'origin/new/bug_8092' 2012-06-14 17:57:09 +02:00
Jared Camins-Esakov
3097319768 Bug 8092 follow-up: Fix perlcritic violations
Apparently you are not supposed to use "return undef;" or perlcritic
gets mad. Sorry, perlcritic!
2012-06-14 17:56:56 +02:00
Paul Poulain
84ec97123b Merge remote-tracking branch 'origin/new/bug_7952' 2012-06-14 15:56:29 +02:00
Dobrica Pavlinusic
1e5f68fdcb Bug 7952 - followup to fix t/Creators.t
Since we are now using temporary file, we are creating test.pdf
at end of test and checking if it exists and have non-zero size.
2012-06-14 15:54:06 +02:00
Paul Poulain
bb4ab3ee76 Merge remote-tracking branch 'origin/new/bug_5337' 2012-06-14 15:44:22 +02:00
c58f8f84d9 Bug 5337 : Upping the count of the unit tests 2012-06-14 15:43:08 +02:00
Dobrica Pavlinusic
dc1ccb1d74 Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser
Without name option to prFile, PDF::Reuse opens '-' file which is real
console STDOUT on plack so pdf file gets emited to terminal instead of
sending it to browser.

This change creates temporary file using File::Temp, pass it to PDF::Reuse
and then reads it back and prints it out for plack (or CGI) to pick up.

Test secenario:

1. Home › Tools › Patron Card Creator › Manage Card Batches
2. select batch checkbox and click Export
3. select template and click Export
4. click on pdf file to download it

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 18:21:57 +02:00
Dobrica Pavlinusic
91bf568114 Bug 7810 - C4/Auth.pm - on plack restart session is undefined
So we shouldn't try to delete it. This produces application error
instead of redirection to login page.

I had similar problems with CGI, especially when session in browser
is still active, and one on filesystem or database is already expired.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Solved the problem when my Plack installation started acting up due to
stale cookies.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 18:11:52 +02:00
Ian Walls
186cfa5cb0 Bug 7444: Update circ/circulation.pl to use KohaDates TT Plugin
Removes all date formatting done in circ/circulation, and sets any/all date
outputs to iso format.  The formatting of dates is now handled in the template
using the KohaDates plugin.

This allows use to remove a dependency on C4/Dates.pm from the script.

This patch also removes the usage of C4/Overdues/CheckBorrowerDebarred.  Since
borrowers.debarred is returned by GetMemberDetails, it doesn't make sense to
include another module to run another MySQL query just to fetch the date again.

To Test:

1. View the checkout page for a patron with materials checked out today and in days past, as
well as items on reserve.
2. View a patron who is nearing their expiry date
3. Renew a patron
4. Renew a material from the checkout page using the renewal date selector
5. Attempt to checkout a book to a patron that is on hold for someone else
6. Attempt to checkout a book that is currently checked out
7. View a debarred patron

In all cases, any dates displayed should be in syspref format

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 18:02:26 +02:00
Paul Poulain
44c0971bbf [PATCH] [SIGNED-OFF] bug 7570: add a space to the table header
Add a space to separate Location from (Status)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Typo fix, all ok.
2012-06-11 17:54:21 +02:00
Meenakshi.R
97e92b22e1 Bug 7570 - Add Item availability status to cart.
Added Item availability status to cart(Location table cell).

Changes:
-opac/opac-basket.pl:
Added code to show In transmit status and modified @items to call "GetItemsInfo" instead of "GetItemsLocationInfo" to get accurate avalibility status.
-koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt:
Added code for showing availibility staus in opac-basket page and in  "More details" link.

Test Cases:
-Add records to your cart with different cases like 1 record with  different Item status(Lost,Avaliable,Withdrawn,etc).
-Click on your cart and see the results in a new window.
-Click on "More details" link and check the results.

Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk>
2012-06-11 17:50:41 +02:00
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
9357d02794 Bug 8171 - Improper escaping of quotes during z39.50 queries leads to broken html
Implementing fix as suggested by Chris Cormack:

http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8171#c4

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:15:40 +02:00
Paul Poulain
a453a881ec Merge remote-tracking branch 'origin/new/bug_8092' 2012-06-11 16:57:00 +02:00
Jared Camins-Esakov
a4514e0d45 Bug 8092: Cheer up Jenkins on loading Cache modules
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 16:55:43 +02:00
Katrin Fischer
21fb688276 Bug 7411: Remove diacritics from generated userid
Patch introduces a new module Text::Unaccent.

To test:
1) Add a new patron with diacritics in surname and first name, leave userid empty.
2) Save user and check the created userid has only the base characters and
diacritics have been removed correctly.
3) Create another user with the same surname and first name, check userid
is generated correctly.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 16:43:39 +02:00
81edc91f37 Bug 8004 - Items on Hold Lose Transfer After Being Scanned Twice
When a hold is placed on an item where the pickup location is
different than the holding library, Koha initiates a branch
transfer for that item to fill that hold when items is run through
the returns system.

If the item is then run through returns a second time, the system is
supposed to close that transfer as a 'wrongtransfer', and open a new
transfer with the same from and to branches as the original.

The problem is that the original transfer is closed, but the new
transfer is not created. This is because at some point, someone
replaced the template variable WrongTransfer, which had previously
contained the branchcode for the library to transfer to, with the
full name of the library instead ( I assume to make a look nicer ).

Solved by removing the line that was changing the variable contents
from the branchcode to the branch name, and adding a new TT filter,
KohaBranchName that functions in the same way as KohaDates, except
it takes a branchcode and returns the branch name for the given
branchcode.

The consequence of this, is the the name of the library is passed to updateWrongTransfer instead of the branchcode, causing the failure.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 15:53:57 +02:00