koha.git
9 years agoBug 8938: Transport cost matrix script and template contain untranslatable strings
Bernardo Gonzalez Kriegel [Mon, 11 Aug 2014 00:10:12 +0000 (21:10 -0300)]
Bug 8938: Transport cost matrix script and template contain untranslatable strings

This patch fixes the problem reported.

To test:
1) Apply the patch
2) Update translations for your preffered language, xx-YY
3) Check new entries
egrep -Rn "Cost must be expressed as a decimal number|Invalid value for" misc/translator/xx-YY*
4) Check no regression on alert, go to
Administration > Transport cost matrix
Edit some value and put a negative value & save,
alert must show up
5) On errors, part of the error string is now on TT file,
no regressions expected here

Verified that changes appear in translated language (de-CH) as appropriate. No regressions found by testing en en de-CH.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested both, entering a numeric value < 0 and non-numeric values, no regressions found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12621: Z39.50-targets - Record type is untranslatable
Bernardo Gonzalez Kriegel [Sun, 10 Aug 2014 22:53:44 +0000 (19:53 -0300)]
Bug 12621: Z39.50-targets - Record type is untranslatable

This patch makes displayed record types translatable

To test:
1) Go to Administration > Z39.50 servers
2) On column Record type the value is 'biblio' or 'authority'
3) Apply the patch
4) Reload the page, now record type must show 'Bibliographic'
or 'Authority'
5) Update translation file for a language, verify new entries
Strings are already on translation file, only a reference
for new entry on the file.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12673: (followup) fix Supplemental issue too
Tomas Cohen Arazi [Wed, 13 Aug 2014 23:36:47 +0000 (20:36 -0300)]
Bug 12673: (followup) fix Supplemental issue too

The same fix needs to be used for the 'Supplemental issue' part.
To test, use the same test steps used for the previous followup,
but choose "Arrived" in the 'Supplemental issue' row.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12673: Followup - fix display in serials-edit
Bernardo Gonzalez Kriegel [Wed, 13 Aug 2014 16:40:11 +0000 (13:40 -0300)]
Bug 12673: Followup - fix display in serials-edit

This patch fix the display of items information
following changes on previous patch.

To test:
1. Go to serials
2. Add a subscription
3. Receive an issue
4. Change status to Arrived
Item information display correct labels,
but no pulldowns, that's the bug
5. Apply the patch
6. Reload page, change to Arrived again,
this time pulldowns must be right

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.

9 years agoBug 12659:Fixing mispelling of the word receive
Natalie Bennison [Fri, 25 Jul 2014 02:22:12 +0000 (14:22 +1200)]
Bug 12659:Fixing mispelling of the word receive

To test go to:
 acquisitions statistics>subscription history

Find mispelled word
 "recieve"

Change to correct spelling
 "receive"

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

As Katrin suggest:
- check the manual history box in one of your subscriptions
- go to the subscription detail page, on the planning tab is the
link to the manual history (bit hidden)

There is the typo, fixed now.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes typo correctly, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12749 - Better translatability for list module
Marc Véron [Wed, 30 Jul 2014 07:12:44 +0000 (09:12 +0200)]
Bug 12749 - Better translatability for list module

This patch changes wording of explanations in list module to make them better translatable.
Additionally, it removes explanation for "Open list" from help screen, because this choice is not available.

To test:
Go to Home > Lists > Public lists > Create new list
Verify that the text changed to "Private list:..." rsp. "Public list:..." in right part of screen and on help screen.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 766: Remove CGI::scrollinglist from marctagstructure.pl
Bernardo Gonzalez Kriegel [Sat, 19 Jul 2014 01:51:22 +0000 (22:51 -0300)]
Bug 766: Remove CGI::scrollinglist from marctagstructure.pl

This patch removes the only instance in this file.

Don't know if the feature is of some utility, seems
that does not work (no use of auth values as indicators
on MARC editor)

To test:
1. Apply the patch
2. Go to Administration > MARC frameworks
3. Clic on MARC structure of any fw
4. Clic Edit on any tag
5. On tag editor check the pulldown 'Authorised value', that was replaced
6. Check for regressions: select a value, save, verify the value, change
again, etc.

Note: removed a SELECT, using now C4::Koha::GetAuthorisedValueCategories
Do not we need an AuthorisedValues.pm? (on C4 or Koha)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 766: Remove CGI::scrollinglist from authorised_values.pl
Bernardo Gonzalez Kriegel [Sat, 19 Jul 2014 03:22:12 +0000 (00:22 -0300)]
Bug 766: Remove CGI::scrollinglist from authorised_values.pl

This patch removes the only instance in this file.
Also fixes array sorting, removes some tabs, removes
an unneeded $dbh handler (there is a global one).
Makes use of C4::Koha::GetAuthorisedValueCategories.

To test:
1. Apply the patch
2. Go to Administration > Authorised values
3. Replaced pulldown next to 'Show category' must
show all (present & system) categories correctly ordered.
4. Select some and check for regressions, e.g. CCODE, Bsort2, YES_NO
no changes must be observed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 766: Remove CGI::scrolling_list from aqplan.pl
Bernardo Gonzalez Kriegel [Tue, 15 Jul 2014 00:10:57 +0000 (21:10 -0300)]
Bug 766: Remove CGI::scrolling_list from aqplan.pl

This patch removes 3 occurences on aqplan.pl

To test:
1. You need a budget and a fund
2. Apply the patch
3. Go to Aquisitions, click on your fund
4. Select one of the options on pulldown Planning
e.g. "Plan by months"
5. Now to the left there are two boxes, Filter and Export

a) Filter: (1) pulldown below 'Select planning type'
check that works selecting other values and submit
This pulldown showed originally code types,
untranslatable BTW. Added a TT block to allow translation
and shows legends that match Planning pulldown, but not
the order.

b) Export: pulldowns for filetype (2) and delimiter (3)
Those have originally one value each, and for me Export
does not work, before or after patch, but check that
pulldown exist.

Notes:
A) 5.a) I can change de order of main Planning pulldown,
is harcoded. The values for Filter pulldown are sorted on
aqplan.pl. Is one or the other.
If desired, TT block can be moved to includes/budgets-admin-toolbar.inc
(where hardcoded Planning lives)

B) 5.b) Moved 'Export' legend inside it's box, like Filter.

C) Finally: there is something strange, before or after patch.
There is an empty option 'Planning by " if you select planning
using main pulldown, it disappears if you select planning using
Filter (not a mistery, using Planning fills $auth_cats_loop,
using Filter submit button does not)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Looks like this needs more work, but no regressions found that were
caused by the patch.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9013 - Cart in staff interface displays location pulled from Description (OPAC)
Owen Leonard [Wed, 16 Jul 2014 17:02:25 +0000 (13:02 -0400)]
Bug 9013 - Cart in staff interface displays location pulled from Description (OPAC)

When the cart in the staff client pulls description data for
items.location and items.ccode it pulls the value designated for the
OPAC--probably a cut-and-paste error when the feature was added to the
staff client.

This patch removes the 'opac' parameter from GetKohaAuthorisedValues.

To test you must have at least one LOC authorized value configured to
have different descriptions for staff and OPAC. Locate or edit an item
with that shelving location and add that record to the cart in the staff
client.

When you view the cart, the shelving location description in the "Items"
column should show the description for the staff client, not the OPAC.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12693 - colspan calculation done by members/statistics.pl should be moved to...
Owen Leonard [Fri, 1 Aug 2014 18:58:35 +0000 (14:58 -0400)]
Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template

It is not necessary for the patron statistics script to pass a colspan
value to the template. The number can be output using Template::Toolkit
syntax.

To test, view the statistics page for a patron. Confirm that the "Total"
cell in the footer spans the correct number of columns. Test with
various numbers of fields in the StatisticsFields system preference.

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7944 - attribute error could be clearer
Owen Leonard [Fri, 18 Jul 2014 18:18:12 +0000 (14:18 -0400)]
Bug 7944 - attribute error could be clearer

If you try to create a patron and enter an extended attribute value
which is required to be unique but exists in another record the error
you receive is not clear. It uses the attribute code instead of the
description. This patch adds description to the output.

To test you must have ExtendedPatronAttributes enabled.

- Edit or create an extended patron attribute and designate it a unique
  identifier.
- Edit a patron and add a value to that attribute.
- Edit another patron and try to add the same value.

You should get an error which includes both the description of the
attribute you tried to modify and the value you submitted.

Signed-off-by: Christopher Brannon <christopher@debian.brannon.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes tests and Qa script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12727 - Patron category filter in batch patron deletion tool is broken
Jacek Ablewicz [Thu, 7 Aug 2014 08:29:37 +0000 (10:29 +0200)]
Bug 12727 - Patron category filter in batch patron deletion tool is broken

After commit 6973e3b7d50777a147a29f2f3d213a6175c9eb74, patron category
filter in batch patron deletion tool (tools/cleanborrowers.pl) doesn't
work properly any longer. It's still possible to choose a patron
category as selection criterion, but this criterion is being
efectivelly ignored on futhers steps.

As a result, all patrons (with no check-outs and no outstanding
account balance) may get mistakenly deleted when using this tool,
despite their respective categories.

To test:

1/ apply patch
2/ follow the test plan[s] for Bug 11975

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12623: SQLHelper replacement - Borrower::Modifications
Yohann Dufour [Fri, 8 Aug 2014 13:50:12 +0000 (15:50 +0200)]
Bug 12623: SQLHelper replacement - Borrower::Modifications

With this patch, the subroutines AddModification and ApproveModifications uses DBIx::Class instead of C4::SQLHelper.
Moreover, the tests has been wrapped in a transaction.

Test plan:
1) Apply the patch

2) Execute the unit tests by launching :
prove t/db_dependent/Koha_borrower_modifications.t

3) The result has to be a success without error or warning :
t/db_dependent/Koha_borrower_modifications.t .. ok
All tests successful.
Files=1, Tests=14,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.60 cusr  0.08 csys =  1.72 CPU)
Result: PASS

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12700 - Capitalization: "Close Help Window" in context help
Marc Véron [Mon, 21 Jul 2014 09:03:12 +0000 (11:03 +0200)]
Bug 12700 - Capitalization: "Close Help Window" in context help

To test:
- Open help in any page of staff client
- In help popup window, see wrong capitalization in button 'Close Help Window'
- Close the popup window
- Apply patch
- Check again: Button now reads "Close help window'

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10542: QueryParser + OpacSuppression doesn't allow search in 'all libraries'
David Cook [Mon, 21 Jul 2014 23:26:03 +0000 (09:26 +1000)]
Bug 10542: QueryParser + OpacSuppression doesn't allow search in 'all libraries'

Since we're using the $query_type variable to detect if this pre-built
query is PQF, we need to use PQF syntax (rather than QueryParser
syntax) when adding to the query. I've made a lot of notes of somewhat
incoherent notes on Bugzilla talking about PQF, CCL, and QP syntaxes,
but I'm hoping to refine these notes on a wiki page for future
reference.

_TEST PLAN_

1) Set 'Suppress in Opac' (ie 942$n) to 1 for one record
2) Re-index Zebra
3) Set 'OpacSuppression' to 'Hide'
4) Set 'UseQueryParser' to 'Do not try'
5) In the staff client, do a search that will return that suppressed
record as well as a few records that are NOT suppressed
6) Note that you can return that suppressed record in the staff client
7) Do the same search in the OPAC
8) Note that the suppressed record doesn't appear
9) Set 'UseQueryParser' to 'Try' && re-run the OPAC search
10) Note that no results appear (the logs will probably mention a
ZOOM error)

11) Apply patch

12) Re-run the OPAC search
13) Note that the suppressed record doesn't appear, and that the
not suppressed records are showing (it's important that you are
getting some results...as ZOOM errors are silent in the UI).
14) Set 'UseQueryParser' to 'Do not try'
15) Re-run the search
16) Note that the suppressed record doesn't appear, and that the
not suppressed records are showing

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - hidden records are hidden.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10542: Fix QueryParser with OpacSupression
Martin Renvoize [Wed, 12 Mar 2014 17:43:20 +0000 (17:43 +0000)]
Bug 10542: Fix QueryParser with OpacSupression

OpacSupressions manipulates the query string after the buildQuery
call and so breaks with queryParser enabled.  This patch adds
checks for queryParser and manipulates the query before passing it
to buildQuery if it is enabled, but leaves the post buildQuery
manipultation when queryParser is disabled

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Adding a sing after test

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12647: PQF QueryParser driver and unit tests fixes
Tomas Cohen Arazi [Fri, 8 Aug 2014 17:48:59 +0000 (14:48 -0300)]
Bug 12647: PQF QueryParser driver and unit tests fixes

Due to Perl 5.18, QueryParser the default search class is no longer
'keyword' (see bug 12738), and needs to be set manually. This patch
adds a line that does that. The problem that gets fixed is with test
'super simple keyword query'.

The rest of the non-deterministically failing tests are due to the same
problem, keys returning differently sorted keys from hashes.

So this patch sorts keys in the step that concatenates attributes when building
the PQF queries (and tests get adjusted to match the now deterministic result).

I did that (sorting there) under Jared's recommendation. Hopefuly he will step
in and comment/fix any mistake I made. My main concern was a possible loss
in performance. That we agreed it is almost void, because of the tiny size
of the hash.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests are passing now again :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12738: C4::Context should set 'keyword' as the default search class
Tomas Cohen Arazi [Fri, 8 Aug 2014 15:01:36 +0000 (12:01 -0300)]
Bug 12738: C4::Context should set 'keyword' as the default search class

On a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS):

To reproduce:
- Have UseQueryParser == "Don't try"
- Perform a search typing just a word that would have many matches on your Zebra db.
- Take note of the search results count.
- Make sure you have the queryparser.yaml file in your config dir.
- Set UseQueryParser == "Try"
- Perform the same search a couple of times
=> FAIL: Notice that the search results count differs from one run to the other.
- Run the regression tests
  $ prove -v t/db_dependent/QueryParser.t
=> FAIL: tests fail

To test:
- Apply the patch
- Run tests
  $ prove -v t/db_dependent/QueryParser.t
=> SUCCESS: tests pass
- Repeat the steps 'To reproduce'
=> SUCCESS: Search results count is deterministic :-D
- Sign off :-D

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Now search with QueryParser always returns the correct number of
results on a system with the newer Perl version.
Passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12738: (regression tests) C4::Context should set keyword search as default for...
Tomas Cohen Arazi [Fri, 8 Aug 2014 14:59:43 +0000 (11:59 -0300)]
Bug 12738: (regression tests) C4::Context should set keyword search as default for QueryParser

This patch introduces tests for the QueryParser PQF driver usage in Koha. Specifically its
initialization on C4::Context, and initial setup.

It also introduces a .pl script that is used to load C4::Context with different hash randomization
seeds on purpose, to verify the initialization result is deterministic and consistent between
runs.

To test:
  $ prove -v t/db_dependent/QueryParser.t

It should fail because different default_search_class is set on each run, and it is not often the
one we expect.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5672: Gives RSS icons to catalog search history placed to the left of saved searches
Viktor Sarge [Thu, 19 Jun 2014 09:13:14 +0000 (10:13 +0100)]
Bug 5672: Gives RSS icons to catalog search history placed to the left of saved searches

Test plan:
* Verify that there is no RSS icons for saved searches in opac
* Install the patch
* Verify that there is no RSS icons for saved searches and searches for the current session in Opac.
* Test that the RSS links produce the expected result.

Note: I left out authority searches since I have very little experience with authority searches and didn't feel I could test it properly.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5672: Gives RSS icons to catalog search history
Viktor Sarge [Tue, 17 Jun 2014 08:15:40 +0000 (09:15 +0100)]
Bug 5672: Gives RSS icons to catalog search history

This patch adds an extra column to the table for the search history (this session and previous searches) with RSS icons for each search.

Test plan:
* Verify that there is no RSS icons for saved searches in opac
* Install the patch
* Verify that there is no RSS icons for saved searches and searches for the current session in Opac.
* Test that the RSS links produce the expected result.

Note: I left out authority searches since I have very little experience with authority searches and didn't feel I could test it properly.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
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>
9 years agoBug 12600: remove duplicate use statement from code
Colin Campbell [Fri, 18 Jul 2014 08:50:34 +0000 (09:50 +0100)]
Bug 12600: remove duplicate use statement from code

A use C4::Charset was added deep in the body of the code
we have already imported it at the top of the file
(the by convention normal place) As use is executed at compile time
specifying it in the code body does not serve a
useful purpose and detracts from the readability of an already
overly complex subroutine.
Remove the superfluous statement
also removed the tabs introduced to the surrounding lines
by the same commit

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Search still works, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5502 - Patron card category search field should be menu
Owen Leonard [Fri, 11 Jul 2014 15:16:38 +0000 (11:16 -0400)]
Bug 5502 - Patron card category search field should be menu

When searching for patrons to add to a patron card creator batch there
is a text input field for submitting a patron category. This should be a
dropdown menu. This patch corrects it.

To test, go to Tools -> Patron card creator and click "New batch."
 - Click the "Add item(s)" button.
 - Confirm that in the Patron search pop-up window there is a dropdown
   menu populated with existing patron categories.
 - Confirm that searches limited by patron category return correct
   results.
 - Confirm that the correct patron category is automatically preselected
   after performing a search limited by category.
 - Confirm that reordering the table of search results works correctly.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8148: add squeeze's Test::MockObject dependency
Tomas Cohen Arazi [Sun, 3 Aug 2014 23:49:59 +0000 (20:49 -0300)]
Bug 8148: add squeeze's Test::MockObject dependency

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
9 years agoBug 8148: (regression tests) C4::Auth_with_ldap needs unit tests
Tomas Cohen Arazi [Mon, 28 Jul 2014 12:31:52 +0000 (09:31 -0300)]
Bug 8148: (regression tests) C4::Auth_with_ldap needs unit tests

This followup provides some unit tests for C4::Auth_with_ldap. It implements
regression tests for this bug's changes too.

The aim was to cover all use cases for checkpw_ldap from the first line up to
those touched by this bug's patches. It should serve as a start for having
unit tests for the LDAP thing.

Having said that: no excuses for not providing regression tests for LDAP from now on :-/

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8148 - LDAP auth_by_bind doesn't fallback to local auth
Dobrica Pavlinusic [Wed, 12 Mar 2014 09:45:09 +0000 (10:45 +0100)]
Bug 8148 - LDAP auth_by_bind doesn't fallback to local auth

This patch covers LDAP auth_by_bind configuration so that wrong
LDAP password will return -1 to C4::Auth so we can abort local auth
and prevent users logging in with stale database passwords.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8148: Only update the password if the LDAP password field was mapped
Frédérick [Wed, 19 Feb 2014 15:59:59 +0000 (10:59 -0500)]
Bug 8148: Only update the password if the LDAP password field was mapped

http://bugs.koha-community.org/show_bug.cgi?id=8148
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8148: Prevent local authentification fallback if an invalid LDAP password was...
Frédérick [Wed, 19 Feb 2014 16:55:35 +0000 (11:55 -0500)]
Bug 8148: Prevent local authentification fallback if an invalid LDAP password was entered.

http://bugs.koha-community.org/show_bug.cgi?id=8148
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12523 - Add patron email in Holds awaiting pickup circulation rapport
simith [Thu, 3 Jul 2014 12:32:32 +0000 (08:32 -0400)]
Bug 12523 - Add patron email in Holds awaiting pickup circulation rapport

Modified:

circ/waitingreservers.pl    - added GetFirstValidEmailAddress

Testing:

I Apply the patch

0) Put an item in hold for pickup;
1) In Circulation -> Holds awaiting pickup, validate email (column Patron);

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and will use the first valid email address.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11673: columns.def has swapped last and first name of alt contact
Tomas Cohen Arazi [Tue, 5 Aug 2014 02:13:00 +0000 (23:13 -0300)]
Bug 11673: columns.def has swapped last and first name of alt contact

To test:
- Create a new guided circulation report
- On the field list scroll to "Alternate contact: Last name"
=> FAIL:
   "Alternate contact: Last name" relates to borrowers.altcontactfirstname
   "Alternate contact: First name" relates to borrowers.altcontactsurname
- Apply the patch, restart the creation of the report
=> SUCCESS:
   "Alternate contact: First name" relates to borrowers.altcontactfirstname
   "Alternate contact: Surname" relates to borrowers.altcontactsurname
- Sign off :-D

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Patch behaves as expected
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 4045: DBRev 3.17.00.013
Tomas Cohen Arazi [Thu, 7 Aug 2014 14:58:15 +0000 (11:58 -0300)]
Bug 4045: DBRev 3.17.00.013

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 4045 - No check for maximum number of allowed holds.
Kyle M Hall [Tue, 27 May 2014 13:25:02 +0000 (09:25 -0400)]
Bug 4045 - No check for maximum number of allowed holds.

Re-add the system preference maxreserves.

All the code using maxreserves is still in place. Though it
is not used in the Reserves module, it is used in all the
scripts where holds are placed.

Also adds a check so that a borrower cannot exceed the maximum
number of allowed holds by using the multi-hold feature via
the opac.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Set maxreserves to 3, set opactheme to bootstrap
4) Log into the opac as a patron
5) Place 3 holds
6) Attempt to place a 4th hold
7) Note you get an error message and cannot place a forth hold
8) Delete two of those holds
9) Attempt to place 3 or more holds as a multi-hold
10) You should see a warning that you cannot place this many holds
11) Try to anyway
12) You should see an alert to tell you to reduce the number of holds
    you are placing.
13) Reduce the number for holds you are placing to 2
14) Your holds should now be placed

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12699 - Capitalization: All Libraries in pull down on news tool page
Marc Véron [Mon, 21 Jul 2014 10:25:21 +0000 (12:25 +0200)]
Bug 12699 - Capitalization: All Libraries in pull down on news tool page

To test, got to tools > news
- In pulldown and in table, "All Libraries" should now read "All libraries"
- Create additonal news for "All libraries". Pull down in form should read "All libraries" as well
- Make sure that news for "All libraries" diesplay correctly where they should (in OPAC and Staff client)

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12635 - Course reserves item list should use "Checked out" instead of "On Loan"
Owen Leonard [Tue, 29 Jul 2014 19:08:33 +0000 (15:08 -0400)]
Bug 12635 - Course reserves item list should use "Checked out" instead of "On Loan"

When viewing the list of items on a course reserve list, if the item is
checked out it is indicated by the phrase "On Loan." The default
templates should always use "checked out" instead of "on loan." Also
corrected: the capitalization of "Item Lost."

To test, Course Reserves must be enabled and you must have an existing
course reserves with items on it, one of which should be checked out.
View the list of items on that Course Reserve and confirm that the table
says "Checked out."

Table in staff client displays "Checked out" / "Item lost"
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12686: Make more selected option XHTML compliant
Bernardo Gonzalez Kriegel [Thu, 31 Jul 2014 18:36:55 +0000 (15:36 -0300)]
Bug 12686: Make more selected option XHTML compliant

This patch fixes several occurrences of selected
options that do not follow XHTML style rule for
markup.

To test:
1. Apply the patch
2. There are no functional changes at all,
only a more strict markup

Changed all cases I can found.

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>
9 years agoBumping database version
Chris Cormack [Thu, 7 Aug 2014 02:58:09 +0000 (14:58 +1200)]
Bumping database version

9 years agoBug 12512 - PROG/CCSR deprecation: Remove OpacShowFiltersPulldownMobile system preference
Owen Leonard [Tue, 1 Jul 2014 16:27:45 +0000 (12:27 -0400)]
Bug 12512 - PROG/CCSR deprecation: Remove OpacShowFiltersPulldownMobile system preference

CCSR having been deprecated there is no longer a use for the
OpacShowFiltersPulldownMobile system preference. This patch removes
it.

To test, apply the patch and run updatedatabase. Check that the
preference can no longer be found in system preferences.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 10220 IDs on checkin columns
Evonne Cheung [Fri, 21 Nov 2014 01:10:08 +0000 (14:10 +1300)]
Bug 10220 IDs on checkin columns

Test: go to Circulation > Check in, table has ID and each column has a
class.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a class to every th and td element in the check-in table.
Works as describe, no regressions found.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Replace some tab with spaces.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12597 - Give better visual indication of currently-selected language in the staff...
Owen Leonard [Mon, 28 Jul 2014 16:11:33 +0000 (12:11 -0400)]
Bug 12597 - Give better visual indication of currently-selected language in the staff client

There is currently no visual feedback to the user reflecting which of
multiple installed translations is currently selected. I think some
necessary styling didn't make it into the conversion to Bootstrap menus.
This patch attempts to improve things.

Most of the changes are to bring back the previous style of highlighting
the currently selected language. A new change is the addition of the
sub-language code to the display of the menu label if one of that menu
item's sub-languages is selected.

This patch also removes some obsolete CSS which referred to the old menu
system.

To test, apply the patch and install or update multiple languages,
including at least two sub-languages. In my test I used en, en-GB and
de-DE. Clear your browser cache if necessary. Enable all these languages
and test the functionality of the language selection menu in the footer.

- Non-enabled languages should appear as non-bold links.
- When a single language (with no sub-languages) is enabled it should
  appear as bold text.
- When one of multiple sub-languages is enabled that selection in the
  pop-up menu should appear as bold text. The menu label should show in
  bold the language code of the selected sub-language.

Tested with de-DE and de-CH, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests. No problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8521 - Error in warning message when deleting list
Owen Leonard [Tue, 15 Jul 2014 19:35:54 +0000 (15:35 -0400)]
Bug 8521 - Error in warning message when deleting list

When deleting a list the operation is blocked if there are items still
on the list, and the interface shows a warning which includes a count of
the items on the list. This count is broken for lists containing more
items than the number specified in the numSearchResults system
preference.

This patch corrects the item count to use an actual count of the total
number of results, not the total number of results in the first page of
results.

The template change to the staff client copies some language logic from
the OPAC template for dealing with a single number of list entries.

Test in both the OPAC and the staff client.

Check the number specified in the numSearchResults system preference and
locate or create a list containing more than that number of items. Try
to delete the list. You should receive a warning message stating the
correct total number of items on the list.

Test also with a list which contains fewer than numSearchResults
entries, and a list which contains zero entries.

Signed-off-by: Ian Beardslee <ian@catalyst.net.nz>
Tested Public and Private lists with 0, 5 & 25 entries, Public with 40 and Private with 45.  Working as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12619 - Shipment date gets lost on finishing and/or editing the invoice
Jacek Ablewicz [Tue, 22 Jul 2014 15:57:01 +0000 (17:57 +0200)]
Bug 12619 - Shipment date gets lost on finishing and/or editing the invoice

To reproduce:
- Create a new shipment, make sure to add a shipment date
- Receive or not receive orders
- Finish receiving with the button at the bottom of the page
- Verify that shipment date is now empty

To test:
- reproduce the aforementioned issue
- apply patch
- confirm that the issue is no longer rerpoductible (= shipment date is
not getting lost any longer), and that there are no apparent regresssions
of any kind involving invoice shipment date entering and/or editing
- sign off

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, fixes the issues, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: (QA followup) last occurence of 'Other phone' renamed to 'Mobile phone'
Tomas Cohen Arazi [Tue, 5 Aug 2014 23:39:03 +0000 (20:39 -0300)]
Bug 12407: (QA followup) last occurence of 'Other phone' renamed to 'Mobile phone'

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: [QA Follow-up] Rename Other Phone to Mobile in staff
Marcel de Rooy [Thu, 31 Jul 2014 12:22:37 +0000 (14:22 +0200)]
Bug 12407: [QA Follow-up] Rename Other Phone to Mobile in staff

Touches three member templates.
Changes label Other into Mobile.
This is consistent with database field name and OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12407: phone label or data switched
Brendon Ford [Fri, 13 Jun 2014 00:28:28 +0000 (20:28 -0400)]
Bug 12407: phone label or data switched

Fix for switched phone numbers on patron details page.

This patch fixes switched phone numbers on patron details page and also makes phone number labels more uniform.

To Test:

1. Apply the patch.
2. Create/modify a patron entering some unique data into the "Secondary phone:" and "Other phone:" fields (different data for each).
3. Save the patron record.
4. Go to the patrons details page and make sure the data entered into the "Secondary phone:" field is displaying next to the "Secondary phone:" label and that the data entered into the "Other phone:" field is displaying next to the "Other phone:" label.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11331 - CSV export for viewlog.pl is missing newlines - followup
Fridolin Somers [Tue, 29 Jul 2014 06:57:54 +0000 (08:57 +0200)]
Bug 11331 - CSV export for viewlog.pl is missing newlines - followup

Perl formatting and cleaning.
Also corrects the HTML of results table in viewlog.tt.

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>
9 years agoBug 11331 - CSV export for viewlog.pl is missing newlines
Fridolin Somers [Fri, 25 Jul 2014 15:01:42 +0000 (17:01 +0200)]
Bug 11331 - CSV export for viewlog.pl is missing newlines

When you try to export the result of tools/viewlog.pl in csv, file
cannot be correctly loaded :
  - newline is missing after each record,
  - strings should be enclosed in ""
  - columns are not the same as for screen output

This patch corrects this by using like other export Text::CSV.
Adds a header line made with the keys of first data. For that, all data
values are initialiszed with empty string.

Test plan :
- Use a database with some logs, see sysprefs
  /cgi-bin/koha/admin/preferences.pl?tab=logs
- Go to export page /cgi-bin/koha/tools/viewlog.pl
- Select a module
- Click on "To a file" and choose a file name
- Click on "Submit"
- Open file
   => Without this patch : newline is missing, multi-lines cells are not
      enclosed in "", there are no column headings
   => Without this patch : each line is a data line, complexe cells are
      enclosed in "", there are column headings
- Test the export of all modules to see that all headings are necessary
- Check the output to screen in the browser

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
The CSV export is significantly improved. I question the usefulness of
including biblioitemnumber in the output. A better inclusion would be
itemnumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
While this feature is still not perfect, this is a big improvement.
Passes tests and QA script, restores basic functionality.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12660:Correct mispelling of accomodate in comments
Brian Norris [Fri, 25 Jul 2014 02:55:04 +0000 (14:55 +1200)]
Bug 12660:Correct mispelling of accomodate in comments

View the file in your git checkout to see the misspelling of accomodate
do the patch
view the files again to see the correct spelling accommodate

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes typos to correct spelling.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10648 - In records merge greatest field can not be added
Fridolyn SOMERS [Fri, 26 Jul 2013 15:02:01 +0000 (17:02 +0200)]
Bug 10648 - In records merge greatest field can not be added

When merging 2 records (/cgi-bin/koha/cataloguing/merge.pl), the destination record is build using the fields and subfields checked in source records.
When a field is checked, the javascript code searches in destination record a field with a greater tag number to insert new field before.
When the new field tag number is greater than all existing field tag numbers, the field is not added.

This patch corrects this by adding at end if no greater field tag number exists. Also adds a sort of fields by tag number because all mergo code is based on this.

Test plan :
- Add to a framework a repeatable field with the greater non existing tag number. For example 998.
- Edit 2 records with this framework and add them a value in this tag.
- Put those records is a list
- Go to this list and check the two records
- Click on "Merge selected"
- Click on next
- Go to second source record
- Click on the greatest tag number. for example 998.
=> The field is added at the end of destination record

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described, no regressions.

9 years agoBug 4013 [Revised] road type missing on search results
Owen Leonard [Wed, 16 Jul 2014 19:32:08 +0000 (15:32 -0400)]
Bug 4013 [Revised] road type missing on search results

On the patron search results page there are several patron fields which
do not show: street number, road type, and state. This patch adds them.

To test, go to Patrons -> Search patrons and perform a search. In the
table of patron search results each patron record should display the
correct information including street number, road type, and state.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

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

9 years agoBug 12690 - opacuserjs gets loaded twice in self checkout
David Cook [Fri, 1 Aug 2014 06:42:34 +0000 (16:42 +1000)]
Bug 12690 - opacuserjs gets loaded twice in self checkout

This patch removes a second instance of "opacuserjs" in the opac
self-checkout.

_TEST PLAN_

1) Enable OPAC Self-checkout in the system preferences
2) Type the following code into your "opacuserjs" system preference:

alert("This is a test");

2) Visit /cgi-bin/koha/sco/sco-main.pl
3) Note that you get a pop-up saying "This is a test" twice.

4) Apply the patch

5) Refresh /cgi-bin/koha/sco/sco-main.pl
6) Note that you now only get a pop-up saying "This is a test" once.

Followed test plan, patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
opac-bottom.inc already adds opacuserjs, so the additional line
in this template can be removed.
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12673: Remove CGI::scrolling_list from C4::Items.pm
Bernardo Gonzalez Kriegel [Tue, 29 Jul 2014 18:00:56 +0000 (15:00 -0300)]
Bug 12673: Remove CGI::scrolling_list from C4::Items.pm

This patch removes only instance in this file

To test:
1. Apply the patch
2. (Esay way) Put on staff URL
/cgi-bin/koha/services/itemrecorddisplay.pl?biblionumber=N&itemnumber=M
3. Code replaced corresponds to pulldowns, verify information
is correct (check with another item edit view)

PrepareItemrecordDisplay() in Items.pm is filled with chunks of
HTML code that must be put on TT file. For now scrolling_list
is the only removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested different item edit displays and the URL given above,
no regressions found. Also passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12675: Add unit test to GetFrameworksLoop
Bernardo Gonzalez Kriegel [Wed, 30 Jul 2014 14:31:39 +0000 (11:31 -0300)]
Bug 12675: Add unit test to GetFrameworksLoop

to test:
1. Apply the patch
2. Run the test, prove t/db_dependent/Koha.t
3. Check that it pass

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>
9 years agoBug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl
Bernardo Gonzalez Kriegel [Tue, 29 Jul 2014 18:49:44 +0000 (15:49 -0300)]
Bug 12675: Remove CGI::scrolling_list from labeledMARCdetail.pl

This patch removes only instance in this file.

Also updates getframework POD on C4/Koha.pm,
adds new GetFrameworksLoop() func on same file from
suggested code, but with ordered result.

To test:
1. Apply the patch
2. Enable viewLabeledMARC syspref
3. On staff, search for a record, goto detail view
4. Clic on Labeled MARC
5. Framework pulldown was replaced, check changing
framework.

A bug was fixed, because selecting any fw and then Default
tries to load values from 'Default' fw code, which does not
exists.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12677: Use Bootstrap "label" style for inline OPAC renewal messages
Owen Leonard [Mon, 28 Jul 2014 15:35:47 +0000 (11:35 -0400)]
Bug 12677: Use Bootstrap "label" style for inline OPAC renewal messages

This patch revises the styling of the renewal success message to use a
default Bootstrap style more suited to inline messages. I think this is
preferable to using the alert style because the alert is designed to be
a block-level element.

http://getbootstrap.com/2.3.2/components.html#labels-badges

Because Koha's CSS already uses a "label" class for something else I
duplicate the Bootstrap "label" class in opac.css as "blabel." The
Bootstrap color definitions are included.

To test, follow the test plan already provided:

1) Apply this patch
2) From the OPAC, renew some items
3) Note the "Renewed!" message in the "Renew" column of the checkouts
   table

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12668 - Stray dollar ($) -sign in opac-reserve.pl
Olli-Antti Kivilahti [Tue, 29 Jul 2014 09:04:52 +0000 (12:04 +0300)]
Bug 12668 - Stray dollar ($) -sign in opac-reserve.pl

A dollar sign is hard-coded in opac-reserve.pl and becomes apparent when trying to place a reservation
 when one has "too_much_oweing" or too much fines.

Removing the dollar sign so we just get

<"Käyttömaksujen katto ylitetty. Et voi tehdä varauksia. Sinulla on maksamattomia maksuja 9.50.">

instead of

<"Käyttömaksujen katto ylitetty. Et voi tehdä varauksia. Sinulla on maksamattomia maksuja $9.50.">

Patch removes hard coded $ sign.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The dollar sign is gone and the message still displays correctly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: (tests followup) need to mock GetCurrency
Tomas Cohen Arazi [Sun, 3 Aug 2014 19:41:18 +0000 (16:41 -0300)]
Bug 12554: (tests followup) need to mock GetCurrency

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12685: Add help file for staff search history
Nicole C. Engard [Thu, 31 Jul 2014 16:40:22 +0000 (11:40 -0500)]
Bug 12685: Add help file for staff search history

This patch adds a missing help file for the staff search history page.

To test:
* Turn on EnableSearchHistory
* Do a search in the catalog
* Click your username in the top right and choose 'search history'
* Click 'help' in the top right
* Confirm that help file is there
   * note: link to manual won't work until after 2014-08-01 in the USA

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: Fix GetMarcPrice for NORMARC
Petter Goksoyr Asen [Fri, 11 Jul 2014 08:54:11 +0000 (10:54 +0200)]
Bug 12554: Fix GetMarcPrice for NORMARC

When doing aquisitions and ordering from external z3950 targes, the item price is not inferred from the MARC record when the NORMARC framework is set.

This patch makes GetMarcPrice treat NORMARC the same as MARC21.

Test plan

* Setup Koha with NORMARC framework
* Add a norwegian z3950 search target (ex: z3950.bibsys.no:2100, database=BIBSYS)
* Create a new basket, and add order to basket from external source
* Search for a tile (ex: ISBN 8205341834) from the bibsys z3950 server
* Click to order the title
* Observe that vendor price is not set
* Apply patch, repeat search for same book
* Order, and observe the vendor price is filled in from the MARC record

http://bugs.koha-community.org/show_bug.cgi?id=12554
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No errors.

Tested changing marcflavour syspref to NORMARC,
and following test plan, bug exist and is fixed.

Changed bug description on patch, too long :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch adds a check for NORMARC to provide the same functionality
as for MARC21. No regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC
Tomas Cohen Arazi [Tue, 29 Jul 2014 18:53:10 +0000 (15:53 -0300)]
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12672: GetMarcISBN should return the corresponding subfield
Tomas Cohen Arazi [Tue, 29 Jul 2014 16:55:44 +0000 (13:55 -0300)]
Bug 12672: GetMarcISBN should return the corresponding subfield

The current GetMarcISBN implementation returns an array of ISBN
in which all subfields of a ISBN field occurence are appended.

For example, in MARC21, if you have $a and $c defined, they will
be appended for output. This happens for $z.

To reproduce:
- Run the regression tests attached to this bug.

To test:
- Apply the patch, regression tests pass.
- Sign off

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12672: (regression test) GetMarcISBN should return the corresponding subfield
Tomas Cohen Arazi [Tue, 29 Jul 2014 16:36:03 +0000 (13:36 -0300)]
Bug 12672: (regression test) GetMarcISBN should return the corresponding subfield

Run:
 $ prove -v t/db_dependent/Biblio.t
=> FAIL: GetMarcISBN doesn't return the expected value for ISBN
         in MARC21, NORMARC and UNIMARC

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12687 - Remove CGI::scrolling_list from circulation.pl
Bernardo Gonzalez Kriegel [Thu, 31 Jul 2014 19:47:30 +0000 (16:47 -0300)]
Bug 12687 - Remove CGI::scrolling_list from circulation.pl

This patch removes the only instance in this file

To test:
1. Apply the patch
2. Search for patrons on staff CheckOut,
use a string that gives multiple results
3. Results are displayed on a select,
that was replaced.

4. Check for regressions: select a patron and press 'Select',
or do double click on a patron name, verify you go
to patron's checkout tab.

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>
9 years agoBug 12398: Fix CAS authentication validation
Julian Maurice [Tue, 10 Jun 2014 10:47:37 +0000 (12:47 +0200)]
Bug 12398: Fix CAS authentication validation

CGI::url_param() also returns deleted parameters so we have to check
with CGI::param() too.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Took a while to get it working, but I can confirm CAS login is not
working without this patch, but does with it.

Some notes:
In order for this to work you have to add http:// in front of your
OpacBaseURL.
You will also need a CAS test server and install the certificate
on your system.

Tested with CAS test server provided by Biblibre.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12398: (followup) tidy unit tests
Tomas Cohen Arazi [Fri, 1 Aug 2014 12:41:35 +0000 (09:41 -0300)]
Bug 12398: (followup) tidy unit tests

This followup removes unnecesary warnings generated by the test,
and also prints a proper message for the tests.

Added a can_ok test for all the exported functions btw.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12398: Add test for C4::Auth_with_cas::_url_with_get_params
Julian Maurice [Wed, 30 Jul 2014 12:02:11 +0000 (14:02 +0200)]
Bug 12398: Add test for C4::Auth_with_cas::_url_with_get_params

Run `prove t/db_dependent/Auth_with_cas.t` to run the test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12174 follow-up of the patch (a missing print statement)
Zeno Tajoli [Sat, 3 May 2014 09:53:33 +0000 (11:53 +0200)]
Bug 12174 follow-up of the patch (a missing print statement)

http://bugs.koha-community.org/show_bug.cgi?id=12174
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12174 - Zotero connection with Koha: problem with UTF-8
Zeno Tajoli [Sat, 3 May 2014 09:09:25 +0000 (11:09 +0200)]
Bug 12174 - Zotero connection with Koha: problem with UTF-8

This patch solves the bug for UTF-8 output. MARC-8 works only if you save it as a file. In fact the standard Internet stack (browser, web server, etc.) doesn't know anything about MARC-8 or it's ISO base (ISO 2022).

To test the bug:
-- without the patch use Zotero on a recent Koha install with Apache.
You can use PTFS sandboxes. You can't use Biblibre sandboxes, they use Ngix.
-- Test a record with special chars.
-- Install the patch
-- Catch (using Zotero) the same record.
-- Test all directly download from Opac.
-- To check MARC-8, use a tool that support it. For example MarcEdit.

http://bugs.koha-community.org/show_bug.cgi?id=12174
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
Tested with zotero add-on for firefox.
Before patch bad diacritics, after patch ok

Record exported as MARC-8, transformed using
yaz-iconv -f marc8 -t utf-8 bib.marc8 > bib.utf8
yaz-marcdump -i marc -o line bib.utf8, checking accents,
also comparing with direct utf-8 export

No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with Zotero in Firefox and with yaz-iconv as suggested by
Bernardo, no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12568 [QA Followup] - Use ':' as separator instead of '|'
Kyle M Hall [Fri, 25 Jul 2014 11:53:40 +0000 (07:53 -0400)]
Bug 12568 [QA Followup] - Use ':' as separator instead of '|'

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12568 - Improve visibility of successful renewal via opac
Kyle M Hall [Mon, 14 Jul 2014 12:34:40 +0000 (08:34 -0400)]
Bug 12568 - Improve visibility of successful renewal via opac

Currently, when a patron renews an item via the opac, the only feedback
the patron receives when a renewal is successful is an updated value for
the due date of the item. This subtle indication of success may go
unnoticed by some patrons. We should add a more prominent way to
indicate an item was renewed successfully.

Test Plan:
1) Apply this patch
2) From the OPAC, renew some items
3) Note the "Renewed!" message in the "Renew" column of the checkouts table

Signed-off-by: Cathi Wiggins <cwiggins@ci.arcadia.ca.us>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Makes successful renewals more visible to the user in the OPAC.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12662: (follow-up) Ajax-based check in does not work for some system preference...
Jonathan Druart [Fri, 25 Jul 2014 10:43:08 +0000 (12:43 +0200)]
Bug 12662: (follow-up) Ajax-based check in does not work for some system preference settings enabled

ModItem is needed too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12662: Ajax-based check in does not work for some system preference settings...
Jacek Ablewicz [Fri, 25 Jul 2014 08:56:52 +0000 (10:56 +0200)]
Bug 12662: Ajax-based check in does not work for some system preference settings enabled

To reproduce:

- enable "InProcessingToShelvingCart" or "ReturnToShelvingCart"
system preference,
- for a sample patron with 1+ checkouts, try to check in some item[s]
using checkboxes in the "Check in" column in the checkouts table
which is displayed in the "Check out" or "Details" patron account tabs,
- observe that clicking "Renew or return checked items" button only
results in ajax "spinning wheel" stuck in infinite loop; check-in
operation is not performed.

To test:

- follow the steps above to reproduce this bug
- apply patch
- redo the test; ensure that this issue is no longer reproductible.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7462 - duplicate patron shows flags
Owen Leonard [Wed, 16 Jul 2014 13:13:34 +0000 (09:13 -0400)]
Bug 7462 - duplicate patron shows flags

When duplicating a patron the form fields for setting patron account
flags and restrictions should be hidden as it is when adding a patron.
This patch adds the correct logic to the template.

To test, duplicate an existing patron:

- Confirm that the "Patron account flags" and "Patron restrictions"
  sections are not visible.
- Confirm that saving a duplicated patron works correctly.
- Confirm that the edit and new patron entry forms are unaffected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, all three points confirmed
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, small template change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10155: Patron search should remember search type options selected
Jonathan Druart [Tue, 15 Jul 2014 08:28:14 +0000 (10:28 +0200)]
Bug 10155: Patron search should remember search type options selected

The search type reset to the default.

Test plan:
1/ go on the patrons home page
2/ Launch a search in the header and select the second value for "search
type" ("contains").
3/ Verify the search type is set to "contains" on the results page.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7237 - duplicating patron not using patron's branch
Owen Leonard [Fri, 18 Jul 2014 16:22:58 +0000 (12:22 -0400)]
Bug 7237 - duplicating patron not using patron's branch

When duplicating a patron the original patron's library should be
preselected.

To test, apply the patch and choose a patron to duplicate, noting which
library is set as their home library. Click the "Duplicate" button and
cnofirm that the patron's library is preselected on the patron entry
form.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11905 - when editing item, cursor is positioning in search box and not to item
Nick Clemens [Sat, 7 Jun 2014 15:18:13 +0000 (11:18 -0400)]
Bug 11905 - when editing item, cursor is positioning in search box and not to item

cataloging-search.inc had embedded js to set focus into the search box.
This patch removes that js from the cataloging-search.inc and adds it into
addbooks.tt and merge.tt to set focus on those pages and allow focus to be set
to the edit items form on additem.tt

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11888: Random password suggestion does not work twice
Juhani Seppälä [Thu, 17 Jul 2014 08:45:06 +0000 (11:45 +0300)]
Bug 11888: Random password suggestion does not work twice

This patch adds a simple ajax-call to pull a new suggested password
from the same perl script.

To test:
1) Search for a patron and select "Change password" from the moremember-view.
2) In the member-password-view, click on "Click to fill with a randomly generated suggestion".
3) Confirm that you get a new suggested password and click the same link again.
4) Note that you do not get another suggested password - nothing is happening.
5) Apply patch.
6) Repeat steps 1-3 and confirm that you can keep clicking for a new suggested password.

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Works as desribed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12654 Correct incorrectly quoted regexp
Colin Campbell [Thu, 24 Jul 2014 16:12:42 +0000 (17:12 +0100)]
Bug 12654 Correct incorrectly quoted regexp

A compile time warning was being generated because \ does not quote
{ Replace the plethora of \ before meta and presumed meta characters
by \Q \E which gets perl to generate all the necessary escapes, we can
assume it knows its regex engine as well or better than the human
programmer

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified change reading the perldoc and also checked that
./misc/link_bibs_to_authorities.pl is no longer showing
the warn and still works.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described, running:
 prove t/db_dependent/AuthoritiesMarc.t
doesn't show the warning anymore.

9 years agoBug 12661: Fixing capitalisation from "Item Type" to "Item type"
Natalie Bennison [Fri, 25 Jul 2014 03:15:47 +0000 (15:15 +1200)]
Bug 12661: Fixing capitalisation from "Item Type" to "Item type"

To fix go to help>reports>manager

Find capitalisation error
"Item Type"

Change to
"Item type"

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>
9 years agoBug 9221 - contact note not showing
Owen Leonard [Wed, 16 Jul 2014 18:21:28 +0000 (14:21 -0400)]
Bug 9221 - contact note not showing

The contents of the contact note field are not displayed on the patron
detail page in the staff client. This patch corrects this.

This patch also corrects the case of the "Contact note" label in the
OPAC patron details form (Log in -> Your personal details).

To test, apply the patch and edit a patron to add data to the contact
note field. Save and view the detail page for that patron. The contents
of the contact note field should appear under the alternate address
data.

In the OPAC the contact note field label should have correct
capitalization.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12615: Remove CGI::scrolling_list from marc_subfields_structure.pl
Bernardo Gonzalez Kriegel [Sun, 20 Jul 2014 21:59:59 +0000 (18:59 -0300)]
Bug 12615: Remove CGI::scrolling_list from marc_subfields_structure.pl

This patch removes all instances on this file.

Also re-enable editor feature to show/change kohafield value, can't find when or why it was removed.
Up to QA or RM for consideration, simply to remove.
But is strange to have a non editable field on auth frameworks.

To test:
1. Apply the patch
2. Go to Administration > MARC frameworks
3. Clic MARC structure of any auth fw
4. Clic subfield on any tag, e.g. 020
5. Clic 'Edit subfields' button

Now the tests proper

6. On any subfield, check pulldown
'Managed in tab', was replaced, so test
if it works and search for regressions
Change, save, load, change again

7. Clic on 'Advanced constraints'
(2) scrolling list removed
At the bottom, check 'Koha link', was changed
Check assign/remove/save/load values, search for regressions

8. Clic on 'Other options' box
Eight(6) scrolling_list removed, they use to
feed three pulldowns, so check each one

'Authorised value',
'Thesaurus'
'Plugin'
Check assign/remove/save/load values, search for regressions
Check adding a new subfield

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12487 [QA Followup] - GetContract must return undef with no params
Kyle M Hall [Fri, 18 Jul 2014 13:14:07 +0000 (09:14 -0400)]
Bug 12487 [QA Followup] - GetContract must return undef with no params

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12487: SQLHelper replacement - C4::Contract
Yohann Dufour [Mon, 30 Jun 2014 12:42:27 +0000 (14:42 +0200)]
Bug 12487: SQLHelper replacement - C4::Contract

With this patch, the subroutines GetContract, GetContracts, AddContract, ModContract and DelContract uses DBIx::Class instead of C4::SQLHelper

Test plan:
1) Apply the patch
2) Execute the unit tests by launching:
prove t/db_dependent/Contract.t
3) The command has to be a success :
t/db_dependent/Contract.t .. ok
All tests successful.
Files=1, Tests=43,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.49 cusr  0.05 csys =  1.59 CPU)
Result: PASS

4) Log on with a superlibrarian permission
5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
6) Record a vendor with a nonzero "name"
7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
8) Click on the button "New" > "Contract" and record a new one
9) Verify the displayed data are correct about the contract
10) "Edit" the contract with different values and verify the data are updated
11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation
12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract
13) Verify the contract name displayed is correct
14) Record an active budget and a fund linked to this budget
15) Go on the new basket (Home > Acquisitions > Search the created vendor)
16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct, then cancel
17) Click on "Delete this basket"
18) Click on "Contracts" (in the left menu) in order to go on aqcontract.pl, then "Delete" the created contract
19) The contract is not displayed anymore in the vendor page

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
Tested on top of Bug 12493
Tests pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: (followup) remove unnecessary output message
Tomas Cohen Arazi [Wed, 30 Jul 2014 13:42:58 +0000 (10:42 -0300)]
Bug 12493: (followup) remove unnecessary output message

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493 : moving the subroutines GetContract and GetContracts from C4::Acquisition...
Yohann Dufour [Tue, 8 Jul 2014 07:16:48 +0000 (09:16 +0200)]
Bug 12493 : moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm

Fix in order to respect the coding guidelines

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: unit tests for the module C4::Contract.pm
Yohann Dufour [Mon, 30 Jun 2014 08:02:01 +0000 (10:02 +0200)]
Bug 12493: unit tests for the module C4::Contract.pm

This patch are the unit tests of the previous patch

Test plan :
Same as the previous patch

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comments on previous patch

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition...
Yohann Dufour [Fri, 27 Jun 2014 14:00:50 +0000 (16:00 +0200)]
Bug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm

This patch includes:
- the subroutines GetContract and GetContracts has been moved from C4::Acquisition.pm to C4::Contract.pm and adapted for a general use
- adaptation of acqui/basket.pl, acqui/basketheader.pl, acqui/neworderempty.pl, acqui/supplier.pl and admin/aqcontract.pl
- the unit tests for the module C4::Contract.pm

Test plan:
1) Apply the patch
2) Execute the unit tests by launching:
prove t/db_dependent/Contract.t t/Acquisition/ t/db_dependent/Acquisition/ t/db_dependent/Acquisition.t
3) The command has to be a success :
t/db_dependent/Contract.t ................................. ok
t/Acquisition/CanUserManageBasket.t ....................... ok
t/Acquisition/Invoice.t ................................... ok
t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok
t/db_dependent/Acquisition/Invoices.t ..................... ok
t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok
t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2
t/db_dependent/Acquisition/TransferOrder.t ................ ok
t/db_dependent/Acquisition/close_reopen_basket.t .......... ok
t/db_dependent/Acquisition.t .............................. ok
All tests successful.
Files=10, Tests=284, 15 wallclock secs ( 0.11 usr  0.02 sys + 12.88 cusr  0.77 csys = 13.78 CPU)
Result: PASS

4) Log on with a superlibrarian permission
5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
6) Record a vendor with a nonzero "name"
7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
8) Click on the button "New" > "Contract" and record a new one
9) Verify the displayed data are correct about the contract
10) "Edit" the contract with different values and verify the data are updated
11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation
12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract
13) Verify the contract name displayed is correct
14) Record an active budget and a fund linked to this budget
15) Go on the new basket (Home > Acquisitions > Search the created vendor)
16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with both patches applied.
Works as described following test plan, all points (I did 14 first)
All test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12457: Allow UT on a non empty database
Yohann Dufour [Mon, 21 Jul 2014 07:27:17 +0000 (09:27 +0200)]
Bug 12457: Allow UT on a non empty database

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12457: Adding unit tests for Members.pm
Yohann Dufour [Mon, 23 Jun 2014 14:00:58 +0000 (16:00 +0200)]
Bug 12457: Adding unit tests for Members.pm

Adding unit tests for the routines AddMessage, GetMessages, GetMessagesCount and DeleteMessage in t/db_dependent/Members.t
Adding unit tests for the routines GetPendingIssues and GetAllIssues in separate files : t/db_dependent/Members/GetPendingIssues.t and t/db_dependent/Members/GetAllIssues.t
The routine GetAllIssues has been modified because it does not test if the arguments was defined :
- the borrowernumber argument is required
- if the order argument is not given, it takes a value by default : 'date_due desc'
- the limit argument is optional

Test plan:
1/ Apply the patch
2/ Execute : prove t/db_dependent/Members.t t/db_dependent/Members/GetAllIssues.t t/db_dependent/Members/GetPendingIssues.t
3/ The result has to be a success without error or warning :
t/db_dependent/Members.t ................... ok
t/db_dependent/Members/GetAllIssues.t ...... ok
t/db_dependent/Members/GetPendingIssues.t .. ok
All tests successful.
Files=3, Tests=83,  5 wallclock secs ( 0.06 usr  0.01 sys +  4.68 cusr  0.26 csys =  5.01 CPU)
Result: PASS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: perltidy on t/db_dependent/Members/*

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12457: Removal warning in t/db_dependent/Members.t
Yohann Dufour [Fri, 20 Jun 2014 12:31:53 +0000 (14:31 +0200)]
Bug 12457: Removal warning in t/db_dependent/Members.t

When I execute prove t/db_dependent/Members.t, this warning appears twice :
"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256."

The warning is due to a invalid use of the routine set_userenv

Test plan:
1/ Execute : prove t/db_dependent/Members.t
2/ The warning appears twice :
"Argument "Test" isn't numeric in modulus (%) at /home/yohann/koha/C4/Context.pm line 1256."
3/ Apply the patch
4/ Execute : prove t/db_dependent/Members.t
5/ The result has to be a success without error or warning :
t/db_dependent/Members.t .. ok
All tests successful.
Files=1, Tests=26,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.50 cusr  0.08 csys =  1.63 CPU)
Result: PASS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All new and old tests pass now.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7143: Add Prosentient Systems to contributing companies
David Cook [Fri, 25 Jul 2014 01:21:01 +0000 (11:21 +1000)]
Bug 7143: Add Prosentient Systems to contributing companies

Better late than never to add the company name to the list of
contributing companies.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Entry added. No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny template addition, no problems.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000: Followup to fix tabs & closing TT directive
Bernardo Gonzalez Kriegel [Mon, 28 Jul 2014 15:01:49 +0000 (12:01 -0300)]
Bug 9000: Followup to fix tabs & closing TT directive

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [4] - Update to GPL v3
Kyle M Hall [Mon, 28 Jul 2014 14:12:08 +0000 (10:12 -0400)]
Bug 9000 [4] - Update to GPL v3

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [3] - Change conf key from tmpl to template
Kyle M Hall [Mon, 28 Jul 2014 14:10:08 +0000 (10:10 -0400)]
Bug 9000 [3] - Change conf key from tmpl to template

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [2] - Update included examples
Kyle M Hall [Mon, 28 Jul 2014 14:06:28 +0000 (10:06 -0400)]
Bug 9000 [2] - Update included examples

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9000 [1] - Update rss.pl to use Template Toolkit
Kyle M Hall [Mon, 28 Jul 2014 14:07:45 +0000 (10:07 -0400)]
Bug 9000 [1] - Update rss.pl to use Template Toolkit

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested using script with sample conf files
RSS feeds generated are 'well formed' xml
Some koha-qa errors fixed in followup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12445 [QA Followup] - Clear issues table before clearing borrrowers table
Kyle M Hall [Fri, 25 Jul 2014 13:12:36 +0000 (09:12 -0400)]
Bug 12445 [QA Followup] - Clear issues table before clearing borrrowers table

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass, even more now than before.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12445: ading unit tests to test the routines : CountSuggestion, ConnectSuggestion...
Yohann Dufour [Thu, 19 Jun 2014 14:32:05 +0000 (16:32 +0200)]
Bug 12445: ading unit tests to test the routines : CountSuggestion, ConnectSuggestionAndBiblio, SearchSuggestion, GetSuggestionInfo, DelSuggestion, GetSuggestionByStatus

These routines were not tested

Test plan:
1/ Execute the command : prove t/db_dependent/Suggestions.t
2/ The result has to be a success without error or warning :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=89,  1 wallclock secs ( 0.05 usr  0.01 sys +  1.52 cusr  0.08 csys =  1.66 CPU)
Result: PASS

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass, no koha-qa errors

But now there are 91!
prove t/db_dependent/Suggestions.t
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=91,  2 wallclock secs ( 0.05 usr  0.00 sys +  1.77 cusr  0.10 csys =  1.92 CPU)
Result: PASS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12445: Improving unit tests for C4::Suggestions.pm
Yohann Dufour [Thu, 19 Jun 2014 07:14:24 +0000 (09:14 +0200)]
Bug 12445: Improving unit tests for C4::Suggestions.pm

Now, the tests used 'is' instead of 'ok', the tests are wrapped in a transaction, adding tests for the routines NewSuggestion, GetSuggestion, ModSuggestion, GetSuggestionFromBiblionumber and GetInfoFromBiblionumber.

The tests for the routines DelSuggestionsOlderThan, CountSuggestion, ConnectSuggestionAndBiblio, SearchSuggestion, GetSuggestionInfo, DelSuggestion and GetSuggestionByStatus will be arrived in another patch.

Test plan:
1/ Execute the command : prove t/db_dependent/Suggestions.t
2/ The result has to be a success without warning or error :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=32,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.49 cusr  0.08 csys =  1.61 CPU)
Result: PASS

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12649: DBRev 3.17.00.011
Tomas Cohen Arazi [Tue, 29 Jul 2014 14:46:32 +0000 (11:46 -0300)]
Bug 12649: DBRev 3.17.00.011

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