]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoBug 11263: Use all languages instead of just the translated ones
Jonathan Druart [Thu, 12 Dec 2013 10:27:26 +0000 (11:27 +0100)]
Bug 11263: Use all languages instead of just the translated ones

This patch produces the same dropdown list as the one in the adv search.
With this way, it won't be necessary to install additional templates to
fill the locale list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11263: do not use system locales settings for subscriptions
Jonathan Druart [Tue, 19 Nov 2013 13:21:38 +0000 (14:21 +0100)]
Bug 11263: do not use system locales settings for subscriptions

The locales list for subscriptions should not be retrieved from the
locales of the system.
This patch retrieves the locales list from the Koha DB (in the same way
as pref language and opaclanguages).

Test plan:
Edit a subscription (or a numbering pattern) and verify the list of
languages is the same as languages available in Koha.
Note: with this patch we loose the saeson translation, it is
normal. See report linked.

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

New locale is retrieved from installed languages.
I wonder if that list can be restricted to
'enabled' ones (parsing syspref language value).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Works according to description.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11848: (follow-up) update license statment
Galen Charlton [Mon, 5 May 2014 04:51:42 +0000 (04:51 +0000)]
Bug 11848: (follow-up) update license statment

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11848: Fix C4::Context::interface, add POD and UT
Julian Maurice [Mon, 17 Mar 2014 22:25:37 +0000 (23:25 +0100)]
Bug 11848: Fix C4::Context::interface, add POD and UT

1/ Edit a Perl script, for example mainpage.pl
2/ add "use Koha::I18N;" to the top of file
3/ add a translatable message somewhere in the script (this have
   to be after the call to get_template_and_user). For example:
   warn gettext("This is a translated warning");
4/ Create or update the PO files with
   misc/translator/translate create LANGCODE
or
   misc/translator/translate update LANGCODE
   (LANGCODE should be enable in syspref 'languages')
5/ In misc/translator/po/LANGCODE-messages.po you should have
   your string, translate it (using a text editor or a PO file
   editor, make sure you don't have the "fuzzy" flag for this
   string).
6/ Go to mainpage.pl with active language being English with your
   browser and check your logs. You should see your string "This
   is a translated warning".
7/ Now change language to LANGCODE. Check your logs, you should
   have the string translated.

Note: I chose to name the sub 'gettext' because it's the default
keyword for xgettext for Perl. We can change it to whatever we want.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Follow test plan, work as described.
No koha-qa errors.
Tests pass

Fixed small merge conflict on t/Context.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Copied test plan from bug.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11848: Make Koha::I18N easier to use
Julian Maurice [Wed, 26 Feb 2014 15:45:59 +0000 (16:45 +0100)]
Bug 11848: Make Koha::I18N easier to use

Instead of writing

  use CGI;
  use Koha::I18N;
  my $cgi = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($cgi, 'intranet');
  print $lh->maketext('my translatable text');

you can now write

  use Koha::I18N;
  print gettext('my translatable text');

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11848: Move language detection function in C4::Languages
Julian Maurice [Wed, 26 Feb 2014 12:20:37 +0000 (13:20 +0100)]
Bug 11848: Move language detection function in C4::Languages

Also store interface (intranet, opac) in context to not have to pass it
as parameter.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8044: (follow-up) ensure Modern::Perl is imported first
Marcel de Rooy [Thu, 15 Aug 2013 13:19:32 +0000 (15:19 +0200)]
Bug 8044: (follow-up) ensure Modern::Perl is imported first

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8044: (follow-up) add copyright block and use Modern::Perl
Julian Maurice [Mon, 20 Aug 2012 11:51:27 +0000 (13:51 +0200)]
Bug 8044: (follow-up) add copyright block and use Modern::Perl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8044: (follow-up) fix warning and error messages in translate.pl
Julian Maurice [Mon, 20 Aug 2012 08:55:50 +0000 (10:55 +0200)]
Bug 8044: (follow-up) fix warning and error messages in translate.pl

CHARSET is now automatically replaced by UTF-8, and 'update' creates the
PO file if it does not exist.

Also do not try to create PO files if POT file creation failed (when
there is no messages to translate for example).

+ add some verbosity
+ add Locale::Maketext and Locale::Maketext::Lexicon to Koha
dependencies

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8044: new module for translating strings in Perl source files
Julian Maurice [Fri, 4 May 2012 12:33:10 +0000 (14:33 +0200)]
Bug 8044: new module for translating strings in Perl source files

You have to use the new module Koha::I18N

Code example:
  use Koha::I18N;
  use CGI;

  my $input = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');

  print $lh->maketext("Localized string!");

PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
  ./translate create LANG
To update:
  ./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7442: (follow-up) adjust UNIMARC test case to match change in BuildSummary()
Galen Charlton [Mon, 5 May 2014 04:18:22 +0000 (04:18 +0000)]
Bug 7442: (follow-up) adjust UNIMARC test case to match change in BuildSummary()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10729: Add phrases configuration for ICU
Colin Campbell [Wed, 14 Aug 2013 15:21:26 +0000 (16:21 +0100)]
Bug 10729: Add phrases configuration for ICU

Add a separate phrases-icu.xml for phrase indexes
The file is based on that distributed with zebra
with a couple of additions to reflect Koha usage

This patch adds a separate tokenizer variable
for phrase indexes so that default.idx is
correctly rewritten for sites using icu
indexing

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Applied patch
- perl Makefile.PL --prev-install-log ../koha-dev/misc/koha-install-log
- make upgrade
- Restarted Zebra server
- Did a full reindex of bibliographic and authorities
- Checked various searches
- Links records to authorities
- Checked created links work correctly

I couldn't find a regression with this patch.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8952: (follow-up) apply link change for social networks to Bootstrap theme
Galen Charlton [Mon, 5 May 2014 04:08:34 +0000 (04:08 +0000)]
Bug 8952: (follow-up) apply link change for social networks to Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8952: (follow-up) remove hard-coded LFTL ID added by a previous patch
Galen Charlton [Mon, 5 May 2014 04:03:26 +0000 (04:03 +0000)]
Bug 8952: (follow-up) remove hard-coded LFTL ID added by a previous patch

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8952: (follow-up) using_https does not deal with Plack
Jonathan Druart [Thu, 23 May 2013 15:28:25 +0000 (17:28 +0200)]
Bug 8952: (follow-up) using_https does not deal with Plack

When using Plack, the https method returns 'OFF'.
We have to test this value before sending the value to templates.

Test plan:
1/ Fill your OPACBaseUrl

2/ Configure apache for using http
3/ Check the social networks links (should be http://OPACBaseUrl)

4/ Launch Plack
5/ Check the social networks link (should be http://OPACBaseUrl)
6/ Stop Plack

7/ Configure apache for using https
  sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out
/etc/apache2/server.crt -keyout /etc/apache2/server.key
and add in you virtualhost (with :443)
    SSLEngine on
    SSLCertificateFile /etc/apache2/server.crt
    SSLCertificateKeyFile /etc/apache2/server.key
  a2enmod ssl
  service apache2 restart
8/ Check the social networks links (should be https://OPACBaseUrl)

FIXME: Under Plack, with ssl actived, the CGI->https() method always
returns 'OFF'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8952: (follow-up) change occurrences of using_https
Jonathan Druart [Thu, 25 Oct 2012 07:29:28 +0000 (09:29 +0200)]
Bug 8952: (follow-up) change occurrences of using_https

Signed-off-by: Corey Fuimaono <agent.075@gmail.com>
Verified.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8952: Add http:// to url in social media links on opac-detail
Owen Leonard [Wed, 24 Oct 2012 16:30:33 +0000 (12:30 -0400)]
Bug 8952: Add http:// to url in social media links on opac-detail

This patch adds a variable to the template, "protocol" based on
whether "using_https" is set. The appropriate protocol is
inserted before social media links.

To test, confirm that  OPACBaseURL is set and lacks "http(s)://"
Social media links should include correct URLs.

A follow-up patch could copy use of this [% protocol %] variable
in other parts of this template which duplicate large chunks of
HTML based on [% using_https %].

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11309: avoid creating duplicate numbering patterns during upgrade to 3.14.x
Nuño López Ansótegui [Tue, 26 Nov 2013 17:38:43 +0000 (18:38 +0100)]
Bug 11309: avoid creating duplicate numbering patterns during upgrade to 3.14.x

To test:

1/ Install Koha 3.12
2/ Create some subscriptions. Ensure you have at least two
   subscriptions with the same numbering pattern, with one of the
   keys everyX/addX/whenmorethanX/settoX set to NULL
3/ Remember this numbering pattern.
4/ Upgrade to 3.14
5/ Run updatedatabase.pl
6/ The numbering pattern is duplicated

Now repeat steps 1 to 4, then apply the patch and run
updatedatabase.pl. Numbering pattern should not be duplicated.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10944: follow-up for Bootstrap Amazon images on https OPAC
Liz Rea [Tue, 3 Dec 2013 20:52:19 +0000 (09:52 +1300)]
Bug 10944: follow-up for Bootstrap Amazon images on https OPAC

see test plan for previous patch, only bootstrap theme instead of prog. :)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10944: fix mixed content warnings for covers on staff client
Robin Sheat [Fri, 4 Oct 2013 03:13:20 +0000 (16:13 +1300)]
Bug 10944: fix mixed content warnings for covers on staff client

This switches the URLs used to access Amazon's cover images to the
SSL image server, preventing warnings when using this on a secure
 site.

To test:
* Enable Amazon images in the sysprefs, all other cover images off.
* Do a search in the staff client. Using firebug or similar, inspect the
  images that indicate both "no image found" and the covers.
* Are they all https, and showing correctly?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10944: fix mixed content warnings in opac results and detail with Amazon images...
Liz Rea [Wed, 25 Sep 2013 02:50:24 +0000 (14:50 +1200)]
Bug 10944: fix mixed content warnings in opac results and detail with Amazon images on https

It's probably going to become more popular to run Koha in SSL
environments.

Currently on SSL, with Amazon images enabled, a SSL enabled site
will either not show Amazon images (IE, some versions of Firefox?),
or show a warning to users about mixed secure and insecure content
(Firefox, Chrome).

Since we now have the using_https template variable, it makes sense
to use it.

To test:

In each browser you have access to, and preferably with SSL set up
(you can set up a self signed cert for your dev install by following,
more or less, the instructions here:
https://wiki.debian.org/Self-Signed_Certificate)

For the apache config, just copy the one for the OPAC, but set it to
use 443 instead of 80 for the port, and point it to your keys per the
instructions above.

** note that using a self signed cert on your dev install will prompt
you when you connect the first time that OMG I CAN'T VERIFY THIS IS
COOL. You did it yourself, if you can't trust yourself... then who can
you trust?

* Enable Amazon images in the system preferences
* Do a search that you know will have images for, verify that without
  SSL
1. the images show
2. the image source is from an Amazon url that uses http://
3. the images are the right size, and look ok
* Do the same using https, verify that with SSL
1. the images show
2. the image source is from an Amazon url that uses https://
3. the images are the right size, and look ok

Clicking on the image should link to the item on Amazon. This patch
also corrects a problem with the Amazon URL used on the images -
it was pointing to a feature that is currently unavailable. That's
fixed here.  All you need to check is that it goes to a valid Amazon
endpoint that doesn't show an error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11684: avoid mixed content warnings using SSL with Amazon - opac-readingrecord...
Liz Rea [Sun, 6 Apr 2014 22:23:05 +0000 (10:23 +1200)]
Bug 11684: avoid mixed content warnings using SSL with Amazon - opac-readingrecord and opac-user

To test:

 0) It goes without saying that images being looked at should
    continue to be the proper size and look ok.
 1) In the staff client, change the OPAC system preference
     opacthemes to 'bootstrap'.
 2) Enable Amazon images in the system preferences
 3) Issue a book you know will have images for a known user
 4) Issue a book you know will have images for intentionally
     overdue for the same user
 5) git reset --hard origin/master
 6) In OPAC, log in as the user.
    -- On the 'your summary' tab on the left (which is default),
       a) In the 'Checked out' tab, there should be at least two
          books. The two books issued should have http images.
       b) In the 'Overdue' tag, there should be at least one
          book. The image for the overdue book issued should
          have http images.
 7) Click the 'your reading history' tab on the left.
    -- The images for the two books issued should have
       http images.
 8) Apply the patch
 9) Repeat steps 6-7, but all the images in question should
    have https images now.
10) In the staff client, change the OPAC system preference
     opacthemes to 'prog'.
11) Repeat steps 5-9
12) Run the koha QA test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Checked reading history, overdoes, and checkouts in
bootstrap and prog OPAC. Amazon image URL is now https://.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10862: DBrev 3.15.00.047
Galen Charlton [Mon, 5 May 2014 03:08:58 +0000 (03:08 +0000)]
Bug 10862: DBrev 3.15.00.047

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10862: (follow-up) make sure that queries that return only one result get recorded
Jonathan Druart [Thu, 12 Sep 2013 09:52:43 +0000 (11:52 +0200)]
Bug 10862: (follow-up) make sure that queries that return only one result get recorded

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10862: (follow-up) fix a couple of issues
Jonathan Druart [Wed, 11 Sep 2013 08:36:19 +0000 (10:36 +0200)]
Bug 10862: (follow-up) fix a couple of issues

This followup fixes a couple of issues:
- disable the feature by default.
- use the datatables include file.
- fix the syspref description.
- replace "History search" with "Search history".
- replace biblio with catalog

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10862: Add search history to the intranet interface
Jonathan Druart [Mon, 2 Sep 2013 15:02:02 +0000 (17:02 +0200)]
Bug 10862: Add search history to the intranet interface

Like OPAC, the search history is now available for intranet.  This
is controlled by the EnableSearchHistory system preference.

Test plan:
 1/ Switch on the 'EnableSearchHistory' syspref.
 3/ Launch some biblio and authority searches.
 4/ Go on your search history page (top right, under "Set library").
 5/ Check that all yours searches are displayed.
 6/ Click on some links and check that results are consistent.
 7/ Delete your biblio history searches.
 8/ Delete your authority searches history searches.
 9/ Launch some biblio and authority searches
10/ Play with the 4 delete links (current / previous and biblio /
authority).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) remove comment about routine that is no longer present
Galen Charlton [Mon, 5 May 2014 02:58:29 +0000 (02:58 +0000)]
Bug 10807: (follow-up) remove comment about routine that is no longer present

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) use 24-hour time when storing search times to session
Galen Charlton [Mon, 5 May 2014 02:55:41 +0000 (02:55 +0000)]
Bug 10807: (follow-up) use 24-hour time when storing search times to session

This ensures that if an anonymous session is converted to a logged-in
session, that search history times from the anonymous session get
stored corectly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) update DBIC schema classes
Galen Charlton [Mon, 5 May 2014 02:40:09 +0000 (02:40 +0000)]
Bug 10807: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: DBrev 3.15.00.046
Galen Charlton [Mon, 5 May 2014 02:39:07 +0000 (02:39 +0000)]
Bug 10807: DBrev 3.15.00.046

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) change wording of tabs
Katrin Fischer [Mon, 21 Apr 2014 20:03:04 +0000 (22:03 +0200)]
Bug 10807: (follow-up) change wording of tabs

Changed the tabs from Catalog and Authority to
Catalog searches and Authority searches to be a bit more specific.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: Add an authority search history for the OPAC - bootstrap
Jonathan Druart [Thu, 19 Dec 2013 14:22:02 +0000 (15:22 +0100)]
Bug 10807: Add an authority search history for the OPAC - bootstrap

Patch for the bootstrap theme

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) make the new field search_history.type should be a varchar(16)
Jonathan Druart [Tue, 24 Sep 2013 09:13:32 +0000 (11:13 +0200)]
Bug 10807: (follow-up) make the new field search_history.type should be a varchar(16)

varchar(255) is too wide for "biblio" and "authority" values.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
10 years agoBug 10807: (follow-up) fix UT t/db_dependent/Search_SearchHistory.t
Jonathan Druart [Mon, 23 Sep 2013 11:39:07 +0000 (13:39 +0200)]
Bug 10807: (follow-up) fix UT t/db_dependent/Search_SearchHistory.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) Change the GPL version to v3+
Jonathan Druart [Mon, 23 Sep 2013 11:35:58 +0000 (13:35 +0200)]
Bug 10807: (follow-up) Change the GPL version to v3+

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) wording tweak; take OpacAuthorities into account
Owen Leonard [Wed, 11 Sep 2013 13:55:14 +0000 (09:55 -0400)]
Bug 10807: (follow-up) wording tweak; take OpacAuthorities into account

This follow-up makes two changes:

1) Change "biblio" to "catalog" when referring to non-authority
   searches.
2) Make display of the authority search tab dependent on the
OpacAuthorities system preference. If OPAC authority searches are
disabled we shouldn't show a tab which will always be empty.

To test, view the OPAC search history page with the OpacAuthorities
preference both on and off.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: Add an authority search history for the OPAC
Jonathan Druart [Fri, 30 Aug 2013 12:01:15 +0000 (14:01 +0200)]
Bug 10807: Add an authority search history for the OPAC

Like biblio, this feature provides an authority search history.
This history is available for connected and disconnected user.
If the user is not logged in Koha, the history is stored in an
anonymous user sessin.

The search history feature is now factorized in a new module.

This patch adds:
- 1 new db field search_history.type. It permits to distinguish the
  search type (biblio or authority).
- 1 new module C4::Search::History. It deals with 2 different storages:
  DB or cookie
- 2 new UT files: t/Search/History.t and t/db_dependent/Search/History.t
- 1 new behavior: the 'Search history' link (on the top-right corner of
  the screen) is always displayed.

Test plan:
 1/ Switch on the 'EnableOpacSearchHistory' syspref.
 2/ Go on the opac and log out.
 3/ Launch some biblio and authority searches.
 4/ Go on your search history page.
 5/ Check that all yours searches are displayed.
 6/ Click on some links and check that results are consistent.
 7/ Delete your biblio history searches.
 8/ Delete your authority searches history searches.
 9/ Launch some biblio and authority searches
10/ Delete all your history (cross on the top-right corner)
11/ Check that all your history search is empty.
12/ Launch some biblio and authority searches.
13/ Login to your account.
14/ Check that all previous searches are displayed.
15/ Launch some biblio and authority searches.
16/ Check that these previous searches are displayed under "Current
session".
17/ Play with the 4 delete links (current / previous and biblio /
authority).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All patches together pass QA script and tests.
Also, new tests in t/db_dependent/ pass.

Tested in all 4 OPAC themes, being logged in and anonymous.
Anonymous search history will be appended to personal search
history after logging in.
Also verified that cleanup_database still purges search history,
now also including the authority searchs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11635: remove duplicate definition of 995$r in UNIMARC record.abs
Fridolin Somers [Wed, 29 Jan 2014 16:26:15 +0000 (17:26 +0100)]
Bug 11635: remove duplicate definition of 995$r in UNIMARC record.abs

Test plan :
- Create a fresh install UNIMARC flavor and GRS1 indexing for biblios
- Re-indexe database
- Perform a search with index "itemtype" (and then "itype") on an
  existing value of 995$r. For example : itemtype:BOOK
=> Check you get results

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) tweak wording
Galen Charlton [Mon, 5 May 2014 02:12:40 +0000 (02:12 +0000)]
Bug 6739: (follow-up) tweak wording

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) add unit tests for GetMemberDetails()->{is_expired}
Galen Charlton [Mon, 5 May 2014 02:07:32 +0000 (02:07 +0000)]
Bug 6739: (follow-up) add unit tests for GetMemberDetails()->{is_expired}

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) update DBIC schema classes
Galen Charlton [Mon, 5 May 2014 02:00:36 +0000 (02:00 +0000)]
Bug 6739: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) do NOT activate new feature by default during upgrade
Galen Charlton [Mon, 5 May 2014 01:57:56 +0000 (01:57 +0000)]
Bug 6739: (follow-up) do NOT activate new feature by default during upgrade

The previous behavior falls in the category of (arguably) buggy behavior
that nonetheless should not be silently changed on the folks who would
have to deal with patron complaints.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: DBRev 3.15.00.045
Galen Charlton [Mon, 5 May 2014 01:57:34 +0000 (01:57 +0000)]
Bug 6739: DBRev 3.15.00.045

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) template changes for the bootstrap theme
Jonathan Druart [Wed, 15 Jan 2014 10:53:56 +0000 (11:53 +0100)]
Bug 6739: (follow-up) template changes for the bootstrap theme

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script, t, xt and t/db_dependent/Members*.

Testing notes:
    - Database update
      * Changes to kohastructure match changes done by the updatedatabase
        statement. Feature is activated by default!
      * Ran database update succesfully.
      * Note: Expired patrons are now blocked by default in new
        AND in updated installations.
    - System preference
      * Verified system preference shows up correctly.
    - Category configuration
      * Add new patron category
      * Edit existing patron category
      * Delete patron category
      * Check patron category summary table.
      => Verified all actions work as expected.
      => Verified chosen value for BlockExpiredPatronOpacActions
         is always displayed and saved correctly.
      * Note: The new value is missing from the summary table.
      * Note: The new value is also not shown when deleting a patron
        category.
    - Check functionality
      * Renew and place a hold for an NOT EXPIRED patron with
        a) category: use syspref (default)
           syspref: block  (default)
        b) category: use syspref (default)
           syspref: don't block
        c) category: block
           syspref: don't block
        d) category: block
           syspref: block
        e) category: don't block
           sypref: block
        f) category: don't block
           syspref: don't block
        Holds and renewals were always possible.
      * Also verified that the warning from NotifyBorrowerDeparture
        still shows up correctly.
      * Verified holds and renewals are still blocked, when the
        user has a restriction with a date in the future.
      * Renew and place a hold for an EXPIRED patron with
        a) category: use syspref (default)
           syspref: block  (default)
           Holds and renewals blocked.
        b) category: use syspref (default)
           syspref: don't block
           Holds an renewals possible.
        c) category: block
           syspref: don't block
           Holds and renewals blocked.
        d) category: block
           syspref: block
           Holds and renewals blocked.
        e) category: don't block
           sypref: block
           Holds and renewals possible.
        f) category: don't block
           syspref: don't block
           Holds and renewals possible.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) fix conflicts with some others bugs.
Jonathan Druart [Wed, 15 Jan 2014 10:38:38 +0000 (11:38 +0100)]
Bug 6739: (follow-up) fix conflicts with some others bugs.

See comments 86 and 88. This patch fixes a bad conflict resolution in a
previous patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) yet more fixes
Katrin Fischer [Sun, 22 Sep 2013 14:20:19 +0000 (16:20 +0200)]
Bug 6739: (follow-up) yet more fixes

- Fixes a typo in one of the OPAC messages: "you account"
- Fixes the updatedatabase script to use 1 instead of yes for the
  system preference default matching the sysprefs.sql file.
- Fixes capitalization "Don't Block" in system preference
  description.
- Adding . to the end of the warning, when renewals are blocked.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) more fixes
Fridolyn SOMERS [Thu, 11 Jul 2013 10:39:16 +0000 (12:39 +0200)]
Bug 6739: (follow-up) more fixes

Some corrections :
- opac-reserve.tt : opening <p> instead of closing
- opac-user.tt : warnexpired was in database format, adds the use
  of KohaDates template plugin
- opac-user.tt : duplicated TT test : [% IF ( BORROWER_INF.warnexpired ) %]
  and [% ELSIF ( BORROWER_INF.warnexpired ) %], maybe a merge error
- opac-user.tt : <string> instead of <strong>, maybe for HTML 6 :-)
- opac-user.pl : adding dateformat var to template is already done by Auth.pm

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

Testing notes:
- Database update
  * Changes to kohastructure match changes done by the updatedatabase
    statement. Feature is activated by default. Fixing 'yes' to be '1'
    in a follow up.
  * Ran database update succesfully.
  * Note: Patrons are now blocked by default in new installations
    AND in updated installations.
- System preference
  * Verified system preference shows up correctly.
- Category configuration
  * Add new patron category
  * Edit existing patron category
  * Delete patron category
  * Check patron category summary table.
  => Verified all actions work as expected.
  => Verified chosen value for BlockExpiredPatronOpacActions'
     is always displayed and saved correctly.
  * Note: The new value is missing from the summary table.
  * Note: The new value is also not shown when deleting a patron category.
- Check functionality
  * Renew and place a hold for an NOT EXPIRED patron with
    a) category: use syspref (default)
       syspref: block  (default)
    b) category: use syspref (default)
       syspref: don't block
    c) category: block
       syspref: don't block
    d) category: block
       syspref: block
    e) category: don't block
       sypref: block
    * Verified renewals and placing holds were never blocked.
    * Also verified that the warning from NotifyBorrowerDeparture
      still shows up correctly.
  * Renew and place a hold for an EXPIRED patron with
    a) category: use syspref (default)
       syspref: block  (default)
       => OK, both actions are blocked.
    b) category: use syspref (default)
       syspref: don't block
       => OK, both actions possible.
    c) category: block
       syspref: don't block
       => OK, both actions are blocked.
    d) category: block
       syspref: block
       => OK, both actions are blocked.
    e) category: don't block
       sypref: block
       => OK, both actions possible.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2014-04-06 Update: Will repeat and amend above test plan on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) fix more issues
Fridolyn SOMERS [Thu, 11 Jul 2013 09:27:51 +0000 (11:27 +0200)]
Bug 6739: (follow-up) fix more issues

Installer fixes :
- in kohastructure.sql, category.BlockExpiredPatronOpacActions default
  value is -1, sets the same in updatedatabase.pl
- in syspref comment, replaces "opac actions such as placing a hold or
  reserve" by "opac actions such as placing holds or renrw books"
- A 'YesNo' does not have 'yes' as value in database, it is '1'.
- corrects small typo "categori" and syspref name case

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) fix more issues
Kyle M Hall [Wed, 15 Jan 2014 10:08:48 +0000 (11:08 +0100)]
Bug 6739: (follow-up) fix more issues

* Hide renewal column, buttons and links
* Fixes minor bug where upper-right table links would show even if
  renewal impossible
* Cleans up some of the template formatting ( whitespace changes only )

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) fix various issues
Kyle M Hall [Tue, 12 Mar 2013 17:46:41 +0000 (13:46 -0400)]
Bug 6739: (follow-up) fix various issues

- translation issues
- wording issues

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: make it possible to block expired patrons from OPAC actions
Chris Hall [Sun, 19 Feb 2012 21:07:13 +0000 (10:07 +1300)]
Bug 6739: make it possible to block expired patrons from OPAC actions

Test Plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Pick a patron, note the patron's category
 5) Issue an item to this patron
 4) Edit that category, set "Block expired patrons" to "Block"
 5) Verify the patron cannot renew or place holds in the OPAC
 6) Edit the category again, set "Block expired patrons" to
    "Don't block"
 7) Verify the patron *can* renew and place holds in the OPAC
 8) Edit the category again, set "Block expired patrons" to
    "Follow system preference BlockExpiredPatronOpacActions"
 9) Set the system preference BlockExpiredPatronOpacActions to
    "Block"
10) Verify the patron cannot renew or place holds in the OPAC
11) Set the system preference BlockExpiredPatronOpacActions to
    "Don't block"
12) Verify the patron *can* renew and place holds in the OPAC

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7442: (follow-up) apply change to Bootstrap theme
Galen Charlton [Mon, 5 May 2014 01:30:45 +0000 (01:30 +0000)]
Bug 7442: (follow-up) apply change to Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7442: (follow-up) restore display of heading type for non-UNIMARC
Galen Charlton [Mon, 5 May 2014 01:27:33 +0000 (01:27 +0000)]
Bug 7442: (follow-up) restore display of heading type for non-UNIMARC

This patch restores the display of the authority type summary for
MARC21, where at present the heading type (i.e., "Topical Term",
"Personal Names") come over for display in the template.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7442 (follow-up) ensuring that summary is display when searching on all types...
Fridolyn SOMERS [Thu, 18 Jul 2013 16:13:12 +0000 (18:13 +0200)]
Bug 7442 (follow-up) ensuring that summary is display when searching on all types of authorities

This patch corrects a small bug :

Authorities search on all types does not show summary because it is computed
with selected type (which is empty) instead of using found authority type.

Test plan :
- Go to intranet autorities search
- Perform a search on all authorities types
- Look at results
  => Without this patch, results rows do not display the autority summary, only
     authorized headings

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)
Fridolyn SOMERS [Thu, 18 Jul 2013 11:59:07 +0000 (13:59 +0200)]
Bug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)

From a biblio record, if one wants to add a 600$a information, a pop-up
appears.  On this new window, on search terms typed and validated, a table
result is displayed, with a column "Get It!" allowing the selection of an
authority.  From here, different cases:

1) If we have a simple authority with 200$a and 200$b subfields, a link
   "choose" is displayed, working correctly.

2) If the authority has different occurences of 200$a/200$b, numeric links (1 2
   and so on) are displayed, one for each occurence.  In the example of my
   screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary
   possesses two links : "1" will add "Paul, Korky" whereas "2" will add
   "Pauline, Korkette" (couldn't come up with a better name ;)).

3) If the authority has 200$x or 200$y subfields defined, several links are
   also created, when it should not be the case.  In our example, "Niclausse,
   Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link
   "2" for "Expositions".  Clicking on the 2nd link leads to the following
   error: Software error: Can't call method "subfields" on an undefined value
   at
   /home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl
   line 86.  Only the cases 1 and 2 should be handled. The creation of links
   for subfields like 200$x or 200$y should be removed.

This problem is caused by the use of " -- " has separator of authorities with
several headings, but also in some heading between main part and subdivisions.
This patch corrects this by using an array in authorities summary so that
presentation is computed in template. I've choosen to use the pipe separator
between authorities with several headings. This may be changed to be
configurable.

Test plan :

- Edit an authority type summary : for example subject (heading on 250) :
  summary "[250a][ -- 250x]"
- Create an authority A1 with one heading and a subdivision : for example a
  subject : 250$a "History" 250$x "20th century"
- Create an authority A2 with several headings. for example a subject : 250$a
  "History" 250$a "Legends"
- Rebuild Zebra queue
- Go to OPAC and click on "Authority search" and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Go to intranet autorities search and search on "History"
  => You will find A1 and A2 :
    History -- 20th century
    History | Legends
- Edit a record using this autorities type as thesaurus : for example on 606$a
- Click on thesaurus link and search on "History"
  => You will find A1 and A2 :
    History -- 20th century ; 0 times ; choose ; Edit authority
    History | Legends       ; 0 times ; 1 2    ; Edit authority
- Click on link "2" to chosse "Legends"
  => You get "Legends" in heading field : for example 606$a

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
I can confirm the problem and the solution. I have tested the patch on a large
DB with authorities having multiples headings. There is no regression on bug
4838.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Without the patch I couldn't choose between multiple headings
in the authority plugin, but with the patch it works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11278: (follow-up) Return an exit value (1) if the module is not found.
Jonathan Druart [Mon, 27 Jan 2014 13:45:21 +0000 (14:45 +0100)]
Bug 11278: (follow-up) Return an exit value (1) if the module is not found.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11278: Followup for customize command line parameter
Marcel de Rooy [Mon, 25 Nov 2013 13:24:42 +0000 (14:24 +0100)]
Bug 11278: Followup for customize command line parameter

The initial patch for this bug did not include a specific command line
option for customization. If a module LocalChanges.pm existed, it would
be used without asking.
This patch adds a command line option enabling the customization option
and offering the extra possibility of using another module name. If no file
name is passed, we default to LocalChanges.
Without the -custom option, behavior is as it was.
Also some POD lines are added to document the feature.

Test plan:
[1] Make a LocalChanges.pm in migration_tools. Verify that it is not used,
    if you do not enable the -cust parameter.
[2] Run the script again with -cust. Verify that it is called now.
[3] Copy LocalChanges.pm to Whatever.pm. Make some change. Run with
    -cust Whatever and verify that the new module is used.
[4] Copy Whatever.pm to another dir, make some change. Run with -cust and the
    full name. Verify that the latest change was used.
[5] Run without any option. Check the pod documentation.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11278: Adjusting bulkmarcimport.pl for customization routine and verbose printing
Marcel de Rooy [Thu, 21 Nov 2013 10:29:59 +0000 (11:29 +0100)]
Bug 11278: Adjusting bulkmarcimport.pl for customization routine and verbose printing

This patch makes two adjustments:
[1] For the verbose option, verbose level 2 now means print the
formatted version of each record.
[2] If a module LocalChanges.pm is found in misc/migration_tools, the
routine "customize" in this module is called for each marc record.
This allows you to make local changes to these marc records before
importing them.

Test plan:
[1] Test the verbose option: a single -v for medium verbosity and two
-v to dump a human-readable version of the record to standard output.
(Do not yet copy LocalChanges.pm in the folder.)
You may used the attached example file on Bugzilla:
perl misc/migration_tools/bulkmarcimport.pl -file zztest01.xml -v -v -b -m XML -t | more
Note the option t for test; no records will be imported.
[2] Copy LocalChanges.pm in the migration_tools folder. You may use the
example provided on Bugzilla (in a patch). If you use the example module,
check the contents of 001, 005 and 590 fields. (The -v -v option allows
you to easily check that.)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11117: Fix text mixup in facets where RTL text + facet count showed
Tomas Cohen Arazi [Thu, 24 Apr 2014 17:19:52 +0000 (14:19 -0300)]
Bug 11117: Fix text mixup in facets where RTL text + facet count showed

This patch adds classes for both the facet label and count, and adds
'inline-block' to the 'facet-count' class so text shows properly.

To reproduce:
- Have facets to show some right to left text (example on the bug
  report) in English language templates.
- Enable the displayFacetCount.
- Check it displays like the attached screenshot.

To test:
- Apply the patch
- Do a search that previously reproduced the problem on the staff
  interface
=> Shows correctly
- Repeat for OPAC (the three themes)
=> Shows correctly

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Still work as described. Checked in Arabic with Arabic records.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed bug and that the patch fixes it, tested in staff,
prog, ccsr and bootstrap.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8231: display warning at check in if borrower is restricted
Lyon3 Team [Mon, 13 Jan 2014 11:09:01 +0000 (12:09 +0100)]
Bug 8231: display warning at check in if borrower is restricted

Display, at check in, a reminder of an already existing suspension date
even if the returned document is not late.

Test plan :
1) Apply the patch
2) Go to a borrower checkout page and checkout some documents with
   different passed duedate using "Specify due date" function. Checkout out
   one with the default duedate.
3) Check in the document with the bigger delay :
   You will get the message : 'X is now restricted until ...'
4) Check in one of the document with a smaller delay :
   You'll get a different message : 'Reminder : Patron was earlier
   restricted until...'.
5) Check in the document which is not late :
   You 'll get the same message as the previous one

Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11466: (follow-up) add additional test
Galen Charlton [Sun, 4 May 2014 23:24:06 +0000 (23:24 +0000)]
Bug 11466: (follow-up) add additional test

This adds an additional test case to document the behavior
that if AdvancedSearchTypes contains 'itemtypes' or /is/
'itemtypes', that it returns the same results.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11466: improve selection of item types for purchase order desired format list
Olli-Antti Kivilahti [Thu, 2 Jan 2014 08:21:49 +0000 (10:21 +0200)]
Bug 11466: improve selection of item types for purchase order desired format list

This patch ensures that the list of desired formats for a purchase
suggestion includes the list of item types so long as the
AdvancedSearchTypes system preference includes 'itemtypes'.

--------------
-- Synopsis --
--------------

When system preference AdvancedSearchTypes has other values than 'itemtypes',
for ex 'itemtypes|loc', itemtypes selection in opac-suggestions.pl
is not populated with available itemtypes.

This patch fixes the issue by broadening the strict comparison of
($advanced_search_types eg 'itemtypes') #fails 'itemtypes|loc'
to
($advanced_search_types =~ 'itemtypes') #succeeds 'itemtypes|loc'

Unit tests included

---------------
-- Test plan --
---------------

REPLICATING THE ISSUE
1. Set system preference  AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have only the default value

AFTER APPLYING THIS PATCH
1. Set system preference  AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have itemtypes available for selection

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tests worked as expected. Placed a suggestion and saw the whole
list of item types, chose one, saved, checked staff and it loaded
as expected. Changed item type in staff and it applied in both
views.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests including new regression tests.
Restores old functionality.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: (follow-up) improve usage comments in new TT include
Galen Charlton [Sun, 4 May 2014 23:11:34 +0000 (23:11 +0000)]
Bug 766: (follow-up) improve usage comments in new TT include

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: (follow-up) point acqui/ajax-getauthvaluedropbox.pl at the new location...
Galen Charlton [Sun, 4 May 2014 23:10:17 +0000 (23:10 +0000)]
Bug 766: (follow-up) point acqui/ajax-getauthvaluedropbox.pl at the new location of GetAuthvalueDropbox

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: (follow-up) move copyright statement back to the top
Galen Charlton [Sun, 4 May 2014 23:08:03 +0000 (23:08 +0000)]
Bug 766: (follow-up) move copyright statement back to the top

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: Update POD for AuthorisedValues TT plugin
Jonathan Druart [Wed, 23 Apr 2014 13:45:46 +0000 (15:45 +0200)]
Bug 766: Update POD for AuthorisedValues TT plugin

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: (follow-up) fix encoding issues
Jonathan Druart [Tue, 22 Apr 2014 11:30:01 +0000 (13:30 +0200)]
Bug 766: (follow-up) fix encoding issues

This patch deals with the current master code. It should be removed when
patches for bug 11944 will be pushed.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes encoding problem, until this can be resolved properly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: Use a TT include instead of a method in the AV plugin
Jonathan Druart [Mon, 17 Mar 2014 11:36:55 +0000 (12:36 +0100)]
Bug 766: Use a TT include instead of a method in the AV plugin

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This gives a koha-qa error, but on another user/env not.
Really don't know

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I see the same error, but can't see where this is coming from,
code seems to work ok.
Works as described, no regressions found.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: remove disused routine buildCGISort
Jonathan Druart [Thu, 6 Mar 2014 16:12:26 +0000 (17:12 +0100)]
Bug 766: remove disused routine buildCGISort

buildCGISort can be deleted.

Test plan:
  git grep buildCGISort
should return no result.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: Use the new plugin to generate sort dropdown list - memberentry
Jonathan Druart [Thu, 6 Mar 2014 16:08:37 +0000 (17:08 +0100)]
Bug 766: Use the new plugin to generate sort dropdown list - memberentry

Now we can use the method plugin from the memberentry form.

Test plan:
1/ Create a patron and verify sort1 and sort2 dropdown list are
   correctly generated.
2/ Select values.
3/ Save.
4/ Edit the patron and verify the selected values are displayed.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: Create a plugin routine to build dropdown list
Jonathan Druart [Thu, 6 Mar 2014 16:07:08 +0000 (17:07 +0100)]
Bug 766: Create a plugin routine to build dropdown list

On this way, dropdown list could be generated from the templates.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 766: Move GetAuthvalueDropbox to C4::Koha
Jonathan Druart [Thu, 6 Mar 2014 16:05:53 +0000 (17:05 +0100)]
Bug 766: Move GetAuthvalueDropbox to C4::Koha

GetAuthvalueDropbox is in C4::Budgets, this does not make sense.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9593: (follow-up) don't make currency.isocode required
Galen Charlton [Sun, 4 May 2014 22:21:17 +0000 (22:21 +0000)]
Bug 9593: (follow-up) don't make currency.isocode required

This patch changes the price parsing so that it can fall
back on the currency name if an ISO code is not supplied; this allows
for handling the very common situation where the currency name
as entered was already the same as the ISO code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9593: update DBIC files
Galen Charlton [Sun, 4 May 2014 22:05:31 +0000 (22:05 +0000)]
Bug 9593: update DBIC files

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9593: DBRev 3.15.00.044
Galen Charlton [Sun, 4 May 2014 22:04:14 +0000 (22:04 +0000)]
Bug 9593: DBRev 3.15.00.044

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9593: (QA Followup)
Kyle M Hall [Tue, 22 Apr 2014 11:13:19 +0000 (07:13 -0400)]
Bug 9593: (QA Followup)

- use "ISO" instead of "iso"
- move hint text

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9593: improve parsing of prices from staged files
Lyon3 Team [Tue, 15 Apr 2014 10:13:05 +0000 (12:13 +0200)]
Bug 9593: improve parsing of prices from staged files

Initial bug :
When there's a round price with no decimals after it,
or when the symbol is after the digits, the price is not captured
by regular expression in MungeMarcPrice routine and the variable
is not initialized.

Enhancement :
The MungeMarcPrice routine had been widely modified.
It's still possible to priority pick the active currency but
unlike the previous mechanism that worked only for prices preceded
by the currency sign, it's now valid wherever the symbol is situated.
As symbol you may enter a pure currency sign as well as a string
including it like '$US'. Moreover, an 'isocode' column had been
added in currency table (editable in the staffo interface from
Administration/Currencies and exchange rates). So the active
currency can be picked either through its symbol or through its iso
code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, especially t/db_dependent/MungeMarcPrice.t
Checked currencies can be added, edited and deleted.
Notes: new ISO code field is mandatory.
       Sample sql files need to be updated (bug 12146)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10875: (follow-up) make displaying/hiding inactive funds work cross-browser
Galen Charlton [Sun, 4 May 2014 21:55:02 +0000 (21:55 +0000)]
Bug 10875: (follow-up) make displaying/hiding inactive funds work cross-browser

This uses the idea introduced by the patch for bug 8659 by Maxime
Pelletier.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) restore ability to select bibs in middle of import batch
Galen Charlton [Sun, 4 May 2014 21:29:41 +0000 (21:29 +0000)]
Bug 7180: (follow-up) restore ability to select bibs in middle of import batch

This patch repairs the JavaScript that selectively removes unselected
bibs from the form submission, fixing a problem where selecting
bibs from the middle or end of the list would cause them to be ordered
without the appropriate quantities, funds, and prices.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) fix regression on bug 6074
Galen Charlton [Sun, 4 May 2014 21:12:33 +0000 (21:12 +0000)]
Bug 7180: (follow-up) fix regression on bug 6074

This patch ensures that bibs selected for ordering are marked
as imported in their import batch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) fix warnings
Galen Charlton [Sun, 4 May 2014 21:06:50 +0000 (21:06 +0000)]
Bug 7180: (follow-up) fix warnings

This patch fixes some warnings (not introduced by the main
patches) regarding fetching the number of bibs in a batch
and fetching the list of batches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10875: (follow-up) preselect the fund located in the record
Jonathan Druart [Fri, 25 Apr 2014 09:14:00 +0000 (11:14 +0200)]
Bug 10875: (follow-up) preselect the fund located in the record

It is useless to copy the fund list in a new node. It seems easier to
hide/show inactive/active funds.

This patch also adds a "(inactive)" marker in the fund list for
inactive funds. If the fund located in the record is inactive, it is
displayed by default and cannot be hidden.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10875: ensure adding order from a staged file does not display inactive funds...
Jonathan Druart [Wed, 11 Sep 2013 08:01:34 +0000 (10:01 +0200)]
Bug 10875: ensure adding order from a staged file does not display inactive funds by default

When adding an order from a staged file, a link
"show all funds" is now added on the top of the
page. All inactive funds are hidden by default.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described.
- Loading the page, a fund needs to be selected. Before
  the patch the first fund was preselected.
- Checking the checkbox, inactive funds show up, but
  are not visible otherwise.
- If the fund is selected from the MARC file, the
  correct fund will be selected, even if it's inactive.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) require an authenticated session to use the AJAX authval dropbox
Galen Charlton [Sun, 4 May 2014 20:14:09 +0000 (20:14 +0000)]
Bug 7180: (follow-up) require an authenticated session to use the AJAX authval dropbox

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) point to new location of the jQuery checkboxes plugin
Galen Charlton [Sun, 4 May 2014 20:06:39 +0000 (20:06 +0000)]
Bug 7180: (follow-up) point to new location of the jQuery checkboxes plugin

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: DBRev 3.15.00.043
Galen Charlton [Sun, 4 May 2014 20:01:10 +0000 (20:01 +0000)]
Bug 7180: DBRev 3.15.00.043

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) use "MARC record" instead of "marcrecord"
Galen Charlton [Sun, 4 May 2014 20:00:04 +0000 (20:00 +0000)]
Bug 7180: (follow-up) use "MARC record" instead of "marcrecord"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) reset statistic values on reloading the page
Jonathan Druart [Wed, 23 Apr 2014 07:56:26 +0000 (09:56 +0200)]
Bug 7180: (follow-up) reset statistic values on reloading the page

On the "Default accounting details", if a dropdown list was created for
a statistic value, on reloading the page it still exist. It should not
given the fund value is reset.

The CGIsort variable is useless and can be remove: the dropdown list
is generated using the ajax call.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) fix various issues
Jonathan Druart [Wed, 16 Apr 2014 09:01:24 +0000 (11:01 +0200)]
Bug 7180: (follow-up) fix various issues

1/ showmarc.pl takes the importid for staged files.
2/ small note to indicate that the vendor's discount will be used if no
discount is filled.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) fix various issues
Jonathan Druart [Tue, 15 Apr 2014 14:31:18 +0000 (16:31 +0200)]
Bug 7180: (follow-up) fix various issues

* fix calculation of discount
* add CSS for unselected rows
* fix Javascript error
* correct capitalization
* use “Statistic” instead of “Planning value”
* improve description of system preference

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) remove disused script fetch_sort_dropbox.pl
Jonathan Druart [Thu, 6 Mar 2014 16:19:20 +0000 (17:19 +0100)]
Bug 7180: (follow-up) remove disused script fetch_sort_dropbox.pl

Test plan:
  git grep fetch_sort_dropbox
should return no result.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (followup) fix case where discount was divided by 100 twice.
Jonathan Druart [Fri, 27 Sep 2013 14:42:44 +0000 (16:42 +0200)]
Bug 7180: (followup) fix case where discount was divided by 100 twice.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) remove useless rrp variable
Jonathan Druart [Mon, 16 Sep 2013 10:45:52 +0000 (12:45 +0200)]
Bug 7180: (follow-up) remove useless rrp variable

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) restore the "Add order" link
Jonathan Druart [Thu, 12 Sep 2013 12:59:56 +0000 (14:59 +0200)]
Bug 7180: (follow-up) restore the "Add order" link

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) correct minor language issues
Kyle M Hall [Thu, 12 Sep 2013 12:35:41 +0000 (08:35 -0400)]
Bug 7180: (follow-up) correct minor language issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: QA followup
Jonathan Druart [Thu, 12 Sep 2013 09:44:25 +0000 (11:44 +0200)]
Bug 7180: QA followup

- fix unit tests (use a transaction).
- add 3 tabs on the page in order to be more understandable.
- fix a warn in logs

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) update license version
Jonathan Druart [Wed, 11 Sep 2013 07:35:16 +0000 (09:35 +0200)]
Bug 7180: (follow-up) update license version

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: make neworderempty code use getAuthValueDropbox.
Jonathan Druart [Tue, 10 Sep 2013 08:31:11 +0000 (10:31 +0200)]
Bug 7180: make neworderempty code use getAuthValueDropbox.

The js function fetchSortDropbox has been deleted in previous patch.
The new function is getAuthValueDropbox.

Test plan:
- link authorized values to some funds
- open an existing order and verify value are correctly filled in the
  sort1 and sort2 values
- create a new order and verify behavior is the same as before

Note: This patch generates 2 ajax queries (max) if the budget is linked
to 2 av categories for sort1 and sort2. This could be improved using a
template plugin for values display on load.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) change syspref description
Jonathan Druart [Tue, 10 Sep 2013 08:30:25 +0000 (10:30 +0200)]
Bug 7180: (follow-up) change syspref description

- the blank line is now useless
- add an example for the syspref value

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7180: (follow-up) fix minor issues
Katrin Fischer [Mon, 9 Sep 2013 20:53:49 +0000 (22:53 +0200)]
Bug 7180: (follow-up) fix minor issues

- Fixed some labels from Budget to Fund
- Added the system preference to sysprefs.sql
- Fixed some untranslatable Javascript strings

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>