Commit graph

21609 commits

Author SHA1 Message Date
Colin Campbell
499ff3618c Bug 12263: Fix startup issues blocking response to HUP
If you do a kill -s HUP sipserver_pid the server process
should restart its children.
This was not happening although it was logging the commencement
of the process.

Removed traces of Exporter usage this was always incorrect
this program inherits from Net::Server 'use base' to make inheritance
clearer. Removed unnecessary begin block

made file executable so it can run

added a shebang line so OS knows to invoke perl to compile and run
the file.

I've removed the debug code dumping the config to STDOUT,
it should not have gone into the production version.
One of the first things this program does is close stdout etc and
reopens the sip sockets to them. Assuming you can print to them other
than as part of the sip dialogue is not always safe.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-15 11:23:29 -03:00
d9749756ca Bug 11575 - OPACBaseURL sometimes set by ENV variable and not system preference
This patch changes how the OPACBaseURL parameter gets set in the subroutine
get_template_and_user in Auth.pm.

Currently, it's being set by the $ENV{'SERVER_NAME'} variable. In many
cases, this will probably match the URL that the user uses to access a
page. However, this causes problems with reverse proxies.

There are ways to compensate for proxy servers (such as inspecting
other variables set by the web server), but such a solution seems
a bit convoluted...especially since we already use the system preference
OPACBaseURL in many other parts of Koha.

We probably shouldn't be passing OPACBaseURL from Auth.pm at all, and
instead use the Koha TT plugin and using_https param to determine
protocol. However, that's outside the scope of this bug/patch.

This patch is just meant to fix an existing bug.

I did leave the $ENV{'SERVER_NAME'} as a full back if OPACBaseURL isn't
set, but that's it.

_TEST PLAN_

Before applying:

1) Clear your OPACBaseURL preference
2) Perform a search in the OPAC
3) Click on or hover over the orange RSS icon
4) Note that the URL used for the RSS links is either:
  a) The same URL you used to access Koha (no reverse proxy)
  b) The ServerName from your Koha apache conf which isn't the
  same URL you used to access Koha (reverse proxy)
5) Add an OPACBaseURL that isn't the same as the actual OPAC URL
6) Note that the OPACBaseURL system preference has no effect here

After applying the patch:

7) Refresh the page
8) Note that the URL you see now is actually the OPACBaseURL system
preference that you set
9) Clear your OPACBaseURL system preference
10) Refresh your search page
11) Note that the URL has reverted back to the URL that you saw before
(either the original Koha site URL or the Koha ServerName defined
in Apache and not the URL of the proxy)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-15 10:33:47 -03:00
7c8b152c38 Bug 12377 [QA Followup] - Remove readonly from input
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-15 10:33:16 -03:00
227dddc9c0 Bug 12377 - Add date pickers to serials-edit.pl
There are two date fields when receiving serials on serials-edit.pl,
these inputs should have a calendar widget like other date fields
in Koha.

Test Plan:
1) Apply this patch
2) Recieve a serial
3) Note when clicking on the "Published on" or "Expected on" fields
   you will now have a calendar popup. Note you can still manually
   edit the date if you wish to.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-15 10:33:07 -03:00
abd6de7da1 Bug 10519: (followup) unit tests leave problematic cruft
On testing I've found that t/db_dependent/Suggestions.t leaves
cruft on the DB. Small followup for that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 16:30:51 -03:00
Jacek Ablewicz
4c6fde24e8 Bug 10519: (followup) Fix context for evalyating $borrowernumber
Follow-up to fix additional suggestion statuses, which are not working
properly due to

   416:  borrowernumber           => $input->param('borrowernumber'),

being evaluated in list context inside $template->param() call arguments.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 16:02:36 -03:00
Jacek Ablewicz
e19736fa83 Bug 10519: Suggestions: 'Organize by' and correct display of tab descriptions broken
The tabbed display in suggestions offers different options to organize
the tabs. The descriptions on the tabs and some of the search options were
not working correctly, displaying as "Unknown".

To test:
- Add several suggestions to your installation, make sure you have:
  - suggestions from different users
  - suggestions managed by different users
  - suggestions with different statuses
  - suggestions with different selected item types

Test all the 'organize by' options (except "Organize by: Library"
- see note below), make sure that the tabs and search options
have correct descriptions and do no longer display as "Unknown".

- Add 1 or 2 custom status to SUGGEST_STATUS authorized value.
  - Verify display is still correct and your new status are displayed.

Note: "Organize by: Library" option is currently severely broken
(and not easily fixable, especially for 'IndependentBranches'
enabled). But this turns out to be a separate issue, with a different
underlaying causes, and it's outside the scope of this patch.
This should be dealt with later, in it's own bug report.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 16:02:20 -03:00
Jonathan Druart
3dcb153a28 Bug 11744: Add regression tests
Before the patch:
 prove t/db_dependent/Acquisition/CancelReceipt.t
returns 1 failure.
After the patch, the 2 tests pass.

Signed-off-by: marjorie barry-vila <marjorie.barry-vila@ccsr.qc.ca>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Yay! Regression tests!
2014-07-14 11:31:41 -03:00
Jonathan Druart
e94528ef72 Bug 11744: A receipt should not be cancelled if holds exist
Test plan:
1/ Set acqCreateItem pref to on receiving
2/ Receive 1 of 2 items ordered
3/ Place a hold on the record
4/ Verify you are not able to cancel the receipt.

This is not the best way to do that but it is the easy one.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 11:17:42 -03:00
Jonathan Druart
6803dc6bf5 Bug 11744: Cancel a receipt does not delete items created on receiving
If items is created on receiving, cancel a receipt should delete them.
The code only manage the case if the order is a child of another order
(partial).

To reproduce:
1/ Set AcqCreateItem to receiving
2/ Order one or more item(s)
3/ Receive the order and verify the item is created
4/ Cancel the receipt
5/ The item is not deleted

Test plan:
1/ Apply this patch and do again previous steps. The item should not be
deleted at step 5.
2/ Set AcqCreateItem to ordering and verify the item is not deleted.

Signed-off-by: marjorie barry-vila <marjorie.barry-vila@ccsr.qc.ca>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 11:17:34 -03:00
Jonathan Druart
10689f2a9b Bug 11226: subscription frequencies and numbering patterns should be editable with serials permissions
Bug 7688 does now allow patrons with serials permissions to edit
 subscription frequencies/numbering patterns.

 Test plan:
 Try to access to serials/subscription-frequencies.pl and
 serials/subscription-numberpatterns.pl with the "serials" permissions.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
With patch and only serial permissions can now access
frequences and patterns.
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 11:17:23 -03:00
eed7f263d0 Bug 8773 - Start per-instance koha-index-daemon in .deb setup
Short:

Launch an indexing daemon (rebuild_zebra.pl -daemon) process for each
enabled instance. Enabling/disabling the use of the indexer is handled
by global configuration variables in /etc/default/koha-common.

Also provides command line tools to manage the running indexer daemons
for your instances.

Long:

Using an indexing daemon avoids launching a new interpreter each time
the cron triggers the indexing, and also allows sub-minute incremental
reindexing, a requirement from our librarians.[1]

Using the indexer daemon could remain "experimental" until it gets more
testing; so is disabled by default initially. To enable the use of the
indexer the user has to tweak the /etc/default/koha-common config file.
Specifically the USE_INDEXER_DAEMON variable, which is clearly explained
in the file.

Frecquency defaults to 5 sec, and can be changed by tweaking the
/etc/default/koha-common config file too.

This patch uses rebuild_zebra.pl in daemon mode, but it is crafted to
allow changing the indexing daemon and passing specific option switches
it might need.

Regards
To+

[1] This is the .deb version of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8519

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:15:22 -03:00
56ffda0a70 Bug 12265: [QA Follow-up] - Improve usage of find
When finding a row by its primary key, it is not necessary to
pass a hashref, only the primary key value itself is required.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:10:25 -03:00
0bd14c7e8e Bug 12265: [QA Follow-up] Replace DBIx search by find
This patch replaces DBIx search by find at two places in z3950servers.pl.
Furthermore, it adds testing on the results of the find method, passing
a not-found-message to the template whenever needed.
The function ServerSearch is adjusted to use HashRefInflator instead of
manually mapping the columns of result objects.
An additional defined-test in _form_data_hashref prevents shifting of
names and values in the result hash.

Test plan:
List all servers. Edit, copy and delete a server.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:10:13 -03:00
afb6d14f25 Bug 12265: Improve Z39.50 servers administration
This patch makes a few tiny improvements on the form, does some
housekeeping/tidying up, and replaces SQL code by DBIC statements.
In detail:
- Adds an id parameter (more precise than searchfield).
- With the move from searchfield to id, you can rename a server now.
- A Copy button is added to clone a server.
- Confirming a delete is moved to javascript. No additional form anymore.
- A message about an insert, update or delete is shown in a div dialog
  alert above the table instead of a separate form.
- Remove offset parameter, Next/Prev button and associated logic.
- All SQL statements are replaced by DBIC.
- Function StringSearch is renamed to DBICified ServerSearch.
- Remove tabs from script and template. Adjust some indentation.

Test plan:
- Test adding, editing and deleting Z3950 servers.
- Test searching for a server with the top search box (not table).
- Add a server with quotes in the name. Search for it. Edit or delete.

Followed tet plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:10:00 -03:00
Bernardo Gonzalez Kriegel
c3c7068709 Bug 12534 - PROG/CCSR deprecation: Make getlanguages() theme independent for opac
This patch removes a reference to prog theme on getlanguages()
when ENV var HTTP_ACCEPT_LANGUAGE is checked.

Changed to use sysprefs to find theme for opac and intranet

To test:
1) Apply the patch
2) Translate for a couple of languages: de-DE, fr-FR, es-ES, etc
3) Enable those languages for OPAC on I18N prefs
4) Using Firefox, clean all history/cookies
5) Change variable intl.accept_languages (will do several times)
 a) got to about:config
 b) search 'lang'
 c) look for the variable, double click, change to 'de-DE'
6) Go to opac page, must load in german
7) Repeat for each translated lang: clean > change val > reload opac
   On each case opac must load on configured language
8) Just to test, set variable on untranslated lang, opac page
must load on first value of list of enabled languages
9) prove t/Languages.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:01:08 -03:00
61dc0ab223 Bug 12470: (followup) License statement missing
Adds the license statement to the new files.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 08:57:06 -03:00
Yohann Dufour
e1e0ac329c Bug 12470: adding unit tests for the routines CheckValidBarCode and CheckIfIssuedToPatron of the module C4::Circulation.pm
The routines CheckValidBarcode and CheckIfIssuedToPatron were not tested

Test plan:
1/ Apply the patch
2/ Execute : prove t/db_dependent/Circulation/CheckValidBarcode.t t/db_dependent/Circulation/CheckIfIssuedToPatron.t
3/ The result of the command has to be a success without error or warning :
t/db_dependent/Circulation/CheckValidBarcode.t ...... ok
t/db_dependent/Circulation/CheckIfIssuedToPatron.t .. ok
All tests successful.
Files=2, Tests=32,  3 wallclock secs ( 0.04 usr  0.01 sys +  2.88 cusr  0.17 csys =  3.10 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Patches squashed
Tests pass, no koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Tests pass using sample data provided with Koha

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 08:51:18 -03:00
ab3bce193f Bug 12517 - Download and send list popups broken in bootstrap OPAC
A JavaScript error prevents the download list and send list links in the
bootstrap OPAC from functioning correctly. A variable declaration was
removed from basket.js during the creation of the theme but
opac-shelves.tt was not changed accordingly. This patch corrects it.

To test, view an existing shelf in the bootstrap OPAC and test the
"download list" and "send list" links. They should each trigger popups
without any errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Popups pops again, no koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 08:49:49 -03:00
99e25ff30d Bug 12522 - Fatal database error when viewing Holds for Bib with no Items
This patch fixes some potential SQL syntax errors, which can cause
fatal software errors in Koha when the environmental variable DEBUG
is on.

_TEST PLAN_

Before applying:

0) Ensure that you don't have "SetEnv DEBUG 1" in your Apache config
1) Create a new bib record
2) Click on the "Holds" tab before creating any items
3) Note the message "Cannot place hold: this record has no
items attached."

4) Add "SetEnv DEBUG 1" to your Apache config
5) Restart Apache
6) Refresh your page
7) Note the following Software Error: "DBD::mysql::st execute failed:
You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to
use near ')' at line 3 at /koha/lib/C4/Koha.pm line 835.

8) Apply the patch

9) Refresh your page
10) Note the message from Step 3

Thorough tester:

11) Remove "SetEnv DEBUG 1" from your Apache config, restart Apache,
and refresh your page. You should see the message from Step 3.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Error reproduced, patch fixes it.
Tested following test plan, no koha-qa errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 08:47:56 -03:00
Galen Charlton
5e5c038070 Bug 12558: (follow-up) remove old versions of schema classes for two tables
The newer version of DBIx::Class::Schema::Loader tweaks
how it maps plural table names to class names.  As a consequence,
two (currently-unused) classes are renamed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-11 16:26:48 -03:00
0aba82173e Bug 12558: Require DBIx::Schema::Loader v0.07039 or higher
This patch shifts required DBIx::Schema::Loader to a newer
version to take advantage of improved smarts about foreign
key relationships.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Yohann Dufour <dufour.yohann@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-07-11 16:26:39 -03:00
8295b3e08f Bug 12558: DBIx::Class schema update 07/2014
Update DBIx::Class schema classes to use a newer
version of DBIx::Class:Schema::Loader.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Yohann Dufour <dufour.yohann@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-07-11 16:26:23 -03:00
Brendan Gallagher
8476a39399 Bug 12307: Catalog details page displaying incorrect status for items with itemtype level notforloan status
The template markup that controls that status column for
the items table in catalogue/detail.pl does not account
for the itemtypes.notforloan flag.

Test Plan:
1) Find an item that is currently available
2) Go to the itemtype editor and mark that itemtype of that item
   as being not for loan
3) Browse to the catalog details page for that item's record
4) Note the item status is still "Available"
5) Apply this patch
6) Reload the catalog details page
7) Note the item status is now "Not for loan"

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-11 16:26:11 -03:00
Yohann Dufour
63c5ba9b03 Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm
The module Koha::Borrower::Files.pm was not tested

To test:
1/ Execute the command: prove t/db_dependent/Borrower_Files.t
2/ The command has to print:
t/db_dependent/Borrower_Files.t .. ok
All tests successful.
Files=1, Tests=23,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.47 cusr  0.08 csys =  1.60 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Squashed patches.
Now test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-11 16:16:11 -03:00
Katrin Fischer
cb8b0fe598 Bug 12508: Follow up - corrects capitalization
Corrects 2 strings:
- 'Delete this contract'
- 'Contract deleted'

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-10 10:44:15 -03:00
Yohann Dufour
de03c263f0 Bug 12508: adding an error message if a contract cannot be removed
If a contract cannot be removed, no errors is displayed. Now, it displays an dialog messag error and the list of contracts.

Test plan:
1) Log on with a superlibrarian permission
2) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
3) Record a vendor with a nonzero "name"
4) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
5) Click on the button "New" > "Contract" and record a new one
6) Click on "New" > "Basket" and record a basket by selectioning the created contract
7) Click on the contract name, then click on the "Contracts" item in the left menu
8) Try to delete this contract, an error is displayed : "Contract has not been deleted. Maybe a basket linked to this contract exists."
9) Delete the basket linked to the contract
10) Delete the contract, no errors is displayed

Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script an tests.
Also tested adding, editing and deleting unused contracts.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-10 10:44:06 -03:00
Viktor Sarge
3acbead049 Bug 12332: Fix for tab "Purchase suggestions" not lighting up
This patch changes the file purchase-suggestions.pl with "suggestionsview => 1" for the template parameter.
In circ-menu.inc i changed the condition from "suggestions" to "suggestionsview" since it seemed to conflict with the existing variable suggestions (and in that case only highlighting the tab when there were suggestions).

Please note that I fixed the troubles with the tab "Fines" in a separate patch 9245.

Test plan:
1) Verify that "Purchase suggestions" does not light up as it should when clicked.
2) Install the patch.
3) Verify that the tab "Purchase suggestions" now actually light up when clicked.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised.
2014-07-08 10:43:46 -03:00
Viktor Sarge
fea21b16ab 9245 Fixes visual bux with fines tab not highlighting
This patch makes shure that mancredit.pl, maninvoice.pl and pay.pl passes the value "finesview=1" that makes the tab active.

Test plan:
1) Go to a library user and the fines tab. Note that the "Fines" tab loses it's highlight when you click "Pay fines", "Create manual invoice" and "Create manual credit".
2) Install the patch.
3) Redo the first step and make shure that the left menu tab "Fines" is now highlighted all the time.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised, no regression found on the rest of the tabs.
2014-07-07 13:13:43 -03:00
Gaetan Boisson
ef5d4f3c62 Bug 11030 - Add 359, 947 and 969 fields in french unimarc_complete framework - followup
Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 13:10:27 -03:00
Mathieu Saby
2e80b0e63a Bug 11030 : add fields 947,969,359 in unimarc_complete french framework
This patch must be tested on top of bug 11021

This patch adds 3 fields to unimarc_complete french framework
- 359 (2-a-b-c-d-e-f-g-h-i-p-u-v) used by Sudoc network, to be displayed in tab 3
- 947 (c) used by Electre
- 969 (a-h) used by Electre
I don't know the difference between 969a and 969h so I gave them quite the same name

To test :
1) take a fresh Koha with unimarc marcflavor
2) in web installer, select french language, unimarc marflavor and "Grilles de catalogage complètes".
3) check default framework in Administration > MARC Frameworks : it should contains 359/947/969 fields

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 13:10:19 -03:00
3e8cf86df7 Bug 12429 [OPAC] patron seeing fines codes
Bug 2546 introduced translatable handling of Koha account type codes but
missed several codes. This patch adds handling of these codes to the
bootstrap OPAC.

This patch also corrects a couple of instances of incorrect
capitalization.

To test, apply the patch and log in to the OPAC as a user who has
existing fines and charges. View the "Your fines" page. You should not
see any account type codes like CR, LR, or FU.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 12:43:36 -03:00
eed44299d3 Bug 12429 [staff client] patron seeing fines codes
Bug 2546 introduced translatable handling of Koha account type codes but
missed several codes. This patch adds handling of these codes to the
staff client.

This patch also corrects a couple of instances of incorrect
capitalization.

To test, apply the patch and view fines page (Patron details ->
Fines) and the pay fines page (Patron details -> Fines -> Pay fines).
You should not see any account type codes like CR, LR, or FU.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 12:43:25 -03:00
Janusz Kaczmarek
4458ac5764 Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl
Under certain circumstances misc/link_bibs_to_authorities.pl creates
multiple authority with identical heading.

Test plan:
1. Have some (2-3) biblio records with some repeated headings
   Have BiblioAddsAuthorities = allow, AutoCreateAuthorities = generate
   Have no authority records
2. Run misc/link_bibs_to_authorities.pl script
3. You will get multiple authority records -- one for each occurence of a
   heading in biblio record.

4. Apply the patch.
5. Repeat 1-3 (remember to have "fresh" biblios, without $9, and no
   authorities).
6. The problem should be fixed.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described.
2014-07-07 12:40:25 -03:00
David Roberts
5d6c092921 Bug 12495 - Include streetnumber in hold alert address
Steetnumber is not included in the addess in the hold alert add the
field to those displayed

To test this, place a hold on an item that is on-loan, having first made
sure that the requesting user has a value in the street number field of
his address. Check the item in, and an alert should appear giving the
name and address of the requesting user. This address should include the
contents of the street number address field.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I was able to confirm three of the four template changes for the
following cases:

- Item placed on hold for a patron at the current library, not waiting
- Item placed on hold for a patron at the current library, already
  waiting
- Item placed on hold for a patron at another library, not waiting

I don't know how to trigger the case [% IF ( diffbranch ) %].

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Note: Maybe sample slip templates should also include street number?

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:56:06 -03:00
ac277edaaf Bug 12511 - Novelist Select not using https in bootstrap
In prog we have:
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

but in bootstrap we have
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="http://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

Because bootstrap isn't using https, we get an error like this:
[blocked] The page at
'https://koha.mylibrary.com/cgi-bin/koha/opac-detail.pl?biblionumber=105315&query_desc=kw%2Cwrdl%3A%20home'
was loaded over HTTPS, but ran insecure content from
'http://imageserver.ebscohost.com/novelistselect/ns2init.js': this
content should also be loaded over HTTPS.

Test plan would require having a subscription to Novelist Select.
I think this is trivial enough to go without.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Very small change, trusting Kyle and the sign-off here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:33:34 -03:00
Katrin Fischer
5dcb7435b7 Bug 12062: Follow up - adds missing )
With this patch, patches pass QA script and unit tests.
Tested printing different slips successfully.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:32:24 -03:00
Bernardo Gonzalez Kriegel
c53520d58d Bug 12062: Follow up to fix more untraslatable cases
This patch modifies staff printslip.tt to take into account
caller. Also fixes similar problem on opac printslip.tt

To test:
staff
1. Print hold transfer slip
2. Print transfer slip
3. Print member slip
opac
4. Print self checkout slip

5. Update translation files, check new strings are present

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:32:08 -03:00
Bernardo Gonzalez Kriegel
ebac54dfea Bug 12062: Untranslatable "Reserve not found"
This patch rewrites transfer slip code to make some
strings translatable.
Also simplifies some code and parameters.

To test:
1) Produce a transfer slip, no changes must be noted.

2) Update PO file, new strings
msgid "%s %s%s%sNo hold found%s %s %s "
msgid "%s%s%sNo hold found%s "
msgid "Koha &rsaquo; Circulation &rsaquo; Transfers"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:31:49 -03:00
Yohann Dufour
47de926463 Bug 12499: adding units tests for C4::Letters
The tests for the subroutines : GetMessageTransportType, EnqueueLetter, SendQueuedMessages, GetQueuedMessages, GetLetters, getletter, addalert, getalert, delalert and GetPreparedLetter of the module C4::Letters have been added.

Test plan:
1) Apply the patch
2) Execute the unit tests by launching :
prove t/db_dependent/Letters.t
3) The result has to be a success without error or warning :
t/db_dependent/Letters.t .. ok
All tests successful.
Files=1, Tests=45,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.44 cusr  0.08 csys =  1.57 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All test pass, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:18:42 -03:00
f187d9d9e7 Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm
Just that.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Could only verify by reading the code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:17:05 -03:00
5cfb693a82 Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl
The '~~' smartmatch operator is used to compare MARC::Field->subfield(code)
(i.e. a string) and the text element of each MARC::Field->subfields() which
is also plain text.

Substituting '~~' for 'eq' should be harmless then.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Tested batch modification of items, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:16:54 -03:00
82e8a7a155 Bug 12151: Remove uses of smartmatch operator in report scripts
This patch removes the use of smartmatch operators in report scripts.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Acquisition and Patron statistics wizard tested, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:16:45 -03:00
091a74de4c Bug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl
This patch removes the use of smartmatch operators in the search code.

Regards
To+

Edit: this revision uses 'grep' instead of Lists::MoreUtils::any

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested search, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:16:36 -03:00
Katrin Fischer
e0bba7040f Bug 12409: Follow up - Reflect from hash to array in comments
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:13:17 -03:00
Jonathan Druart
b140b8cc08 Bug 12409: Fix fields order on exporting to bibtex
The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted
which is wrong with perl 5.18

Note that the t/db_dependent/Record.t fails without this patch.

Test plan (for perl >= 5.18 only):
1/ prove t/db_dependent/Record.t should return green
2/ Try to export a record to bibtex and verify the order is correct
(should be author, title, year, published, etc.).

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

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Wrong Bug number on heading.
Work as described, test pass, no koha-qa errors.

The problem is to think that a hash returns
keys in a particular order, that's not true
and no matter which perl version.

Code as was left is... misleading.
Comments talks about a hash, which is no more.
On array asignment "a => b" is equivalent to "a, b",
but the former is usually used on hashes, so a
replacement of '=>' by ',' could clarify what are we storing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixing the comments in a follow-up patch.
Tests pass now without problems and records export ok.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-07 10:13:02 -03:00
16250f76d2 Revert "Bug 8567: Set output directory for fines.pl in cron config created by the packages"
This reverts commit 0162453a1c.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-04 15:08:23 -03:00
Bernardo Gonzalez Kriegel
f001cc32a3 Bug 11638: Remove HTML from addbiblio.pl
This patch extracts variables with HTML from addbiblio.pl
and an instance of CGI::scrolling_list

As it changes how MARC editor show input fields, I prefer
not add patches for other cases mentioned on Comment #1

To test:
1. Verify there are no regressions on MARC editor
Add/Edit records, modify values
2. Update translation file for a language,
check new string 'Tag editor'

About the error message on error when deleting biblio,
it must be localized but the script is not trying to
use a template file, only prints a basic html and aborts.
Perhaps a way of handling errors more gracefully is needed,
but again it need to be solved on it's own bug.

Updated test plan

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-03 15:01:10 -03:00
a3c9c4b11d Bug 12482: (QA followup) coding guidelines for hashrefs
As of the public coding guidelines, $$variable{key} usage is discouraged. $variable->{key} should be used instead.

Btw, honour the "FIXME - Bug 2505" line :-D

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-03 14:45:59 -03:00
a66eb6e86d Bug 12482 [QA Followup]
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-03 14:25:22 -03:00