koha.git
10 years agoBug 11721 - Use new DataTables include in suggestions template
Owen Leonard [Fri, 7 Feb 2014 21:02:06 +0000 (16:02 -0500)]
Bug 11721 - Use new DataTables include in suggestions template

This patch modifies the template for the suggestions page to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

Sorting is now configured to exclude articles when sorting the title
column.

To test, apply the patch and view the suggestions page (Acquisitions ->
Suggestions). Sorting of suggestions should work correctly.

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

Note: the columsn fund and status are not sortable/searchable
before and after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11509: (trivial rmaint followup) wrong parameter count
Tomas Cohen Arazi [Mon, 10 Feb 2014 14:55:06 +0000 (11:55 -0300)]
Bug 11509: (trivial rmaint followup) wrong parameter count

While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e.
koha-create should accept being invoked with only one parameter).

This patch just changes the minimum parateres required from 2 to 1.

To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters"
   message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11692: fix display of additional bib information in OPAC "most popular" pag
Owen Leonard [Wed, 5 Feb 2014 17:16:10 +0000 (12:16 -0500)]
Bug 11692: fix display of additional bib information in OPAC "most popular" pag

The template for the OPAC's "most popular" page includes several
variables which are not passed by the script, including
biblioitems.size. This patch adds the right columns to the query and
standardizes the output somewhat based on non-XSLT opac-detail.

To test, apply the patch and view the "most popular" page in both prog
and bootstrap. You should see correct publisher, copyright, pages, and
size information.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested in all three themes and works lovely

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves the bibliographic display on the 'Most popular' page
in the OPAC. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11687: remove disused script statecollection.pl
Jonathan Druart [Wed, 5 Feb 2014 09:39:26 +0000 (10:39 +0100)]
Bug 11687: remove disused script statecollection.pl

It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11094 - Bootstrap theme: fix typo "loaction"
Bernardo Gonzalez Kriegel [Mon, 21 Oct 2013 16:25:03 +0000 (13:25 -0300)]
Bug 11094 - Bootstrap theme: fix typo "loaction"

This patch fixes a typo on opac-user.tt

To test you must have existing holds on your account. Log into the OPAC
and view the holds tab on the "your summary" page (opac-user.pl).

Resize the browser window until the table switches from a regular table
layout to a vertical column. Only when the view is narrow enough does
the affected label appear:

Pick up location: [library name]

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11666: remove SQL as an option for MARC framework exports and imports
Galen Charlton [Tue, 4 Feb 2014 23:03:08 +0000 (23:03 +0000)]
Bug 11666: remove SQL as an option for MARC framework exports and imports

The SQL option for MARC framework imports was subject to a bug whereby
somebody could use it to gain access to arbitrary information in the
database by uploading an SQL file containing unexpected statements.

As it is difficult to securely sanitize SQL, this patch removes the
option to use SQL as an import or export format.

To test:

[1] Verify that SQL no longer appears as an import or export option
    for the MARC frameworks.
[2] Verify that exports and imports in CSV, Excel XML, and ODS formats
    still work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised. The UI doesn't offer exporting/importing in the SQL format.
Crafting the URL to export SQL fallbacks to a spreadsheet format (ODS).

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11666: add permission check for MARC framework import/export
Galen Charlton [Tue, 4 Feb 2014 15:54:33 +0000 (15:54 +0000)]
Bug 11666: add permission check for MARC framework import/export

This patch makes the MARC framework import/export script require
that the staff user be logged in with appropriate permissions for
managing the MARC frameworks.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can confirm the bug and the solution. After applying the patch
downloading the file without logging in first is no longer possible.
Also passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11662: remove disused member-picupload.pl
Galen Charlton [Sat, 1 Feb 2014 02:11:38 +0000 (02:11 +0000)]
Bug 11662: remove disused member-picupload.pl

This script is no longer used, and in addition has problematic
handling of its parameters that could lead to writing to
arbitrary files on the server.

To test:

[1] Verify that member-picupload.pl is no longer referred
    to in the codebase after applying this patch.
[2] Verify that there are no regressions in patron
    photo management.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Found no regressions in removing this script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11661: sanitize file names supplied to edithelp.pl
Chris Cormack [Sat, 1 Feb 2014 02:06:58 +0000 (15:06 +1300)]
Bug 11661: sanitize file names supplied to edithelp.pl

This patch corrects an issue whereby edithelp.pl could
be used to create or modify arbitrary files on the server
with the permissions of the Apache user.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11660: remove disused tools/pdfViewer.pl
Chris Cormack [Sat, 1 Feb 2014 01:18:23 +0000 (14:18 +1300)]
Bug 11660: remove disused tools/pdfViewer.pl

tools/pdfViewer.pl can be used to read artibrary files on the system.

It is actually an unused file, so leaving it around serves no purpose
and is dangerous.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11619: (follow-up) fix QueryParser.t
Galen Charlton [Tue, 4 Feb 2014 18:44:07 +0000 (18:44 +0000)]
Bug 11619: (follow-up) fix QueryParser.t

The previous patch did not account for the change
in the number of indexes, and thus caused one
of the tests to fail.

To test:

[1] Verify that prove -v t/QueryParser.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11619: remove duplicate key in QueryParser config
Marcel de Rooy [Mon, 27 Jan 2014 12:50:01 +0000 (13:50 +0100)]
Bug 11619: remove duplicate key in QueryParser config

Corrects a double entry for language in yaml file.
Language should have been language-original.

Test plan:
Check that you have language-original in your zebra install.
Specifically, this index should cover MARC21 041$h.
Enable QueryParser and search for a record with this index.
Note that this patch does not enable searching on this
index without QueryParser. This is true for many more indexes
in record.abs that are not included in the getIndexes routine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - make sure you are testing with a current
indexing configuration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11636 - make it possible to remove patrons from patron list during add process
Owen Leonard [Wed, 29 Jan 2014 17:17:09 +0000 (12:17 -0500)]
Bug 11636 - make it possible to remove patrons from patron list during add process

If your patrons have card numbers with leading zeroes this causes
problems removing patron entries during the process of adding patrons to
an existing list. This patch refactors the relevant JavaScript to
correct the problem and to remove inline "onclick" from generated HTML.

This patch also includes a fix for Bug 11632 - Untranslatable string
"Remove" in patron lists.

To test:

1. If necessary, create or modify a patron to have a card number
   with leading zeroes.
2. Go to Tools -> Patron lists.
3. Click "Add patrons" on an existing list.
4. Perform a patron search and choose one of the results.
5. Click the "remove" link next to the patron name which was just added.
   Nothing will happen.
6. Apply the patch and test again. The "remove" link should now work.

To test the fix for Bug 11632, after applying the patch run "translate
update [language code]" and confirm that the "Remove" string is listed
in the updated po file for patron_lists/list.tt.

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, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11572: ensure that running Z39.50 search from staff search results detects ISBN
“ByWater [Thu, 16 Jan 2014 20:00:40 +0000 (15:00 -0500)]
Bug 11572: ensure that running Z39.50 search from staff search results detects ISBN

In Koha 3.8, if a standard catalog search was performed and the user
clicked the Z39.50 search button, the search string would automatically
be placed in the isbn field for the Z39.50 search form.
Changes to the code have since broken this functionality.

Test Plan:
1) From mainpage.pl, use "Search the catalog" to search for the string
   "9781570672835"
2) Click the Z39.50 Search button
3) Note the string is placed in the title field
4) Apply this patch
5) Repeat steps 1-2
6) Note the string is placed in the isbn field

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested old and new ISBN with and without hyphens.
Also tested some other keyword searches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Note that the behavior will be a bit odd if you do a 'replace via
Z39.50' from a bib record whose title happens to be an ISBN, but
this scenario seems unlikely enough to ignore.

10 years agoBug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is...
Frédéric Demians [Sat, 1 Feb 2014 08:49:38 +0000 (09:49 +0100)]
Bug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is disabled

Bootstap theme opac holding tab is improperly displayed when opacbookbag
syspref is disabled, and virtualshelf is enabled. This is due to the
fact that in this situation basket.js is loaded (for virtual shelves),
but some JS variables are not defined in template since opacbookbag is
disabled.

To reproduce this bug:

- Choose bootstrap OPAC theme
- Enable virtualsheves syspref
- Disable opacbookbag syspref
- Open a biblio record in OPAC detail page
- You will observe that items holding tabs are not displayed as tabs but
  as a bulleted list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Confirmed display problem exists without the patch and is solved by it.
Ideally we would avoid having the cart messages in the template when
the feature is deactivated, but this is ok for now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10851: (follow-up) FIX bad c/p (variable name)
Jonathan Druart [Mon, 27 Jan 2014 09:14:35 +0000 (10:14 +0100)]
Bug 10851: (follow-up) FIX bad c/p (variable name)

In catalogue.detail.tt, a wrong variable loop was used.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patches pass QA script and tests.
Additional tests done:
- Receiving issues, setting and unsetting new status
- Display on serial summary page
- Display on subscription detail page, issues tab
- Display on OPAC and staff detail pages, subscription tab
    OPAC: ok
    Staff: ok
- Claiming issues, filtering and status display

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10851: (follow-up) fix issues reported by QA script
Jonathan Druart [Tue, 21 Jan 2014 08:28:24 +0000 (09:28 +0100)]
Bug 10851: (follow-up) fix issues reported by QA script

This patch fixes following warnings:

 FAIL   C4/Serials.pm
   FAIL   valid
        Useless use of a constant (43) in void context
        Useless use of a constant (41) in void context
        Useless use of a constant (44) in void context
        Useless use of a constant (42) in void context
        Useless use of a constant (4) in void context

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10851: add additional "missing" statuses for serials issues
Jonathan Druart [Tue, 20 Aug 2013 09:14:09 +0000 (11:14 +0200)]
Bug 10851: add additional "missing" statuses for serials issues

4 new statuses to represent variations on "missing" is added by this
patch: "never received", "sold out", "damaged", and "lost.

These status have the same behavior than the simple Missing status.

Test plan:
- Find a serial to claim.
- Modify the status of this serial with one of these new statuses.
- Try to find it with the "serials to claim" search.
- Verify that the status is displayed on the serial module pages and on
  the OPAC.

Signed-off-by: Nicolas Bravais <nicolas.bravais@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap...
Mathieu Saby [Wed, 13 Nov 2013 18:56:10 +0000 (19:56 +0100)]
Bug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap OPAC

Another fix, 10465, removed fields 780 and 785 from a unimarc xslt file.
This cleanup is needed for bootstrap too

To test : in a UNIMARC Koha, with Bootstrap theme OPAC
1. Be sure that OPACXSLTDetailsDisplay , OPACXSLTResultsDisplay sysprefs
   are set to "default"
2. Apply the patch
3. Search some records in OPAC : the list view and the detail view
   should be exacty the same as before you apply the patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes are consistent with changes done earlier on the prog theme.
Checked that the detail pages and results still display correctly
for UNIMARC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11655: koha-translate --list no longer shows 'en'
Tomas Cohen Arazi [Fri, 31 Jan 2014 19:52:15 +0000 (16:52 -0300)]
Bug 11655: koha-translate --list no longer shows 'en'

'en' is not a translation and it doesn't make any sense to return it as
part of the installed translations or the available ones.

It becomes relevant to remove it as users upgrading their installed
translations end up grepping the output to remove 'en' like in:

for lang in $(koha-translate --list | grep -v -x -e 'en') ; do
  koha-translate --update $lang
done

instead of simply issuing the koha-translate --list command.

To test:
- Run
  ./koha-translate --list
  ./koha-translate --list --available
=> It shouldn't return 'en' in the result list.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11491: (QA follow-up) updated license and use Modern::Perl
Mark Tompsett [Tue, 7 Jan 2014 19:43:31 +0000 (14:43 -0500)]
Bug 11491: (QA follow-up) updated license and use Modern::Perl

Replaced License text with latest one from
    http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
and tweaked copyright lines accordingly.

Also changed use strict and use warnings into use Modern::Perl
as per PERL2 from the coding guidelines.

TEST PLAN
---------
1) less ~/kohaclone/opac/svc/report
   - The license does not reflect the current license
   - This will have use strict and use warnings
2) Apply patch
   - The license should be corrected
3) It should still run
     https://.../cgi-bin/koha/svc/report?id=##
     https://.../cgi-bin/koha/svc/report?id=##&annotated=blah
   Where ## reflects a public report available (for OPAC).

Signed-off-by: Holger Meißner <h.meissner.82@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11491: add option to supply field names in reports web service output
Mark Tompsett [Tue, 7 Jan 2014 19:39:46 +0000 (14:39 -0500)]
Bug 11491: add option to supply field names in reports web service output

The staff and public catalog reports web services (/svc/report) return
JSON output, in particular an array contain an array for each row
of the report output.

This patch adds a URL parameter, annotated, which when supplied and
set to a value that evaluates to Perl true, will cause the output
to be emited as a JSON array of hashes, where each hash represents
a row of report output and the hash keys are the column names
or labels set in the report definition.

This patch also moves code around to make diffs between svc/report and
opac/svc/report smaller.

The suggestion to return an array of hashes was made by Chris Cormack.

TEST PLAN
---------
 1) Log into staff client
 2) Reports
 3) Used save reports
 4) Click the Action button on any report
     WITHOUT PARAMETERS.
    -- with parameters blows up in master and this.
 5) Click Edit
 6) Make the report public
 7) Update the SQL
 8) Note the ID number of the report
 9) Note the ID number of a non-public report
10) Make up a crazy ID number for a non-existant report
11) In a new tab (with the appropriate edits)
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 8
    -- JSON data has arrays of field values.
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1
    -- JSON data has arrays of field values.
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 9
    -- Software error: Sorry this report is not public
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1
    -- Software error: Sorry this report is not public
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 10
    -- Software error: Sorry this report is not public
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1
    -- Software error: Sorry this report is not public
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 8
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 9
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 10
    -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1
    -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154.

12) Apply the patch
13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2
    -- There should be no problems. All OK.

14) In a new tab (with the appropriate edits)
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 8
    -- JSON data has arrays of field values.
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1
    -- JSON data has arrays of hashes with field names as keys
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 9
    -- Software error: Sorry this report is not public
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1
    -- Software error: Sorry this report is not public
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 10
    -- Software error: There is no such report.
     https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1
    -- Software error: There is no such report.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 8
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1
    -- JSON data has arrays of hashes with field names as keys
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 9
    -- JSON data has arrays of field values.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1
    -- JSON data has arrays of hashes with field names as keys
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 10
    -- Software error: There is no such report.
     https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1
    -- Software error: There is no such report.

Signed-off-by: Holger Meißner <h.meissner.82@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10811: (follow-up) use "local-number" rather than "Local-Number"
Galen Charlton [Fri, 31 Jan 2014 19:13:59 +0000 (19:13 +0000)]
Bug 10811: (follow-up) use "local-number" rather than "Local-Number"

At present, the QueryParser search mode expects that search field names
and aliases are case-sensitive.  This may change (see bug 11353), but
for now, this patch ensures that the local-number searches used by
the KohaBiblio rule will work regardless of the value of the
UseQueryParser system preference.

To test:

[1] Use the KohaBiblio 999$c matching rule with UseQueryParser both
    on and off.  Verify that matching by biblionumber works correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10811 - Add a 999$c record matching rule to the MARC21 defaults
David Cook [Mon, 2 Sep 2013 03:25:03 +0000 (13:25 +1000)]
Bug 10811 - Add a 999$c record matching rule to the MARC21 defaults

This patch adds a default record matching rule for biblionumber
using the 999$c and the Local-Number index.

This is part of the optional marc21 SQL, as well as in the
updatabase.pl script.

TEST PLAN
---------
 1) Apply the SQL for adding the KohaBiblio matching rule.
 2) Run updatedatabase.pl
 3) Export some MARC bibliographic records from Koha
 4) Import those same MARC bibliographic records using the
     "KohaBiblio" record matching rule.
 5) The incoming records should match perfectly
 6) Check the mysql tables (marc_matchers, matchpoints,
      matcher_matchpoints, matchpoint_components,
      matchpoint_component_norms) to make sure the values were
     inserted as expected.

Optional: install a new Koha MARC21 database from scratch and
ensure that the sample matching rules are loaded.  Add at
least one bib record, and try steps 1-6.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Dropped the database update from the original patch, as the matching
rules are not at present mandatory during installation.

10 years agoBug 11513: (follow-up) format enrollment end date consistently
Galen Charlton [Fri, 31 Jan 2014 16:21:05 +0000 (16:21 +0000)]
Bug 11513: (follow-up) format enrollment end date consistently

The previous patch added use of the KohaDates TT plugin, so this
patch makes sure that it gets used to format the display of all
occurrences of the enrollment end date.

To test:

[1] Create a patron category with a fixed end date.
[2] Bring up the list of all categories and verify that the date
    is displayed based on the dateformat value.
[3] Delete the category, and verify that the confirmation dialog
    formats the date correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11513: fix log warning noise in patron category editor
Mark Tompsett [Fri, 10 Jan 2014 05:06:21 +0000 (00:06 -0500)]
Bug 11513: fix log warning noise in patron category editor

Just going to the patron categories page triggered errors.
Running through all the plain options also triggered other
warnings. This fix silences them.

Discovered tabs I had not corrected by running qa test tool.

Some errors which I could not trigger were also fixed, such
as line 248 shown by Merllissia Manueli.

TEST PLAN
---------
 1) Log in to staff client
 2) Click 'Administration'
 3) Click 'Patron categories'
 4) Click '+ New category'
 5) Enter a dummy category and click 'Save'
 6) Click 'Edit' for the dummy category.
 7) Change a value and click 'Save'
 8) Click 'Delete' for the dummy category.
 9) Confirm to delete.
10) Review error log, several new warnings
11) Apply patch
12) Run the koha qa test tool.
13) Click 'Home'
14) Click 'Administration'
15) Click 'Patron categories'
16) Click '+ New category'
17) Enter a dummy category and click 'Save'
18) Click 'Edit' for the dummy category.
19) Change a value and click 'Save'
20) Click 'Delete' for the dummy category.
21) Confirm to delete.
22) Review error log, no new warnings

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, saw no errors in the log after applying the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested various dates and enrollment periods with different settings of
dateformat pref. Works as advertised. No warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11268: (follow-up) update DBIC schema classes
Galen Charlton [Fri, 31 Jan 2014 15:58:58 +0000 (15:58 +0000)]
Bug 11268: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11268: DBRev 3.15.00.016
Galen Charlton [Fri, 31 Jan 2014 15:55:24 +0000 (15:55 +0000)]
Bug 11268: DBRev 3.15.00.016

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11268: increase size of biblioitems.url
Kyle M Hall [Mon, 18 Nov 2013 19:18:15 +0000 (14:18 -0500)]
Bug 11268: increase size of biblioitems.url

The URL field in biblioitems is defined as a varchar(255) which is large
enough for most URLs but not all. This patch converts it to a
TEXT field to make sure it is capable of storing all valid URLs.

Test Plan:
1) Attempt to a URL that is greater than 255 chacters long in a record
   (856$u in MARC21)
2) Save the record, note the url gets truncated
3) Apply this patch
4) Repeat step 1
5) Note the entire url is saved

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11488: make string "Are you sure you want to write off ..." translatable
Jonathan Druart [Thu, 16 Jan 2014 15:08:17 +0000 (16:08 +0100)]
Bug 11488: make string "Are you sure you want to write off ..." translatable

Test plan:
- ./translate update LANG
- translate the string into your po file
- ./translate install LANG
- Verify the string is translated.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11495: Make "Select titles to: " translatable
Katrin Fischer [Sat, 11 Jan 2014 14:54:44 +0000 (15:54 +0100)]
Bug 11495: Make "Select titles to: " translatable

Fixes translation of "Select titles to: " on the Bootstrap
OPAC result page.

Test plan:
- Update one of the po files running:
  perl translate update <langcode>
- Verify that "Select titles to: " is only listed once for
  search-results.tt
Apply patch
- Verify addings titles to lists and cart from the result list
  still works as expected
- Rerun the po file update
- Verify the string is now listed twice for search-results.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11534: fix bug that made it impossible to remove instructors from a course
Owen Leonard [Wed, 29 Jan 2014 17:52:51 +0000 (12:52 -0500)]
Bug 11534: fix bug that made it impossible to remove instructors from a course

In some cases clicking the "remove" link to remove a course instructor
when editing a course reserves course doesn't work. I suspect this is
caused by leading zeroes in the card number. This patch refactors the
relevant function to fix the problem and to remove inline JavaScript
from generated markup.

Other changes:

- Make the "Remove" text translatable
- Re-order the first name and last name when added by JavaScript to
match the template's "surname, firstname" order.

To test:

1. If necessary, create or modify a patron to have a card number
   with leading zeroes.
2. Go to Course reserves and add or edit a course.
3. If you are editing a course and there are existing instructors, click
   the "remove" link. Nothing will happen.
4. Perform a patron search and choose one of the results. The name
   should be added to the list of instructors in the format "surname,
   firstname."
5. Click the "remove" link next to the patron name which was just added.
   Nothing will happen.
6. Apply the patch and repeat step 4. The "remove" link should work.
7. Add an instructor and save the course reserve. Repeat steps 2 and 3.
   The "remove" link should now work.

To test the translation fix, after applying the patch run "translate
update [language code]" and confirm that the "Remove" string is listed
in the updated po file for course_reserves/course.tt.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11616: (follow-up) remove tablesorter CSS
Galen Charlton [Fri, 31 Jan 2014 15:30:29 +0000 (15:30 +0000)]
Bug 11616: (follow-up) remove tablesorter CSS

This patch removes CSS rules that applied only to use of the
jQuery tablesorter plugin, which is now gone.

To test:

[1] Verify that git grep -l headerSort does not turn up
    any results.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11616: remove jQuery tablesorter plugin
Jonathan Druart [Mon, 27 Jan 2014 11:22:21 +0000 (12:22 +0100)]
Bug 11616: remove jQuery tablesorter plugin

DataTables has replaced the tablesorter plugin for client-side sorting
of tables in Koha.  There is no table using this plugin, so this patch
removes it and remaining references to it.

REVISED TEST PLAN
-----------------
1) Apply the patch
2) Home -> Koha administration -> Authorized values
3) Change the 'Show category:' drop down value, and play with
    the sorting of columns.
   -- should sort as expected.
4) Search the catalogue -> look for a biblio with high circulation
5) Click one of the name links.
6) Click the Items tab on the left.
7) Scroll down and click the (View item's checkout history)
    link in the History area.
   -- There was no sorting prior to the patch, so afterwards
      it should display the same.
8) git grep -i tablesorter
   -- Only a reference in staff-global.css and release texts.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9823: (follow-up) improve POD for C4::Reserves::GetReservesFromBiblionumber
Galen Charlton [Thu, 30 Jan 2014 16:48:26 +0000 (16:48 +0000)]
Bug 9823: (follow-up) improve POD for C4::Reserves::GetReservesFromBiblionumber

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9823: QA follow-up for GetReservesFromBiblionumber calls
Marcel de Rooy [Fri, 24 Jan 2014 08:59:03 +0000 (09:59 +0100)]
Bug 9823: QA follow-up for GetReservesFromBiblionumber calls

The template params holds and holdcount are not used in the ISBD template.
Removed the associated code from catalogue/ISBDdetail.pl.
Same applies for catalogue/MARCdetail.pl and labeledMARCdetail.pl.
Same applies also for catalogue/imageviewer.pl.
Same applies also for catalogue/moredetail.pl.

In catalogue detail.tt only the number of holds is used. Removed the code
that passed the holds array to the template.

For consistency opac-detail should also incorporate future holds into its
holds count; added the all_dates parameter for that reason.

The Reserves module is no longer needed in moredetail. Removed it. Checked
the other scripts also.

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 9823: Refactor return from GetReservesFromBiblionumber
Jonathan Druart [Mon, 18 Mar 2013 14:37:18 +0000 (14:37 +0000)]
Bug 9823: Refactor return from GetReservesFromBiblionumber

The return from GetReservesFromBiblionumber contains an unnecessary
extra variable. In scalar context an array returns its element count.
Maintaining a separate count can lead to unforeseen bugs
and imposes ugly constructions on the subroutine's users.

Remove the useless count variable from the return

This patch also changes the parameters: now the routine takes a hashref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Placed biblio holds, future holds and item holds. Works as expected.
Tested Holds.t and Reserves.t. Pass.
Tested /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=999 with two holds on
one item. Fine.
C4/SIP/ILS/Item.pm: Looked for "whatever" and "arrayref" and could not find
them anymore. Looks good.
Handled a few unneeded calls in QA follow-up.
Left only one point to-do for serials/routing-preview.pl. See Bugzilla.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11439: (follow-up) adjust for change in list returned by OCLC XISBN
Galen Charlton [Thu, 30 Jan 2014 15:48:48 +0000 (15:48 +0000)]
Bug 11439: (follow-up) adjust for change in list returned by OCLC XISBN

The set of related ISBNs for the first Harry Potter book returned
by OCLC's XISBN service has changed recently, so this patch adjusts
the test to match.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11579: Show ordernumber in basket.pl tables
Julian Maurice [Fri, 17 Jan 2014 10:46:02 +0000 (11:46 +0100)]
Bug 11579: Show ordernumber in basket.pl tables

Test plan:
Verify the ordernumber is correctly displayed on the basket page
(acqui/basket.pl?basketno=X)

Signed-off-by: silvere <silvere.hanguehard@enc.sorbonne.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a tiny typo in the HTML: </th> > </td>.
Passes all tests and QA script.
Tested that the ordernumber is now displayed and table sorting
works for the smaller and more detailed table.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11571: fix breakage of -f option for translate script
Jonathan Druart [Thu, 16 Jan 2014 14:47:42 +0000 (15:47 +0100)]
Bug 11571: fix breakage of -f option for translate script

Bug 7934 breaks the -f option introduced in bug 9161; this patch
repairs the regression.

While the generation of the command tmpl_process3.pl, a space is
missing if the -x option is given.

The tmpl_process3.pl is called like:
/home/koha/src/misc/translator/tmpl_process3.pl -q update -i
/home/koha/src/koha-tmpl/intranet-tmpl/prog/en/ -s
/home/koha/src/misc/translator/po/fr-FR-i-staff-t-prog-v-3006000.po -r
-x 'help'-f pay.tt

Revised test plan:
1) cd ./misc/translator
2) put a warn at LangInstaller.pm line 375.
3) time ./translate update fr-FR -f pay.tt
-- note the execution time and the output. The options in the
    command contain "-x 'help'-f pay.tt"
    The -f param is not passed to the script.
    The execution time is strangely long.
5) git reset --hard origin/master
6) apply this patch
7) put a warn at LangInstaller.pm line 375.
8) time ./translate update fr-FR -f pay.tt
-- verify the output and the execution time is now corrected.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11314: (follow-up) make another "All" translatable
Galen Charlton [Sun, 26 Jan 2014 15:39:27 +0000 (15:39 +0000)]
Bug 11314: (follow-up) make another "All" translatable

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11314: (follow-up) make "All" translatable
Jonathan Druart [Fri, 24 Jan 2014 14:24:20 +0000 (15:24 +0100)]
Bug 11314: (follow-up) make "All" translatable

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11314: restore ability to see only 5 entries on parcel.pl
Kyle M Hall [Wed, 27 Nov 2013 17:40:11 +0000 (12:40 -0500)]
Bug 11314: restore ability to see only 5 entries on parcel.pl

Bug 9130 removed the ability to limit the tables on parcel.pl to 5 rows,
as well as the "sticky" feature. It is trivial to restore this
functionality. These datatables are already using bStateSave, so are
they are "sticky" already. The only part left is to enable the
ability to limit the table to 5 rows at a time.

Test Plan:
1) Apply this patch
2) Browse to parcel.pl
3) Note the default rows count is still 10
4) Note the option to limit the row count to 5

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Double-checked that the "sticky" feature is still in place thanks
to bStateSave.

I didn't notice a difference due to iDisplayLength being added, but
the extra option of "5" to the list is there.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11608: Delete unused commented lines in template
Jonathan Druart [Fri, 24 Jan 2014 15:07:08 +0000 (16:07 +0100)]
Bug 11608: Delete unused commented lines in template

On the way, these lines are commented and can be deleted safely.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removes an HTML comment with unused code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11608: Remove the word 'library' from funds list
Nicole C. Engard [Fri, 24 Jan 2014 14:34:27 +0000 (08:34 -0600)]
Bug 11608: Remove the word 'library' from funds list

The list of funds on the main acq page shows the library's name
followed by the word 'library'. I don't think this word is necessary
as most libraries have the word 'library' in their names. Even
if they don't they probably just want their library name to show
without extra words.

To test:

* Visit the acquisitions module before applying
* See the library's name + 'library' above the funds list
* Apply patch
* Look again at funds list and 'library' should be gone

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove a space

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11533: fix authority searching with no sorting when QueryParser is enabled
Galen Charlton [Thu, 16 Jan 2014 20:36:02 +0000 (20:36 +0000)]
Bug 11533: fix authority searching with no sorting when QueryParser is enabled

This patch fixes an issue where chosing 'None' as the sort order
for an authority search would result in zero hits if QueryParser is
eanbled.

This patch also adds some additional test cases.

To test:

[1] Enable QueryParser.
[2] Perform an authority search in the staff interface that
    uses 'Heading A-Z' as the sort order and returns hits.
[3] Run the same search, but with the sort order set to 'None'.
    No hits are returned.
[4] Apply the patch.
[5] Do step 3 again.  This time, hits should be returned.
[6] Verify that prove -v t/db_dependent/Search.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11533: (regression test) QP breaks authority search
Tomas Cohen Arazi [Mon, 13 Jan 2014 19:26:22 +0000 (16:26 -0300)]
Bug 11533: (regression test) QP breaks authority search

This patch duplicates the SearchAuthority tests, with QP enabled.
Searching shouldn't be affected by QP. Instructions for manually
reproducing this can be read in the first comment for the bug entry.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10907: (follow-up) fix typo...
Galen Charlton [Thu, 23 Jan 2014 21:34:58 +0000 (21:34 +0000)]
Bug 10907: (follow-up) fix typo...

... introduced by yours truly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10907: (follow-up) fix table sorting
Galen Charlton [Thu, 23 Jan 2014 18:32:06 +0000 (18:32 +0000)]
Bug 10907: (follow-up) fix table sorting

This patch fixes a problem wherein table sorting did not work if
OpacSuggestionManagedBy was off.

As a matter of style, this patch also modifies the (Boolean) syspref
check to be just:

[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10907: DBRev 3.15.00.015
Galen Charlton [Thu, 23 Jan 2014 18:24:00 +0000 (18:24 +0000)]
Bug 10907: DBRev 3.15.00.015

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10907: Optionally show the staff member's name who managed a suggestion in OPAC
Katrin Fischer [Mon, 9 Dec 2013 17:40:33 +0000 (18:40 +0100)]
Bug 10907: Optionally show the staff member's name who managed a suggestion in OPAC

The name of a staff member who managed a suggestion is shown in the
the OPAC if the new system preference OpacSuggestionManagedBy is set to
'Show'. This is also the default.

If the preference is set to 'Don't show' the staff members name
is not displayed and the column 'Managed by' in the table of
suggestions in the patron account is not displayed.

To test:
- Create a one or more suggestions
- 'Manage' them by accecpting or rejecting
- Go to your patron account and check that the staff member name is
  shown for your suggestions
- Apply patch, run database update
- Check the name is still shown
- Switch the preference to 'Don't show'
- Check the name is no longer shown and the table still displays
  correctly, but without the 'Managed by' column
- Repeat those tests for both bootstrap and prog theme!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works as advertised, the only little nitpick is you could just do
[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]

However you are following the custom in that file already, so that's
fine

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
10 years agoBug 11486: Don't display the number of remaining renewals if == 0
Jonathan Druart [Fri, 10 Jan 2014 11:25:58 +0000 (12:25 +0100)]
Bug 11486: Don't display the number of remaining renewals if == 0

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11486: Show renewal count on 'check out' and 'details' tabs in patron record
David Cook [Tue, 7 Jan 2014 04:07:53 +0000 (15:07 +1100)]
Bug 11486: Show renewal count on 'check out' and 'details' tabs in patron record

This patch adds the renewal count to the 'Check out' and "Details' tabs
of the patron record.

This information already exists in the OPAC view of the patron record.
Since librarians might be serving patrons in person who want to know
this information without looking it up online, it makes sense to show
it in the staff client.

There may also be times where librarians want to see how many renewals
a patron has left, how many they've used already, etc. when making other
decisions.

_TEST PLAN_

Before applying:

1) Go to "Check out" with a patron that has some check outs before today
2) Add some check outs for today
*Ensure that all issues are for items that can be renewed*
3) Note that the Renew column just says '0' followed by a check box
4) Check the 'Detail' tab. It should say the same.

Apply the patch.

5) View the "Details" and "Check out" tabs again
6) Note that the renewal count now appears in the form resembling:
5 of 5 renewals remaining

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11415: DBRev 3.15.00.014
Galen Charlton [Thu, 23 Jan 2014 17:07:27 +0000 (17:07 +0000)]
Bug 11415: DBRev 3.15.00.014

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11415 (QA Followup) fix whitespace
Kyle M Hall [Fri, 10 Jan 2014 14:15:25 +0000 (09:15 -0500)]
Bug 11415 (QA Followup) fix whitespace

This patch also fixes a JavaScript syntax error if the
SelfCheckReceiptPrompt system preference is off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11415: Add syspref to toggle SCO receipt printing
JaTara Barnes [Sun, 5 Jan 2014 06:33:31 +0000 (00:33 -0600)]
Bug 11415: Add syspref to toggle SCO receipt printing

This patch adds the SelfCheckReceiptPrompt to control
whether receipts are automatically printed when a patron
finishes a SCO session.  This is on by default during
new installations and upgrades.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10922: (follow-up) remove display of form parameter
Galen Charlton [Thu, 23 Jan 2014 16:53:44 +0000 (16:53 +0000)]
Bug 10922: (follow-up) remove display of form parameter

This patch removes the display of the close parameter
in the "Accounting details" legend added by the previous patch --
this was obviously a bit of stray debug logic.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10922: Display whether prices are include or don't include tax when creating...
Mathieu Saby [Fri, 20 Sep 2013 11:09:38 +0000 (13:09 +0200)]
Bug 10922: Display whether prices are include or don't include tax when creating a new order

This patch adds "(tax inc.)" or "(tax exc.)" after the "Vendor price",
"Replacement cost", "Budgeted cost" and "Actual cost" when entering
a new order.  This reflects the value of the list and invoice prices
include/don't include tax flags in the vendor record.

Actual cost must probably not be displayed here, but it will be the
subject of an other patch.

To test :
- create 2 vendors, with differents values for "List prices includes
  tax" and "Invoiced prices does includes tax" options
- create baskets for these 2 vendors
- create an order in each basket, and look at the "tax. inc." and
  "tax exc" mention. It should be consistent with the options for
  each vendor
- look at an order adding "&close=1" to the normal URL of the order.
  You must see the order without ability to edit it, but with the same
  mentions "tax inc." and "tax exc."

Signed-off-by: Isabelle Beroud <isabelle.beroud@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
I have some doubts about the calculations done here, but the
display changes are correct.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11397: Remove the itemnumber list on the Acquisition detail tab
Jonathan Druart [Mon, 16 Dec 2013 10:57:15 +0000 (11:57 +0100)]
Bug 11397: Remove the itemnumber list on the Acquisition detail tab

The list of links to items from the acquisitions tab can be
unwieldy if an order was used to purchase a lot of them, and the
availability of AcqItemSetSubfieldsWhenReceived and filters on the
holdings table provide alternative ways to do things like turn
off on-order statuses.

Test plan:
- verify this patch does not introduce regression on the enhancement
  introduced by bug 8230.
- verify the itemnumber list does not appears anymore.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
The acquisitions details tab on the holdings table in the staff
client no longer shows the links to the items. Tests pass.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
In my tests the itemnumbers didn't show up on the acquisition
detail tab before the patch. So the patch visually only changed
the column header for me. All other acquisition related information
showed up ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11429: Manage display for basketgroup without name
Jonathan Druart [Fri, 17 Jan 2014 15:31:54 +0000 (16:31 +0100)]
Bug 11429: Manage display for basketgroup without name

If a basketgroup does not have a name, the link was ' (closed)'
Now it is "Basket group no. ID (closed)".
This is used on the acqui/basketgroup.pl?booksellerid=XX page

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Adds a link to the basket group page
on the basket summary page. The link only appears when the basket
group is closed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11429: Add a link to basketgroup in basket detail page
Mathieu Saby [Thu, 19 Dec 2013 21:58:35 +0000 (22:58 +0100)]
Bug 11429: Add a link to basketgroup in basket detail page

If a basket is in a closed basketgroup, the basketgroup name is
currently displayed.

This patch adds a link around the basketgroup name if the librarian
has permission to manage basketgroups.

Test:

A. With a librarian with rights for managing basketgroups
Display a closed basket that is grouped in a basketgroup
Check the name of the basketgroup is now a link
Click on the link and check you are seeing information about the
right basketgroup

B. With a librarian WITHOUT rights for managing basketgroups
Display a closed basket that is grouped in a basketgroup
Check the name of the basketgroup is not a link

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 11435: Show basketgroup information in Acquisition tab in catalogue page
Mathieu Saby [Sun, 22 Dec 2013 22:34:18 +0000 (23:34 +0100)]
Bug 11435: Show basketgroup information in Acquisition tab in catalogue page

This patch adds a new column for displaying information about
basketgroups in the Acquisition tab on catalogue page for a record.

It also adds the number of the basket in the basket column.

If the user does not have group_manage permission, he just see the basketgroup name
and number.

If he has the permission, he can click to display the basketgroup.

If the basket is not in a basketgroup, the column is empty.

To test:

- Use a record in an order, and put the basket in a basketgroup.
- Connect with a user WITHOUT group_manage permission (but with order_manage
  permission).
- Go to the record's detail in catalogue and click on Acquisition tab.
- Check you see the name and number of the basketgroup, with no link
  around it.
- Check the number of the basket is displayed within () after the name of
  the basket
- Click on the basket link, check the basket displayed is the right one.

- Connect with a user WITH group_manage permission.
- Go to the record's detail in catalogue and click on Acquisition tab.
- Check you see a link with the name and number of the basketgroup.
- Click on the link, check the basketgroup displayed is the right one.

- On the basketgroup page, move the basket out of the basketgroup, and
  save the basketgroup.

- Go back to the record's page on the catalogue and click on Acquisition
  tab.
- Check the basketgroup column is empty

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber
Julian Maurice [Fri, 17 Jan 2014 10:21:05 +0000 (11:21 +0100)]
Bug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber

If parent_ordernumber is not set in NewOrder parameter, it is
automatically set to ordernumber.

This patch only avoid code duplication.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This solution is better!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also all tests in
t/db_dependent/Acquisitions/.

Confirmed bug and that the patch fixes it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11549: (follow-up) interpolated variables into SQL statements should not be allowed
Jonathan Druart [Tue, 14 Jan 2014 11:13:31 +0000 (12:13 +0100)]
Bug 11549: (follow-up) interpolated variables into SQL statements should not be allowed

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11549: make it possible to receive and cancel the receipt of a transferred order
Jonathan Druart [Tue, 14 Jan 2014 11:06:34 +0000 (12:06 +0100)]
Bug 11549: make it possible to receive and cancel the receipt of a transferred order

To reproduce the issue:
- transfer an order from a basket to another. Note the previous
ordernumber (X) and the new one (Y).
- receive the order
- cancel the receipt
- verify the order has been deleted:
select count(*) from aqorders where ordernumber=Y;
select * from aqorders_transfers where ordernumber_from = X;
The value for ordernumber_to is null.

To test this patch:
- apply this patch
- transfer an order from a basket to another
- receive the order
- cancel the receipt
- verify the order still exist in the basket where the transfer has been
  done.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11549: Add regression test
Jonathan Druart [Tue, 14 Jan 2014 11:04:24 +0000 (12:04 +0100)]
Bug 11549: Add regression test

test plan:
prove t/db_dependent/Acquisition/TransferOrder.t should fail before the
patch and success after applying it.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11141: (follow-up) ensure filters are kept if the receive is cancelled
Jonathan Druart [Wed, 15 Jan 2014 09:14:48 +0000 (10:14 +0100)]
Bug 11141: (follow-up) ensure filters are kept if the receive is cancelled

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11141: retain pending order filters during receiving.
Jonathan Druart [Fri, 25 Oct 2013 14:35:44 +0000 (16:35 +0200)]
Bug 11141: retain pending order filters during receiving.

On receiving orders, the librarian has to filter again the pending
orders list.

This patch stores the filters in a cookie in order to apply them when
the librarian finish a receive and come back on the pending orders list.

Test plan:
1/ choose a vendor with several baskets and orders.
2/ start to receive an item.
3/ on the pending orders page, add some relevant filters.
4/ receive an item.
5/ you are back on the pending orders page and filters are directly
applied.

Signed-off-by: Nicolas Bravais <nicolas.bravais@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested with receiving and cancelling the receive process the
filters are kept.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11312: make facets selectable using an ID [opac-bootstrap]
Jonathan Druart [Wed, 27 Nov 2013 15:35:54 +0000 (16:35 +0100)]
Bug 11312: make facets selectable using an ID [opac-bootstrap]

Signed-off-by: Francesca Moore <francescalamoore@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11312: make facets selectable using an ID -- opac-bootstrap
Francesca Moore [Tue, 14 Jan 2014 01:42:38 +0000 (14:42 +1300)]
Bug 11312: make facets selectable using an ID -- opac-bootstrap

To test:
1. search in OPAC directory
2. inspect the facets, note that they now have spans

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

I'm not sure that this change is necessary, since the parent li elements
have IDs that can be hooked onto for CSS, but it doesn't change existing
behaviour and more control is always nice, so that's all right.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11312: make facets selectable using an ID [opac-prog]
Jonathan Druart [Wed, 27 Nov 2013 15:35:27 +0000 (16:35 +0100)]
Bug 11312: make facets selectable using an ID [opac-prog]

Signed-off-by: Francesca Moore <francescalamoore@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11312: make facets selectable using an ID [staff]
Jonathan Druart [Wed, 27 Nov 2013 15:34:12 +0000 (16:34 +0100)]
Bug 11312: make facets selectable using an ID [staff]

Test plan:
launch a search and verify all facet headers have an id.

Signed-off-by: Francesca Moore <francescalamoore@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11453: Update EN default UNIMARC bibliographic framework
Bernardo Gonzalez Kriegel [Fri, 27 Dec 2013 03:44:28 +0000 (00:44 -0300)]
Bug 11453: Update EN default UNIMARC bibliographic framework

This patch updates default EN UNIMARC bibliographic framework

I used the 2008 version of the UNIMARC bibliographic manual,
and added updates listed on official site.

There are new fields/subfields, those added are hidden by
default.

There are some description changes, and also a lot of
changes to repeatable and mandatory values.

To test:
a) Functional
1) Remove all bibliographic frameworks
2) Load new file unimarc_framework_DEFAULT.sql
3) Check that it load without errors

b) Correctness
1) Take a time and verify that all new
fields/subfileds are correct

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Huge patch, lots of additions and corrections.
To view the changes git diff --color-words HEAD^ is helpful.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11313: supply empty value in mandatory comboboxs in MARC record editors
Fridolyn SOMERS [Wed, 27 Nov 2013 15:40:09 +0000 (16:40 +0100)]
Bug 11313: supply empty value in mandatory comboboxs in MARC record editors

In biblio (or authority) record editing or creation, Bug 3727 added
an empty value to combobox for subfields using itemtype authorized values,
which is mandatory and does not have a default value. This to avoid
selecting arbitrarily the first value of the combobox.

This patch extends this behavior to normal authorized values like CCODE,
COUNTRY ...

Also, when record already exists and has a defined value for the subfield
this value will be selected in combobox so there is no need for an empty
value.

Test plan :
- In a biblio framework, set a subfield mandatory and using itemtypes
  authorised values
- Set a default value for this subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the first empty value is selected
- Go to biblio framework and set a default value for the subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the default value is selected
   and there is no empty value
- Select an other value and save the record
- Edit this record
=> You see the subfield with a combobox, the saved value is selected and
   there is no empty value

Perform same tests with a normal authorized values categorie (instead of
  itemtypes).
Perform same tests with with authority creation/edition
Perform same tests with a normal authorized values categorie and authority
  creation/edition

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Fridolyn: I had a lot of difficulty understanding your test plan,
especially since the second line should not be in the test plan
(since if there is a default value, no empty value should appear).

Perhaps it would be useful to use more whitespace to separate
steps and the things for which a tester should check.

Also, it might be useful to specify what testers should check for
before and after applying the patch, so that they're sure that the
behaviour has been corrected.

In any case, the patch works! Certainly a helpful addition.

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

1) Adding a bibliographic record
Subfield is mandatory, no default value:
- adding record: no value is preselected, empty value exists
- editing record: saved value is shown,  empty value exists
Subfield is mandatory, defined default value:
- adding record: default is preselected, no empty value
- editing record: saved value is shown, no empty value exists
Subfield is not mandatory, defined default value:
- adding record: default is preselected, empty value exists
- editing record: saved value is shown, emtpy value exists
Subfield is not mandatory, no default value:
- adding record: empty value is preselected
- editing record: saved value is shown, empty value exists

2) Adding an authority record
Repeating tests from above.
- Subfield is mandatory, no default value: OK
- Subfield is mandatory, defined default value: OK
- Subfield is not mandatory, defined default value: OK
- Subfield is not mandatory, no default value: OK

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11056: Delete dead code in basketgroup.pl
Mathieu Saby [Wed, 18 Dec 2013 17:04:25 +0000 (18:04 +0100)]
Bug 11056: Delete dead code in basketgroup.pl

In basketgroup.pl, some code is supposed to be executed if
$op = "validate".  But this value is no longer assigned to
the $op variable since 2009.

This patch suppressed dead code, along with parseinputbaskets
and parseinputbasketgroups subs, which are obsolete.

No functional changes expected

Regression test :
* Check basketgroup are shown as before the patch, and can be closed
 and reopened.
* Check you can add or remove a basket from a basketgroup, and change
  information about it (like delivery place)
* Check you can create a basketgroup when you close a basket.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The following commands return nothing:
- grep validate acqui/basketgroup.tt
- grep -R basketgroup.pl -C 2 | grep validate
- git grep parseinputbaskets
- git grep parseinputbasketgroups
- git grep basketgroup.pl | grep validate

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11138: add auto_unsuspend_holds to daily crontab (Debian package)
Liz Rea [Fri, 25 Oct 2013 03:40:03 +0000 (16:40 +1300)]
Bug 11138: add auto_unsuspend_holds to daily crontab (Debian package)

To test:

Install the packages with this patch, observe the /etc/cron.daily/koha-common
file - auto_unsuspend_holds should now be in the default list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11138 - Add auto_unsuspend_reserves to crontab.example
Liz Rea [Thu, 14 Nov 2013 01:52:28 +0000 (14:52 +1300)]
Bug 11138 - Add auto_unsuspend_reserves to crontab.example

To test:

Set up and run the cronjobs from crontab.example with a hold set to
unsuspend today. The hold should be unsuspended.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11330: (follow-up) fix description of 951 tag in the default framework
Katrin Fischer [Thu, 5 Dec 2013 18:44:43 +0000 (19:44 +0100)]
Bug 11330: (follow-up) fix description of 951 tag in the default framework

Fixes one missing for 951 field description in the Default framework.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11330: fix inconsistent field/subfield descriptions on MARC21 bibliographic frame...
Bernardo Gonzalez Kriegel [Tue, 3 Dec 2013 17:58:37 +0000 (14:58 -0300)]
Bug 11330: fix inconsistent field/subfield descriptions on MARC21 bibliographic frameworks

This patch tries to make MARC21 bibliographic frameworks
internally consistent. It modifies field/subfield descriptions
of simple_bib and fastadd frameworks to match corresponding
ones of default framework.

To test:
1) Download and edit the attached script, check-diff.sh
Put on it user, pass and database name of your dev install
Copy the script on your git home

2) Run the script (bash check-diff.sh).
WARNING: the script removes bibliographic frameworks, and load
default, simple_bib and fastadd ones.
It will show on screen, and write on file differences.txt,
any difference on field/subfield description (liblibrarian)
between any framework and default

On master it will show a lot of lines

3) Apply the patch

4) Run the script again. Frameworks files must load without problem.
There will be no differences

NOTE: There are many "space" changes. The reason
to that is to format files to ease the translation process.
Not related with this bug, but necessary.
Also a few changes on default framework.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I ran some tests and found one more case where the
liblibrarian and libopac columns had slightly different
descriptions, adding a follow-up for that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11329: Check for MARC record existence in catalogue/showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:41:53 +0000 (09:41 +0100)]
Bug 11329: Check for MARC record existence in catalogue/showmarc

Intranet counterpart patch. Same check as in opac/opac-showmarc.

Test plan:
[1] Run showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11329: Check for MARC record existence in opac-showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:30:13 +0000 (09:30 +0100)]
Bug 11329: Check for MARC record existence in opac-showmarc

Instead of just running as_formatted, check if GetMarcBiblio returned
a reference. If you e.g. did not pass an id, return 404 instead of 500.
Consistent with opac-export.pl

Test plan:
[1] Run opac-showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11237: DBRev 3.15.00.013
Galen Charlton [Fri, 17 Jan 2014 15:16:50 +0000 (15:16 +0000)]
Bug 11237: DBRev 3.15.00.013

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11237: Update default value for pref AcqItemSetSubfieldsWhenReceived
Jonathan Druart [Thu, 16 Jan 2014 10:02:59 +0000 (11:02 +0100)]
Bug 11237: Update default value for pref AcqItemSetSubfieldsWhenReceived

The default value for this pref should be an empty string, not "0".

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11237: Update explanation for pref AcqItemSetSubfieldsWhenReceived
Jonathan Druart [Tue, 12 Nov 2013 09:27:17 +0000 (10:27 +0100)]
Bug 11237: Update explanation for pref AcqItemSetSubfieldsWhenReceived

This patch improves the description of the AcqItemSetSubfieldsWhenReceived
system preferences to clarify that it applies to updating items
during order receipt, if those items where created when the order was
placed.

Test plan:
Update the updatedb entry and search the pref in the admin module.
The explanation should have been updated.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11363: make units in label printer profile form translatable
Roman Amor [Thu, 16 Jan 2014 02:55:03 +0000 (15:55 +1300)]
Bug 11363: make units in label printer profile form translatable

Changed the unit names form an import to a switch case so that it is in
the .tt so that it can be translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11477: (follow-up) improve display of user/patrons in logs tool
Galen Charlton [Fri, 17 Jan 2014 05:54:09 +0000 (05:54 +0000)]
Bug 11477: (follow-up) improve display of user/patrons in logs tool

This patch tweaks the display of patron and user names in the logs
tool so that if a name is present, the patron/user ID that follows
it is enclosed in parentheses.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11477 - Add names for librarian and borrowers in the logs
David Cook [Mon, 6 Jan 2014 04:19:21 +0000 (15:19 +1100)]
Bug 11477 - Add names for librarian and borrowers in the logs

This patch adds the first name and surname of the librarian and the
user involved in a transaction log, if available.

If neither the firstname or the surname is available, then the 'object'
number will be prefaced with the 'Member' qualifier.

_TEST PLAN_

0) This patch depends on Bug 11473, so you must apply it first

Before applying this patch (11477):
1) View the logs.
2) Note that the Librarian column just has a number
3) Note that the Object column will just say Member X (where X is a
number), in the circulation, fines, and patron/member modules.

Apply the patch.

4) Reload the logs (you don't need to make new ones)
5) Note that the Librarian and Object columns mentioned above now
have firstname and surname appearing (where available)

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473: (follow-up) ensure link to item is construct correctly
Galen Charlton [Fri, 17 Jan 2014 06:04:37 +0000 (06:04 +0000)]
Bug 11473: (follow-up) ensure link to item is construct correctly

This patch adjusts the check on action_logs.info to better detect
if the event concerns an item.  This fixes a problem where the links
from log entries on item modifications would, if followed, result
in internal server errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - add 'biblio' and 'item' to cataloguing logging info
David Cook [Mon, 6 Jan 2014 04:01:10 +0000 (15:01 +1100)]
Bug 11473 - add 'biblio' and 'item' to cataloguing logging info

This patch adds the words 'biblio' and 'item' to the 'info'
of the cataloguing logs which were missing them (such as biblio
delete, biblio mod, item mod, upload cover image).

This patch also adds 'authority' for authority mod.

_TEST PLAN_

Before applying:
1) Create/view mods for items, biblios, and authorities.
2) Create/view biblio deletion
3) Create/view upload cover image log
4) Note that none of these contain the words 'biblio','item',or
'authority' in their "Info" columns.

Apply patch.

5) Repeat steps 1-3
6) Note that the new logs contain 'biblio','item', and 'authority'
in their "Info" column, while the past ones don't.
7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item'
appear in their "Object" column for the new logs

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Improve wording in log viewer template
David Cook [Mon, 6 Jan 2014 03:49:01 +0000 (14:49 +1100)]
Bug 11473 - Improve wording in log viewer template

This patch capitalizes 'member' and 'biblio' as object labels in the
log viewer.

It also adds a "Subscription" label, and changes "auth" to "Authority".

_TEST PLAN_

Before applying patch:

1) View logs for patrons, new biblio, serials, and authorities.

Apply the patch:

1) Notice the capitalization and new/modified labels.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Remove boilerplate in log viewer template
David Cook [Mon, 6 Jan 2014 03:43:53 +0000 (14:43 +1100)]
Bug 11473 - Remove boilerplate in log viewer template

This patch eliminates unnecessary conditions and boilerplate.

_TEST PLAN_

Apply the patch.

1) Try viewing logs for circulation, patrons, fines,
cataloguines, serials, authorities, etc.
2) Note that everything should look exactly the same as before,
with one exception: FINES
3) Fines will now show "member X" for the user associated with
the fine.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Fix log viewer template conditions
David Cook [Mon, 6 Jan 2014 03:32:31 +0000 (14:32 +1100)]
Bug 11473 - Fix log viewer template conditions

This patch adds the 'loopro' key to the 'module' value, so that
conditions are actually triggered in the template logic.

(Note: loopro.CIRCULATION is valid, but I changed it for the sake
of consistency across the different conditions.)

This patch also adds substr checks to the 'info' column when
using the cataloguing module. This will check for 'item' and 'biblio',
so that the appropriate label qualifer can be shown in the log viewer.
If either term is absent, the unqualified number will be shown instead
(this will be the majority of action logs at this point).

_TEST PLAN_

Before applying:

1) Access log viewer from Tools (or wherever really)
2) Look up logs for circulation, patrons, cataloguing, serial,
authorities, etc.
3) Note that the "Object" will always just be a number without qualification.

After applying the patch:

1) Look at those same logs
2) Note that the object number for borrowers will usually be prefaced
by 'member' (notwithstanding FINES which aren't taken into account in
this template yet); new bibs and new items should say 'Item X' or
'Biblio X'. Serials should have a link. Authorities should have a link
and an 'auth' preface.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11476: remove extra empty option from title pull-down in OPAC self-registration
Owen Leonard [Fri, 10 Jan 2014 16:56:15 +0000 (11:56 -0500)]
Bug 11476: remove extra empty option from title pull-down in OPAC self-registration

If you have patron titles enabled, the OPAC patron details form lists 2
empty spaces instead of 1. An empty option is passed by the script, so
the template does not need to include one.

To test you must have at least one patron title set in BorrowersTitles
system preference and OPACPatronDetails must be set to "allow."

1. Apply the patch
2. Log in to the OPAC
3. Click the "personal details" tab.
4. Click the "salutation" dropdown. There should be only one blank line
   preceding the existing titles.

Test in both prog and bootstrap.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described for existing and creating new accounts.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11018: allow adding order from a reverted MARC batch
Jonathan Druart [Tue, 8 Oct 2013 15:17:45 +0000 (17:17 +0200)]
Bug 11018: allow adding order from a reverted MARC batch

Weird behavior:
When an import is undone into catalog, the status is set to "reverted".
But if you open the add orders from iso2709, the status is automatically
set to "imported" and does not appear in the list.
So it is not possible to import a reverted batch.

[RM note: since a reverted batch is nonetheless a staged batch, and
could be reused, allowing orders to be placed by taking bibs
from a reverted batch is not as odd as it might sound.  It *can* look
odd for a staged or reverted batch to contain records that are
imported, but that's a long-standing oddity.]

Test plan:
- verify you reproduce the weird behavior
- apply this patch
- import a file and the batch into the catalog
- verify (in the your mysql/MariaDB cli) the status is "imported"
- verify it does not appears in the add orders from iso2809 page
- undo the import
- verify (in the your mysql/MariaDB cli) the status is "reverted"
- verify it appears in the add orders from iso2809 page and the status
  is always "reverted"
- finish the order

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) update the bootstrap theme
Galen Charlton [Fri, 17 Jan 2014 05:21:07 +0000 (05:21 +0000)]
Bug 9788: (follow-up) update the bootstrap theme

This patch applies the change made in the QA follow-up
to the Bootstrap theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 10:22:51 +0000 (12:22 +0200)]
Bug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber

Adds three tests to Reserves.t for GetReservesFromItemnumber.
We test if this routine does not return a future next available hold,
a future item level hold. And if it does return a future wait (that is:
a confirmed future hold, using ConfirmFutureHolds).

Note that Holds.t does also contains some basic tests for this routine,
but the additional tests seem to better located in the direct context of
tests for bug 9761 for ConfirmFutureHolds.

Test plan:
Run both t/db_dependent/Holds.t and t/db_dependent/Reserves.t.
Verify if both tests do not fail.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: QA followup
Jonathan Druart [Mon, 4 Nov 2013 10:55:57 +0000 (11:55 +0100)]
Bug 9788: QA followup

1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) for expirationdate in Letter.pm
Marcel de Rooy [Fri, 21 Jun 2013 16:43:59 +0000 (18:43 +0200)]
Bug 9788: (follow-up) for expirationdate in Letter.pm

Pasting comment from the Bugzilla report:

Looking bit longer at this code, it is kind of strange to find it
there in the first place. Adding maxpickupdelay in Letters.pm should
not be there, but it is..

Also this date is not used normally in the default HOLD Available for
Pickup notice (that we are generating in this case). And if it would be
undef, the expiration date should imo be empty instead of today+0.
(before adding maxreservespickupdelay, you should test the allowexpire
pref first) So it is an (invisible) bug on its own.

Test plan:
See former patch. Kyle just discovered this bug, apparently by
deleting the maxpickupdelay pref..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 08:33:46 +0000 (10:33 +0200)]
Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber

Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: Improvements when calling GetReservesFromItemnumber
Marcel de Rooy [Mon, 11 Mar 2013 13:28:57 +0000 (14:28 +0100)]
Bug 9788: Improvements when calling GetReservesFromItemnumber

This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.

Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.

This patch builds on work from reports 9367 and 9761.

Test plan:

Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.

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