koha.git
9 years agoBug 4041: Second Step: Add system preference and "German style" address formats for...
Marc Véron [Wed, 18 Feb 2015 16:23:57 +0000 (17:23 +0100)]
Bug 4041: Second Step: Add system preference and "German style" address formats for staff

To test:

Apply patch
Do a database update (e.g. by changing version number in kohaversion.pl)
Find new system preference 'addressformat' in I18N/L10N
Choose 'German style'
Go to Patrons and edit a patron / create new patron
Verify that Zip code appears above City
Change system preference to 'US style'
Verify that Zip code appears between State and Country.

BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Patch amended to move street number after address. /Marc

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Amended do resolve conflict with updatedatabase.pl  /Marc
Rebased for current master /Marc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 4041: Third step - Display address on patron's pages using the system preference
Marc Véron [Mon, 2 Mar 2015 20:33:20 +0000 (21:33 +0100)]
Bug 4041: Third step - Display address on patron's pages using the system preference

This patch displays the address information in the left column of the patron's pages using the new system preference.
The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc

To test:
- Apply patch on top of 1st and 2nd patch
- Select 'German style' in system preference 'addressformat' in I18N/L10N
- Verify that the address information displays properly in the left column of all patron's pages.
- Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched))
- Switch system preference to US style, repeat checks

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
AMending without changes to put this patch at the end of the patch list / Marc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 4041: First step (staff interface): Extract address blocks to include files
Marc Véron [Tue, 17 Feb 2015 21:36:45 +0000 (22:36 +0100)]
Bug 4041: First step (staff interface): Extract address blocks to include files

This patch extracts the address blocks in memberentrygen.tt to include files.

To test: The overall functionality should remain the same with this patch.

In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13109: Serial failure for received and general viewing.
Mason James [Mon, 30 Mar 2015 06:33:45 +0000 (19:33 +1300)]
Bug 13109: Serial failure for received and general viewing.

to test...

1/ attempt to view a subscription-detail that has a NULL value for either it's 'startdate' or 'enddate'

  an example url would be...
  http://koha-admin.foo.org/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1

  observe error...
  'Date::Calc::PP::Delta_Days(): Usage: Date::Calc::Delta_Days($year1,$month1,$day1,$year2,$month2,$day2) at /your/koha/C4/Serials.pm line 2325'

2/ apply patch
3/ repeat step 1/
   observe that detail page displays OK

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I confirm the issue if startdate is null (can exist with old data,
before the js check on the form).
Amended patch: Remove trailing space char and the link to the bz number
(can be found using git log).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8992: (QA followup) <body> was missing id and class
Tomas Cohen Arazi [Tue, 28 Apr 2015 21:11:35 +0000 (18:11 -0300)]
Bug 8992: (QA followup) <body> was missing id and class

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8992: DBRev 3.19.00.031
Tomas Cohen Arazi [Tue, 28 Apr 2015 19:33:27 +0000 (16:33 -0300)]
Bug 8992: DBRev 3.19.00.031

Some fixes too.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8992: Add 7..$3 to the Indentifier-standard index
Jonathan Druart [Wed, 7 Jan 2015 15:12:04 +0000 (16:12 +0100)]
Bug 8992: Add 7..$3 to the Indentifier-standard index

Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
9 years agoBug 8992: Add the greybox include file for the bootstrap theme
Jonathan Druart [Fri, 10 Oct 2014 02:12:00 +0000 (04:12 +0200)]
Bug 8992: Add the greybox include file for the bootstrap theme

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
9 years agoBug 8992: Use the existing greybox plugin in interface/theme
Jonathan Druart [Mon, 18 Aug 2014 09:25:58 +0000 (11:25 +0200)]
Bug 8992: Use the existing greybox plugin in interface/theme

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
9 years agoBug 8992: XSLT changes
Jonathan Druart [Wed, 23 Apr 2014 11:34:45 +0000 (13:34 +0200)]
Bug 8992: XSLT changes

This patch add the same behavior as previous patches for the xslt view.

Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
9 years agoBug 8992: DB changes - add the IdRef syspref
Jonathan Druart [Wed, 23 Apr 2014 11:33:25 +0000 (13:33 +0200)]
Bug 8992: DB changes - add the IdRef syspref

Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8992: Interfacing with the Idref webservice
Jonathan Druart [Wed, 23 Apr 2014 11:32:47 +0000 (13:32 +0200)]
Bug 8992: Interfacing with the Idref webservice

On the detail page (in the opac), if the biblio comes from the Sudoc,
you must have a link (on the right of the author link) which open a popup with
informations about this author (publications by role).

To test:

1/ Switch on the Idref system preference

2/ Simulate a SUDOC record:
  Fill a 7..$3 field with a ppn (032581270 for example).
  Fill the 009 field with an integer

3/ Go to the opac detail page of this notice.
You should see the IDREF link.
If you click on it, a popup displays a loading icon and after a few
seconds (depending of the productivity of the authority :)), a list of
roles. For each role, a table displays all his corresponding publications.

4/ On the right, you have 2 links: 1 for a koha search for this result
and 1 for a SUDOC link

Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10752: (QA followup) rephrase erorr messages a little
Katrin Fischer [Mon, 20 Apr 2015 20:15:02 +0000 (22:15 +0200)]
Bug 10752: (QA followup) rephrase erorr messages a little

Rephrased error messages a little and changed the link to
look like it does on other pages, for example when looking
at an order created from a suggestion.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
http://bugs.koha-community.org/show_bug.cgi?id=10752
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10752: Alert if the suggestion has not been added - OPAC
Jonathan Druart [Mon, 20 Apr 2015 08:08:07 +0000 (10:08 +0200)]
Bug 10752: Alert if the suggestion has not been added - OPAC

Same as previous patches for the OPAC.

Test plan is the same.

Tested with all patches applied. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10752: Remove the specific css for links in an error dialog
Jonathan Druart [Mon, 20 Apr 2015 07:44:23 +0000 (09:44 +0200)]
Bug 10752: Remove the specific css for links in an error dialog

Comes from commit c28f7d7de5d1e1a8d5e0038b76fce74397c3c489
Date:   Tue Mar 20 15:20:25 2012 +0100
    Bug 6209 [Revised] Standardize on one plugin for client-side form
    validation

It did not find how it could be useful.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10752: Alert the librarian if the suggestion has not been added
Jonathan Druart [Thu, 16 Apr 2015 14:57:03 +0000 (16:57 +0200)]
Bug 10752: Alert the librarian if the suggestion has not been added

Test plan:
- Create a new suggestion, chose a short term as your title and copy it.
- Leave all other fields of the suggestion form untouched.
- Save your first suggestion.
- Enter a second suggestion with the same title.

Before this patch, the suggestion was not inserted without alert.
With this patch, an alert is displayed on the interface.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Love the simplicity and ability to expand. :)

Tested with all pateches applied. Wors as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13919: Renewal possible with item level hold on item
Kyle M Hall [Mon, 30 Mar 2015 14:16:31 +0000 (10:16 -0400)]
Bug 13919: Renewal possible with item level hold on item

Test Plan:
1) Apply this patch
2) Enable AllowRenewalIfOtherItemsAvailable
3) Check out an item from a record with multiple holdable items
4) Place an item level hold on the checked out item
5) Verify the item can not be renewed from the opac

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13919: Make the tests pass fixing the number of tests
Jonathan Druart [Mon, 13 Apr 2015 10:34:14 +0000 (12:34 +0200)]
Bug 13919: Make the tests pass fixing the number of tests

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13919: Unit Test
Kyle M Hall [Mon, 30 Mar 2015 14:16:11 +0000 (10:16 -0400)]
Bug 13919: Unit Test

Tested both unit test patches together.
Without main patch applied: do not pass as expected / with main patch pass OK as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9878: Add consistentcy on restriction messages
Jonathan Druart [Thu, 9 Apr 2015 14:22:44 +0000 (16:22 +0200)]
Bug 9878: Add consistentcy on restriction messages

Between both pages circ/circulation.pl and members/moremember.pl, the
restriction messages should be the same.

Test plan:
1/ Add a non-unlimited restrictions to a patron
2/ Go on both pages and confirm the restriction message is the same.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: FIX documentation to join subfield
Jonathan Druart [Wed, 12 Nov 2014 10:16:03 +0000 (11:16 +0100)]
Bug 12404: FIX documentation to join subfield

To display all subfields, the join TT method must be used.

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: Allow equal sign '=' in the TT directive
Jonathan Druart [Wed, 5 Nov 2014 16:10:58 +0000 (17:10 +0100)]
Bug 12404: Allow equal sign '=' in the TT directive

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: Add some documentation in the help page.
Jonathan Druart [Tue, 11 Feb 2014 13:09:29 +0000 (14:09 +0100)]
Bug 12404: Add some documentation in the help page.

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: tools/export.pl allows CSV export
Jonathan Druart [Wed, 5 Feb 2014 15:44:24 +0000 (16:44 +0100)]
Bug 12404: tools/export.pl allows CSV export

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: Allow TT tags for csv profiles
Jonathan Druart [Tue, 11 Feb 2014 12:25:47 +0000 (13:25 +0100)]
Bug 12404: Allow TT tags for csv profiles

This patch is the main patch. It contains the changes in
C4::Record::marcrecord2csv.

The goal of this development is to provide a better flexibility on
creating a CSV profile.
Currently it is not possible to:
- Concatenate specific subfields into a csv column
- Display a field/subfield using a condition
- Extract a substring of a subfield value
and a lot of other actions.

This patch allows to write Template Toolkit code and to extract only
data you want.

See the help page for more information (in next patch).

Test plan:
Create some CSV profiles (MARC, not SQL) using some TT methods.
Use the basket export and the export tool and verify the CSV file
generated is what you expected.

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: Add new unit tests
Jonathan Druart [Tue, 11 Feb 2014 12:25:29 +0000 (13:25 +0100)]
Bug 12404: Add new unit tests

These unit tests reflect the changes done in next patches.

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12404: Add UT for marcrecord2csv
Jonathan Druart [Tue, 11 Feb 2014 12:21:59 +0000 (13:21 +0100)]
Bug 12404: Add UT for marcrecord2csv

Verify that these unit tests pass before any changes and after applying
all patches.

Signed-off-by: Courret <scourret@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10423: Show date due with time if it's a hourly loan
Jonathan Druart [Wed, 15 Apr 2015 13:33:54 +0000 (15:33 +0200)]
Bug 10423: Show date due with time if it's a hourly loan

On printing the summary from the patron account, the hours are not
displayed if needed.
The as_date_due flag should be set to display it correctly.
Problem, GetPendingIssues modify the value retrieved from the database.
In order to not add regression and check all calls to GetPendingIssues,
this patch backup the value before the change.

Test plan:
Check some items out, specify a hourly loan for some.
Click on print > print summary and confirm the date due are correctly
formatted.

Followed test plan. Date + time display as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10971: Hide EAN search for MARC21 / template corrections
Katrin Fischer [Sat, 21 Feb 2015 18:22:33 +0000 (19:22 +0100)]
Bug 10971: Hide EAN search for MARC21 / template corrections

This patch hides the EAN filter on the page for ordering from
a subscription when the marcflavour is not UNIMARC as it will
only work for this flavour currently.

It also corrects
- branch to library
- supplier to vendor
- the library code in the result list to the branch name

To test:
- Make sure you have a subscription, not the vendor
- Create a new basket for the subscription vendor
- Choose 'from a subscription' to create your order line
- Look at the filters on the left side, switch
  the marcflavour system preference to see change for
  the EAN filter
- Verify changes

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14055: remove symlink that breaks upgrades
Robin Sheat [Fri, 24 Apr 2015 02:48:53 +0000 (14:48 +1200)]
Bug 14055: remove symlink that breaks upgrades

Old versions of koha-common would put in a symlink to the system YUI
libraries. This causes upgrade problems, so we look out for that and zap
it if it's there.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14030: (RM followup) fix copypasta blooper
Tomas Cohen Arazi [Fri, 24 Apr 2015 13:12:32 +0000 (10:12 -0300)]
Bug 14030: (RM followup) fix copypasta blooper

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13992: Software error in reports if field or table does not exist
Marc Véron [Tue, 14 Apr 2015 08:28:03 +0000 (10:28 +0200)]
Bug 13992: Software error in reports if field or table does not exist

To reproduce:

- Go to Home > Reports Guided reports wizard
- Create report from SQL
- Enter something like: select holdrio from borrowers
- Save SQL
- run report

Result:
Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/reports/guided_reports.pl line 932.
expected: graceful error message

- Change sql to something like: select id from holdrio;
- Save SQL
- Run report

Result:
Can't use an undefined value as an ARRAY reference at /usr/share/kohaclone/reports/guided_reports.pl line 932.
expected:  graceful error message

- Change sql to something like: pling from plong
- Save SQL
Result (after saving): Message "The database returned the following error: 1"
Expected: Meaningful message "The database returned the following error: No SELECT" (similar to forbidden statements as UPDATE)

Test plan:
- Apply patch
- Try to reproduce issues above. They should be resolved.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14030: DBRev 3.19.00.030
Tomas Cohen Arazi [Fri, 24 Apr 2015 13:03:17 +0000 (10:03 -0300)]
Bug 14030: DBRev 3.19.00.030

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14030 - Added tests for duplicates.
Mark Tompsett [Tue, 21 Apr 2015 00:11:23 +0000 (20:11 -0400)]
Bug 14030 - Added tests for duplicates.

It seems that the id's are not really used, but rather
the subtags, types, and language related fields.

These tests check for duplicates.

TEST PLAN
---------
1) Apply both patches
2) prove -v t/db_dependent/Languages.t
   -- may fail if you have duplicates.
3) ./installer/data/mysql/updatedatabase.pl
   -- this will trigger the atomicupdate, which because of
      this tweak, will correct duplicates.
4) prove -v t/db_dependent/Languages.t
   -- should succeed.
5) Run the updatedatabase.pl script multiple times.
6) prove -v t/db_dependent/Languages.t
   -- should still succeed.
7) koha qa test tools.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors, test run successfully, no more duplicates

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed German description.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14030: Add Georgian language and fix Kannada language code
Bernardo Gonzalez Kriegel [Tue, 21 Apr 2015 00:34:05 +0000 (21:34 -0300)]
Bug 14030: Add Georgian language and fix Kannada language code

This patch adds Georgian language and a fix wrong language code

Language added: Georgian - ka - geo
I selected 'geo' for ISO639-2 instead of 'kat' because it's the
same code form http://www.loc.gov/marc/languages/language_code.html

Also a fix is needed to Kannada ISO639-1 code, from 'ka' to 'kn'

To test:
1) Apply the patch
2) Run updatedatabase.pl (once)
3) Check language, e.g. go to staff > search > More options > Limits
and search for Georgian on language list

I only added language code 'ka', not script 'Geor' nor country 'GE',
the plan is to name translation files 'ka-*', but can ammend the patch
if needed.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13941: QA Follow-up - fix for acqui/addorder.tt
Katrin Fischer [Wed, 15 Apr 2015 21:33:00 +0000 (23:33 +0200)]
Bug 13941: QA Follow-up - fix for acqui/addorder.tt

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13941: [2/2] Fix <body> tags missing id/class
Frédéric Demians [Tue, 14 Apr 2015 14:27:48 +0000 (16:27 +0200)]
Bug 13941: [2/2] Fix <body> tags missing id/class

Followed test plan from patch 1/2, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13941: [1/2] Test <body> tag with id/class attributes
Frédéric Demians [Tue, 14 Apr 2015 14:26:50 +0000 (16:26 +0200)]
Bug 13941: [1/2] Test <body> tag with id/class attributes

Test:

- Apply the first patch [1/2] containing a new test checking <body> tags in all
  templates
- Run the test: prove xt/tt_valid.t
- You get a list of templates with invalid <body> tags.
- Apply the second patch [2/2] fixing all invalid <body> tags.
- Re-run the test: It passes.

Folowed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13492: Add the location column to the checkouts tables
Jonathan Druart [Tue, 23 Dec 2014 10:59:07 +0000 (11:59 +0100)]
Bug 13492: Add the location column to the checkouts tables

Test plan:
1/ Verify that the location column is correctly displayed on the
checkouts tables (circ/circulation.pl and members/moremember.pl).
2/ Verify that you can hide/show this column (using the admin page
and/or the ColVis DT plugin).

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13492: Add the column configuration for the checkouts table - morember.pl
Jonathan Druart [Tue, 23 Dec 2014 10:45:11 +0000 (11:45 +0100)]
Bug 13492: Add the column configuration for the checkouts table - morember.pl

Test plan:
1/ Verify that you can show/hide columns on the checkouts table (moremember.pl).
2/ Play with the column configuration admin page (admin/columns_settings.pl),
and confirm the behavior is correct (depends on what you have selected).

Amended patch: replace 'un' and 'deux' with 'sort_order' and
'todays_or_previous_checkouts' in the yml file.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13492: Add the column configuration for the checkouts table - circulation.pl
Jonathan Druart [Tue, 23 Dec 2014 10:30:33 +0000 (11:30 +0100)]
Bug 13492: Add the column configuration for the checkouts table - circulation.pl

Test plan:
1/ Verify that you can show/hide columns on the checkouts table (circulation.pl).
2/ Play with the column configuration admin page (admin/columns_settings.pl),
and confirm the behavior is correct (depends on what you have selected).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13606: DBRev 3.19.00.029
Tomas Cohen Arazi [Thu, 23 Apr 2015 16:23:54 +0000 (13:23 -0300)]
Bug 13606: DBRev 3.19.00.029

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13606: (RM followup) DBIx updates
Tomas Cohen Arazi [Thu, 23 Apr 2015 16:22:41 +0000 (13:22 -0300)]
Bug 13606: (RM followup) DBIx updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13606: Add tests and fix existing ones
Jonathan Druart [Fri, 10 Apr 2015 13:35:54 +0000 (15:35 +0200)]
Bug 13606: Add tests and fix existing ones

Some tests were wrong and not executed in a transaction.
Lot of sessions were created in DB because the session was never
flushed.

TEST PLAN
---------
$ mysql ...
> delete from sessions;
^Z
$ prove -v t/db_dependent/BackgroundJob.t
...
$ fg
> select id from sessions;
-- There will be lots of ids (10, if I recall)
^Z
$ git bz apply 13606
...
$ prove -v t/db_dependent/BackgroundJob.t
...
$ fg
> select * from sessions;
-- there should only be the one orphaned job.
   You can tell it is correct by the "making new job".
> quit

Run the koha-qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13606 Clear job data in session when the job is completed
Frédéric Demians [Fri, 10 Apr 2015 06:44:39 +0000 (08:44 +0200)]
Bug 13606 Clear job data in session when the job is completed

Bug 11395 uses the session to store the report sent to the interface
(update on biblio XX OK, etc.).

If the session is stored in mysql, the max size of the
sessions.a_session will be reached easily (TEXT field).

To reproduce:
0/ Set SessionStorage to 'mysql'
1/ Create a file with 500 biblionumbers:
  mysql -e "select biblionumber from biblio limit 500;" | tail -n 500 > /tmp/biblionumbers.txt
2/ Define a marc modification template (something like "delete field 99$9" is nice)
3/ Load the /tmp/biblionumbers.txt in the batch biblio modification tool
4/ Repeat 3
You will get:
  Syck parser (line 1534, column 6): syntax error at
  /usr/lib/i386-linux-gnu/perl5/5.20/YAML/Syck.pm line 75.
None Koha page is reachable.

It comes from get_template_and_user > checkauth > get_session >
l.1595 $session = new CGI::Session("driver:MySQL;serializer:yaml;id:md5", $sessionID, {Handle=>$dbh});

5/ Get your sessionID contained in your CGISESSID cookie
Have a look at the value a_session in the sessions table:
mysql> select a_session from sessions where id="YOUR_SESSIONID";

You should see that the yaml is not correctly ended.
The size of the DB field has been reached and the yaml is truncated.

Test plan:
0/ Delete your CGISESSID cookie
1/ Try to reproduce the previous issue
2/ After the second batch, have a look at the sessions table and confirm
that only one job_$JOB_ID exist in the yaml

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
NOTE: Nicely clears batch job session information.
      (2) is incorrect. This cleans up after a full run.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13606: Upgrade sessions.a_session to MEDIUMTEXT
Jonathan Druart [Wed, 21 Jan 2015 14:59:10 +0000 (15:59 +0100)]
Bug 13606: Upgrade sessions.a_session to MEDIUMTEXT

The previous patch fixed partially the problem.
If you try to update more that 1000 records, you will get the same
error.

This patch change the type of sessions.a_session from TEXT (64kb) MEDIUMTEXT (32mb).

Test plan:
1/ Try to modify a huge amount of records (1000 should be enough)
2/ Confirm it worked!

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
I confirm that with more than 1000 records the session object is truncated, and
then can't be anymore be desirialized, blocking completely Koha. Fixed with
this patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
This only pushes off the problem expontentially (64KB vs. 16MB), but this is a
good start.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13790: (RM followup) DBIx updates
Tomas Cohen Arazi [Thu, 23 Apr 2015 16:06:00 +0000 (13:06 -0300)]
Bug 13790: (RM followup) DBIx updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13790: DBRev 3.19.00.028
Tomas Cohen Arazi [Thu, 23 Apr 2015 16:01:40 +0000 (13:01 -0300)]
Bug 13790: DBRev 3.19.00.028

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13790 [QA Followup] - Disable auto increment on old_issues after pk values are...
Kyle M Hall [Mon, 20 Apr 2015 12:21:08 +0000 (08:21 -0400)]
Bug 13790 [QA Followup] - Disable auto increment on old_issues after pk values are created

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13790: [QA Follow-up] Relocation of db revision in updatedatabase
Marcel de Rooy [Mon, 20 Apr 2015 07:11:02 +0000 (09:11 +0200)]
Bug 13790: [QA Follow-up] Relocation of db revision in updatedatabase

The db rev lines should not be under the bug 13068 sandbox section.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13790: ([QA Followup)
Kyle M Hall [Fri, 17 Apr 2015 15:00:52 +0000 (11:00 -0400)]
Bug 13790: ([QA Followup)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13790: Add unique id issue_id to issues and old_issues tables
Kyle M Hall [Wed, 4 Mar 2015 09:16:24 +0000 (01:16 -0800)]
Bug 13790: Add unique id issue_id to issues and old_issues tables

Test Plan:
1) Use a database with existing issues and old issues
2) Apply this patch
3) Run updatedatabase
4) Inspect the database
   a) old_issues should now have a column issue_id starting with 1
   b) issues should now have a column issue_id starting with the number
      of rows in the old_issues table plus one
5) Perform a checkout, note it is written to the database
6) Check in the checked out item, note it is moved to the old_issues table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13994: (QA Followup) Change "Back" to "Return"
Kyle M Hall [Fri, 17 Apr 2015 10:44:03 +0000 (06:44 -0400)]
Bug 13994: (QA Followup) Change "Back" to "Return"

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13994: Add a back link to error message in Reports
Marc Véron [Tue, 14 Apr 2015 09:50:14 +0000 (11:50 +0200)]
Bug 13994: Add a back link to error message in Reports

To reproduce:
- Go to Home > Reports
- Create from SQL
- Do something that results in an error message, e.g. by entering an UPDATE statement

Result: You get an error message with title "The follwing error was encountered"
But there is now link to go directly back to fix it.

To test:
- Apply patch
- Repeat steps above
- Verify that a link appears (and works): "Back to previous page"

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8474: Holds done by librarians cause silent errors in koha-error_log, placereques...
Olli-Antti Kivilahti [Wed, 23 Jul 2014 08:15:57 +0000 (11:15 +0300)]
Bug 8474: Holds done by librarians cause silent errors in koha-error_log, placerequest.pl -> $checkitem

Squashed this rogue variable initialization

Test plan:
1/ Place a hold at a biblio level (on the next available item)
2/ Without this patch you get
placerequest.pl: Use of uninitialized value $checkitem in string ne at /home/koha/src/reserve/placerequest.pl line 75.
placerequest.pl: Use of uninitialized value $checkitem in string ne at /home/koha/src/reserve/placerequest.pl line 101.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a tab.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14051: Tiny adjustment of ReturnPathDefault pref description
Marcel de Rooy [Thu, 23 Apr 2015 08:30:14 +0000 (10:30 +0200)]
Bug 14051: Tiny adjustment of ReturnPathDefault pref description

Adding that Return-Path is bounce address. Note that if it is empty, the From address is used. This could be the admin address, but Koha uses other from addresses too.

Test plan:
Read the description on the preferences page.
Check some Koha mails with/without this pref. Note that this patch does not
change behavior in any way.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13834: News: Wording not consistent for Publication date / Creation date
Marc Véron [Wed, 22 Apr 2015 20:09:48 +0000 (22:09 +0200)]
Bug 13834: News: Wording not consistent for Publication date / Creation date

This patch replaces column header "Creation date" with "Publication date" in staff client > Home > Tools > News
(same as the field label in editing form for news).

To test apply patch and verify that column header displays as appropriate.

Signed-off-by: vagrant <eskaaren@yahoo.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10174: Add a tooltip to explain what is a digest
Jonathan Druart [Wed, 15 Apr 2015 10:19:42 +0000 (12:19 +0200)]
Bug 10174: Add a tooltip to explain what is a digest

The digest term seems to be ambiguous for some people.

This patch adds a tooltip to explain what it is (feel free to provide
a better wording).

Test plan:
Go at the OPAC and click on the "Your messaging tab", you should see an
icon close to "Digest only" to explain what is a digest.
Same at the intranet on editing/showing patron info

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13023: (RM followup) DBIx updates
Tomas Cohen Arazi [Thu, 23 Apr 2015 15:42:50 +0000 (12:42 -0300)]
Bug 13023: (RM followup) DBIx updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13023: DBRev 3.19.00.027
Tomas Cohen Arazi [Thu, 23 Apr 2015 15:35:55 +0000 (12:35 -0300)]
Bug 13023: DBRev 3.19.00.027

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13023: (QA Followup) Use db column for storage on item creation
Kyle M Hall [Thu, 29 Jan 2015 16:22:45 +0000 (11:22 -0500)]
Bug 13023: (QA Followup) Use db column for storage on item creation

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13023: (QA Followup) Add db mapping to frameworks
Kyle M Hall [Mon, 15 Dec 2014 12:02:13 +0000 (07:02 -0500)]
Bug 13023: (QA Followup) Add db mapping to frameworks

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13023: Nonpublic note for items should be mapped to a database column like itemnotes
Kyle M Hall [Thu, 2 Oct 2014 14:11:32 +0000 (10:11 -0400)]
Bug 13023: Nonpublic note for items should be mapped to a database column like itemnotes

An item's public notes are mapped to a db column, but the librarian only
notes are not. We need to map these so in the future we may display them
in places other than the editor.

Test Plan:
1) Create an item with a non-public note
2) Apply this patch
3) Run updatedatabase
4) Update your frameworks to map your nonpublic item note to items.itemnotes_nonpublic
5) Run misc/batchRebuildItemsTables.pl
6) Inspect the database, note that your non-public note is now in
   items.itemnotes_nonpublic

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11399: QA fixes
Stéphane Delaune [Thu, 11 Sep 2014 08:29:49 +0000 (10:29 +0200)]
Bug 11399: QA fixes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11399: batch Rebuild Items Tables
Stéphane Delaune [Tue, 17 Dec 2013 11:46:39 +0000 (12:46 +0100)]
Bug 11399: batch Rebuild Items Tables

You can/must use it when you change items mapping.
this script rebuilds the non-MARC DB items table from the MARC values

usage : batchRebuildItemsTables.pl [ -h ][ -c ][ -t ][ -where ]

Options:
   -h --help       (or without arguments) shows this help message
   -c              Confirm: rebuild non marc DB (may be long)
   -t              test only, change nothing in DB
   --where         add where condition on default query
                   (eg. -where 'biblio.biblionumber<100')

(copied test plan)
to test it :

create a test item (eg on biblionumber 3) with a non mapped subfield with a test value.
check real items DB row ( SELECT * from items where biblionumber=3 ) => non mapped value is in more_subfields_xml
map the non mapped subfield with unused items column
re-check in Db that nothing changes
run ./batchRebuildItemsTables.pl -c --where 'biblio.biblionumber=3'
check real items DB row ( SELECT * from items where biblionumber=3 ) => new mapped value is not in more_subfields_xml anymore but in the mapped column

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors.
Add a new item to record, save with value in unmapped subfield ('x')
Change mapping, run script, value on newly mapped column

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13482: Sent biblionumber to the template
Jonathan Druart [Wed, 22 Apr 2015 07:55:55 +0000 (09:55 +0200)]
Bug 13482: Sent biblionumber to the template

The biblionumber is sent to the template as 'itembiblionumber' at 1 place, the template get the 'biblionumber' variable.
I don't understand why but the easy way is to sent the variable twice.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13482: Prevent race condition on printing a ReserveSlip
Jonathan Druart [Thu, 16 Apr 2015 12:10:30 +0000 (14:10 +0200)]
Bug 13482: Prevent race condition on printing a ReserveSlip

The problem has been well described by Kyle and Nicole on bug 7255
description and comment 1.

With this counter patch, I suggest to popup AFTER the return has been
confirmed. This will remove the race condition and avoid to pass
itemnumber to the pl file as in the patch submitted by Olli.

Only the borrowernumber and biblionumber are needed (transfer and op are
never used by circ/hold-transfer-slip.pl).

Test plan:
It is very hard to know all cases (at least 6) where the popup is
displayed. Try at least to get the hold and the transfer confirmation
messages.
You should get the popup if you click on "print slip" button.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14008: Proposed follow-up: Dialog should appear whenever filters are active
Marc Véron [Sun, 19 Apr 2015 05:37:37 +0000 (07:37 +0200)]
Bug 14008: Proposed follow-up: Dialog should appear whenever filters are active

The first patch displays the value(s) of an active filter if you come back to the page or reload the page via a menu action.
To make the situation more clear the dialog "No saved reports match your criteria." shoudl always appear when a filter is active.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14008: Display active filters when searching for reports
Jonathan Druart [Fri, 17 Apr 2015 13:24:36 +0000 (15:24 +0200)]
Bug 14008: Display active filters when searching for reports

On the saved report list, the filters on the left are not displayed.
It means that some can be set, but the user has not visible feedbacks.

How filters work here:
If a user set a filter, it is saved in the session. Next time he will
come on this search, the previous values will be kept.

This patch just displayed the filter's values in the input fields.

Test plan:
Search for reports by date, author and keyword.
The filters should be displayed after you have clicked on the submit
button ("Apply filter").

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10706: Delete saved_reports to be sure no reports existed
Jonathan Druart [Fri, 17 Apr 2015 12:53:24 +0000 (14:53 +0200)]
Bug 10706: Delete saved_reports to be sure no reports existed

We need to be sure no report existed before launching the tests.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10706: Add test
Jonathan Druart [Thu, 16 Apr 2015 15:23:26 +0000 (17:23 +0200)]
Bug 10706: Add test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10706: Search reports by id
Jonathan Druart [Thu, 16 Apr 2015 15:23:37 +0000 (17:23 +0200)]
Bug 10706: Search reports by id

This patch adds the ability to search reports by their id.

Test plan:
1/ Go on the saved report list (reports/guided_reports.pl?phase=Use saved)
2/ Search for a report id (refer to the ID column in the table)
3/ The result should be consistent

That the filters are not kept, already existed.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14022: Does not reset the subscription length on editing a subscription
Jonathan Druart [Mon, 20 Apr 2015 14:59:05 +0000 (16:59 +0200)]
Bug 14022: Does not reset the subscription length on editing a subscription

The subscription length is always set to the first/default value
('issues') when editing a subscription.
Even if you selected another value on creating/editing it, the form will
show you the first option.

Test plan:
1/ Add/Edit a subscription, select a subscription length different of
the first value (issues)
2/ Edit the subscription and confirm the value is kept

Bonus: issues, week and months become translatable.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59)
Jonathan Druart [Tue, 21 Apr 2015 08:44:43 +0000 (10:44 +0200)]
Bug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59)

Same for the overdues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14016: Restore correct date format on issue date (00:00 vs 23:59)
Jonathan Druart [Mon, 20 Apr 2015 08:41:19 +0000 (10:41 +0200)]
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59)

Introduced by bug 13601, and same fix used in bug 10423 and bug 12847:
the date_due retrieved from the DB is modified.

There are some problems:
1/ There is confusion between the iso and sql formats in the codebase.
2/ Since bug 13601, dt_from_string does not manage the iso format (there
are occurrences of 'iso' but it assumes that both formats are
identical).

To solve the issue, 2 solutions:
1/ Same as bug 10423 and bug 12847: try to get rid of the change done on
date_due in C4::Members::GetPendingIssues, it should be kept as the sql
value.
2/ Too many errors found and another fallback should be added to
dt_from_string (if 'iso' is passed, try sql then iso).

Test plan:
Go on the checkout list at the OPAC and confirm that the due dates are
correctly formatted.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: (QA followup) remove useless warnings
Tomas Cohen Arazi [Wed, 22 Apr 2015 17:58:05 +0000 (14:58 -0300)]
Bug 13419: (QA followup) remove useless warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: (follow-up) fix call to set_userenv
Jonathan Druart [Wed, 22 Apr 2015 15:28:23 +0000 (17:28 +0200)]
Bug 13419: (follow-up) fix call to set_userenv

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: (follow-up) Add tests - remove existing shelves
Jonathan Druart [Thu, 18 Dec 2014 14:40:52 +0000 (15:40 +0100)]
Bug 13419: (follow-up) Add tests - remove existing shelves

Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: Add tests
Jonathan Druart [Tue, 9 Dec 2014 10:27:46 +0000 (11:27 +0100)]
Bug 13419: Add tests

Test plan:
    prove t/db_dependent/Utils/Datatables_Virtualshelves.t
should return green

Tested together with follow-up, works as expected
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: Add filters on the list table
Jonathan Druart [Mon, 8 Dec 2014 13:01:54 +0000 (14:01 +0100)]
Bug 13419: Add filters on the list table

Tested together with patch #1, works as expected
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13419: Add server-side processing for lists
Jonathan Druart [Fri, 5 Dec 2014 16:30:02 +0000 (17:30 +0100)]
Bug 13419: Add server-side processing for lists

This patch adds DataTables using a server-side processing to display
lists (virtual shelves).

Test plan:
1/ Go on virtualshelves/shelves.p
2/ Play with the table functions (sort, filter, pagination, etc.)
3/ Go with the Public lists tab and verify the table is correctly
filtered.

Tested together with patch #2, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13987: Fix server name in z39.50 authority search results
Blou [Mon, 13 Apr 2015 18:49:42 +0000 (14:49 -0400)]
Bug 13987: Fix server name in z39.50 authority search results

When doing an Auth search through z3950, the resulting table has the first column (servers name) always empty.

TEST
1) once logged into the intranet, go to Authorities.
2) Click New from z39.50, fill appropriatly for a successful search.
3) Acknowledge first column is empty.  Always.
4) Apply the (very simple) patch.
5) Do another search, validate column is not empty anymore.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8276: (follow-up) Remove stry </td>
Katrin Fischer [Sun, 19 Apr 2015 20:26:52 +0000 (22:26 +0200)]
Bug 8276: (follow-up) Remove stry </td>

Removes an additional </td> tag that isn't needed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8276: circ history - checked out items are later
Jonathan Druart [Tue, 31 Mar 2015 14:07:43 +0000 (16:07 +0200)]
Bug 8276: circ history - checked out items are later

If the sort is done on "checkin on", the items currently checked out
should be list after all others.

Test plan:
1/ Go on the checkout history page for a record with checked out items
2/ Sort on the "checkin on" column and confirm that the checked out
items are sorted after/before others depending on the sort order
(asc/desc).

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13817 - Edit links on course items may point to the wrong course!
Kyle M Hall [Tue, 10 Mar 2015 17:38:50 +0000 (10:38 -0700)]
Bug 13817 - Edit links on course items may point to the wrong course!

If items are assigned to multiple courses, the "edit" links for a course
item may pass the wrong course id. This is really a cosmetic issue.

It appears that in Template Toolkit, if you reuse an existing variable
name in a foreach loop, it will not create a new temporary variable but
will instead re-use the existing variable leaving assigned at the end to
the last assignment, just as it would in Perl code.

This is not a problem when all items are assigned to one and only one
course, but can cause issues when we loop through the other courses an
item may be on.

This is solved easily by renaming the variable used in the foreach loop
to another unused name.

Test Plan:
1) Apply this patch
2) Try the edit and delete links for an item on reserve for a course
3) No changes in behavior should be noted

Signed-off-by: Tom Misilo <misilot@fit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14013 - Use name of a saved report as part of the file name for download
Marc Véron [Sun, 19 Apr 2015 16:40:09 +0000 (18:40 +0200)]
Bug 14013 - Use name of a saved report as part of the file name for download

This patch propoeses the name of a saved report as part of the download file name.

To test:

- Apply patch
- Got to Home > Reports > Guided reports wizard > Saved reports (or create a new report from sql)
- Run a saved report
- Download the report (as csv, tab, ods)
Result: The downlaod file name proposed should be prepended by the report name, separated with a -

- Bonus test: Try to downlaod saved reports which have special character in their name.

NOTE: Used "ñ/â is N/A" as a report name. The /'s were translated
      to underscored, but the letters were as expected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 14046: Make the CheckIfIssuedToPatron using the biblionumber
Jonathan Druart [Wed, 22 Apr 2015 14:05:41 +0000 (16:05 +0200)]
Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber

C4::Circ::CheckIfIssuedToPatron called
  $items = GetItemsByBiblioitemnumber($biblionumber);
But if biblionumber != biblioitemnumber, the items retrieved were not
the good ones!

Test plan:
Make your Auto increment values for biblio and biblioitems differs
Launch the tests:
    prove t/db_dependent/Circulation/CheckIfIssuedToPatron.t

Before this patch, they did not pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13819: (QA Followup) more documentation
Kyle M Hall [Fri, 17 Apr 2015 11:22:08 +0000 (07:22 -0400)]
Bug 13819: (QA Followup) more documentation

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13819: Add biblioitems to ISSUESLIP and ISSUEQSLIP in C4::Members::IssueSlip()
Barton [Wed, 11 Mar 2015 22:53:11 +0000 (22:53 +0000)]
Bug 13819: Add biblioitems to ISSUESLIP and ISSUEQSLIP in C4::Members::IssueSlip()

Document all expansions within  C4::Members::IssueSlip()

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

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  - Works as described. ISBN appears on ISSUESLIP & ISSUEQSLIP.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
  - Not all fields for biblioitems are available, but neither
    are they all available for other tables. Noted in POD.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13156 Display borrower's cardnumber who did a suggestion in suggestion.pl
Frédéric Demians [Sun, 2 Nov 2014 17:53:47 +0000 (18:53 +0100)]
Bug 13156 Display borrower's cardnumber who did a suggestion in suggestion.pl

To avoid homonyms, it would be nice if the card number is displayed in the user
suggestion.pl. Currently, consult the record of the user to know exactly who
made the suggestion.

TEST PLAN: Apply the patch. Go on suggestion.pl. Check that nothing has
changed, except that cardnumbers are displayed in 'Suggested by' column.

Resolved an easy conflict while applying. Followed test plan. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13623: Follow-up: remove stray </p> tag
Katrin Fischer [Sun, 19 Apr 2015 20:48:25 +0000 (22:48 +0200)]
Bug 13623: Follow-up: remove stray </p> tag

Just removing a stray </p> tag.

I got problems when trying to check this page
with an HTML validator, would probaby be worth
checking.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13623: Enhance html for holds queue viewer
ByWater Staff [Mon, 26 Jan 2015 16:16:42 +0000 (10:16 -0600)]
Bug 13623: Enhance html for holds queue viewer

It would be very helpful from a css/scripting point of view if the
author field in the holds queue report had a selectable class. In
edition, it would be great if the biblionumber were easy to grab from a
hidden div.

Test Plan:
1) Apply this patch
2) Load the holds queue report ( view_holdsqueue.pl )
3) Inspect an author name with your web browser ( or view the html )
   a) Note the hq-author class of the wrapping div
   b) Note the hidden hq-biblionumber div

HTML appears as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 [QA Followup] - Remove unused call to localtime()
Kyle M Hall [Tue, 7 Apr 2015 14:29:01 +0000 (10:29 -0400)]
Bug 13159 [QA Followup] - Remove unused call to localtime()

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 [QA Followup] - Fix transaction_date and undefined warning
Olli-Antti Kivilahti [Tue, 3 Mar 2015 16:17:59 +0000 (18:17 +0200)]
Bug 13159 [QA Followup] - Fix transaction_date and undefined warning

cli-client doesnt respect the transaction_date format
  "YYYYMMDDZZZZHHMMSS"
Using timestamp() to generate the proper datetime format.

"String $value undefined"-warning in build_field() fixed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 [QA Followup] - Move script back to it's original path
Kyle M Hall [Mon, 2 Mar 2015 13:32:28 +0000 (05:32 -0800)]
Bug 13159 [QA Followup] - Move script back to it's original path

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 [QA Followup] - Fix changed namespace for Sip::Constants
Kyle M Hall [Mon, 2 Mar 2015 13:31:11 +0000 (05:31 -0800)]
Bug 13159 [QA Followup] - Fix changed namespace for Sip::Constants

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 [QA Followup] - Fix flag parameters
Kyle M Hall [Tue, 24 Feb 2015 14:59:19 +0000 (09:59 -0500)]
Bug 13159 [QA Followup] - Fix flag parameters

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13159 - Enhancements to the SIP2 command line emulator
Kyle M Hall [Wed, 29 Oct 2014 11:49:38 +0000 (07:49 -0400)]
Bug 13159 - Enhancements to the SIP2 command line emulator

I needed to be able to perform checkout operations for testing from the
command line. I ended up reengineering the SIP2 command line tester
quite a bit.

Enhancements:
* Moved message generation code to subroutines
* Added support for more messages
* Added command line switches for each supported message
* Enabled use of Sip::Constants to keep code DRY and more understandable
* Moved script from misc to C4/SIP
* Designed with an eye towards possibly moving some code to CPAN in the future
* Also designed to make adding new messages much easier in the future

Test Plan:
1) Apply this patch
2) Look at help via ./C4/SIP/sip_cli_emulator.pl --help
3) Test patron status request and patron information, should work as before
   except you need to pass the command line switche -m <message_name>
4) Test the new checkout option using -m checkout -i <item barcode>

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Worked as advertised, with one warning at renew only:

Trying 'renew'
Use of uninitialized value $value in concatenation (.) or string at ./sip_cli_emulator.pl line 462, <GEN0> chunk 1.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10985: [UNIMARC] Fix authority summary
Jonathan Druart [Wed, 2 Oct 2013 12:16:09 +0000 (14:16 +0200)]
Bug 10985: [UNIMARC] Fix authority summary

The problem is the template in authority type summary is not respected
at all. It is only read to see which fields and subfields should appear
in the summary.
This patch fixes that.
It also fixes a bug in auth_finder.pl plugin when summary contains
fields other than 2XX.

Test plan:
0/ You must use a UNIMARC setup for those tests
1/ edit an authority type summary with:
     NP : [200a][, 200b][ 200d][-- 152b --][ ; 200c][ (200f)] [001*] [ppn: 009*]
2/ create a new authority with previous fields (it is possible some
   fields don't exist).
3/ search this authority and verify the summary is someting like:
     NP : Name, D.-- NP -- 23849 ppn: my_ppn
4/ Verify some summary for existing authorities and check they are
   correct.
5/ Edit a biblio record and use the plugin auth_finder.pl (for example
   in a 7XX field)
6/ Do a search and verify the summary is correct
7/ Click on 'choose' or one of the numbered links ('1', '2', ... ; you
should have multiple 2XX fields for the numbered links to show up)
8/ Verify that the biblio field is correctly filled.

/!\ For the ppn, it should be defined in the zebra indexes.

In MARC21 and NORMARC setups, this patch should change nothing, please
verify that too (you can check that the auth_finder.pl plugin is still
working and the auth type summary is correctly displayed in authorities
search and auth_finder.pl plugin).

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
It works as described, both in authority search result page, and in authority
data entry plugin.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13880 - Allow svc/report to be passed sql parameters
Kyle M Hall [Fri, 20 Mar 2015 13:48:05 +0000 (09:48 -0400)]
Bug 13880 - Allow svc/report to be passed sql parameters

The same feature added to the opac svc/report in bug 9915 should be
added to the staff side.

Test Plan:
1) Apply this patch
2) Create this report:
   SELECT * FROM biblio WHERE biblionumber = <<biblionumber>>
3) Note the id of the report
4) Go to the Staff URL
/cgi-bin/koha/svc/report?id=YOUR_REPORT_ID&sql_params=SOME_VALID_BIBLIONUMBER
5) Note you recieve a json response

NOTE: without applying the patch you get an empty JSON response.

ALSO: running koha qa tools does not verify the changes.
      $ perlcritic -4 svc/report
      (my perlcritic rc points to the koha qa tool one)
      No issues.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>