Commit graph

26633 commits

Author SHA1 Message Date
dde0e01503 Bug 16289: Refactore code and add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:09:48 +00:00
Karl Holten
d753644c2f Bug 16289: Abbreviated formatting for numbering patterns
To test:

1) Go to Serials -> Manage numbering patterns
2) Create .New Numbering Pattern.
3) Type in a name of 'Day, Month, Season' and a numbering formula of '{X} {Y} {Z}'.
4) Set up the X field as following: add 1, every 1, set back to 1, when more than 30.
5) Select the formatting for X. There should be six options available instead of the original three. Use the formatting 'Name of Day (abbreviated)'.
5) Set up the Y field to add 1 every 30 reset back to 1 when more than 12. Use the formatting option 'Name of month (abbreviated)'.
6) Set up the Z field to add 1 every 90 reset back to 1 when more than 4. Use the formatting option 'Name of season (abbreviated)'.
8) Select a frequency of 1/day.
9) Select a first issue publication date of Jan 1, 2016.
10) Set X to begin with 5 and have an inner counter of 5. Set Z to begin with 3 and have an inner counter of 10.
11) Click the 'Test Pattern' button.
12) Abbreviated versions of the day, month and season should appear in the test pattern.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:09:48 +00:00
Claire Gravely
9066ae153b Bug 16165 - Include link to ILS-DI documentation page in ILS-DI system preference
There is no clue in the system preference about the nice ILS-DI documentation
once you turn it on. We should include a note and the link, similar to how we
do it for the web self checkout.

Test plan:
Syspreference ILS-DI should now include URL in description.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:08:13 +00:00
Liz Rea
0427dfe8ee Bug 15213 - Fix tools sidebar to highlight Patron lists when in that module
To test:

Add some patron lists, navigate through the lists interface and make
sure that while you are in the module, that Patron lists is highlighted
on the sidebar.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: fix alignement

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:06:34 +00:00
Mark Tompsett
c91b16bd9e Bug 16637: Dependency for C4::Tags not listed
Added optional dependency, so as to explain why testing
explodes when the Enhanced Content system preference
TagsExternalDictionary is set. It is optional, because not only
does TagsExternalDictionary have to be set, but TagsEnabled
must be 'Allow'.

Also tweaked C4/Tags.pm to ignore TagsExternalDictionary,
if Lingua::Ispell is not installed. A warning is given.

TEST PLAN
---------
 1) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

 2) sudo apt-get install liblingua-ispell-perl
    -- should be a new install

 3) prove t/db_dependent/Tags.t
    -- should work fine

 4) sudo apt-get remove liblingua-ispell-perl

 5) prove t/db_dependent/Tags.t
    -- should explode

 6) Clear the Enhanced Content system preference
    TagsExternalDictionary

 7) prove t/db_dependent/Tags.t
    -- should work fine

 8) apply patch

 9) prove t/db_dependent/Tags.t
    -- should work fine

10) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

11) prove t/db_dependent/Tags.t
    -- should work, with warning.

12) sudo apt-get install liblingua-ispell-perl

13) prove t/db_dependent/Tags.t
    -- should work fine

14) run koha qa test tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Post-hackfest hotel Olympia lobby signoff. Kalimera!
Works as expected.
At this moment the Tags.t test does not need the database btw,
but the module should have much more test coverage.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:05:10 +00:00
1fda4105a8 Bug 16636 [QA Followup] - Move tests to t/External
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:02:14 +00:00
7f4682df0d Bug 16636: [QA Follow-up] Move External_BakerTaylor.t to t
When we mock the preferences completely now, we do not need
db access anymore.

Test plan:
Run the test without exporting KOHA_CONF.
The test passes with some warns about koha-conf.xml.
If you point KOHA_CONF to etc/koha-conf.xml, you have no warns.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:00:22 +00:00
5361440f65 Bug 16636: [QA Follow-up] Make BakerTaylor plack safe
Initialize file level lexicals each call. Do not call _initialize
outside the module.
Adjust test by mocking preferences.

Test plan:
Run t/db_dependent/External_BakerTaylor.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested module with trivial script under Plack/memcached by toggling
the associated preferences.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:00:22 +00:00
Mark Tompsett
b4479624de Bug 16636: t/00-load.t warning from C4/External/BakerTaylor.pm
Since the tests are expecting an initialize function, the
initialize call was just moved outside of the INIT block.

TEST PLAN
---------
1) prove t/00-load.t
   -- warnings about INIT for BakerTaylor
2) prove `git grep -l BakerTaylor | grep [.]t$`
   -- should all run okay
3) apply patch
4) repeat steps 1 and 2
   -- warning should be gone, and everything else run okay
5) run koha qa test tools

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Florent Mara <florent.mara@gmail.com>

NOTE: Tweaked test plan based on comment #4,
      Added sign off based on comment #6.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 18:00:22 +00:00
4fc8b3d6cf Bug 16635: [QA Follow-up] Eliminate some global package vars
[1] $branch is only related to line 123 as fallback.
[2] $width moved to a constant; sub width is not used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the corresponding plugin in item editor.
Test t/db_dependent/Barcodes.t and Barcodes_ValueBuilder.t still pass.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:58:48 +00:00
Mark Tompsett
fd152d9e95 Bug 16635: t/00-load.t warning from C4/Barcodes/hbyymmincr.pm
According to http://perldoc.perl.org/vars.html, "our" should
be a reasonable substitute for the "use vars". By declaring as
"our", and removing the INIT, prove t/00-load will no longer
generate a warning about INIT for the C4/Barcodes/hbyymmincr.pm
module.

TEST PLAN
---------
1) prove t/00-load.t
   -- warnings about INIT for hbyymmincr
2) prove `git grep -l hbyymmincr | grep [.]t$`
   -- should all run okay
3) apply patch
4) repeat steps 1 and 2
   -- warning should be gone, and everything else run okay
5) run koha qa test tools

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:58:48 +00:00
Marc Véron
45dce0ac79 Bug 16634: Translatability: Fix issue in memberentrygen.tt
This patch fixes a small translatability issue in
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
The sentence following sentence was splitted by HTML tags:
"Attribute value xxxxx is already in use by another patron record."

To test:
- Review code
- Apply patch
- In Admin, create a unique patron attribute type and try to give
  two patrons the same value for this attribute type.

Signed-off-by: Rocio Dressler <rocio@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:53:47 +00:00
Marc Véron
203d34a3ca Bug 16633: Translatability: Issues in tags/review.tt (sentence splitting)
This patch fixes translatability issues in
koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
(isolated words by sentence splitting).

To test:
- Review code and verify that changes make sense.

Signed-off-by: Rocio Dressler <rocio@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:51:53 +00:00
Marc Véron
b0ba45058a Bug 16620: Translatability: Fix problem with isolated word "please" in auth.tt
This patch fixes a translatability problem (syntax in different languages) with a tag-isolated word "please"
in koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt

To test:
- Verify in code that there is no sentence spliting by a-tags (lines 80/84).

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:50:59 +00:00
phette23
ec66ff457b Bug 16613: fix MARC 09X help links
The 09X MARC fields, such as 099 local call number or 090
locally-assigned Library of Congress call number, all point to
non-existent pages on the LC website, e.g.
http://www.loc.gov/marc/bibliographic/bd090.html

Test plan:
- enter the advanced cataloging editor
- begin to input any MARC tag of form 09X
- click the help link at the bottom of the browser window
=> Without this patch, taken to a URL of form `'http://www.loc.gov/marc/bibliographic/bd' +
  tag + '.html'` which is broken because the only documentation for
  these tags is at https://www.loc.gov/marc/bibliographic/bd09x.html
=> With this patch applied, the link is correct

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:48:12 +00:00
Marc Véron
b6979db410 Bug 16563: Translatability: Issues in opac-account.tt (sentence splitting)
This patch removes splitting by <i>-tags from 2 sentences.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:46:49 +00:00
Marc Véron
6b432d2b21 Bug 16540 - Clean up opac-auth.tt for translatability
This patch fixes translatability issues in opac-auth.tt (ugly
translations caused by sentence splitting).

It was necessary to change indentation to make the the file more
readable and to make sure that changes have no side effects.

The changes do not touch the overall functionallity.

To test:
- Review code to verify that no functionality change is introduced
  and to verify that the text changes make sense.
- Apply patch, verify that OPAC login page behaves as before.

UPDATE: Amended for comment #10 / mv
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:44:27 +00:00
2bff91eb4e Bug 16667: Unused variable and function call in circulation.pl
This patch removes an unused occurence of the $branches variable. Probably a
leftover from a recent rewrite.

To test:
- Run:
  $ git grep '$branches' circ/circulation.pl
=> FAIL: Only on occurence of the variable
- Apply the patch
- Run:
  $ git grep '$branches' circ/circulation.pl
=> SUCCESS: The variable has been removed
- Sign off :-D

Regards

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:43:04 +00:00
740cb37e94 Bug 16609: Catch warning from Koha::Hold in Hold.t
Before this patch, the suspend step triggers a warn from Koha::Hold.
Now we catch it.

Test plan:
Run the test. Do not see the warning about unable to suspend.

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

NOTE: Nice clean up!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:42:03 +00:00
f38a9927a3 Bug 16608 - Missing entity nbsp in some XML files
The special character "non breaking space" &nbsp; is not contained in XML syntax by default.
So we add it in the file header :
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>

Even if the source code files do no contain this character, it can be that translated files contain it.
French for example "Titre&nbsp;:".

This entity is missing in all files in koha-tmpl/intranet-tmpl/prog/en/data/ and in some files of koha-tmpl/intranet-tmpl/prog/en/xslt.

Test plan :
  - generate French templates:
    cd misc/translator
    ./translate install fr-FR
    cd ../..
  - run test:
    prove -v t/00-valid-xml.t
    you get failing error message
  - apply this patch
  - translate again
  - run test again: it passes

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
Tes pass, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:40:55 +00:00
ce97930016 Bug 16608 - Add xsd extension to t/00-valid-xml.t
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:40:55 +00:00
Marc Véron
8631ebaf9f Bug 16589 - Quote of the day: Fix upload with csv files associated to LibreOffice Calc
To reproduce:
- Install LibreOffice and make sure that csv files are associated to Calc
  (Note: tested with Firefox 46.0.1 on Windows 8)
- Go to Home > Tools > Quote editor > Quote uploader
- Try to upload a valid CSV (e.g. Example from Bug 15684)
Result: File can not be uploaded
        (Incorrect filetype: application/vnd.sun.xml.calc)
To test:
- Apply patch
- Try to upload again
Expected result: Quotes are imported.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Can't reproduce on a Mac but get it fails on a Windows Box: fixed with this
  patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Can't recreate on debian but the fix looks safe.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:39:13 +00:00
Marc Véron
593dee4ea0 Bug 16560: Translatability: Issues with "The entered " in opac-memberentry.tt
This patch fixes two splitted sentences to avoid translation issues:

The entered <a href="#borrower_cardnumber">card number</a> is the wrong length.
The entered <a href="#borrower_cardnumber">card number</a> is already in use.

To test:
Apply patch and verify that html in the 2 that are changed is correct and that
they are not splitted by a-tags.

Note: I could not figure out under which conditions this code displays in
      the OPAC self registration form.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:37:56 +00:00
e9d6ac9478 Bug 15676 - Actions in pending offline circulation actions are not translatable
This patch modifies the offline circulation transaction processing page
so that English strings describing actions are processed in the template
rather than being output directly from the script.

To test, apply the patch and create an offline circulation file
containing at least one checkout, one check-in, and one payment.

- Upload the file and choose 'Add to offline circulation queue.'
- View pending offline circulation actions
- In the list of pending actions, the actions column should show "Check
  out" instead of "issue," "Check in" instead of "return," and "Payment"
  instead of "payment."

Strings appear as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:36:59 +00:00
Dimitris Antonakis
43d77fdcf0 Bug 14897 - Header name mismatch in ./modules/catalogue/detail.tt
We changed the detail.tt file for staff interface from Publication details to
"Serial enumeration / chronology" to match the cataloguing editor.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:35:44 +00:00
Blou
63041c19c9 Bug 14605 - Corrects the individual fine's description
When paying a fine, the description is built out of the borrower's type and title, instead of the actual fine's description.

STEPS:
1) in the staff, go to a user with a fine to pay.
   a) if none, go to a user and Fines>>"Create manual invoice" with a distinctive description.
2) In Fines>>Pay fines, click the "Pay" button on the line of the fine.
3) This will take you a "Pay an individual fine" screen, where the description will look like "Staff Mrs", for the category and title of the borrower.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:34:08 +00:00
4f3067184d Bug 16492: Add a FIXME to explain the possible problem with no_set_userenv
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:31:19 +00:00
bb6e70fe7d Bug 16492: Test that no_set_userenv will not set userenv if not exist yet
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:31:19 +00:00
90307bcbfa Bug 16492 - Checkouts ( and possibly checkins and other actions ) will use the patron home branch as the logged in library
Bug 14507 introduced the use of checkpw in C4::SIP::ILS::Patron so that
non-Koha internal authentication processes would be able to function via
SIP ( LDAP et al ).

The problem is that checkpw changes the userenv to that of the patron!
This is not usually an issue in Koha because most of the time that
patron running through checkpw is the one to be logged in.

Aside from SIP2 the only other area where this may be an issue is in SCO
when using SelfCheckoutByLogin.

Test Plan:
1) On master, check out an item to a patron via SIP2
2) Note the checkout lists the item as having been checked out
   from the patron's home library not matter which library is was
   supposed to be checked out from.
3) Apply this patch
4) Re-checkout the item
5) The item should now be checked out as if it was checked out from
   the library as defined in the SIP configuration file.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:31:19 +00:00
f17897fb10 Bug 10459 - DBRev 16.06.00.002
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:15:21 +00:00
ff9de4138a Bug 10459: Add tests for borrowers.updated_on
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:10:23 +00:00
Mark Tompsett
f863e478b9 Bug 10459 renamed timestamp to updated_on
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:10:22 +00:00
255596ae6c Bug 10459: Borrowers should have a timestamp
This patch adds a timestamp column to the borrowers table in kohastructure
and updatedatabase. (And also to the deletedborrowers table.)
A timestamp may be useful in synchronizing with external systems (among other
reasons).

Test plan:
Run updatestructure on an existing database, or install a new one.
Verify that the borrowers table has a timestamp now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested updatestructure and running kohastructure.sql.
Passed t/db_dependent/Members.t.

updatedatabase.pl did not apply. I edited and then run it. Columns were added as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

Bug 10459: Follow up to update to atomic update methodology

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New column created, no errors.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:10:22 +00:00
a4c44b9f64 Bug 16695: Require Exception::Class 1.38 instead of 1.39
Looking at
http://cpansearch.perl.org/src/DROLSKY/Exception-Class-1.40/Changes
there is no need to require 1.39

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:08:20 +00:00
40f3d43f46 Bug 16647: update debian/control for 16.*
This patch updates debian/control* to match what
was used for building the 16.05.00 packages, and includes
changes to:

- specify a floor for the Swagger2 version
- add dep on libio-socket-ip-perl, which is needed
  for the package to work on Debian Wheezy
- suggest libwww-youtube-download-perl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:06:36 +00:00
f97626271e Bug 16649: Make OpenLibrarySearch test pass even if launches offline
Test plan:
  prove t/OpenLibrarySearch.t
should return green even if you are offline

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:05:03 +00:00
b9b4eeb849 Bug 16675: fix breakage of t/Languages.t
This patch fixes test breakage introduced by the patch for bug 16088,
which added caching of getlanguages().  Upon inspection, it looks like
the patch for 16088 does not introduce a regression on bug 10560,
so this patch adds a couple cache-clearings.

To test
-------
[1] Verify that t/Languages.t passes.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 17:03:10 +00:00
023384811f Bug 16668: Fix t/Ris.t tests
Caused by bug 16442.
Now we need to mock the marcflavour pref

Test plan:
  prove t/Ris.t
should return green

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:59:20 +00:00
Mark Tompsett
5e6da05b10 Bug 16618: 00-load.t prematurely stops all testing
Rather than add/remove regular expressions to skip modules (like bug 9054), encapsulate the decision logic into a separate function.

Currently there are three libraries which trigger halts:
Koha::NorwegianDB (which was already there)
Koha::ElasticSearch::Indexer
Koha::SearchEngine::Elasticsearch::Search

TEST PLAN
---------
1) prove t/00-load.t
   -- should barf horribly on Catmandu stuff
      if not: sudo apt-get remove libcatmandu-marc-perl
      then repeat step.
2) apply patch
3) prove t/00-load.t
   -- should not barf horribly
4) run koha qa test tools

NOTE: The four optional modules for Koha::NorwegianDB are
      listed in the PerlDependencies.pm, while there is
      no mention of Catmandu libraries at all there.
      This may be another bug which needs fixing.

TECH NOTES (for ideas of how to tinker around):
These three things should trigger the three module cases:
sudo apt-get remove libcatmandu-marc-perl
sudo apt-get remove libcatmandu-store-elasticsearch-perl
sudo apt-get remove libconvert-basen-perl

You probably had koha-perldeps installed before, so the following wil mostly fix:
sudo apt-get install koha-perldeps libcatmandu-marc-perl

And in case you didn't have elastic search stuff installed:
echo deb http://packages.elastic.co/elasticsearch/1.7/debian stable main | sudo tee /etc/apt/sources.list.d/elasticsearch.list
wget -O- https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get update

cd ~
wget http://debian.koha-community.org/koha/otherthings/elasticsearch_deps.tar.gz
tar xvf elasticsearch_deps.tar.gz
cd es_deps
sudo dpkg i lib*
sudo apt-get install -f

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:53:06 +00:00
04e5c2630c Bug 16596: Display library and patron category descriptions instead of their code
Test plan:
On circ/circulation-home.pl and reserve/request.pl, search for patrons
The descriptions for the libraries and patron categories should be
displayed.

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

On top of Bug 13336
Works as described, now descriptions instead of codes.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=16455

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:51:26 +00:00
3948102f2a Bug 16578: Same fix for the staff interface
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as first patch
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:49:43 +00:00
7d4844e171 Bug 16578: Fix wide character errors in opac-export.pl
This simple patch fixes wide character warning raised by opac-export.pl when
'MARC (Unicode/UTF-8)' and 'MARC (Unicode/UTF-8, Standard)' formats are chosen for downloading records.

To test:
- Have records indexed
- Open your OPAC logs:
  $ tail -f /var/log/koha/kohadev/opac-error.log
- Open the detail page in the opac for a record
- Choose Save record > MARC (Unicode/UTF-8)
=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh...
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> FAILE opac-export.pl: Wide character in print...
- Apply the patch
- Choose Save record > MARC (Unicode/UTF-8)
=> SUCCESS: No warnings raised.
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> SUCCESS: No warnings raised.
- Sign off :-D

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:49:43 +00:00
af59b66941 Bug 16465: Fix typo issues vs checkouts
Test plan:
Confirm the wording is correct

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:45:31 +00:00
27254de06d Bug 16465: discharge - Add a title tag at the OPAC
Test plan:
Confirm that the opac-discharge.pl has now a title

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:45:31 +00:00
6a706b86a2 Bug 16428: [QA Follow-up] Useless call to GetMarcStructure in _build_default_values_for_mod_marc
The routine calls GetMarcStructure and does not use its return value
after all.

Test plan:
Run t/db_dependent/Items.t

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:43:30 +00:00
52b1b8eae1 Bug 16428: Use the biblio framework to know if a field is mapped
The subroutine _build_default_values_for_mod_marc takes the
frameworkcode in parameter, but ModItemFromMarc did not pass it.
It uses it to know if a field is mapped or not to a Koha field
(C4::Koha::IsKohaFieldLinked).
Consequently the default framework ("") was always used.

This bug has been found working on bug 13074 and has been put on a
separate bug report to ease the backport.

Test plan:
Without this change, the tests added by bug 16428 won't pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:43:30 +00:00
687a7e22b6 Bug 16441: Fix Letters.t
These tests were wrong, but the package variable used to cache the
letters hid the problem.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:41:28 +00:00
c4f388f649 Bug 16441: Do not use a package variable to cache C4::Letters::getletter
C4::Letters::getletter use a package variable (%letter) to cache letter
returned by the subroutine.
I have not found any direct issues caused by that but it is safer to
remove it.
It won't be a big deal to hit the DBMS to get a valid letter when
needed.

No test plan here, just confirm that the changes make sense.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that performance loss is just a millisecond or so per
subsequent call of getletter.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:41:28 +00:00
Jacek Ablewicz
113adf68e5 Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses
It seems that if subscription_numberpatterns.numberingmethod contains parentheses, updatedatabase.pl crashes when running the 3.23.00.006 DB upgrade snippet, with the following error:

[Mon Jun 6 09:06:54 2016] updatedatabase.pl: Unmatched ( in regex; marked by <-- HERE in m/ ( <-- HERE / at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 11498.

Steps to reproduce:
1/ Have a Koha DB version<3.23.00.006
2/ Create a subscription numbering with parentheses in it:
   ie "Vol. (Month, Year)" with pattern
       Vol. {X} ({Y}, {Z})
3/ Add some serials using that numbering method so that serialseq is filled in DB:
   ie  "Vol. 16 (February, 2015)"
4/ Run the updatedatabase.pl script either from the cli or just start the webinstaller
5/ The error is produced

To test:
1/ apply patch
2/ try to reproduce this issue once again, should be fixed now
3/ have a look at the code, make sure the changes are consistent

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: I have not tested the patch, but the diff looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:39:26 +00:00
8794348ccb Bug 16570: Do not tell all checked-in items are part of a rotating collection
When an item is checked-in a message will tell you it's part of a
rotating collection, even if it's not true.

Test plan:
Make sure the message appears only when needed.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-10 16:38:07 +00:00