koha.git
9 years agoBug 12451 - circulation rule cant be edited if itemtype contains a space character
Fridolin Somers [Thu, 19 Jun 2014 08:17:53 +0000 (10:17 +0200)]
Bug 12451 - circulation rule cant be edited if itemtype contains a space character

When an itemtype description contains a space character like " Book"
(often used to set this itemtype as first in sorted lists), the edition
of an existing circulation rule does not work, it selects the default
itemtype. Same for patron category.

It's because the JavaScript code performs a trim on value existing in
table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select
options in editing line.

Test plan :
- Create an itemtype with a leading or trailling space in description :
  ie " Book"
- Go to cgi-bin/koha/admin/smart-rules.pl
- Create a rule with this itemtype, Unit=hours and Hard due date=Exactly
  on 31/12/2015 (any date)
- Click on Edit on this rule line
  => Without this patch, the default itemtype is selected in edition
     line
  => With this patch, the correct itemtype is selected in edition line

Check others selects are ok :
  - Create a rule with Unit=hours and Hard due date=Exactly on
    31/12/2015 (any date)
  - Click on Edit on this rule line
    => The correct options are selected
Same tests with a patron category containing a leading or trailling space in description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8567: Set output directory for fines.pl in cron config created by the packages
Reed Wade [Thu, 26 Jun 2014 20:38:58 +0000 (16:38 -0400)]
Bug 8567: Set output directory for fines.pl in cron config created by the packages

Modified debian/koha-common.cron.daily adding instance output dir option to
the fines.pl entry as described in the ticket.

Requires patch from Bug 8566 which provides the __instancename__ feature for
koha-foreach.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12220 - bootstrap not responsive on all devices
Owen Leonard [Wed, 25 Jun 2014 17:07:52 +0000 (13:07 -0400)]
Bug 12220 - bootstrap not responsive on all devices

The bootstrap theme includes a meta tag attribute which disables zooming
on some devices. This was unintentional and not desirable. This patch
removes the problematic attribute.

See:
http://blog.javierusobiaga.com/stop-using-the-viewport-tag-until-you-know-ho

To test: Apply the patch and view the OPAC on a device with a touch
interface. Attempt to zoom in on any OPAC page. Zooming should work.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Reproduced using a smartphone.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12237: Remove the "horrible hack" in C4::Templates
Julian Maurice [Tue, 13 May 2014 08:21:43 +0000 (10:21 +0200)]
Bug 12237: Remove the "horrible hack" in C4::Templates

Use C4::Languages::getlanguage() instead of
C4::Templates::_current_language()

Test plan:
1/ Set one of the 4 XSLT sysprefs to 'default'
2/ Go to the corresponding page
3/ Switch language and check that the right XSLT is used
4/ Set the same syspref to something with '{langcode}' in it. For
example:
"../koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/UNIMARCslim2OPACDetail.xsl"
5/ Go back to the corresponding page
6/ Switch language and check that the right XSLT is used
7/ Change a compact.xsl for a language (for example
koha-tmpl/intranet-tmpl/prog/fr-FR/xslt/compact.xsl) to be able to see
differences
8/ Go to a biblio detail page in staff interface and click on "MARC
Preview: Show"
9/ Close the popup, switch language and click again on the same link
10/ Check that the correct XSLT is used.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No problems found, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10652 - Ajaxfileupload.js failing in IE9 for local image upload
David Cook [Mon, 29 Jul 2013 03:02:26 +0000 (13:02 +1000)]
Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload

This patch adds a try/catch to the Javascript for adding the iframe
element. The try will work for IE8 and older versions, while newer
versions and other browsers will be covered by the check.

Test Plan:

1) Try uploading a local cover image in IE9
2) Notice that your page is reloaded with no result (except the
pop-up of a Javascript error, if you have error reporting on in
your browser).

3) Apply the patch

4) Trying uploading a local cover image again
5) Notice that it uploads correctly

6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested in IE10 in IE10 "browser mode" and IE9 mode as well as in
Firefox. Uploads work correctly with book cover images and in MARC
uploads.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Also verified as working in Chrome.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Doesn't break functionality and fixes a known problem. I'll push this for
stable branches to use it, but will fill a new bug for updating AjaxFileUpload.js
from upstream.

9 years agoBug 12150: Add missing space and correct innerHTML typo
Jonathan Druart [Wed, 11 Jun 2014 10:47:28 +0000 (12:47 +0200)]
Bug 12150: Add missing space and correct innerHTML typo

The previous patch forgot to add a space between the string "Edit
action" and the placeholder.

Trying to test it, I found a typo: innerhtml does not exist, it should
be innerHTML.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12150 - Use more javascript string formatting in intranet for translated strings.
Pasi Kallinen [Mon, 28 Apr 2014 05:27:38 +0000 (08:27 +0300)]
Bug 12150 - Use more javascript string formatting in intranet for translated strings.

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

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No bug number on description
No commit message
No test plan
No koha-qa errors

I only signed this because it's useful for translations
but we can live without it, so is up to QA now

Tested some easy messages (e.g. syspref saving), and
updated PO files to check new strings.
Inspected the code, I think that there are no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12481: Staff client detail-view "next" link is greyed out when the last search...
Juhani Seppälä [Thu, 26 Jun 2014 08:28:19 +0000 (11:28 +0300)]
Bug 12481: Staff client detail-view "next" link is greyed out when the last search result of any results page is clicked or navigated into

When doing a staff client catalog search with more than 1 page of results
and clicking the last result on any search result page, the top-left navigation
button for "next" is greyed out.

Tested on newest Firefox & Chromium. Attempts to restore originally planned checks for navigation
with the exception of not using results.length due to buggy behaviour where the results get concatenated
upon page reload & "return to results" navigation - a separate issue?

To test:
1) Do an intranet catalog search that has more than 1 page of results.
2) Click on the last result on a page that is not the last one & confirm that the navigation button "next" is greyed out.
4) Apply patch.
5) Do an intranet search with more than 1 but less results than fit on a single page.
6) Click on the last result on the page and confirm that the "Next" navigation button is greyed out.
6) Do an intranet search with more than 1 page of results.
7) Click on the last result of a page that's not the final page of the results & confirm that "Next" is not grey out.
8) Navigate to the last page of the results and click on the final result & confirm that "Next" is greyd out.

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

This patch prevents the "Next" button on detail view to be grayed out at the end of e result page.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12485 - Show OPAC search history when opacuserlogin is OFF
Owen Leonard [Thu, 26 Jun 2014 19:03:37 +0000 (15:03 -0400)]
Bug 12485 - Show OPAC search history when opacuserlogin is OFF

In the boostrap OPAC the link to search history is missing if
opacuserlogin is turned off. OPAC search history should be available
whether or not users can log in. This patch removes this dependency.

To test, apply the patch and test with various combinations of
opacuserlogin and EnableOpacSearchHistory:

- opacuserlogin and EnableOpacSearchHistory both enabled
- opacuserlogin enabled and EnableOpacSearchHistory disabled
- opacuserlogin disabled and EnableOpacSearchHistory enabled

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes QA script and tests.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12463 - Capitalization: Calendar tool, headings for different types of holidays
Owen Leonard [Thu, 26 Jun 2014 19:33:07 +0000 (15:33 -0400)]
Bug 12463 - Capitalization: Calendar tool, headings for different types of holidays

There are several instances of incorrect capitalization in the Calendar
tool. This patch corrects them.

To test, apply the patch and go to Tools -> Calendar. Headings and
labels on the page should have correct capitalization.

Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String changes in the template, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12386 - 'Days in advance' pull down in bootstrap OPAC is huge
Owen Leonard [Mon, 30 Jun 2014 18:05:21 +0000 (14:05 -0400)]
Bug 12386 - 'Days in advance' pull down in bootstrap OPAC is huge

The "days in advance" form field on the "Your messaging settings" page
in the OPAC has a Bootstrap-default width which is too wide. This patch
adds a class to give it a more reasonable size.

To test you must have the EnhancedMessagingPreferences preference set to
"Allow." Log in to the OPAC and view the messaging settings page. The
dropdown menu of numbers should look correct.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands
Reed Wade [Thu, 26 Jun 2014 06:24:07 +0000 (02:24 -0400)]
Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands

koha-foreach has been modified to replace __instancename__ with $name
on each iteration using sed.

The docbook file for koha-foreach has also been updated to reflect the
new functionality.

To test:

    koha-foreach ls -ld /etc/koha/sites/__instancename__

should list directories instead of giving an error message.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
The suggested example with ls works as expected, as does my
more complex example with fines.pl:

koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \
--out /var/log/koha/__instancename__/

The man page looks good too.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoug 11857 - Number of patrons on a patron list not accurate
Fridolin Somers [Thu, 5 Jun 2014 15:21:28 +0000 (17:21 +0200)]
ug 11857 - Number of patrons on a patron list not accurate

When creating a patron list with only 1 patron, the patron
lists page says that the list contains 3 patrons.
When creating a patron list with only 1 patron, it works fine.

This is caused by the fact that access on "patron_list_patrons"
Koha::Schema::Result::PatronList object returns an hash if one
result and an array if more results.
See similar problem at
http://permalink.gmane.org/gmane.comp.lang.perl.modules.template-toolkit/7250

This patch replaces by the call on resultset and then the use of
"count" method.

Test plan :
- Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl
- Create a new patron list LIO
- Add one patron
- Create a new patron list LIM
- Add 2 patrons
- Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl
=> Without this patch you see :
  Name  Patrons in list
  LIO   3
  LIM   2
=> With this patch you see :
  Name  Patrons in list
  LIO   1
  LIM   2

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Confirmed the problem and that
the patch fixes it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBUG 12304: LDAP auto-provisioning set default messaging preferences
Martin Renvoize [Wed, 21 May 2014 14:18:14 +0000 (14:18 +0000)]
BUG 12304: LDAP auto-provisioning set default messaging preferences

LDAP auto-provisioning should set default messaging preferences upon
creation of a user.

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Manually applied to 3.12.9 and it works beautifully in test and production.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12456: The file C4/Maintainance.pm, and by extension the file t/Maintainance...
Yohann Dufour [Fri, 20 Jun 2014 09:22:31 +0000 (11:22 +0200)]
Bug 12456: The file C4/Maintainance.pm, and by extension the file t/Maintainance.t, has been removed

The file C4/Maintainance.pm is not used anywhere, it can be removed, and by extension, the file t/Maintainance.t too.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
A relic from the past :)
No references to this file or it's subs
No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811 [QA Followup] - Enable bProcessing
Kyle M Hall [Wed, 2 Jul 2014 14:17:37 +0000 (10:17 -0400)]
Bug 9811 [QA Followup] - Enable bProcessing

It's a bit disconcerting to not have any feedback while paging
through the patrons. Enabling bProcessing helps resolve that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Fix wording branch vs library
Jonathan Druart [Wed, 11 Jun 2014 13:20:37 +0000 (15:20 +0200)]
Bug 9811: Fix wording branch vs library

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

1) Top search
- OK no regressions found

2) New filters

- OK Terminology
- OK Search fields, search types, category, library
- OK Clear button

3) Result list

- OK Cardnumber
- OK Name, address and email
- OK Fines, checkouts and overdues
- OK Adding patrons to patron lists
- OK Select all/unselect all
- OK Sorting on the various columns
- OK Paging
- OK PatronsPerPage system preference

4) Performance
Tested with a database containing 40.000 patrons.
Search results were displayed with a little delay,
overall performance seemed pretty good.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Cardnumber could be alphanumeric
Jonathan Druart [Wed, 11 Jun 2014 13:05:31 +0000 (15:05 +0200)]
Bug 9811: Cardnumber could be alphanumeric

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Various fixes
Jonathan Druart [Mon, 9 Jun 2014 15:35:43 +0000 (17:35 +0200)]
Bug 9811: Various fixes

This patch fixes the issues raised in bug 9811 comment 105, 106 and 107:
1/ Add missing space between category and type.
2/ Fix error on searching an empty string (caused by a previous rebase).
3/ Remove sort option on checkbox/borrowernumber column.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Remove useless orderby management
Jonathan Druart [Mon, 9 Jun 2014 15:35:15 +0000 (17:35 +0200)]
Bug 9811: Remove useless orderby management

I don't know what is this stuff. I didn't find a call to member.pl with
an orderby parameter.
I am not sure this is in used.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Display email address in patron result list
Jonathan Druart [Mon, 9 Jun 2014 15:33:48 +0000 (17:33 +0200)]
Bug 9811: Display email address in patron result list

This patch restores the enhancement introduced by Bug 10318.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: QA follow-up: Fix license version
Jonathan Druart [Mon, 28 Apr 2014 09:06:06 +0000 (11:06 +0200)]
Bug 9811: QA follow-up: Fix license version

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811 - datetime does not respect DateFormat-system prefrence
Olli-Antti Kivilahti [Fri, 14 Mar 2014 11:39:03 +0000 (12:39 +0100)]
Bug 9811 - datetime does not respect DateFormat-system prefrence

To test:
Try searching by the date of birth using the left filter column. Good luck.

After applying this patch:
You can search using your preferred DateFormat.

Merci bocu

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: FIX encoding issue on patron categories
Jonathan Druart [Fri, 14 Mar 2014 10:03:34 +0000 (11:03 +0100)]
Bug 9811: FIX encoding issue on patron categories

The patron categories should use the html_entity filter (on the current
master).

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
This fix solves the issue of double encoding some utf8-characters by html_encoding the
patron categories, which are not marked as utf8.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Fixing JSON validation error for non-javascript string literal characters
Olli-Antti Kivilahti [Thu, 13 Mar 2014 10:58:18 +0000 (11:58 +0100)]
Bug 9811: Fixing JSON validation error for non-javascript string literal characters

Issue:
When a patron has backslashes in his circulation notes, the JSON transportation
layer cannot send the message because it will fail JSON validation when trying to
validate backslashed non-literal characters (\s \d ...).
This causes the whole search to fail when even one Borrower has a non-literal
backslashed character in his notes.

Solution:
The Borrowers' circulation notes are filtered through a regexp which doubles all
backslashes to prepare them for the JSON validation routine.

Result:
Backslashes pass through unchanged.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: FIX branches loop was not correctly set
Jonathan Druart [Fri, 10 Jan 2014 10:24:48 +0000 (11:24 +0100)]
Bug 9811: FIX branches loop was not correctly set

The branches loop was not set with the values.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Patron search improvement
Jonathan Druart [Tue, 19 Mar 2013 10:12:26 +0000 (11:12 +0100)]
Bug 9811: Patron search improvement

This patch add DataTables using server-side processing for the patrons
search.

It adds:
- 1 module C4/Utils/DataTables/Members.pm
- 2 services svc/members/search and svc/members/add_to_list
- 1 template members/tables/members_results.tt
- 1 new practice which is to add template for DataTables in a
  subdirectory named 'tables'.

Impacted scripts: members/members-home.pl and members/members.pl

To go further: We can imagine that all patrons searches use the same
service with no big changes: 1 little template creates a JSON file and
to implement DataTables on the template page, that's all.

Amended patch: Since bug 10565 has been pushed, these patches don't
apply cleanly. I had to rewrite a part of the patron list feature.
I removed the choice to add all resultant patrons from a search. I think
this choice is useless with this patch: we are able to display the
number of patrons we want and to select all of them.

Test plan:
- Check that there is no regression on searching patrons.
- Try filters on the left of the screen.
- Try to sort each column.
- Try the "Browse by last name" links.
- Check that the "Clear" button clears yours filters.
- Try with IndependantBranches ON and OFF.
- Verify this feature does not break the patron list feature (cf bug
  10565).

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, couldn't find any regressions
or problems. Some notes left on the bug.

Bug 9811: Add unit tests for C4::Utils::DT::Members

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Bug 9811: QA followup

- removes 2 tabs
- removes mysqlisms
- add sort on borrowernotes
- fix wrong capitalization
- cat => Category

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for fixing these!

Bug 9811 - multilines notes brakes JSON

In new patron search feature, the search results are fetched using Ajax and returned in JSON format.
The JSON is created by TT using koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt.
One of the fields is the borrower notes. When this notes contains several lines, the JSON is broken.

This patch uses TT fileters to consert in notes linefeeds into HTML line break (html_line_break) and then remove linefeeds (collapse).

Test plan :
- perform a member search that does not return a borrower with a circ note
- edit one of the borrowers returned by this search
- enter serveral lines of text in "Circulation note" and save
- reperform the member search
=> circ note is well displayed on several lines

Bug 9811: use count(primary_key) instead of count(*)

Bug 9811: A limit clause should be always added.

By default, we want to retrieve 20 first results.

Bug 9811: Load the page without any data.

Displaying the first 20 patrons is not useful. With this patch, the
table is hidden and no record is retrieved by default.
On the same way, the existing side effect on redirect disappears.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
-------------
-TEST REPORT-
-------------
For the filter: Tested all the search fields, branches, search type.
Found a bug with "date of birth", followup provided.
Tested display limits and verified that AJAX-queries are
  efficient (using LIMIT clause) to not stress DB needlessly.
Tested adding Patrons to a list.
A good feature, which seems to work quite well.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adding my test plan to the last patch of this bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12337 - Multi-clicking the renewal buttons on circulation.pl can trigger "renewal...
Kyle M Hall [Fri, 30 May 2014 11:17:25 +0000 (07:17 -0400)]
Bug 12337 - Multi-clicking the renewal buttons on circulation.pl can trigger "renewal failed" message.

Each time the "renew all" or "renew or return" buttons are click, the
renewal process is triggered. If the patron only has one renewal left,
and the button is multi-clicked, the librarian may receive a
"renewal failed" message even though the renewal did occur. In
addition, this can just unwanted multiple consecutive renewals
as well.

Test Plan:
1) Check out an item to a patron that can have 1 renewal
2) Click the "renew all" button multiple times, fast and furiously
3) Note the "renewal failed" messaged
4) Apply this patch
5) Repeat steps 1 and 2
6) Note the item is now renewed without the failure message

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11357 - biblioitems.size value not correctly displayed in list emails sent from...
Fridolin Somers [Thu, 19 Jun 2014 12:47:15 +0000 (14:47 +0200)]
Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet

The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable.

It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places:

[% END %]
   [% IF BIBLIO_RESULT.size %]
   , [% BIBLIO_RESULT.size %]
[% END %]

This patch corrects by using item() TT method.
See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template.

Test plan :
In each display :
=> Without this patch you see biblioitems.pages and then a number
=> With this patch you only see biblioitems.pages

- Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined
Same for OPAC and intranet :
- Add it to the cart
- Open the cart
- Check the "Title" column
- Click on "More Details"
- Check the "Details" row
- Send the basket via email and check the result
- Add to a list
- Send the list via email and check the result

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well!!
Tested on staff & opac, cart & list.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 11810: (followup) regenerate CSS due to conflict
Tomas Cohen Arazi [Mon, 30 Jun 2014 19:15:18 +0000 (16:15 -0300)]
Bug 11810: (followup) regenerate CSS due to conflict

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)
Owen Leonard [Fri, 27 Jun 2014 15:30:17 +0000 (11:30 -0400)]
Bug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)

The default Bootstrap input size (absent any specific input size or
class) is too short for the suggestion form. This patch adds a Bootstrap
class to fields which need more room and adjusts the OPAC CSS to allow
for better handling of input width at lower screen widths.

To test apply the patch and clear your browser cache if necessary. Open
the "new suggestion" form in the OPAC and confirm that the entry fields
for title, author, publisher, and collection title are sized well.

Adjust the width of your browser window up and down to confirm that the
field sizes adjust well at various screen widths.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12419: Not for loan items are not listed
Jonathan Druart [Fri, 13 Jun 2014 13:27:45 +0000 (15:27 +0200)]
Bug 12419: Not for loan items are not listed

On the cataloguing search (cataloguing/addbook.pl), if an item has a
notforloan value > 0, the item is not listed in the Location column.

It is quite confusing, the current behavior let patrons believe that
there is not item for the biblio (or less than the real count).

Test plan:
1/ Create 2 biblio records A and B
2/ Create some items for A
3/ Create 1+ item(s) for B with a notforloan status > 0
4/ Reindex both records
5/ Launch a search on the cataloguing module and verify that the
notforloan items are not listed in the 'Location' column.
6/ Apply this patch and verify the not for loan items are listed ("Not
for loan (XXX)").

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, not for loan items now show up.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12419: (QA followup) regression tests
Tomas Cohen Arazi [Mon, 30 Jun 2014 17:55:04 +0000 (14:55 -0300)]
Bug 12419: (QA followup) regression tests

Changes to searchResults deserve unit tests.

Edit: minor tweaks:
 - Remove warning in line 702
 - Modernize
 - License added
 - "This file is a stub" removed

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12455: (QA followup) license text missing
Tomas Cohen Arazi [Mon, 30 Jun 2014 15:27:45 +0000 (12:27 -0300)]
Bug 12455: (QA followup) license text missing

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12455: adding unit tests for the module C4/SMS.pm
Yohann Dufour [Fri, 20 Jun 2014 08:42:13 +0000 (10:42 +0200)]
Bug 12455: adding unit tests for the module C4/SMS.pm

The module C4/SMS.pm was not tested

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

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Replace stub test, all test pass.
Removed "use strict/warnings", no need for that with "use Modern::Perl"
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12223 - members-update.tt has misspelled field B_phone name
Bernardo Gonzalez Kriegel [Fri, 27 Jun 2014 19:42:39 +0000 (16:42 -0300)]
Bug 12223 - members-update.tt has misspelled field B_phone name

This patch fixes a misspelled word

To test:
1. login in opac, clic personal details, change Alternate phone
number and submit
2. go to staff, Patrons, clic on link 'Patrons requesting modifications'
Alternate phone has mispelled label
3. apply the patch
4. reload, label is fixed

Followed test plan. Typo is fixed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a typo, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12361 - No default value for opaccolorstylesheet syspref
Fridolin Somers [Thu, 5 Jun 2014 07:28:29 +0000 (09:28 +0200)]
Bug 12361 - No default value for opaccolorstylesheet syspref

After install, the syspref opaccolorstylesheet will by default contain colors.css.
This file exist in OPAC prog theme but not in bootstrap theme.

This patch set the syspref empty by default in installer/data/mysql/sysprefs.sql.

Test plan :
- Create a fresh install
- Look at opaccolorstylesheet content
=> without this patch : is contains colors.css
=> with this patch : it is empty
- Enable opac bootstrap theme
- Go to opac main page
- Look at HTTP errors (with firebug for example)
=> without this patch : there is a 404 error because colors.css does not exist
=> with this patch : no such error

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12479: (QA followup) minor fixes, and tcohen added
Tomas Cohen Arazi [Mon, 30 Jun 2014 13:03:11 +0000 (10:03 -0300)]
Bug 12479: (QA followup) minor fixes, and tcohen added

David's name gets alphabeticaly sorted, and Tomás is added.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12479 - [SIGNED-OFF] Update mailmap for master
David Cook [Wed, 25 Jun 2014 06:52:54 +0000 (16:52 +1000)]
Bug 12479 - [SIGNED-OFF] Update mailmap for master

Just wanted to add a mailmap entry so that GitStats merges together
the commits I made as "David <dcook@prosentient.com.au>" versus
"David Cook <dcook@prosentient.com.au>".

Also increases accuracy if myself or others does a git shortlog...

_TEST PLAN_

Before applying:

1) Run 'git shortlog --author="dcook@prosentient.com.au"'
2) Note two entries: one for "David" and one for "David Cook".

3) Apply patch

4) Repeat step 1
5) Note only one entry for "David Cook"

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Works as advertised.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 7143: Updating new developers
Chris Cormack [Mon, 23 Jun 2014 20:15:47 +0000 (08:15 +1200)]
Bug 7143: Updating new developers

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Edit: Switched from spaces to tabs in history.txt.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12464 - Bootstrap XSLT view no longer displaying 505 correctly formatted
Owen Leonard [Thu, 26 Jun 2014 18:13:40 +0000 (14:13 -0400)]
Bug 12464 - Bootstrap XSLT view no longer displaying 505 correctly formatted

505 contents notes are not displayed correctly in the Bootstrap theme
because the relevant CSS was not included in the transfer from prog.
This patch adds it.

To test, apply the patch and view a record in the OPAC which contains a
505 note with contents details. Clear your browser cache if
necessary. The contents should appear correctly, with a line break for
each entry.

I tested with the same biblio as shown in attachment #1 (imported from Library of Congress)
After applying patch the record displays the same as in prog theme
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS change only. Works as expected, no problems found.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12443: (QA followup) Unit tests for _build_initial_query
Tomas Cohen Arazi [Wed, 25 Jun 2014 19:29:18 +0000 (16:29 -0300)]
Bug 12443: (QA followup) Unit tests for _build_initial_query

This followup adds uint tests for the newly introduced function.
It is really basic, but covers all scenarios for the new function,
and will help us prevent regressions in future patches.

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12443 - Initial re-factoring of buildQuery
David Cook [Wed, 18 Jun 2014 06:26:31 +0000 (16:26 +1000)]
Bug 12443 - Initial re-factoring of buildQuery

This patch reduces three repeated code fragments into a single
internal subroutine, which is easier to read, has comments,
and should make it easier to refactor more buildQuery code
in the future.

_TEST PLAN_

Before applying

1) Run a bunch of different searches in the staff client and OPAC
in separate tabs

2) Apply the patch

3) Run the same searches again (maybe in yet more tabs) and notice
that the results are exactly the same.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Same results, no errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12143 - hiding alternate address on patron self registration doesn't hide heading
Jacek Ablewicz [Mon, 23 Jun 2014 10:08:26 +0000 (12:08 +0200)]
Bug 12143 - hiding alternate address on patron self registration doesn't hide heading

This patch fixes the following issue: in OPAC self registration form,
even if all alternate address fields are configured as hidden,
the heading for "Alternate address" still shows.

To test:

1/ Confirm the issue: hide all alternate adres field names (i.e., enter
B_address|B_address2|B_city|B_state|B_zipcode|B_country|B_phone|
B_email|contactnote into PatronSelfRegistrationBorrowerUnwantedField
system prefrence).
2/ Observe that "Alternate address" section heading still shows
in patron self registration form ("your personal details" tab),
despite that all section fields are configured as hidden.
3/ Apply patch.
4/ Reload OPAC self registration form; confirm that "Alternate address"
is not displyed any longer, and the issue is now fixed.
5/ Remove some field name (e.g. B_address2) from
PatronSelfRegistrationBorrowerUnwantedField; ensure that "Alternate
address" heading does show if at least one section field is not
hidden.
6/ Test steps 1-5 should be performed/repeated in both bootstrap
and prog OPAC themes.

Followed test plan with prog and bootstrap themes, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 11715: Update POD for get_template_and_user
Jonathan Druart [Fri, 2 May 2014 10:06:30 +0000 (12:06 +0200)]
Bug 11715: Update POD for get_template_and_user

If flagsrequired is set, authnotrequired should be 0.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715: require authentication for various staff scripts
Galen Charlton [Tue, 29 Apr 2014 17:04:02 +0000 (17:04 +0000)]
Bug 11715: require authentication for various staff scripts

To test:

[1] Verify that item record creating and editing during the
    acquisitions process continues to work.
[2] Verify that calling  services/itemrecorddisplay.pl without
    a valid user session fails.
[3] Verify that authentication is required for making a new
    order from a suggestion, transferring an order, doing a
    Z39.50 search from acquisitions, displaying the record
    card view in the staff interface, and running the till
    reconciliation report (/cgi-bin/koha/reports/stats.screen.pl)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified all changed scripts are not accessible witout a valid
user session, but are with one.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715 : require authentication for the cataloging authorities Z39.50 search
Chris Cormack [Sun, 16 Mar 2014 20:15:05 +0000 (09:15 +1300)]
Bug 11715 : require authentication for the cataloging authorities Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl notice you now
   need to login

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>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715: require authentication for the cataloging Z39.50 search
Chris Cormack [Mon, 10 Mar 2014 21:56:53 +0000 (10:56 +1300)]
Bug 11715: require authentication for the cataloging Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_search.pl notice you now need
to login

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>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715: Set the default of authnotrequired = 0 in get_template_and_user
Chris Cormack [Mon, 10 Mar 2014 21:51:00 +0000 (10:51 +1300)]
Bug 11715: Set the default of authnotrequired = 0 in get_template_and_user

To test:

Verify that pages in the OPAC and staff interface display correctly.

Note that there are cases where 'authnotrequired' was not passed
at all to get_template_and_user, so there may be pages that start
requiring authentication.  Whether that is correct or not depends
on context.

Follow up patches are to remove all the unnessecary setting of this
value, so that the only places we set are when we do want
authnotrequired=1

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>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12427: Allow execution of UTs on a DB with issues
Jonathan Druart [Thu, 19 Jun 2014 11:50:31 +0000 (13:50 +0200)]
Bug 12427: Allow execution of UTs on a DB with issues

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12427: adding unit tests of module C4::Members::Attributes.pm
Yohann Dufour [Tue, 17 Jun 2014 14:53:14 +0000 (16:53 +0200)]
Bug 12427: adding unit tests of module C4::Members::Attributes.pm

The subroutines UpdateBorrowerAttribute, SearchIdMatchingAttribute, DeleteBorrowerAttribute, GetBorrowerAttributes, GetAttributes, GetBorrowerAttributeValue, SetBorrowerAttributes and CheckUniqueness of the module C4::Members::Attributes.pm were not tested.

Test plan:
1/ Execute the command: prove t/db_dependent/Members_Attributes.t
2/ The result has to be:
t/db_dependent/Members_Attributes.t .. ok
All tests successful.
Files=1, Tests=60,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.45 cusr  0.08 csys =  1.58 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test with patrons on db having issues and attributes
New test file, all test pass
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler
Kyle M Hall [Mon, 16 Jun 2014 11:30:03 +0000 (07:30 -0400)]
Bug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11292 - barcode scanner clicking 'save'
Kyle M Hall [Thu, 22 May 2014 12:35:16 +0000 (08:35 -0400)]
Bug 11292 - barcode scanner clicking 'save'

When cataloging a bib record if you scan an ISBN barcode in the barcode
scanner clicks the 'save' button before the cataloging is done. This did
not happen in 3.10, but is happening again in 3.12.

Test Plan:
1) Open the marc editor
2) Focus on a field, hit the enter key
3) Note the record tries to save
4) Focus on an indicator, hit the enter key
5) Note the record tries to save
6) Apply this patch
7) Repeat steps 2 and 4, note the record no longer
   tries to save upon carriage return

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Patch tested with a sandbox.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428: remove debugging leftover
Tomas Cohen Arazi [Mon, 23 Jun 2014 23:23:08 +0000 (20:23 -0300)]
Bug 12428: remove debugging leftover

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428: (QA followup) regression tests.
Tomas Cohen Arazi [Mon, 23 Jun 2014 19:36:43 +0000 (16:36 -0300)]
Bug 12428: (QA followup) regression tests.

Just that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428 - "OPAC info" is not displayed in the OPAC
Owen Leonard [Mon, 16 Jun 2014 16:56:24 +0000 (12:56 -0400)]
Bug 12428 - "OPAC info" is not displayed in the OPAC

The changes made by Bug 7720 ("Ambiguity in OPAC Details location")
broke the display of OPAC branch information tooltips by making changes
to the markup which the tooltip plugin needs to function.

This patch corrects the markup to enable tooltips to work again. This
patch also makes changes to Items.pm so that branch information tooltips
can be shown for both home and holding branches (which are optionally
displayed now via the changes by Bug 7720). Before this patch the
tooltip would always display the information for the holding branch
regardless of the OpacLocationBranchToDisplay setting.

This patch also changes the footer include, adding an alias for the
jQueryUI tooltip function to prevent conflict with Bootstrap's function
of the same name.

To test, you must have at least two libraries configured with "OPAC
info" for display in the OPAC.

Modify the holdings of a title so that there is at least one item which
has different holding and home branches matching your library configured
above.

View the detail page for that record under various values of the
OpacLocationBranchToDisplay system preference:

- "holding library" : The table of holdings should show a column for
  only the holding library. Hovering your cursor over the library name
  should display the branch information you configured for that library
  in a tooltip .

- "home and holding library" : The table of holdings should show columns
  for both home and holding library. Hovering your cursor over each
  should show the corresponding library information tooltips.

- "home library" : The table of holdings should show a column for
  only the home library. Hovering your cursor over the library name
  should display the branch information you configured for that library
  in a tooltip.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Works with all settings of OpacLocationBranchToDisplay.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11742: (QA followup) wrong number of tests
Tomas Cohen Arazi [Mon, 23 Jun 2014 18:22:37 +0000 (15:22 -0300)]
Bug 11742: (QA followup) wrong number of tests

The number of tests was wrong.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11742: FIX the code parameter was not take into account
Jonathan Druart [Mon, 9 Jun 2014 10:21:31 +0000 (12:21 +0200)]
Bug 11742: FIX the code parameter was not take into account

In C4::Letters::GetLetters, the code filter was not used as a query
parameter.

Moreover, the JS code was buggy. We only need to check the letter code,
except if it is an edit and the letter code has not been changed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 11742: A letter code should be unique.
Jonathan Druart [Wed, 7 May 2014 14:12:39 +0000 (16:12 +0200)]
Bug 11742: A letter code should be unique.

This patch is a dirty way to fix a design issue on notices.
Currently the code assumes that a letter code is unique. Which is wrong,
the primary key is module, code, branchcode.

Maybe we should add a primary key (id) for the letter table in order to
pass the id to the template and correctly manage the letter code
duplication.

Test plan:
Try to duplicate a letter code using edit, add and copy actions.
If you manage to do it, please describe how you did.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 11742: Change return type for GetLetters
Jonathan Druart [Wed, 7 May 2014 13:55:54 +0000 (15:55 +0200)]
Bug 11742: Change return type for GetLetters

The GetLetters subroutine should return an arrayref with different
letters for a module.

Test plan:
0/ Delete your notices with module=claimacquisition, claimissues,
serial
1/ Go on the late orders page (acqui/lateorders.pl) and verify you
cannot choose a notice for claiming
2/ Create a notice with module=claimacquisition
3/ Go on the late orders page (acqui/lateorders.pl) and verify you
can choose the notice for claiming
4/ Go on the Claim serials page (serials/claims.pl) and repeat the same
thing with the a "claimissues" notice
5/ Create a new subscription (serials/subscription-add.pl) and verify
you cannot choose a notification for patrons.
6/ Create a notice with module "serial" and verify you can.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Additional tests done:

- copy notice ODUE, on saving you are now prompted to choose
  a new CODE for the notice
- edit new notice, try to set code back to ODUE. You are
  prompted that the code is already in use.

This will prevent people from accidentally overwriting a letter
with the same letter code.

9 years agoBug 12350 - disable apache indexes
Robin Sheat [Tue, 3 Jun 2014 02:23:43 +0000 (14:23 +1200)]
Bug 12350 - disable apache indexes

Test plan:
* Go to http://library/opac-tmpl and check you get a 403 error instead
  of a directory listing.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12231 - Update AllowMultipleIssuesOnABiblio language
Nicole C. Engard [Sat, 31 May 2014 16:47:05 +0000 (11:47 -0500)]
Bug 12231 - Update AllowMultipleIssuesOnABiblio language

This preference had misleading language, this patch changes it a bit
to make it clearer.

To test:
* Apply patch
* Visit System Preferences
* Go to Circulation Tab
* Read description of AllowMultipleIssuesOnABiblio preference
* Confirm that it is clearer

http://bugs.koha-community.org/show_bug.cgi?id=12231
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
String patch, no errors

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12086: qa-followup: remove warning on launching unit tests
Jonathan Druart [Mon, 23 Jun 2014 09:43:48 +0000 (11:43 +0200)]
Bug 12086: qa-followup: remove warning on launching unit tests

Without this patch, the following warning appears:
  t/db_dependent/Holds/RevertWaitingStatus.t .. Subroutine
  C4::Context::userenv redefined at
  t/db_dependent/Holds/RevertWaitingStatus.t line 25.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12086 - Hold priorities incorrect, when waiting status was reversed
Kyle M Hall [Thu, 17 Apr 2014 16:10:21 +0000 (12:10 -0400)]
Bug 12086 - Hold priorities incorrect, when waiting status was reversed

1) Test record has 1 single item, checked out to patron X
2) Place 3 holds for patrons A, B and C, all title level hold this time
   A, B, C, item branches and staff branch are the same.
3) Return item, confirm hold
4) Confirm item is now waiting for patron A
   Priorities are: A = Waiting, B = 1, C = 2
5) Open patron account of user B, checkout book
   Koha asks: Item X has been waiting for patron A... Revert
   waiting status
   Confirm.
6) Check priorities:
   Hold list shows: A = 1, C = 1
   Database says: A = 1, C = 3
7) Apply this patch
8) Repeat steps 1-6
9) Note the priorities are correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan correctly predicts the error and the correction made by the
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12393 - Depend on SSL module for LWP, for OverDrive
Jesse Weaver [Tue, 10 Jun 2014 01:25:47 +0000 (19:25 -0600)]
Bug 12393 - Depend on SSL module for LWP, for OverDrive

The OverDrive integration needs to connect to an authentication server
over HTTPS, and many systems do not install the necessary module
(LWP::Protocol::https) by default.

Test plan (for patch):
  1) Run koha_perl_deps.pl -a, verify that LWP::Protocol::https appears in
     listing.

Test plan (to verify that LWP::Protocol::https is necessary, needs OverDrive access):
  1) Remove LWP::Protocol::https (liblwp-protocol-https-perl under Debian).
  2) Run an OverDrive search on the OPAC, it should fail.
  3) Reinstall LWP::Protocol::https.
  4) Rerun OverDrive search, it should now succeed.

Note: older versions of Debian do not need to install LWP::Protocol::https separately;
the Debian scripts have been updated to reflect this divide.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12416: add new tests of DelUniqueDebarment
Yohann Dufour [Mon, 16 Jun 2014 08:19:02 +0000 (10:19 +0200)]
Bug 12416: add new tests of DelUniqueDebarment

The subroutine DelUniqueDebarment was not enough tested

To test: execute the command prove t/db_dependent/Borrower_Debarments.t
The command has to print:
t/db_dependent/Borrower_Debarments.t .. ok
All tests successful.
Files=1, Tests=31,  1 wallclock secs ( 0.03 usr  0.01 sys +  1.44 cusr  0.08 csys =  1.56 CPU)
Result: PASS

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12416: the subroutine 'ok' is replaced by the subroutine 'is'
Yohann Dufour [Mon, 16 Jun 2014 07:31:13 +0000 (09:31 +0200)]
Bug 12416: the subroutine 'ok' is replaced by the subroutine 'is'

The use of the subroutine 'is' is prefered over the subroutine 'is'

To test: execute the commande prove t/db_dependent/Borrower_Debarments.t
To command has to print:
t/db_dependent/Borrower_Debarments.t .. ok
All tests successful.
Files=1, Tests=22,  1 wallclock secs ( 0.03 usr  0.01 sys +  1.42 cusr  0.08 csys =  1.54 CPU)
Result: PASS

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12416: add the test of DelUniqueDebarment
Yohann Dufour [Mon, 16 Jun 2014 07:13:35 +0000 (09:13 +0200)]
Bug 12416: add the test of DelUniqueDebarment

The subroutine DelUniqueDebarment was not tested

To test: execute the command prove t/db_dependent/Borrower_Debarments.t
The command has to print:
t/db_dependent/Borrower_Debarments.t .. ok
All tests successful.
Files=1, Tests=22,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.43 cusr  0.07 csys =  1.54 CPU)
Result: PASS

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12462: Fix some POD errors
Tomas Cohen Arazi [Fri, 20 Jun 2014 19:52:59 +0000 (16:52 -0300)]
Bug 12462: Fix some POD errors

Bug 12041 made xt/author/podcorrectness.t consider files in the 'Koha' namespace.
Some of them where failing. This patch fixes some of those POD problems.

Best regards
To+

Test:
1) run prove xt/author/podcorrectness.t
it fails
2) apply patch
3) run again, now it's ok

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Before patch test fails. After it, it pass
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11021: Suppress unneeded fields in unimarc_complet default Framework
Mathieu Saby [Wed, 9 Oct 2013 18:28:09 +0000 (20:28 +0200)]
Bug 11021: Suppress unneeded fields in unimarc_complet default Framework

First patch, for "complete" framework, used by academic libray
900, 901, 910, 918, 920,950,960,970,980,987 fields were useless. I removed them.
I kept only the fields mentionned in Sudoc documentation http://documentation.abes.fr/sudoc/formats/loc/index.htm
916 field is not cited in that page, but it belongs to Sudoc format.

I kept also 2 fields specific to Electre in 2013 :
902 niveau de lecture (Electre)
903  indexation (Electre)

I also added to the name of the 9XX fields I kept the mention (Sudoc) / (Electre) / (Koha), so it could be easier for librarians to know what is the purpose and the origin of each field

I don't make an updatedatabase, because some libraries could still be using these fields for good or bad reasons.

To test :
1) take a fresh Koha with unimarc marcflavor
2) in web installer, select french language, unimarc marflavor and "Grilles de catalogage complètes".
3) check default framework in Administration > MARC Frameworks : it should be without 900,901,910,918,920,950,970,980,987

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12367 - Import patrons still says "MD5 hash"
Magnus Enger [Thu, 5 Jun 2014 07:58:36 +0000 (09:58 +0200)]
Bug 12367 - Import patrons still says "MD5 hash"

The password hashing algorithm was changed in Bug 9611,
but on Tools > Import patrons, in the text on the right
hand side, it still says:

"'password' should be stored in plaintext, and will be
converted to a MD5 hash"

This has no practical effect, of course, but to someone
evaluating Koha it might give the false impression that
password security is lower than it really is.

To test:
- Look at Tools > Import patrons and verify that it says
  "a MD5 hash"
- Also look at the help page and see the same text
- Apply the patch
- Check that both the tool and the help now says
  "a Bcrypt hash"

I'll do a patch for the docs too.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12379: remove double use of plugin KohaDates
Yohann Dufour [Fri, 6 Jun 2014 08:34:46 +0000 (10:34 +0200)]
Bug 12379: remove double use of plugin KohaDates

The file catalog/detail.tt uses twice the plugin KohaDates, one can be removed

test plan: verify there is no regression about the dates on the biblio detail page

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No problem with dates, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No regressions found. Congratulations on your first patch Yohann!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12261: Staff client next/previous links lead to unknown record
Juhani Seppälä [Tue, 17 Jun 2014 10:05:10 +0000 (13:05 +0300)]
Bug 12261: Staff client next/previous links lead to unknown record

When using Staff client next/previous links after a search :
If the current record is the last of the results, clicking on "next"
will lead to the page of an unknown record with message :

The record you requested does not exist (NaN).

To test:
1) Do an intranet catalog search that has more than 1 results.
2) Click on the last search result and then click the "Next"-button from
   the top-left navigation.
3) Confirm that you get thrown to a page with the message: "The record
   you requested does not exist (NaN).".
4) Apply patch.
5) Repeat steps 1 - 2.
6) Confirm that the navigation button for "Next" is greyed out.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This patch fixes the problem with last result in both single pages of
search results and multiple pages of search results.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12299: Translate marc21_relatorterms.sql into Italian
Zeno Tajoli [Fri, 20 Jun 2014 09:47:00 +0000 (11:47 +0200)]
Bug 12299: Translate marc21_relatorterms.sql into Italian

To test:
- Apply this patch.
- Reset your DB (DROP DATABASE, CREATE DATABASE -- whatever method you
  prefer)
- Install it-IT templates on command line
- Run the webinstaller using it-IT
- Follow the steps and choose all under 'opzionali'
=> SUCCESS: no errors
=> Sign this
=> Extra: see the authorised value 'RELTERMS' and check if you like the
   translation

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested loading file.
Two errors fixed:
a) duplicate line ... ('RELTERMS','con', 'Conservatore')
b) missing semicolon ...  ('RELTERMS','voc','Cantante')

With that file loads Ok
No koha-qa errors

Ooops, forget the fix. Resubmited

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds an optional SQL file to the Italian installer - works as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Removed BOM from file.

9 years agoBug 12255 - Amazon cover images have useless image alt text in bootstrap
Owen Leonard [Thu, 22 May 2014 16:22:44 +0000 (12:22 -0400)]
Bug 12255 - Amazon cover images have useless image alt text in bootstrap

"item-thumbnail" is not a useful alt text for an Amazon book cover
image. Better would be the link's title text, "View on Amazon.com." This
patch makes this correction. (Rather than "View at Amazon.com" which
doesn't sound correct to me).

To test you must have the OPACAmazonCoverImages system preference
enabled. Log in to the OPAC and view your list of checked-out titles.
The alt text for cover images should be "View on Amazon.com." Test in
both prog and Bootstrap.

NOTE: You'll need one to be overdue in order to trigger both
      cases. Examine the HTML for both tabs in the person details
      page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This fixed the cover alt texts for Amazon covers in the patron
account for checkouts, overdues and holds.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12458 - Holidays calendar has wrong colors for weekly and yearly repeatable
Fridolin Somers [Fri, 20 Jun 2014 12:54:07 +0000 (14:54 +0200)]
Bug 12458 - Holidays calendar has wrong colors for weekly and yearly repeatable

In Tools / Calendar, the colors in the calendar for weekly and yearly repeatable are different from the color of the "Key" legend.

This patch sets the colors used in the "Key" legend to the cells if calendar.

Test plan :
- Go to Tools/Calendar
- Add a weekly repeatable holiday
- Check its color in calendar is the same as the text "Holiday repeating weekly"
=> Without this patch, it's green instead of yellow
- Add a yearly repeatable holiday
- Check its color in calendar is the same as the text "Holiday repeating yearly"
=> Without this patch, it's yellow instead of orange
- Check the color of others holydays types are OK

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
I'd like to see today's date a clearly different color from the
weekly repeated holiday, because now they're close in color.
But this patch does exactly what it says and should so I'm signing
off.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Legend, headings and calendar colors now match.
No problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7143: Release team 3.18
Marcel de Rooy [Thu, 22 May 2014 07:40:05 +0000 (09:40 +0200)]
Bug 7143: Release team 3.18

See http://wiki.koha-community.org/wiki/Roles_for_3.18

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors.
Order is alphabetical?

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12434: Fix Typo in Smart Rules Help
Nicole C. Engard [Tue, 17 Jun 2014 14:43:18 +0000 (09:43 -0500)]
Bug 12434: Fix Typo in Smart Rules Help

This patch fixes a typos in the help file on the circ and
fine rules.

To test:

Visit admin > circ and fine rules
Click help in the top right
Confirm that period is not spelled peiod

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9093 - 008 forgetting what material type was chosen
David Cook [Fri, 6 Jun 2014 04:01:17 +0000 (14:01 +1000)]
Bug 9093 - 008 forgetting what material type was chosen

This patch adds material type checking to the MARC21 008 tag editor,
based on value from the leader. That is, the 008 tag editor
will choose an initial material type based on the leader 06
(and if necessary the leader 07 position)

_TEST PLAN_
1) Create a new record or open an existing bib record
2) Change position 6 from its current value (probably "a") to
"c" or "e" or "g" or "m" or "p". (See the end of this message
for a comprehensive list of 06 values to try.)
3) Open the 008 tag editor
4) Note that it still says BKS even though it should say "MU"
or "MP" or "VM" or "CF" or "MX".

5) Apply the patch

6) Repeat steps 2 and 3.
7) Note that the 008 tag editor now shows the correct material
type based on the leader.

8) For more comprehensive checking, try switching position 6
back to "a" and changing position 7 to "b" instead of "m".
9) Note that it will switch from "BKS" to "CR".
10) Fin

Comprehensive mapping:

Field 008/18-34 Configuration
If Leader/06 = a and Leader/07 = a, c, d, or m: Books
If Leader/06 = a and Leader/07 = b, i, or s: Continuing Resources
If Leader/06 = t: Books
If Leader/06 = c, d, i, or j: Music
If Leader/06 = e, or f: Maps
If Leader/06 = g, k, o, or r: Visual Materials
If Leader/06 = m: Computer Files
If Leader/06 = p: Mixed Materials
http://www.loc.gov/marc/bibliographic/bdleader.html

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, nice job.
koha-qa complains for a tab char, removed on followup.
Mode change on TT file (+x), removed.
No other errors

NOTE: It would be desirable to update LEADER values
to reflect changes on 008.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Awesome work David.

9 years agoBug 12226 - A user with the database username/userid can access staff with full permi...
Bernardo Gonzalez Kriegel [Mon, 16 Jun 2014 16:42:26 +0000 (13:42 -0300)]
Bug 12226 - A user with the database username/userid can access staff with full permissions

This patch implements 2 suggestions on comment #3

- Prevents creation of a new user with same userid
of database user

- When checking password, if userid matches database user,
only check against pass on config file

To test:
1. Create a new user with same login as database user
any password different from real db user
2. Check that you can login on staff using this user/pass
and you are superlibrarian

3. Apply the patch

4. Login again using new pass, it must fail
5. Login again using db pass, you are now superuser,
but system does not warn you :( No problem, that's
for having one borrower with that login
6. Delete user with same login as db user
7. Try to create one again as in 1, system must return
an error of duplicate login!

8. Check for no regressions on user/pass authentication

Resubmited, has an error

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This works nicely and as described.
Also editing the former 'superuser' will force you to
change the userid in order to save any other change.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12226: (regression tests) Check_Userid should always consider the DB user not...
Tomas Cohen Arazi [Sat, 21 Jun 2014 00:06:08 +0000 (21:06 -0300)]
Bug 12226: (regression tests) Check_Userid should always consider the DB user not unique

Some improvements on t/db_dependent/Members.t and specifically regression
tests for bug 12226

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12454: Can't add new patron categories
Katrin Fischer [Thu, 19 Jun 2014 15:39:56 +0000 (17:39 +0200)]
Bug 12454: Can't add new patron categories

To test:
- Add a new patron category
- After saving, the new patron category won't show up in the list
- Apply patch
- Try to add a new patron category again
- It should now save correctly and show up in the list of patron
  categories.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12041: UT - Get rid of warnings
Jonathan Druart [Thu, 22 May 2014 13:47:55 +0000 (15:47 +0200)]
Bug 12041: UT - Get rid of warnings

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12041 - POD fixing followup
Robin Sheat [Wed, 21 May 2014 23:59:52 +0000 (11:59 +1200)]
Bug 12041 - POD fixing followup

This fixes a minor POD error detected, and also adds the Koha/ directory
to the regular test case so that the in-repo tests can find these
things.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12041 - improve Koha::Cache
Robin Sheat [Tue, 8 Apr 2014 05:51:01 +0000 (17:51 +1200)]
Bug 12041 - improve Koha::Cache

This makes Koha::Cache behave better by default. It will use memcached
if available to do shared caching, if that's not available it will fall
back to in-memory caching. It also allows for a singleton accessor to
allow a single cache to be shared within a process.

* Added tests to confirm UTF8-cleanness.
* Added minor fixups to stop warnings.

Test plan:
* The t/Cache.t file runs successfully with and without the
  MEMCACHED_SERVERS envvar set (and memcached running in the
  environment.)

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11891: (follow-up) set DBIC storage flags correctly
Galen Charlton [Tue, 27 May 2014 17:57:33 +0000 (17:57 +0000)]
Bug 11891: (follow-up) set DBIC storage flags correctly

Since we're passing an existing DBI database handle to
DBIC, and that handle doesn't have RaiseError set to true
by default, don't let DBIC override that -- for now.

Test plan: verify that the DB-dependent test suite passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11891: (follow-up) remove custom storage class
Galen Charlton [Wed, 18 Jun 2014 22:25:22 +0000 (22:25 +0000)]
Bug 11891: (follow-up) remove custom storage class

For now, just rely on the normal DBIx::Class cleanup handler;
otherwise, the following warning is displayed in logs:

  (in cleanup) Can't locate object method "_preserve_foreign_dbh" via package "Koha::Storage" at .../Koha/Storage.pm

Using the default DBIC storage class also means that we
don't have to manually do things like set the SQL limit dialect;
meaning that we don't get the following warning message:

  DBIx::Class::ResultSet::find(): Your storage class (Koha::Storage) does
  not set sql_limit_dialect and you have not supplied an explicit
  limit_dialect in your connection_info. DBIC will attempt to use the
  GenericSubQ dialect, which works on most databases but can be (and
  often is) painfully slow. Please file an RT ticket against
  'Koha::Storage' . at /home/gmc/koha/C4/Members.pm line 840

Test plan: same as main patch

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11891 - Make Koha::Schema use C4::Context->dbh
Kyle M Hall [Tue, 4 Mar 2014 18:26:03 +0000 (13:26 -0500)]
Bug 11891 - Make Koha::Schema use C4::Context->dbh

Right now there is no connection between the database handles used by
C4::Context::dbh and Koha::Datbase/Schema. This makes it impossible to
use transactions in unit tests to temporarily modify the database to
test subroutines that take advantage of Koha::Database. This patch fixes
that issue.

Test Plan:
1) Apply this patch
2) prove -v t/db_dependent/ILSDI_Services.t and
   prove -v t/db_dependent/Items.t and
   prove -v t/db_dependent/Circulation_issue.t should
   all start passing

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11891: set up tests to require that Koha::Database uses same DB handle as C4...
Galen Charlton [Mon, 26 May 2014 18:39:11 +0000 (18:39 +0000)]
Bug 11891: set up tests to require that Koha::Database uses same DB handle as C4::Context

This patch removes changes in two cases to work around the fact that
Koha::Database and C4::Context were not using the same DBI database
handle.

To test:

[1] Run prove -v t/db_dependent/ILSDI_Services.t and
    prove -v t/db_dependent/Items.t.  Both tests
    should fail.
[2] Apply the main patches and run step 1 again.  This
    time, both tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11801: In transit hold items incorrectly labels as "Waiting to be pulled" on...
Jonathan Druart [Thu, 20 Feb 2014 15:06:36 +0000 (10:06 -0500)]
Bug 11801: In transit hold items incorrectly labels as "Waiting to be pulled" on request.pl

If an item needs to be transferred to fill a hold, the hold will be
listed as 'Waiting to be pulled" while it is in transit.

Test Plan:
1) Place a hold for pickup at another library
2) Check in the item, confirm the hold transfer
3) View the holds for that record ( request.pl )
4) Note the priority is "In transit" and the status is 'Waiting to be
   pulled".
5) Apply this patch
6) Reload the holds page
7) Note the status is now "Item being transferred to $branch"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12406: adding the column maxsuspensiondays in the tests
Yohann Dufour [Wed, 11 Jun 2014 14:26:18 +0000 (16:26 +0200)]
Bug 12406: adding the column maxsuspensiondays in the tests

The column maxsuspensiondays was added in the datatable but not in the tests, which caused the failure of the tests

test plan: execute prove t/db_dependent/Circulation_Issuingrule.t
The command has to print:
t/db_dependent/Circulation_Issuingrule.t .. ok
All tests successful.
Files=1, Tests=9,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.35 cusr  0.08 csys =  1.47 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Failure on test before patch, success after
No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12439 - check that CGI is enabled when doing koha-create
Robin Sheat [Wed, 18 Jun 2014 02:05:48 +0000 (14:05 +1200)]
Bug 12439 - check that CGI is enabled when doing koha-create

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

9 years agoBug 12293: Correct display for patron messaging preferences on OPAC - bootstrap
Jonathan Druart [Tue, 20 May 2014 14:30:02 +0000 (16:30 +0200)]
Bug 12293: Correct display for patron messaging preferences on OPAC - bootstrap

This patch is a follow-up for bug 11125, it fixes the bootstrap theme.

Test plan:
1) Remove 'sms' from message_transport_types table.
2) Go on OPAC "My messaging" tab => table columns are out of alignment with table heading.
3) Apply patch => table is correctly displayed.

Signed-off-by: Axelle Clarisse <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With and without 'sms' existing the display of the table is now correct.
Template only change.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12380 - can't tab to save buttons on add item
Owen Leonard [Mon, 9 Jun 2014 12:58:30 +0000 (08:58 -0400)]
Bug 12380 - can't tab to save buttons on add item

Many form elements on the add item page are giving a tabindex of "1" by
the script. This seems to make it impossible to tab through the add item
form fields onto the save buttons. I don't see a reason to set an
explicit tabindex of "1," so this patch removes it.

To test, apply the patch and open an item for editing. Try tabbing
through the add item form fields. It should be possible to tab through
the fields and onto the submit buttons at the bottom. Test again when
adding a new item.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11958: Fix typon in classification source help
Nicole C. Engard [Sat, 31 May 2014 17:32:24 +0000 (12:32 -0500)]
Bug 11958: Fix typon in classification source help

The Classification Sources help file said the source was in the 942$2 but it's in the 952$2 and 94$2 so this patch fixes that.

To test:
* Go to Admin > Classification Sources
* Click Help
* Confirm the Help file is right now

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
String change, no errors.

Note: Perhaps change "Authorized Values ..." for "Authorized values ..."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12338: Remove smartmatch operator from C4/Serials.pm
Tomas Cohen Arazi [Fri, 30 May 2014 19:13:36 +0000 (16:13 -0300)]
Bug 12338: Remove smartmatch operator from C4/Serials.pm

This patch removes the use of the 'when' smartmatch operator from
Serials.pm

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12343: QA follow-up
Jonathan Druart [Wed, 11 Jun 2014 11:36:28 +0000 (13:36 +0200)]
Bug 12343: QA follow-up

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
9 years agoBug 12343: Add regression test for TransformKohaToMarc
Jonathan Druart [Wed, 11 Jun 2014 11:31:55 +0000 (13:31 +0200)]
Bug 12343: Add regression test for TransformKohaToMarc

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
9 years agoBug 12343 - TransformKohaToMarc() is adding MARC subfields in random order
Jacek Ablewicz [Tue, 3 Jun 2014 07:24:23 +0000 (09:24 +0200)]
Bug 12343 - TransformKohaToMarc() is adding MARC subfields in random order

TransformKohaToMarc() function in C4/Biblio.pm iterates through it's
argument - which is a hashref - using 'each'. Perl is not guaranteed
to return hash keys in any particular order (not to mention that
in more recent perl versions, explicit hash key order randomization
is to be expected).

As a consequence:
1) For biblio records added via acquisition (order from a new/empty
record, order from a suggestion), freshly created MARC biblio records
doesn't always have 260 $b and 260 $c stored in the proper order
2) Holdings data exported for zebra indexing as 952 fields may have
subfields generated in more-or-less random order. While it probably (?)
does not affect zebra indexing/searching in any significant way,
end result is prone to be somehow ugly (which can be a potential
issue e.g. for people running Z39.50 server) and is not guaranteed
to be consistent; different records - or even different items in the
same record, can have 952 subfields generated in indiscriminate order.

This patch fixes abovementioned issues via introducting explicit
sorting (by subfiled code/letter) for subfield pairs before they
are added to the MARC record.

To test:
1/ Try to confirm and reproduce both issues (use perl 5.18.1 if possible
for more randomly ordered results).
2/ Apply patch.
3/ Redo the tests; ensure that both issues are now fixed and that there
are no apparent regressions of any kind (especially regarding to 952 fields
generated for zebra [re]indexing).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
9 years agoBug 11169: DBRev 3.17.00.008
Tomas Cohen Arazi [Sun, 15 Jun 2014 14:24:59 +0000 (11:24 -0300)]
Bug 11169: DBRev 3.17.00.008

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