koha.git
10 years agoBug 11719 - Use new DataTables include in serials templates
Owen Leonard [Mon, 10 Feb 2014 15:22:45 +0000 (10:22 -0500)]
Bug 11719 - Use new DataTables include in serials templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
serials-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Serials search results (serials/serials-search.pl): Perform a search
  which will return more than one subscription. The expiration date
  column is now sorted using the "title-string" filter for sorting based
  on the unformatted date. The "anti-the" filter has been added to the
  title column to exclude articles when sorting.

- Serials collection (serials/serials-collection.pl): View the serial
  colection page for an existing subscription. The table of issues
  should be sorted correctly.

- Serial claims (serials/claims.pl): The "since" and
  "claim date" columns have been modified to use the title-string filter
  for sorting based on the unformatted date.
  C4::Serials.pm::GetLateOrMissingIssues has been modified to pass an
  unformatted date along with the formatted date. The "anti-the" filter
  has been added to the title column to exclude articles when sorting.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested all 3 tables, no regressions found.
Passes QA script and tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11351: (follow-up) ensure itemtypes.sip_media_type is set to NULL when cleared
Galen Charlton [Mon, 28 Apr 2014 18:08:58 +0000 (18:08 +0000)]
Bug 11351: (follow-up) ensure itemtypes.sip_media_type is set to NULL when cleared

This patch ensures that the sip_media_type is set to NULL
rather than the empty string when it is cleared via item
types administration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11351: (follow-up) update DBIC schema classes
Galen Charlton [Mon, 28 Apr 2014 18:01:54 +0000 (18:01 +0000)]
Bug 11351: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11351: DBrev 3.15.00.037
Galen Charlton [Mon, 28 Apr 2014 17:59:21 +0000 (17:59 +0000)]
Bug 11351: DBrev 3.15.00.037

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11351: (follow-up) fix typos in seed SIP2 media types
Galen Charlton [Mon, 28 Apr 2014 17:57:27 +0000 (17:57 +0000)]
Bug 11351: (follow-up) fix typos in seed SIP2 media types

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11351 - Add support for SIP2 media types - French file
Jonathan Druart [Wed, 23 Apr 2014 13:27:01 +0000 (15:27 +0200)]
Bug 11351 - Add support for SIP2 media types - French file

This patch adds the SIP_MEDIA_TYPE AV for the fr-FR file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
10 years agoBug 11351 - Add support for SIP2 media types
Kyle M Hall [Fri, 6 Dec 2013 18:35:49 +0000 (13:35 -0500)]
Bug 11351 - Add support for SIP2 media types

Koha's SIP2 server implementation does not currently support the SIP2
protocol field "media type" ( CK ).

This patch implements the SIP2 media type by allowing an arbitrary
mapping of itemtypes to SIP2 media types.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Edit an itemtype, select a SIP media type, and save the changes
4) Make a SIP2 Item Information Request
5) Verify that the CK field of the Item Information Response contains
   the correct media type code.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
10 years agoBug 7125: make MARC framework tag form not suggest that one can change the form
Owen Leonard [Wed, 23 Apr 2014 14:52:14 +0000 (10:52 -0400)]
Bug 7125: make MARC framework tag form not suggest that one can change the form

When you edit an existing tag in a MARC framework the form makes it
appear as if you can change the tag number when in fact you cannot. This
patch changes the template so that the tag number does not appear as an
editable form field during the edit process.

To test, apply the patch and open an existing MARC framework in
Adminstration -> MARC bibliographic framework.

- Choose an existing tag from the list and click 'Edit.'
- The line labeled "Tag" should display the tag as text.
- Making a change to any of the tag's details should work correctly.
- Return to the list of the MARC framework's tags.
- Click 'New tag.'
- The line labeled "Tag" should display a blank form field.
- Create a new tag and confirm that it saves correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as describes, on edit and new.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Work as described, template change only.
Checked editing and adding tags.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12127: fix incorrect DataTable types in Holds to Pull list
David Cook [Wed, 23 Apr 2014 05:54:36 +0000 (15:54 +1000)]
Bug 12127: fix incorrect DataTable types in Holds to Pull list

This patch explicitly sets the sType in the Holds to Pull list table
for the libraries, itypes, and locations columns. It appears that the
type is automatically being set to "html" when it should be set to
"string".

It needs to have a sType of "string", since DataTables will strip out
the <br> tags when using "html", and we need them for the regexp
we use to create a more precise filter search.

_TEST PLAN_

Before applying:

1) Place a "next available" hold on a record with an item available
from one library/branch (e.g. "Branch A")
2) Place a "next available" hold on a record with an item available
from two different libraries/branches
3) Place a "next available" hold on a record with an item available
from three different libraries/branches - one of which is the same
as the library/branch from Step 1.
4) Go to the Holds to Pull List
5) Filter the branches by "Branch A".
6) You should only see the hold from Step 1 - not Step 3.
7) Try filtering on a branch for a hold that has multiple
libraries/branches. (They shouldn't appear when filtering, except
when using the "None" filter).

Apply the patch.

After applying:
1) Repeat Steps 4-7 from above. When filtering on "Branch A", you
should be able to see all holds that are available at "Branch A",
even if they are available at other branches (i.e. the holds has
multiple libraries listed).

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 11724: Make Funds/Status on suggestions page sortable/searchable
Owen Leonard [Fri, 14 Mar 2014 18:33:51 +0000 (14:33 -0400)]
Bug 11724: Make Funds/Status on suggestions page sortable/searchable

The fund and status columns on the suggestions page are not sortable or
searchable. This patch makes them so.

This patch also amends the DataTables configuration to use class-based
targeting for sorting types as was decided on the koha-devel list. The
table markup has been modified accordingly.

To test you must have existing suggestions. Apply the patch and go to
Acquisitions -> Suggestions. View the table of existing suggestions and
confirm that the funds and status columns are sortable and searchable.

Confirm that the title column correctly ignores articles when sorting.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11856: Add publication year and edition to French acq PDF template
Katrin Fischer [Thu, 27 Feb 2014 15:30:29 +0000 (16:30 +0100)]
Bug 11856: Add publication year and edition to French acq PDF template

Follow up to the patch for the English templates - repeat tests
with OrderPDFFormat set to pdfformat::layout3pagesfr.

Additional change:
Translates 'published by' to 'publie par'

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 11856: Add publication year and edition to German acq PDF template
Katrin Fischer [Thu, 27 Feb 2014 15:29:08 +0000 (16:29 +0100)]
Bug 11856: Add publication year and edition to German acq PDF template

Follow up to the patch for the English templates - repeat tests
with OrderPDFFormat set to pdfformat::layout2pagesde.

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 11856: Add publication year and edition to English acq PDF templates
Katrin Fischer [Thu, 27 Feb 2014 10:12:11 +0000 (11:12 +0100)]
Bug 11856: Add publication year and edition to English acq PDF templates

To test:
- Switch OrderPdfFormat to pdfformat::layout3pages
- Create one or more  baskets with a few orders, make sure you
  are adding some records that contain a publication year and/or
  edition statement
- Close the basket
- Create a basket group
- Print the PDF and check that edition and publication year
  show up and bibliographic information is printed correctly
- Switch OrderPdfFormat to pdfformat::layout2pages
- Repeat PDF print

This patch also changes the formatting a bit and differentiates between
UNIMARC and MARC21. For MARC21 no additional punctuation is needed as
those are cataloged with the information. Only spaces are added for MARC21,
while UNIMARC is kept they way it was before.

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 12134: ensure that patrons are not restricted even when the last restriction...
Kyle M Hall [Thu, 24 Apr 2014 15:23:05 +0000 (11:23 -0400)]
Bug 12134: ensure that patrons are not restricted even when the last restriction has expired

Test Plan:
1) Add a manual restriction to a patron and wait until the
   expiration date of the restriction has passed.  This can be
   simulated by modifying borrowers.debarred for a borrower and
   setting the date in the past.
2) Try to check out an item to that patron
3) Note you cannot
4) Apply this patch
5) Repeat step 2
6) Note you can now check out items the patron

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12134: (follow-up) fix one of the IsDebarred() tests
Galen Charlton [Mon, 28 Apr 2014 17:05:19 +0000 (17:05 +0000)]
Bug 12134: (follow-up) fix one of the IsDebarred() tests

- pass valid ISO date to the debar-date-in-future test
- correctly verify that patron is restricted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred
Jonathan Druart [Fri, 25 Apr 2014 10:48:42 +0000 (12:48 +0200)]
Bug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12134: Add unit tests to reflect the change in IsDebarred
Jonathan Druart [Thu, 24 Apr 2014 15:36:44 +0000 (17:36 +0200)]
Bug 12134: Add unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12115: follow-up fix for tools/inventory's output_pref issues
Mark Tompsett [Mon, 21 Apr 2014 01:13:26 +0000 (21:13 -0400)]
Bug 12115: follow-up fix for tools/inventory's output_pref issues

This should correct issues with the output_prefs in the
compareinv2bar logic section of tools/inventory.pl
It is a follow up to bug 11253.

TEST PLAN
---------
NOTE: There should be no distinguishable difference before and
      after the patch. This corrects a works by accident bug.

Back up DB.
Create a small barcode file from books in a given branch.

Set I18N/L10N system preference of dateformat to mm/dd/yyyy.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in mm/dd/yyyy format.

Set I18N/L10N system preference of dateformat to yyyy-mm-dd.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in yyyy-mm-dd format.

Set I18N/L10N system preference of dateformat to dd/mm/yyyy.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in dd/mm/yyyy format.

Apply patch
Restore DB (so results should be comparable to the first result)
Repeat the three testing blocks above.
There should be no visible difference.

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 11986: fix searching by tags in OPAC when DOM mode is in use
Jacek Ablewicz [Sun, 23 Mar 2014 20:24:48 +0000 (21:24 +0100)]
Bug 11986: fix searching by tags in OPAC when DOM mode is in use

This patch fixes the following issue: in installations that are using
zebra DOM indexing for bibliographic records, tag searching in OPAC
doesn't work properly (clicking on any tag in OPAC leads to "404 error").

To test: ensure that with patch applied:
1) problems with tag searching get resolved for [some] test
configuration with biblio DOM indexing enabled,
2) there are no apparent tag-searching-related regressions in OPAC,
in some yet another test installation configured with legacy
(grs1) indexing mode for biblios.

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 12111: (follow-up) ensure that vendor note is not editable during order receiving
Galen Charlton [Mon, 28 Apr 2014 15:37:43 +0000 (15:37 +0000)]
Bug 12111: (follow-up) ensure that vendor note is not editable during order receiving

This patch removes the ability of finishreceive.pl to change the vendor
note of an order.  It also uses a normal span rather than a disabled
textarea to display the vendor note on the receiving page, to emphasize
that it cannot be changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12111: (follow-up) fix breadcrumbs wording for vendor note
Mathieu Saby [Sat, 26 Apr 2014 12:37:42 +0000 (14:37 +0200)]
Bug 12111: (follow-up) fix breadcrumbs wording for vendor note

As asked by QAer,
this followup fixes wording in modordernotes.tt for vendor note
(Change order vendor note vendor note => Change order vendor note)
It also uses [%- and -%] to make code more readable

Test plan :
try to edit a vendor note, check the wording is correct in breadcrumbs

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, should be nicely translatable now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12111: Improving templates regarding order notes
Mathieu Saby [Sat, 19 Apr 2014 18:34:42 +0000 (20:34 +0200)]
Bug 12111: Improving templates regarding order notes

This bug changes some lines in modordernotes.tt to make them more easily
translatable, especially in german (remark by K. Fisher on bug 9416).
No change should be visible

It also suppresses the ability to edit order "vendor note" in reception,
as the note for vendor is not made to be changed after the document is
received.

Test plan :
- in a basket, try to edit the notes (internal and vendor) of order.
  Check the display is correct
- go in reception module (parcel.pl page) : in the list of all orders
  to receive, you should have a link to change "internal note", but no
  more link to change "vendor note"
- try to receive a specific order which have a "vendor note". On the
  right panel of the page, you must have an editable textarea for
  internal note, and a non-editable (colored in grey) textarea for
  vendor note

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11769: (follow-up) style required fields
Owen Leonard [Mon, 17 Mar 2014 17:13:00 +0000 (13:13 -0400)]
Bug 11769: (follow-up) style required fields

This follow up adds the correct "required" style to the required form
fields as well as the "required" text after each required field.

To test, apply all patches and go to Administration -> MARC
bibliographic framework -> New framework. The framework code and
description fields should show that they are required.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described and feels a million times better.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11769 - Use validation plugin when creating new MARC framework
Owen Leonard [Fri, 14 Feb 2014 20:17:44 +0000 (15:17 -0500)]
Bug 11769 - Use validation plugin when creating new MARC framework

The page for adding a new MARC framework includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> New framework. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing framework should also work correctly.

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11227: remove some JavaScript from staff PO files
Bernardo Gonzalez Kriegel [Thu, 3 Apr 2014 13:10:33 +0000 (10:10 -0300)]
Bug 11227: remove some JavaScript from staff PO files

This patch rewrites authorities_js.inc so translate
script will process it correctly. To do that I added
<script></script> at the file

To test:
1) Update po files for your preffered language

2) Check occurrence of mergeAuth on staff PO file
or try
egrep -n  "Merging with authority: |Cancel merge"
strings appear in a JS func

3) Apply the patch

4) Update translations again, check again, old
strings now begin with #~ (obsoleted) and there
are new entries for the messages

5) Check functionality provided by script

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a translation difficulty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12138 - Use placeholders in translatable Javascript strings
Pasi Kallinen [Thu, 24 Apr 2014 11:51:28 +0000 (14:51 +0300)]
Bug 12138 - Use placeholders in translatable Javascript strings

Currently translating Javascript strings with variables in them is hard,
because the strings are created from separate parts. For example:

 _("Are you sure you want to delete the") + " " + count + " " +
_("attached items?")

This is translated in two different parts, and the translator cannot
affect the place where the count-variable is.

Now, if the javascript strings allowed placeholders, similar to how the
template strings do, the above could be written as:

_("Are you sure you want to delete the %s attached
items?").format(count)

This would make translation much easier.

Attached patch adds a Javascript string formatter, and changes all the
concatenated translatable JS strings used in intranet to use that.

To test:
1) cd misc/translator
2) perl translate update xx-YY
3) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-pre
4) apply patch
5) perl translate update xx-YY
6) grep ^msgid po/xx-YY-i-staff-t-prog-v-3006000.po | sort | uniq >
xx-YY-post
7) compare the files: diff -Nurd xx-YY-pre xx-yy-post | less
   should show the javascript strings that changed.
8) Test the UIs where the formatted js strings are used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I tested *most* of the changed files. There were some instances where it
wasn't clear to me how to trigger the warnings which were modified,
especially tags/review.tt, admin/manage-marc-import.tt, and holidays.tt.
Everything I was able to test worked correctly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, no regressions found. Thx!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11497: remove TT construct for picking a default string that i18n toolchain fails...
Bernardo Gonzalez Kriegel [Thu, 3 Apr 2014 18:58:08 +0000 (15:58 -0300)]
Bug 11497: remove TT construct for picking a default string that i18n toolchain fails to pick up

The i18n toolchain fails to pick up constant text defined inside
[% ... %].  In particular, in a construct like this

  [% var OR "string" %]

the string "string" will not be available to be translated.

This patch fixes all the cases I could find.

To test:
1. Update your preferred language
(cd misc/translator; perl translate update fi-FI)

2. Count headers for example
egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l

3. Apply the patch

4. Repeat 1 and 2, now there are more lines
Or translate to some lang and visit every touched page and look the title

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Template changes only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11631: Make i18n toolchain ignore useless strings
Pasi Kallinen [Thu, 24 Apr 2014 08:01:52 +0000 (11:01 +0300)]
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10823: add class info to enumchron data in detail.tt, for better styling
Mason James [Mon, 14 Apr 2014 12:11:16 +0000 (00:11 +1200)]
Bug 10823: add class info to enumchron data in detail.tt, for better styling

This patch adds spans to style parts of the enumchron and serialseq
information in the holdings table in the taff interface:

These include:

- items.enumchron
- the separator used
- serial.serialseq
- items.publisheddate

TEST PLAN
---------
1) Apply patch 10825
2) Find a biblio where the enumchron and serialseq are different.
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serilaitems.itemnumber
        AND serialitems.serialid=serial.serialid;
3) In the staff client, view the source for that item.
   -- It should be one class for the entire <td> cell.
4) Apply patch 10823
5) Refresh the page
6) Look at the source for that item again.
   -- It should have <span> tags around the 4 things listed
      above.
7) Run the koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only, no regression found.
Using [%- -%] could improve readability of HTML source code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11588: fix untranslatable subscription frequency units
Pasi Kallinen [Thu, 24 Apr 2014 10:20:06 +0000 (13:20 +0300)]
Bug 11588: fix untranslatable subscription frequency units

To test:

1) cd misc/translator
2) perl translate update xx-YY
3) check that there's no msgid that contains the subscription
   frequencies (day, week, month and year) in
   po/xx-YY-i-staff-t-prog-v-3006000.po (search for
   "BLOCK translate_frequnit")
4) apply patch
5) perl translate update xx-YY
6) check po/xx-YY-i-staff-t-prog-v-3006000.po that it contains the
   msgid for the frequencies. (search for "BLOCK translate_frequnit")

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 12114: (QA Followup) Use JSON instead of JSON::XS
Kyle M Hall [Fri, 25 Apr 2014 12:53:25 +0000 (08:53 -0400)]
Bug 12114: (QA Followup) Use JSON instead of JSON::XS

RM note: on most platforms, the JSON module will use JSON::XS
by default.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12114: Fix encoding problem with reports JSON web service (staff)
Katrin Fischer [Sun, 20 Apr 2014 22:07:31 +0000 (00:07 +0200)]
Bug 12114: Fix encoding problem with reports JSON web service (staff)

Repeat tests from first patch, but this time, access the report
with your staff client base URL.

<Staff BaseURL>/cgi-bin/koha/svc/report?id=<reportid>

Based on paste from Galen Charlton.

Followed test plan. Result as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12114: Fix encoding problem with reports JSON web service (opac)
Katrin Fischer [Sun, 20 Apr 2014 22:01:19 +0000 (00:01 +0200)]
Bug 12114: Fix encoding problem with reports JSON web service (opac)

- catalog a record that includes umlauts äöü
- write a report, that has the record in the result set
- access the JSON output of the report
  <OPAC BaseURL/cgi-bin/koha/svc/report?id=1
- verify the umlaut displays not correctly
- switch the encoding in the browser to 'western'/latin1
- verify the umlaut now displays correctly
- apply patch
- verify umlaut now displays correctly from the beginning

Based on paste from Galen Charlton.

Followed test plan. Result as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12118 - remove unnecessary YUI assets included in offline circ manifest
Owen Leonard [Mon, 21 Apr 2014 18:29:19 +0000 (14:29 -0400)]
Bug 12118 - remove unnecessary YUI assets included in offline circ manifest

The offline circulation asset manifest includes some YUI JavaScript
files which are no longer used by any template in Koha except for
acquisitions/basketgroup.tt. This patch removes them from the manifest.

To test, apply the patch and test offline circulation. Everything should
work correctly.

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 12131: Remove unused dependency on Exporter
Colin Campbell [Wed, 23 Apr 2014 13:23:28 +0000 (14:23 +0100)]
Bug 12131: Remove unused dependency on Exporter

C4::TmplToken depends on Exporter but does not use any
of its facilities. Removed the dead code so it does not
clog up the source and waste compilation time

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Module still compiles correctly; t/TmplToken.t passes.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12119 - Move jeditable jQuery plugin outside of language-specific directory outsi...
Owen Leonard [Mon, 21 Apr 2014 18:42:14 +0000 (14:42 -0400)]
Bug 12119 - Move jeditable jQuery plugin outside of language-specific directory outside of language-specific directory

This patch moves the jeditable jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and confirm that editing quotes works correctly
in the Quote of the Day manager.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12116 - Move fixFloat jQuery plugin outside of language-specific directory
Owen Leonard [Mon, 21 Apr 2014 16:11:58 +0000 (12:11 -0400)]
Bug 12116 - Move fixFloat jQuery plugin outside of language-specific directory

This patch moves the fixFloat jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

This patch also includes a change to staff-global.css to override some
style the floating toolbar inherited when we added Bootstrap widgets.

To test, apply the patch and confirm that the toolbar "sticks" to the
top of the screen when scrolling down on the following pages:

- System preferences
- Authorities editor (Authorities -> New authority)
- Cataloging editor (Cataloging -> New record)
- List contents view (Lists -> View a list's contents)

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12101 - Move Greybox library outside of language-specific directory
Owen Leonard [Thu, 17 Apr 2014 16:44:42 +0000 (12:44 -0400)]
Bug 12101 - Move Greybox library outside of language-specific directory

This patch moves the Greybox library to intranet-tmpl/lib so that it is
not duplicated for each set of translated templates. The Greybox library
files are called directly only by one include file, greybox.inc, which
is modified by this patch.

To test, apply the patch and view any page which calls the Greybox
library and confirm that modal windows are still generated correctly.

For instance, Cataloging -> Cataloging search, click the "Preview MARC"
link.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12107 - Move checkboxes jQuery plugin outside of language-specific directory
Owen Leonard [Fri, 18 Apr 2014 13:27:48 +0000 (09:27 -0400)]
Bug 12107 - Move checkboxes jQuery plugin outside of language-specific directory

This patch moves the checkboxes jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and confirm that select all/clear all controls
continue to work on the following pages:

- Acquisitions -> Late orders
- Acquisitions -> Add to order from an external source (search targets)
- Acquisitions -> Suggestions
- Administration -> Funds -> Planning (show/hide all columns)
  * Some unused code has been removed
- Administration -> Library transfer limits
- Staff client cart
- Authorities -> New from Z39.50 (search targets)
- Cataloging -> New from Z39.50 (search targets)
- Circulation -> Check out to a patron (renew/check in selections)
- Circulation -> Offline circulation -> Pending operations
- Patrons -> Patron detail (renew/check in selections)
- Patrons -> Fines -> Pay fines
- Serials -> Subscription -> Serial collection
- Tools -> Label creator -> Batches -> Search results
- Tools -> Patron card creator -> Batches -> Search results
- Tools -> Tags moderation
- Tools -> Batch item deletion
- Tools -> Batch item modification
- Tools -> Inventory -> Submit a batch of barcodes
- Lists -> List contents view

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described! I don't think I've ever checked so many boxes
before...

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12103 - Move ajaxfileupload jQuery plugin outside of language-specific directory
Owen Leonard [Thu, 17 Apr 2014 17:27:14 +0000 (13:27 -0400)]
Bug 12103 - Move ajaxfileupload jQuery plugin outside of language-specific directory

This patch moves the ajaxfileupload jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

To test, apply the patch and test a page which requires the file upload
plugin. For instance: Tools -> Upload local cover image. The upload
process should finish correctly.

Tested with patron and local cover images. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12112: remove disused routine C4::Breeding::ImportBreeding()
Galen Charlton [Sat, 19 Apr 2014 21:57:08 +0000 (21:57 +0000)]
Bug 12112: remove disused routine C4::Breeding::ImportBreeding()

This patch removes the ImportBreeding() routine, which lost its
last caller as of the patch for bug 10462.

To test:

[1] Verify that prove -v t/Breeding.t passes.
[2] Perform a Z39.50 search in the staff interface.
[3] Perform a cataloguing reservoir search in the staff
    interface; verifying that cached records from the search
    done in step 2 are retrieved.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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 10942: (QA followup) make warnings to to STDERR
Tomas Cohen Arazi [Thu, 13 Mar 2014 14:30:15 +0000 (11:30 -0300)]
Bug 10942: (QA followup) make warnings to to STDERR

As noted by Robin, STDOUT is used by the script to communicate with
debconf and, hence, the warning messages should be directed to STDERR.

This patch does that. To test:

- Set AUTOMATIC_TRANSLATIONS_UPDATE="no" so the warning normally shows
- Redirect STDOUT to /dev/null:
  dpkg -i koha-common...deb > /dev/null
=> Warning message doesn't show (i.e. it is sent to STDOUT)
- Apply the patch, rebuild package
- Redirect STDOUT to /dev/null:
  dpkg -i koha-common...deb > /dev/null
=> Warning message shows (i.e. is correctly sent to STDERR)
- Redirect STDERR to /dev/null:
  dpkg -i koha-common...deb 2> /dev/null
=> Warning message doesn't show
- Verify that previous tests pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10942: (follow-up) debconfing the update option
Robin Sheat [Wed, 12 Mar 2014 04:24:36 +0000 (17:24 +1300)]
Bug 10942: (follow-up) debconfing the update option

This causes a question to be asked at installation time as to whether
translations should be updated or not. The answer is written to the
config file, and stored in debconf. Effort is taken to ensure that if
the admin changes the config file, the update will be picked up and
reflected in debconf (i.e. that the admin's decision is always the
correct one.)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixed two typos that made it fail and it worked like a charm.

Tested like this:

- Install the package
=> no errors, the file is created, defaults to 'yes'
- Install a language (koha-translate --install es-ES)
- Re-install the package (simulating an upgrade)
=> es-ES gets updated
- Set preference to 'no'
- Re-install
=> es-ES doesn't get updated, the warning is printed correctly
- Installed a second language (koha-translate --install pt-BR)
- did all the tests again
=> Success

Note: on master there are obvious template translation warnings.
A copy of the generated package can be grabbed from:
http://es.koha-community.org/koha-common_3.15+20140312172225.af7c0a23_all.deb

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes
Galen Charlton [Wed, 12 Mar 2014 02:07:53 +0000 (02:07 +0000)]
Bug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes

This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes,
meaning that package upgrades will update the translations by
default.  This seems definitely sensible for new installations,
but as there are some older installations that may be in the
habit directly editing generated translated templates, it's
less clear whether this is a good idea for upgrades.

This patch is intentionally separate, and can be ignored if
the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE
be off even for new installations or if somebody counter-patches
with adding debconf support.

To test:

- As with the previous patches in the series, except that the
  translations would be automatically updated upon installing
  the new package.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10942: (follow-up) create a /etc/koha/koha-common.conf
Galen Charlton [Wed, 12 Mar 2014 02:02:47 +0000 (02:02 +0000)]
Bug 10942: (follow-up) create a /etc/koha/koha-common.conf

This patch creates a new master configuration file for the
koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE
variable rather than leaving in in /etc/default/koha, which is meant
to be used for init script settings.

The configuration format is simple - a shell script that
sets variables and which can sourced by another script or
trivially parsed.

To test:

- Apply the patch series for bug 10942 and build a package.
- Install the package.
- Verify that a new config file, /etc/koha/koha-common.conf.
- Follow the rest of the test plan for the main page (e.g.,
  set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10942: Provide a way for package upgrades to update template translations
Tomas Cohen Arazi [Tue, 24 Sep 2013 17:45:07 +0000 (14:45 -0300)]
Bug 10942: Provide a way for package upgrades to update template translations

This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at
/etc/default/koha-common that is used to control whether the upgrade
process should trigger a

 $ koha-translate --update <lang_code>

command for each installed template translation language.

To test:
- Have a koha-common setup with some languages installed
  (e.g. koha-translate --install es-ES)
- Apply the patch and build a package for it.
- Install it.
- A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place
  at /etc/default/koha-common
- Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes'
- Re-install the package to trigger the post-install script
- Verify that translations get updated.

Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no
and there are translations installed (so they need to get updated).

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised, default behaviour doesn't change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js
Owen Leonard [Thu, 17 Apr 2014 19:18:36 +0000 (15:18 -0400)]
Bug 12105 - Remove duplicated plugin jquery.dataTables.columnFilter.js

This patch removes a redundant copy of the DataTables plugin
jquery.dataTables.columnFilter.js and corrects two templates.

The path to the plugin has been modified in acqui/parcel.tt:

- Go to Acquisitions and search for a vendor.
- Open the detail page for that vendor.
- Click the "Receive shipments" button.
- Select an invoice to view.
- In the table of titles, confirm that the column header search forms
  work to filter column data.

In the template for the Staged MARC management page the plugin has been
removed as it is unused. A couple of markup corrects have been made.
Confirm that table sorting is unaffected by going to Administration ->
Staged MARC management, clicking a staged MARC file, and viewing the
table of items in that batch.

There should be no more remaining instances of this path in the
templates:

[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I believe the sort order of the Order Line column is
      strange, but unrelated to this patch. The search area
      functions (filtering, paging, page size, etc.) worked
      fine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10782 - Add a koha-mysqlcheck script
Magnus Enger [Mon, 14 Oct 2013 19:10:31 +0000 (21:10 +0200)]
Bug 10782 - Add a koha-mysqlcheck script

This patch adds the koha-mysqlcheck script, as a "frontend" for
the mysqlcheck command. It can be used to check the integrity of
database tables, as well as to repair them. See "man mysqlcheck"
for more information.

The script takes a Koha instance name as its only required
parameter. Any other parameters provided before the instance
name are passed directly to mysqlcheck, which means that all
the functionality of mysqlcheck is available through this script.

To test the script:
- Apply the patch, build your own packages and install them, or
- copy koha-mysqlcheck to a server already running off packages

- Run some variations of the command, with and without arguments,
  and check that the output makes sense. E.g.:
    sudo koha-mysqlcheck myinstance
    sudo koha-mysqlcheck -e myinstance # Extended checks
    sudo koha-mysqlcheck -e -v myinstance # Extended checks and verbose
- See "man mysqlcheck" for other relevant options

To test the man page:
- Run these commands and look at the formatted man page:
    $ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
      debian/docs/koha-mysqlcheck.xml
    $ man -l koha-mysqlcheck.8
- Make sure this test passes:
    $ prove -v xt/verify-debian-docbook.t

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11646: fix untranslatable confirm popup in field 006 and 008 builders
Bernardo Gonzalez Kriegel [Sat, 22 Mar 2014 17:50:03 +0000 (14:50 -0300)]
Bug 11646: fix untranslatable confirm popup in field 006 and 008 builders

This patch MARC21 modifies value builders 006 and 008 to make
confirm popup translatable

To test:
1) Update po files for your preferred language, xx-YY
cd misc/translator; perl translate update xx-YY
2) Check that confirm string is NOT present
egrep -B3 "Show values for|material type\?" po/xx-YY*po
3) Apply the patch
4) Repeat 1)
5) Repeat 2), now the strings are present

Also check that english or translated popup is right

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11639: fix untranslatable strings in 007 builder
Bernardo Gonzalez Kriegel [Sat, 22 Mar 2014 16:53:44 +0000 (13:53 -0300)]
Bug 11639: fix untranslatable strings in 007 builder

This patch modifies marc21_field_007.tt to make
some missing strings translatable

To test:
1) Using your preferred language, xx-YY, updatepo files
cd misc/translator
perl translate update xx-YY
2) Check that missing strings are NOT present
egrep -i "exact bit depth|pad with zero|use up to 6" po/xx-YY-i-staff-t-prog-v-3006000.po
3) Apply the patch
4) repeat 1)
5) Repeat 2), check that missing strings are present

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12117 - Remove unused image myshadow.png from the staff client
Owen Leonard [Mon, 21 Apr 2014 16:55:23 +0000 (12:55 -0400)]
Bug 12117 - Remove unused image myshadow.png from the staff client

myshadow.png was used by a jQuery plugin which has long been removed.
This patch removes it.

To test, search the Koha source for references to myshadow.png.
There should be none.

Followed test plan, patch removed file as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12094: fix default tab selection broken by jQueryUI upgrade
Owen Leonard [Wed, 16 Apr 2014 14:21:05 +0000 (10:21 -0400)]
Bug 12094: fix default tab selection broken by  jQueryUI upgrade

The recent upgrade to jQueryUI didn't take into account the new method
for forcing selection of a tab by adding a class to the tab markup. This
patch corrects this by updating the class name.

This patch also updates one instance where it was necessary to switch to
the new function for selecting a tab by ID, introduced by Bug 12075.

To test, view the following pages:

- Perform a catalog search in the staff client. On the search results
  page the "Search the catalog" tab should be selected.

- In Acquisitions, view the basket groups page for a vendor which has
  open and closed basket groups
  (/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=X). Append
  "&listclosed=1" to the URL. The "Closed" tab should be selected.

- In Administration -> Authorized values, modify an authorized value for
  which an icon has been selected. When the edit form loads the
  corresponding icon tab should be selected.

- In Administration -> Item types, modify an itemtype for which an icon
  has been selected. When the edit form loads the corresponding icon tab
  should be selected.

- In Cataloging, open an existing record and select any tab besides the
  first one. Choose "Save and continue editing" from the Save menu. When
  the page reloads you should be returned to the tab you selected
  before.

- In Suggestions, markup for selected the tab has been removed because
  it didn't appear to be performing any function. The first tab is
  selected by default. The template doesn't need to explicitly add a
  class to make it so.

- In Tools -> CSV profiles, choose an existing profile for editing. When
  the page loads the "Edit existing profile" tab should be selected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Unable to duplicate Cataloging step issue, but there is no
      visible regression with the patch. The second part of the
      addbiblio.tt portion of the patch is clearly correct,
      because it is the same type of change as made in the other
      sections.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: (follow-up) clarify logic on multiple loans on same bib
Galen Charlton [Mon, 21 Apr 2014 05:51:58 +0000 (05:51 +0000)]
Bug 10859: (follow-up) clarify logic on multiple loans on same bib

This patch clarifies the logic for determining if a given item to be
checked out would be the second (or third, etc.) loan on the same bib.

As a conseqence, if the item is already on loan to the patron, the
circ staffer won't see the multiple-loans-on-a-bib warning, just
the confirmation to renew the loan or the warning that no more
renewals are lest.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: DBRev 3.15.00.036
Galen Charlton [Mon, 21 Apr 2014 05:33:00 +0000 (05:33 +0000)]
Bug 10859: DBRev 3.15.00.036

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: (follow-up) fix order in sysprefs.sql
Katrin Fischer [Thu, 13 Mar 2014 12:48:04 +0000 (13:48 +0100)]
Bug 10859: (follow-up) fix order in sysprefs.sql

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: (follow-up) GetIssues.t - Execute unit tests in a transaction
Jonathan Druart [Thu, 13 Mar 2014 11:39:02 +0000 (12:39 +0100)]
Bug 10859: (follow-up) GetIssues.t - Execute unit tests in a transaction

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: (follow-up) improve wording
Jonathan Druart [Thu, 13 Mar 2014 11:36:21 +0000 (12:36 +0100)]
Bug 10859: (follow-up) improve wording

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10859: Alert if a borrower already has an issue for the same biblio
Jonathan Druart [Tue, 18 Feb 2014 09:06:33 +0000 (10:06 +0100)]
Bug 10859: Alert if a borrower already has an issue for the same biblio

This patch adds a new system preference, AllowMultipleIssuesOnABiblio.

If this system preference is OFF, an alert is raised if a patron
tries to check out an item even when they already have a different
item checked out from that bib.

The librarian can force the checkout anyway.

It doesn't alert the librarian if the biblio is a subscription

Test plan:
1. Create a biblio with at least 2 items
2. Checkout the first item for a borrower
3. Set syspref AllowMultipleIssuesOnABiblio to OFF.
4. Try to checkout the second item with the same borrower. A message
should appear telling you that this borrower already borrowed an item
from this biblio.
If you have the permission 'force_checkout' You should also see two
buttons to confirm (or not) the checkout
5. Click on 'No'. The checkout is not done
6. Repeat step 4 and click 'Yes', the checkout is done.
7. Return the second item.
8. Set syspref AllowMultipleIssuesOnABiblio to ON
9. Try to checkout the second item with the same borrower. This time
the checkout is done without warnings.

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>
All tests and QA script pass, works well. Tested:

* Permission to override
  * check out a second item from a record with subscriptions works
  * check out a second item from a 'normal' record is warned about,
  but can be done

* No permission to override
  * subscription item: can be checked out
  * normal item: can't be checked out

* Feature turned off
  * Check out never warns/blocks

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7288: (follow-up) add unit test for is_linked_to_subscriptions flag
Galen Charlton [Mon, 21 Apr 2014 05:16:29 +0000 (05:16 +0000)]
Bug 7288: (follow-up) add unit test for is_linked_to_subscriptions flag

This adds a direct unit test of the is_linked_to_subscriptions flag
and corrects a typo in the previously-submitted test.

To test:

[1] Verify that prove -v t/db_dependent/Acquisition/OrderFromSubscription.t
    passes.
[2] Verify that prove -v t/db_dependent/Acquisition/Invoices.t
    passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7288: (follow-up) various fixes
Galen Charlton [Mon, 21 Apr 2014 05:06:14 +0000 (05:06 +0000)]
Bug 7288: (follow-up) various fixes

- Fix syntax error in supplied test
- remove subscriptionid as a field returned by GetInvoices(), as
  the is_linked_to_subscriptions Boolean takes its place.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7288: (follow-up) set a boolean if the invoice if linked to subscriptions
Jonathan Druart [Tue, 11 Mar 2014 10:17:18 +0000 (11:17 +0100)]
Bug 7288: (follow-up) set a boolean if the invoice if linked to subscriptions

If an invoice is linked to subscription, we need to set a boolean to
true in order to filter them in the interface.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7288: add filter on subscriptions in the invoices table
Jonathan Druart [Mon, 5 Nov 2012 09:35:08 +0000 (10:35 +0100)]
Bug 7288: add filter on subscriptions in the invoices table

This patch adds a checkbox "Show only subscriptions" in the invoices
table.

If this checkbox is checked, only invoices that contain at least one
order linked to a subscription are displayed.

To test:
- Test in a database with multiple existing invoices
- Create an order from a subscription, close basket, receive
- Test that the result table of the invoice search shows
  the new checkbox and that it works correctly

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11864: Show parent order line in received orders table
Julian Maurice [Thu, 25 Jul 2013 07:38:24 +0000 (09:38 +0200)]
Bug 11864: Show parent order line in received orders table

Test plan:
1/ Go to the receipt page of a bookseller
2/ Choose an invoice for which you have already partially
   received some orders (or create an order an receive it
   partially)
3/ In the received orders table, under column Order line,
   you should now see the parent order line number in
   parenthesis

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
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 11864: (code cleanup) re-indent parcel.tt and rename a variable
Julian Maurice [Thu, 25 Jul 2013 07:25:21 +0000 (09:25 +0200)]
Bug 11864: (code cleanup) re-indent parcel.tt and rename a variable

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed 2 additional tabs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11027: (follow-up) update unit test to reflect new columns returned by GetLateOrders
Galen Charlton [Mon, 21 Apr 2014 04:39:04 +0000 (04:39 +0000)]
Bug 11027: (follow-up) update unit test to reflect new columns returned by GetLateOrders

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11027: (follow-up) change label "Branch" to "Library"
Galen Charlton [Mon, 21 Apr 2014 04:36:00 +0000 (04:36 +0000)]
Bug 11027: (follow-up) change label "Branch" to "Library"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11027: (follow-up) hide link if no basketgroup and use real branch name
Mathieu Saby [Sun, 2 Feb 2014 22:07:16 +0000 (23:07 +0100)]
Bug 11027: (follow-up) hide link if no basketgroup and use real branch name

This patch is a answer to remarks made by QA:
- if there is no basketgroup for an order, the basketgroup
  column in lastorders.pl is now blank (instead of parentheses)
- the name of the branch is used instead of its code in the
  branch column

To test: check late orders, included and not included into basketgroup

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11027: (follow-up) Create link to baskets/basketgroups only if user have required...
Mathieu Saby [Sun, 22 Dec 2013 21:48:34 +0000 (22:48 +0100)]
Bug 11027: (follow-up) Create link to baskets/basketgroups only if user have required permissions

With this followup, a user without order_manage permission won't be able
to cick on a basket and a user without group_manage permission won't be
able to click on a basketgroup

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11027: Add a column for basketgroups in late orders table and improve other columns
Mathieu Saby [Wed, 18 Dec 2013 21:09:50 +0000 (22:09 +0100)]
Bug 11027: Add a column for basketgroups in late orders table and improve other columns

This patch makes 4 changes in late orders page :
- adding a new column for basketgroup, displaying
  the name and number of the basketgroup
- displaying the name of the basket as well as its
  number, with a hyperlink to this basket
- displaying fund in a separate column to make
  sorting easier, and renaming it from "budget" to
  "fund" (the confusion can be found elsewhere in Koha...)
- displaying branch in a separate column to make
  sorting easier (this column could be improved later,
  by getting branch from basketgroup if there is one)

For that, in Aquisition.pm, I made some changes to GetLateOrders:
- 3 new columns in SELECT
- 1 new join

To test :
1. Display the list of late orders of your instance.
2. Check you have 3 new columns for basketgroups, fund and branch
3. In basketgroup column you should have "name of basket group (number)"
4. In basket column you should have "name of basket (number)"
5. Check the links for basketgroups. They should send you to the
   page displaying information for each basketgroup
   (without possibiliy of editing them if they are closed)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patches pass QA script and all tests.
Works as described. Also checked sorting and orders which
are not in a basketgroup display correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11551: (follow-up) standardize label of order number / order line
Galen Charlton [Mon, 21 Apr 2014 04:27:56 +0000 (04:27 +0000)]
Bug 11551: (follow-up) standardize label of order number / order line

This patch changes the label of the order number search field
on the order search form from "Order no." to "Order line", to make
it consistent with how the order number is referred to in other
parts of acquisitions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11551: Allow to search on parent ordernumber in histsearch.pl
Julian Maurice [Fri, 10 Jan 2014 14:50:34 +0000 (15:50 +0100)]
Bug 11551: Allow to search on parent ordernumber in histsearch.pl

It is now possible to search on the order number on the order search
page.

Also searching on parent_ordernumber is possible, allowing one to
search to search children for a given order number.

Test plan:
1/ create a basket and 1 order with at least 2 items.
2/ receive partialy the order (receive only 1 item).
3/ note that a new ordernumber is created for item not received.
4/ go on the order search form and search for the original ordernumber
without checking the new checkbox "Display children too." => only 1
order (the parent) is displayed.
5/ now check the checkbox and search again => the parent order is
displayed but children too.

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11551: Add unit tests for using GetHistory to search by order number
Jonathan Druart [Tue, 14 Jan 2014 13:00:16 +0000 (14:00 +0100)]
Bug 11551: Add unit tests for using GetHistory to search by order number

prove t/db_dependent/Acquisition.t should return green.

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7308: (follow-up) tweak style of child fund amounts
Galen Charlton [Mon, 21 Apr 2014 04:15:11 +0000 (04:15 +0000)]
Bug 7308: (follow-up) tweak style of child fund amounts

This patch changes the styling of the amounts of child funds
in the funds table to use a more visible indication (i.e.,
italics rather than a font color of grey) and to use a
a new CSS class, "child_fund_amount", rather than a hard-coded
style.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7308: (follow-up) change color style for fund child
Jonathan Druart [Mon, 28 Oct 2013 11:15:27 +0000 (12:15 +0100)]
Bug 7308: (follow-up) change color style for fund child

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7308: (follow-up) removing line breaks for better translatability
Katrin Fischer [Sun, 21 Jul 2013 08:07:26 +0000 (10:07 +0200)]
Bug 7308: (follow-up) removing line breaks for better translatability

Because of the lines breaks in the table headings the strings
were separated in translation. Example:

Base-level allocated
 - Base-level
 - allocated

If you look at a smaller screen the table headings will still break
without the additional <br />.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7308: rework aqbudgets.pl table
Julian Maurice [Thu, 11 Oct 2012 12:14:20 +0000 (14:14 +0200)]
Bug 7308: rework aqbudgets.pl table

admin/aqbudgets.pl should have the following columns:

Base-level allocated (or just Allocated)
Base-level ordered
Total sub-levels ordered
Base-level spent
Total sub-levels spent
Base-level available
Total sub-levels available

Base-level is always calculated for one level, without children.
Total sub-levels should include child funds.
Available is calculated as "allocated - (ordered + spent)".

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Seems to work alright for me.
Passes QA script and tests, after I fixed 2 tabs in admin/aqbudgets.pl.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7308: Show ordered amount in aqbudgets.pl
Julian Maurice [Fri, 13 Apr 2012 08:40:35 +0000 (10:40 +0200)]
Bug 7308: Show ordered amount in aqbudgets.pl

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11552: (follow-up) fix a typo in a comment
Galen Charlton [Mon, 21 Apr 2014 03:34:31 +0000 (03:34 +0000)]
Bug 11552: (follow-up) fix a typo in a comment

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11552: allow searching on original order number after a transfer
Jonathan Druart [Tue, 14 Jan 2014 12:33:58 +0000 (13:33 +0100)]
Bug 11552: allow searching on original order number after a transfer

If an order is transferred from one basket to another, it should be
possible to retrieve it with the original order number (AKA order
line).  This patch makes it so.

Test plan:
- transfer an order
- note the original order number and the new one
- receive the order and, on the parcel page, try to find your order with
  the original order number and the new one.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
RM note: this works only for the most recent transfer, so if an order
gets transferred multiple times, earlier order numbers won't retrieve
it.

10 years agoBug 7844: Plack intranet tooling for developers
Dobrica Pavlinusic [Wed, 11 Apr 2012 12:36:24 +0000 (14:36 +0200)]
Bug 7844: Plack intranet tooling for developers

koha.psgi example and plackup.sh script to run any Koha site
intranet or opac interface under Plack with optional multi-process
Starman server

  plackup.sh site-name [intranet]

site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml

All configuration is specified in koha.psgi, which you are welcome to edit
and tune according to your development needs (enable memcache, enable/disable
debugging modules for plack and so on).

For deployment of opac or intranet you would probably want to take a look
in plackup.sh and enable starman as web server (which is pre-forking server
written in perl) and put some web server in front of it to serve static web
files (e.g. ngnix, apache)

When you are happy with it, rename koha.psgi and plackup.sh it to site name
and save it for safe-keeping.

This commit message is included in patch as README.plack because it includes
useful information for people using plack for first time.

Test scenario:
1. install plack and dependencies, as documented at
   http://wiki.koha-community.org/wiki/Plack

2. start ./plackup.sh sitename i[ntranet]

3. open intranet page http://localhost:5001/ and verify that it redirects
   to http://localhost:5001/cgi-bin/koha/mainpage.pl

4. start ./plackup.sh sitename

5. open OPAC http://localhost:5000/ and verify that it redirects to
   http://localhost:5000/cgi-bin/koha/opac-main.pl

6. next step is to take a look into koha.psgi and enable additional
   debug modules, save file and reload page (plackup will reload
   code automatically)

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. As I have explained in a comment on the bug
this looks like a very good starting point, and we can argue about
the details and add more options over time. Very happy to sign
this off! (My earlier concern about / not working has now been
taken care of, thanks Dobrica!)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8262: (follow-up) correct comment
Galen Charlton [Sun, 20 Apr 2014 22:57:55 +0000 (22:57 +0000)]
Bug 8262: (follow-up) correct comment

There is no guarantee that the database admin user
is going to be called "kohaadmin".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8262: explicitly warn that database admin account cannot create lists
Marcel de Rooy [Mon, 3 Mar 2014 08:55:43 +0000 (09:55 +0100)]
Bug 8262: explicitly warn that database admin account cannot create lists

Since kohaadmin has no borrower number, it cannot create lists.
A database error is logged, but the user is not notified.
This patch alerts the user.

In the incidental case that a normal user gets a database error,
they are notified too that the list could not be created.

Test plan (for prog and bootstrap):
* This patch should be applied on top of 9032 patches.
* Login as as the database admin user
* Create a list in opac and staff. Check the message.
* Login as a normal user.
* Force a database error on list creation (I renamed category
  in the table with alter table change column..)
* You should have a different error message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9915: (follow-up) use SQL placeholders
Galen Charlton [Sun, 20 Apr 2014 16:04:27 +0000 (16:04 +0000)]
Bug 9915: (follow-up) use SQL placeholders

This patch teaches C4::Reports::Guided::execute_query()
how to accept a list of query parameter values.  It then
follows-up on the main patch by simplifying how it converts
report parameters to a complete SQL query, and removes the
use of DBI->quote() and complicated regexes.

To test:

[1] Verify that using the OPAC svc/report service with
    sql_params continues to work.
[2] Verify that there are no regressions with running
    reports from the staff interface, both via the web
    service and the reports interface.
[3] Verify that prove -v /db_dependent/Reports_Guided.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
No regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9915: Allow sql_params to be passed to a report using the OPAC svc/report interface
Chris Cormack [Sun, 24 Mar 2013 07:29:18 +0000 (20:29 +1300)]
Bug 9915: Allow sql_params to be passed to a report using the OPAC svc/report interface

Test plan:

1/ Make a public report that contains SQL parameters
2/ Test it from the staff side
3/ Hit the url like
cgi-bin/koha/svc/report?id=1&sql_params=chris&sql_params=chris2
4/ Test you get JSON

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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.

Tested with a public report:
select * from items
  - cgi-bin/koha/svc/report?id=6
  - URL shows JSON and all items
select * from items where itype = <<itype>>
  - cgi-bin/koha/svc/report?id=6&sql_params=BK
  - URL shows JSON and only BK items
select * from items where itype = <<itype>> and homebranch = <<homebranch>>
  - cgi-bin/koha/svc/report?id=6&sql_params=BK&sql_params=MPL
  - URL shows JSON and only BK items in MPL
select * from items where itype = <<itype|itemtypes>> and homebranch = <<homebranch|branches>>
  - same as above
  - URL shows JSON and only BK items in MPL
select * from items where dateaccessioned = 2013-12-15
  - cgi-bin/koha/svc/report?id=6&sql_params=BK&sql_params=MPL&sql_params=2013-12-15
  - URL shows JSON and correct items

Note: This will currently only work for public reports!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) restore documented intepretation of virtualshelfshares.sharedate
Galen Charlton [Sun, 20 Apr 2014 22:46:39 +0000 (22:46 +0000)]
Bug 9032: (follow-up) restore documented intepretation of virtualshelfshares.sharedate

The sharedate column is documented as having the following meaning:

"date of invitation or acceptance of invitation"

This patch adjust the new list-sharing code to stick with that
interpretation, as otherwise the column should have been renamed
to 'invite_expiration_date' or the like.

It also removes the "housekeeping" functionality from AddShare, as
otherwise the routine should have been named AddShareAndDoOtherStuff.

To prevent list shares from piling up, a new --list-invites flag
has been added to cleanup_database.pl.  The default crontabs have
been modified to use the --list-invites flag by default.

To test
-------
[1] Make some list share invites and accept some, but now all of them.
[2] Wait 14 days (or more reasonably, manually edit the sharedate
    values for the unaccepted shares to put them at least 14 days in the
    past.).
[3] Run cleanup_database.pl --list-invites
[4] Verify that accepted shares remain, as to share invites that have
    not yet reached more than 14 days of age.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) code tidying
Galen Charlton [Sun, 20 Apr 2014 22:06:27 +0000 (22:06 +0000)]
Bug 9032: (follow-up) code tidying

- use Modern::Perl;
- standardize license statement
- run perltidy

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) add libemail-valid-perl as a Debian dependency
Galen Charlton [Sun, 20 Apr 2014 22:02:21 +0000 (22:02 +0000)]
Bug 9032: (follow-up) add libemail-valid-perl as a Debian dependency

Not strictly necessary, but for as long as both debian/control and
debian/control.in are stored in the repo...

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) wording tweaks
Galen Charlton [Sun, 20 Apr 2014 22:00:46 +0000 (22:00 +0000)]
Bug 9032: (follow-up) wording tweaks

- "share his list" => "share a list"
- "any valid email" => "a valid email"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: DBrev 3.15.00.035
Galen Charlton [Sun, 20 Apr 2014 21:29:08 +0000 (21:29 +0000)]
Bug 9032: DBrev 3.15.00.035

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) adding new notices to non-English installer files
Marcel de Rooy [Fri, 21 Mar 2014 14:42:54 +0000 (15:42 +0100)]
Bug 9032: (follow-up) adding new notices to non-English installer files

Adds the notices SHARE_INVITE and SHARE_ACCEPT to sample_notices.sql for
the foreign language installer files in installer/data/mysql.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I tested each installer file by deleting all notices from letter, running
the file and counting the records. I did so with and without this patch.
The results below show that in each case two notices were added as
expected. Note that the English file contains 25 notices including the two
new ones.

BEFORE THIS PATCH:
de-DE/mandatory/sample_notices.sql: 23 notices
es-ES/mandatory/sample_notices.sql: 18 notices
fr-FR/1-Obligatoire/sample_notices.sql: 18 notices
it-IT/necessari/notices.sql: 21 notices
nb-NO/1-Obligatorisk/sample_notices.sql: 23 notices
pl-PL/mandatory/sample_notices.sql: 18 notices
ru-RU/mandatory/sample_notices.sql: 18 notices
uk-UA/mandatory/sample_notices.sql: 17 notices

AFTER THIS PATCH:
de-DE/mandatory/sample_notices.sql: 25 notices
es-ES/mandatory/sample_notices.sql: 20 notices
fr-FR/1-Obligatoire/sample_notices.sql: 20 notices
it-IT/necessari/notices.sql: 23 notices
nb-NO/1-Obligatorisk/sample_notices.sql: 25 notices
pl-PL/mandatory/sample_notices.sql: 20 notices
ru-RU/mandatory/sample_notices.sql: 20 notices
uk-UA/mandatory/sample_notices.sql: 19 notices

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) loop variable and Cancel button
Marcel de Rooy [Wed, 19 Mar 2014 15:56:23 +0000 (16:56 +0100)]
Bug 9032: (follow-up) loop variable and Cancel button

[1] Use loop variable instead of $_ in opac-shareshelf.pl
[2] Adds Cancel button to Invite form (prog and bootstrap) in
    opac-shareshelf.tt.  Likewise adds Return link under an error
    message in opac-shareshelf.tt.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up): send cookie with redirect
Marcel de Rooy [Fri, 14 Mar 2014 14:14:14 +0000 (15:14 +0100)]
Bug 9032: (follow-up): send cookie with redirect

Small fix to resolve a problem Dobrica noted on the bug report: if you
had to log in when accepting the share, the cookie was not passed
back to the server when redirecting to shelf display.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: new SHARE_INVITE & SHARE_ACCEPT notifications
Marcel de Rooy [Fri, 31 May 2013 10:32:29 +0000 (12:32 +0200)]
Bug 9032: new SHARE_INVITE & SHARE_ACCEPT notifications

Adds notices SHARE_INVITE and SHARE_ACCEPT in updatedatabase and
sample_notices.

Test plan:
Install or upgrade and verify that you have the new notice under Tools.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) add support for bootstrap theme
Marcel de Rooy [Thu, 6 Mar 2014 10:44:15 +0000 (11:44 +0100)]
Bug 9032: (follow-up) add support for bootstrap theme

Adds new template opac-shareshelf.tt.
Modifies template opac-shelves.tt: Share button, Remove Share button,
label "Your lists" instead of "Your private lists", list category
Shared.

Test plan:
Verify if the Share a list-features work in bootstrap by:
[1] Switch to bootstrap. Go to Lists.
[2] Share one of your private lists.
[3] Login as another user and accept the invitation.
[4] Remove the share again.
[5] Check if Share and Remove share do not popup for public lists.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: enforce consistent behavior when deleting lists
Marcel de Rooy [Wed, 5 Mar 2014 15:26:40 +0000 (16:26 +0100)]
Bug 9032: enforce consistent behavior when deleting lists

DelShelf deletes a list regardless whether it is private, shared or
public. HandleDelBorrower had another approach, trying to save shared
and public lists by setting the owner to NULL.

This patch makes both routines behave consistently.

A new report 11889 has been opened to discuss the 'disowning' feature.

NOTE: I did not add a db revision here to handle possible cases of lists
without owner in the current data. Such public (or shared) lists can still
be used without any problem. Bug 11889 and a new planned report for a lists
management tool will address this topic further on. After that, all goals
of umbrella report 7310 should be realized.

Test plan:
Create a list P1 with user1 that allows adding by other users.
Add a patron (user2).
Login as user2 and create some lists, add some items.
Let user2 add some entries to P1 too.
Delete patron user2.
Verify that his lists are gone, but his entries in P1 are kept (nullified).

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: Unit tests for sharing lists
Marcel de Rooy [Mon, 10 Jun 2013 12:51:55 +0000 (14:51 +0200)]
Bug 9032: Unit tests for sharing lists

This patch combines some work from bugs 10389 and 10441.
With thanks to Srdjan and Jonathan Druart for their contributions.

Adds tests for AddShare, AcceptShare, IsSharedList, RemoveShare.
This patch also restores the inadvertently deleted DelShelf tests
in bug 10499.

Test plan: Run the test VirtualShelves.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: add ability to accept list share invitations and remove shares
Marcel de Rooy [Fri, 12 Jul 2013 14:30:05 +0000 (16:30 +0200)]
Bug 9032: add ability to accept list share invitations and remove shares

This patch handles:

[1] The response (acceptance) by the invited person.

If the person accepts this share, the private list of the sender will
be shown under Your lists on the shelves page. In OPAC 'Your private
lists' has been renamed to Your lists (just as in Staff). The Type
column shows Private or Shared for these lists; a list appears as
Shared as soon as an invitation has been accepted. The owner has the
options to Edit, Delete or Share; the invited person does not have
these options on the shared list.

[2] Removing an accepted share.

If a user accepted a share, they should also be able to remove it again.
The Remove Share button is visible on OPAC when viewing Your lists or
a particular shared list.

Note: AddShare has been extended to return a possible database error.
If the share invite could not be added, a mail will not be sent.

Test plan (for prog theme):
Enable pref OpacAllowSharingPrivateLists
User 1 creates new private list P1, perms: D-A-D, adds 2 items, sends share
User 1 checks your lists display: is P1 Private with Edit button?
User 2 accepts share: sees P1, but cannot add or delete items
User 2 checks your lists display again: P1 shows Shared without Edit?
User 1 checks your lists display again: P1 shows Shared with Edit?
User 2 tries to accept share again: should fail now
User 3 tries to accept share: should also fail
User 3 tries again, modifies shelfnumber and/or key in url: should also fail

User 2 creates new private list P2, perms: A-A-A, no items, sends share
User 2 checks your lists display: P2 shows Private with Edit?
User 1 accepts, adds one item
User 1 checks your lists display: P2 shows Shared without Edit?
User 2 checks your lists display: P2 shows Shared with Edit?
User 2 deletes item of user 1 (allowed)
User 2 deletes list P2
User 1 checks your lists display in opac or staff: P2 is gone?

User 1 creates private list P3, sends a share.
User 1 creates private list P4, adds one item, sends a share.
User 2 accepts the share for P3.
User 2 checks the shelves display, and removes share P3.
User 2 accepts the share for P4.
User 2 views shelf P4 with one item and confirms Remove share on that form.
User 2 checks shelves display again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) Plackify opac-shareshelf.pl
Marcel de Rooy [Fri, 28 Feb 2014 20:41:09 +0000 (21:41 +0100)]
Bug 9032: (follow-up) Plackify opac-shareshelf.pl

Plackified opac-shareshelf by moving global my variables into hashref
and explicitly passing paramters to the subroutines that
opac-shareshelf.pl uses.

Slightly changed base64ord and base64chr functions to more generic ones.

This patch also corrects the version of the GPL statement.

Test plan:
Verify if sending an share invitation still works (under prog theme).

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) adjust the "share a list" template
Owen Leonard [Wed, 5 Jun 2013 16:22:02 +0000 (12:22 -0400)]
Bug 9032: (follow-up) adjust the "share a list" template

This patch makes a few changes to the "share a list" template:

- We don't use tables for layout of forms. This patch corrects the
  display of the share form to use Koha standard form markup.
- Revise the confirmation message displayed after a list is shared to be
  more readable.
- Add a link back to private lists to the confirmation message.
- Add T:T markup to make this page display the left-hand navigation
  which is shown on other patron-related pages when a user is logged in.

To test, apply this patch on top of other patches pending for Bug 9032
and confirm that the list share form looks correct and works correctly.
Confirm that share confirmation page reads well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9032: (follow-up) add new dependency Email::Valid
Marcel de Rooy [Fri, 31 May 2013 10:03:25 +0000 (12:03 +0200)]
Bug 9032: (follow-up) add new dependency Email::Valid

Just adds this dependency to PerlDependencies module.
Note from Robin: libemail-valid-perl is in squeeze already.

Test plan:
You should see Email::Valid now under About/Perl modules.
If Email::Valid is not yet installed on your system, please do so.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>