koha.git
10 years agoBug 8307: QA Followup for finishreceive.pl
Marcel de Rooy [Mon, 3 Jun 2013 08:19:39 +0000 (10:19 +0200)]
Bug 8307: QA Followup for finishreceive.pl

Only split the expression a=b on the first = sign.
Tested with the very unlikely z=x=1 :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
10 years agoBug 8307: Set a value for subfields when receiving
Jonathan Druart [Fri, 18 May 2012 11:42:36 +0000 (13:42 +0200)]
Bug 8307: Set a value for subfields when receiving

If items are created when ordering, this patch allows to add a value for
some items subfields.

Test plan:
Define status for items.notforloan (mapping 995$o in unimarc), for
example 4:On order, 5:On treatment

Set the Syspref AcqCreateItem on "ordering".

ACQ framework : set default value = 4 for 995$o (in unimarc)

Syspref AcqItemSetSubfieldsWhenReceived : set "o=5|b='foo bar'"

When ordering the item, default status will be 4 ; when receiving the
item, status will be changed from 4 to 5. The subfield b have to contain
'foo bar'

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
10 years agoBug 10776: fix awkward wording in subscription notification screen
Liz Rea [Thu, 22 Aug 2013 04:55:48 +0000 (16:55 +1200)]
Bug 10776: fix awkward wording in subscription notification screen

to test:
- make a subscription available to be notified about
- log into the opac, click the subscriptions tab, then More details
- click "Subscribe to email notification on new issues"
- observe the text without the patch - there seems to be an extra "arrive?"
- apply the patch, refresh - wording should flow a bit better.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes bad wording and works as described.
Passes all tests and QA script, template change only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11054: Specify UTF-8 encoding when creating a child record
Colin Campbell [Tue, 15 Oct 2013 14:09:08 +0000 (15:09 +0100)]
Bug 11054: Specify UTF-8 encoding when creating a child record

When the only non-ascii characters in a new child record
are latin + diacritic in the range covered by Latin-1 they
are not being added to a new child record correctly encoded.
Explicitly setting the record's encodiing ensures that
they are interpreted correctly.

see "Unicode Bug" in perldoc perlunicode for background on
why these characters are special

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

Same test as before
1) with a record with diacritics in author/title,
2) press new child record, on new record 773adt
with mangled accents
3) Apply patch
4) Repeat 2, now good results

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested with a record containing umlauts in the title,
$t was empty before and umlauts in $a mangled.
After applying the patch fields are correctly filled and
diacritics display correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update patron help files [ FOLLOW-UP ]
Nicole C. Engard [Sat, 26 Oct 2013 03:47:54 +0000 (23:47 -0400)]
Bug 10671: Update patron help files [ FOLLOW-UP ]

This patch adds two new permissions that were just pushed
to the related patron help files. It is a follow up to the
previous patch that updated the patron help file.

To test:

Apply the patron help patch
Apply this patch
Visit the patron permissions page
Confirm that help is there and right

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Acq Help Files
Nicole C. Engard [Sat, 26 Oct 2013 01:35:25 +0000 (21:35 -0400)]
Bug 10671: Update Acq Help Files

This patch updates the Acq help file links
to the manual.

To test:

* visit acq pages
* confirm manual links are right

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update patron help files
Nicole C. Engard [Sat, 26 Oct 2013 01:27:49 +0000 (21:27 -0400)]
Bug 10671: Update patron help files

This patch updates the text and links in the
patron related help files.

To test:

* visit all patron pages
* Click help
* confirm test and links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Admin Help Files
Nicole C. Engard [Sat, 26 Oct 2013 01:04:12 +0000 (21:04 -0400)]
Bug 10671: Update Admin Help Files

This patch updates the links to the manual in the
help files. It also updates the text a bit in a few.

To test:

* Visit admin pages
* Check the help files on each
* Make sure links and text appears

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Tools Help Files
Nicole C. Engard [Sat, 26 Oct 2013 00:42:43 +0000 (20:42 -0400)]
Bug 10671: Update Tools Help Files

This patch updates the links to the manual in
the tool help files.

To test:

* Visit tool pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Serials Help
Nicole C. Engard [Sat, 26 Oct 2013 00:31:54 +0000 (20:31 -0400)]
Bug 10671: Update Serials Help

This patch updates the links to the manual in
the serials help files.

To test:

* Visit serials pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10671: Update Cataloging Help
Nicole C. Engard [Sat, 26 Oct 2013 00:10:21 +0000 (20:10 -0400)]
Bug 10671: Update Cataloging Help

This patch updates the links to the manual in
the cataloging help files.

To test:

* Visit cataloging pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) don't require userenv
Galen Charlton [Thu, 31 Oct 2013 22:36:39 +0000 (22:36 +0000)]
Bug 8015: (follow-up) don't require userenv

Core routines probably should never assume that they're
running with a valid userenv defined.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) update stage_file.pl
Galen Charlton [Thu, 31 Oct 2013 22:10:31 +0000 (22:10 +0000)]
Bug 8015: (follow-up) update stage_file.pl

This patch fixes the call to BatchStageMarcRecords() made
by the comand-line record importer.  At some point in the future
we could go further and teach that tool how to apply modification
templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) update DBIx::Class schema classes
Galen Charlton [Thu, 31 Oct 2013 22:04:22 +0000 (22:04 +0000)]
Bug 8015: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: DBRev 3.13.00.040
Galen Charlton [Thu, 31 Oct 2013 22:02:25 +0000 (22:02 +0000)]
Bug 8015: DBRev 3.13.00.040

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: QA Followup 2
Kyle M Hall [Tue, 22 Oct 2013 18:24:36 +0000 (14:24 -0400)]
Bug 8015: QA Followup 2

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: QA Followup
Kyle M Hall [Tue, 22 Oct 2013 16:55:02 +0000 (12:55 -0400)]
Bug 8015: QA Followup

* Add bug number to database update
* Fix capitalization errors
* Fix JavaScript string translation errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) remove references to C4::Koha::Log
Kyle M Hall [Tue, 22 Oct 2013 16:24:10 +0000 (12:24 -0400)]
Bug 8015: (follow-up) remove references to C4::Koha::Log

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) add user permissions to all languages
Kyle M Hall [Tue, 22 Oct 2013 16:19:21 +0000 (12:19 -0400)]
Bug 8015: (follow-up) add user permissions to all languages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines
Jonathan Druart [Fri, 29 Mar 2013 16:29:27 +0000 (17:29 +0100)]
Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8015: Fix complains from qa tools

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of the eval in ModifyRecordWithTemplate

This patch removes the use of eval in the
C4::MarcModificationTemplates::ModifyRecordWithTemplate routine.

Now this routine call the wanted modification routine with the list of
parameters.
This call is done only if the condition is respected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of eval for evaluating =~ m//

Koha::SimpleMarc::field_equals uses eval in order to check if a string
matches a pattern.
Now this eval is removed and the "regex" variable does not contain the
regex separated character (/ or |).

Regression: Before this patch, the user was able to user a modifier. Now
it is not possible.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of the eval for substitution

Before this patch, the regex substitution was contain into only one
variable (e.g. my $regex = "/foo/bar/i").
Now each member of the regex is stored into a field in the
marc_modification_template_actions sql table.

In order to avoid a complex code, only modifiers i and g are take into
account.

Note: If you already add the mmta table, you have to drop it.
This patch also adds a foreign key from mmta to mmt tables.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: FIX ui issue

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: The template name is a required field

Test plan:
Try to add a template with an empty string as name.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) fix various issues (squashed patch)
Kyle M Hall [Tue, 19 Mar 2013 10:27:46 +0000 (03:27 -0700)]
Bug 8015: (follow-up) fix various issues (squashed patch)

Bug 8015: Fix template capitalization amd other template issues

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix error where field object is returned instead of field value for fields without subfields

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix bad ordering on function parameters

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Escape escape characters for strings

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix bad parameter list for direct external call to update_field

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix problem with moving existing subfield value to nonexistent field/subfield

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: FIX QA issues

This patch fixes some stuffs failing qa tests: POD, indentation (tabs),
perlcritic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) trap exceptions thrown by SetUTF8Flag()
Jonathan Druart [Tue, 16 Oct 2012 07:45:07 +0000 (09:45 +0200)]
Bug 8015: (follow-up) trap exceptions thrown by SetUTF8Flag()

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Catch error in the SetUTF8Flag routine

The eval avoids the interface to run endlessly if an error occurred.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) move from the Koha to the C4 namespace
Kyle M Hall [Fri, 28 Sep 2012 12:39:58 +0000 (08:39 -0400)]
Bug 8015: (follow-up) move from the Koha to the C4 namespace

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: (follow-up) fix copy and move if subfields don't exist.
Jonathan Druart [Mon, 13 Aug 2012 15:04:05 +0000 (17:04 +0200)]
Bug 8015: (follow-up) fix copy and move if subfields don't exist.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Followup: On move, we cant delete existing fields

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8015: Add MARC Modifications Templates
Kyle M Hall [Thu, 26 Apr 2012 20:08:57 +0000 (16:08 -0400)]
Bug 8015: Add MARC Modifications Templates

The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.

This tool is useful for altering MARC records from
various venders work with your MARC framework.

The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.

Each action can also have an optional condition to check
the value or existance of another field.

The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.

Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).

At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) prevent t/00-load.t failing
Galen Charlton [Thu, 31 Oct 2013 18:51:04 +0000 (18:51 +0000)]
Bug 8435: (follow-up) prevent t/00-load.t failing

C4::Serials now needs a valid context in order to
load.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10445: (follow-up) fix error
Kyle M Hall [Mon, 21 Oct 2013 00:27:31 +0000 (20:27 -0400)]
Bug 10445: (follow-up) fix error

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Followup to failed QA tests have helped pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10445: make SIP Server respect maxoutstanding system preference
Kyle M Hall [Tue, 11 Jun 2013 14:00:58 +0000 (10:00 -0400)]
Bug 10445: make SIP Server respect maxoutstanding system preference

The system preference 'maxoutstanding' is defined as the maximum amount
of fees owed by the patron before Koha should block placing holds (
terrible naming on this one ).

However, although the Koha OPAC respects this preference, placing holds
via a SIP2 device will not.

Test Plan:
1) Set maxoutstanding to $10
2) Pick a patron owning more than $10 in fees
3) Attempt to place a hold for this patron from a SIP2 device
   This attempt should succeed
4) Apply this patch
5) Restart your SIP2 server
6) Attempt to place a hold for this patron from a SIP2 device again
   This attempt should now fail

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10974: make OAI-PMH resumption tokens handle time correctly
David Cook [Mon, 30 Sep 2013 05:47:03 +0000 (15:47 +1000)]
Bug 10974: make OAI-PMH resumption tokens handle time correctly

This patch changes the value separator in OAI-PMH resumption tokens
from colons to slashes, so that the token string isn't split incorrectly
when a time is included.

TEST PLAN:

1) Turn on the OAI-PMH server syspref in Koha
2) Send a ListRecords request using 'from' and 'until' arguments that
include times (Best to use very far apart times so that you retrieve
more than 50 records which will likely be the trigger for a resumptionToken).
Here is an example:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
metadataPrefix=oai_dc&from=2012-09-05T13:44:33Z&until=2014-09-05T13:44:33Z

N.B. Replace KOHAINSTANCE with the URL of your Koha instance.

3) Scroll down to the bottom of the page until you find the resumptionToken.
It will look similar to this:

<resumptionToken cursor="50">
oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:
</resumptionToken>

4) Copy that resumption token and send a request with it like so:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
resumptionToken=oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:

5) The page should (incorrectly) show no records.

6) APPLY PATCH

7) Repeat steps 2, 3, and 4

8) Note that the resumptionToken now uses slashes (e.g. /) instead of
colons.

Note also that now the second request will show records!!!

N.B. This will only happen if Koha has enough records to serve to you.
If your Koha has less than 50 records, try lowering the number provided
in the "OAI-PMH:MaxCount" system preference.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
I understand; I can now confirm the behaviour described in the test plan.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, all tests and QA script.
Resumption Token works correctly after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11178: Make the Bootstrap OPAC theme the default for new installs
Galen Charlton [Thu, 31 Oct 2013 17:03:32 +0000 (17:03 +0000)]
Bug 11178: Make the Bootstrap OPAC theme the default for new installs

This patch implements the proposal adopted by the community to
make Boostrap be the default OPAC theme for new Koha installs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11142 - Update Bootstrap theme's place hold form to match the new version in...
Owen Leonard [Fri, 25 Oct 2013 19:31:51 +0000 (15:31 -0400)]
Bug 11142 - Update Bootstrap theme's place hold form to match the new version in prog

The update to the prog theme's place hold page (Bug 10836) happened
after the Bootstrap theme's place hold form had already been converted,
so it lags behind. This patch applies the changes made to prog to Bootstrap.

To test, switch to the Bootstrap theme and follow the test plan from Bug
10836:

Place single and multiple holds under various conditions:

- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled

Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).

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

Tested all situations, all syspref, and without JavaScript.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10283: Hide "many items" on second tab when using OpacSeparateHoldings
Jonathan Druart [Mon, 20 May 2013 07:53:38 +0000 (09:53 +0200)]
Bug 10283: Hide "many items" on second tab when using OpacSeparateHoldings

If there are over 50 items in the holdings or Other holdings tab, the
warning and link 'This record has many physical items. Click here to
view them all.' is only shown for the first tab.

Test plan:
- Switch on the OpacSeparateHoldings pref.
- Go on a biblio detail page at the OPAC with more than 50 items
- Check that the 'view all' link appears on the second tab.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10523: Remove two obsolete routines from Installer.pm
Marcel de Rooy [Mon, 1 Jul 2013 13:12:53 +0000 (15:12 +0200)]
Bug 10523: Remove two obsolete routines from Installer.pm

The routines sql_file_list and marcflavour_list in Installer.pm are not used.
There are some references to them in probably obsolete '/lib' test units.
I changed these test units for the record too.

Also: removed the not-existing marcflavour parameter of sample_data_sql_list
in its call in install.pl.

Test plan:
Run a new install.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295: DBRev 3.13.00.039
Galen Charlton [Thu, 31 Oct 2013 16:33:17 +0000 (16:33 +0000)]
Bug 7295: DBRev 3.13.00.039

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295: (follow-up) update DBIx::Class schema classes
Galen Charlton [Thu, 31 Oct 2013 16:32:51 +0000 (16:32 +0000)]
Bug 7295: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295: (follow-up) fix syntax error in kohastructure.sql
Galen Charlton [Thu, 31 Oct 2013 16:30:29 +0000 (16:30 +0000)]
Bug 7295: (follow-up) fix syntax error in kohastructure.sql

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295 (follow-up) replace simple-quoted string by double-quoted string
Julian Maurice [Thu, 18 Jul 2013 09:04:08 +0000 (11:04 +0200)]
Bug 7295 (follow-up) replace simple-quoted string by double-quoted string

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295: (follow-up) several fixes
Julian Maurice [Tue, 17 Jul 2012 08:51:36 +0000 (10:51 +0200)]
Bug 7295: (follow-up) several fixes

- List of libraries in basket.pl is now sorted by branch name, not code
- When IndependantBranches is ON, user has only the possibility to set
  basket branch to its own branch, or to no branch at all.
- When basket do not belong to any branch, selected branch by default is
  connection branch (was 'no branch')
- added id attributes to both added li elements
- change description of 'order_manage_all' permission to make it
  clearer.
- remove Test::MockModule dependency

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7295: More granular permissions for baskets
Julian Maurice [Fri, 20 Apr 2012 15:12:29 +0000 (17:12 +0200)]
Bug 7295: More granular permissions for baskets

- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11168: fix regression that broke exporting serial claims to CSV
Jonathan Druart [Wed, 30 Oct 2013 11:33:15 +0000 (12:33 +0100)]
Bug 11168: fix regression that broke exporting serial claims to CSV

Bug 7688 broke the exporting serial claims as CSV (see bug 10854).

For C4::Serials::GetLateOrMissingIssues(), $supplierid is not
meant to be mandatory.  This patch fixes that.

Test plan:
try to export a serial claim.
Without this patch, the csv is always empty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) fix uninitialized variable warning
Galen Charlton [Thu, 31 Oct 2013 15:46:42 +0000 (15:46 +0000)]
Bug 7298: (follow-up) fix uninitialized variable warning

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) fix translation for CSV strings
Jonathan Druart [Tue, 24 Sep 2013 08:19:27 +0000 (10:19 +0200)]
Bug 7298: (follow-up) fix translation for CSV strings

Following the same way as bug 10935, the headers are in an include file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Translatability tested successfully.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) various QA fixes
Jonathan Druart [Mon, 23 Sep 2013 08:43:20 +0000 (10:43 +0200)]
Bug 7298: (follow-up) various QA fixes

- use Modern::Perl;
- GPL version
- tabs

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

Testing notes:
- CSV header row is now translatable.
  Tested by updating the German po files and checking for the line.
- Tested that claiming for late serial issues still works as
  expected, as one file has been renamed. Filed 10931 for
  untranslatable CSV contents.
- Tested that claiming late orders still works:
  * Table searching and sorting
    Works nicely, but some columns could be split up for better
    searching and sorting:
      * Order date: 20/01/2013 (245 days)
      * Total cost:     10.00x1 = 10.00 Books
        => item type should be separate
      * Basket:  10 MPL
        => Library and basket number could be separate columns
  * Filters
     * Combined various filters, search results look correct.
  * Selecting order for claiming
      * Limiting by vendor makes it possible to check/uncheck all
      * With no vendor limit, entries for other vendors will be
        locked after the first checkbox is checked for one vendor
  * Exporting as CSV
     * Exported single line > CSV appears correct.
     * Exporting multiple lines > CSV appears correct.
     PROBLEM: Translated CSV don't work correctly, as line
     breaks are lost in the translation process.
     Needs to be fixed in a follow-up.
  * Sending serial claim email
     * No regressions found - there are some problems with the
       email contents noted on bug 7298.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) make CSV strings translatables.
Jonathan Druart [Tue, 13 Aug 2013 14:21:33 +0000 (16:21 +0200)]
Bug 7298: (follow-up) make CSV strings translatables.

Using a template file, the CSV headers become translatable.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) fix checkboxes binding on load
Jonathan Druart [Tue, 13 Aug 2013 13:27:38 +0000 (15:27 +0200)]
Bug 7298: (follow-up) fix checkboxes binding on load

Click on checkboxes should be bound on load.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: (follow-up) fix capitalization and moving supplier id
Katrin Fischer [Sat, 20 Jul 2013 17:52:11 +0000 (19:52 +0200)]
Bug 7298: (follow-up) fix capitalization and moving supplier id

Fixes a few capitalization errors on the late orders page like
- Claim orders
- filter
- Search results

Also moves the supplierid from the order date column to the
vendor column.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7298: add option to export late orders as CSV
Jonathan Druart [Fri, 22 Jun 2012 09:10:57 +0000 (11:10 +0200)]
Bug 7298: add option to export late orders as CSV

This patch allows to export late orders as CSV.

Test plan:
- Go on the late orders page (acqui/lateorders.pl)
- Select one or more order and click on the button "Export as CSV".
- The generated file should contains some information on the orders
  (order date, estimated delivery date, vendor name, information field,
  cost, basket name (and basketid), claims count and the claimed date)
  The last line of the file is the total of orders.
- You are not allow to select order from different vendor.
- The check/uncheck all links appears only if a vendor is selected.
- Check that the check/uncheck works for all pages of the table.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing comments on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) make SearchSubscriptions handle lack of userenv
Galen Charlton [Thu, 31 Oct 2013 15:37:00 +0000 (15:37 +0000)]
Bug 8435: (follow-up) make SearchSubscriptions handle lack of userenv

This patch allows t/db_dependent/Bookseller.t to pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: DBRev 3.13.00.038
Galen Charlton [Thu, 31 Oct 2013 15:26:51 +0000 (15:26 +0000)]
Bug 8435: DBRev 3.13.00.038

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) handle lack of userenv gracefully
Jonathan Druart [Thu, 31 Oct 2013 08:49:12 +0000 (09:49 +0100)]
Bug 8435: (follow-up) handle lack of userenv gracefully

C4::Serials::can_edit_subscription now deals with C4::Context->userenv.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) the unit tests should create the biblio
Jonathan Druart [Wed, 21 Aug 2013 12:23:24 +0000 (14:23 +0200)]
Bug 8435: (follow-up) the unit tests should create the biblio

Previous version does not create the biblio.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) use a transaction for unit tests
Jonathan Druart [Fri, 28 Jun 2013 07:27:39 +0000 (09:27 +0200)]
Bug 8435: (follow-up) use a transaction for unit tests

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: (follow-up) add unit tests for can_edit_subscription
Jonathan Druart [Wed, 27 Mar 2013 15:53:56 +0000 (16:53 +0100)]
Bug 8435: (follow-up) add unit tests for can_edit_subscription

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8435: add permission to enable editing other library's serials if IndependantBran...
Jonathan Druart [Mon, 12 Nov 2012 13:15:42 +0000 (14:15 +0100)]
Bug 8435: add permission to enable editing other library's serials if IndependantBranches is on

In the serial module, we want to hide serials from others libraries.
However, to permit central serials manage, this patch introduces a
new permission, 'superserials'. If a staff member has this permission,
that person can override the restriction.

Test plan:
- Switch on the IndependantBranches syspref
- Add the permission 'superserials' for a patron and test you can
  navigate and see all serials
- Remove this permission and test you cannot manage/view subscriptions
  from others libraries

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) fix undefined variable warning during template processing
Galen Charlton [Mon, 21 Oct 2013 23:49:01 +0000 (23:49 +0000)]
Bug 8037: (follow-up) fix undefined variable warning during template processing

Fix instances of the following warning appearing in the Apache log:

... parcel.pl: Argument "" isn't numeric in addition (+)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) improve GetBudgetByOrderNumber test
Galen Charlton [Mon, 21 Oct 2013 23:34:46 +0000 (23:34 +0000)]
Bug 8037: (follow-up) improve GetBudgetByOrderNumber test

This patch moves the GetBudgetByOrderNumber() test from
Budgets.t to Acquisition.t, thereby making it easier to
test without doing a direct SQL insert into the aqorders table.

To test:

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) tweak fund subtotal note
Galen Charlton [Mon, 21 Oct 2013 23:20:39 +0000 (23:20 +0000)]
Bug 8037: (follow-up) tweak fund subtotal note

Use "Tax exc." rather than "GST exc." to be consistent with other parts
of the table footer.  Also remove the new style introduced in the previous
patch; defining non-semantic CSS classes like font-weight-normal is not
desirable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) bad sql query and variable renaming
Jonathan Druart [Fri, 25 Oct 2013 12:27:10 +0000 (14:27 +0200)]
Bug 8037: (follow-up) bad sql query and variable renaming

The first patch does a left join on aqorders_items which returns too
much order lines.

This patch follows the Galen's suggestion: it removes the join and calls
the GetItemnumbersFromOrder routine for retrieving itemnumbers.

Bonus: the "parcelitems" variable is badly named and obfuscates the code.
I changed it for "orders".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) adds the note "GST exc." for subtotals by fund
Kyle M Hall [Wed, 8 May 2013 13:06:17 +0000 (09:06 -0400)]
Bug 8037: (follow-up) adds the note "GST exc." for subtotals by fund

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: (follow-up) fix various issues
Kyle M Hall [Fri, 22 Mar 2013 10:35:41 +0000 (03:35 -0700)]
Bug 8037: (follow-up) fix various issues

[1] Add test for GetBudgetByOrderNumber()
[2] Remove unconditional warn.
[3] Remove MySQLism

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8037: Display holds & fund on the already received table on order receipt summary
Kyle M Hall [Wed, 28 Mar 2012 17:33:36 +0000 (13:33 -0400)]
Bug 8037: Display holds & fund on the already received table on order receipt summary

Adds a column to indicate holds on received items, as well as adding
a new column for fund and showing the subtotals per fund above
the total subtotal.

To test:

[1] Create an order basket containing at least one title and
    ensure that an item is created for that title.  Close the
    basket.
[2] Place a hold on the title.
[3] Receive the order.  After receiving it, but before finishing
    the invoice, the table of already received orders should now
    have columns for the order budget and number of holds on the
    title as well as lines with the subtotal per fund.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10572: DBrev 3.13.00.037
Galen Charlton [Thu, 31 Oct 2013 14:41:19 +0000 (14:41 +0000)]
Bug 10572: DBrev 3.13.00.037

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10572: (follow-up) ensure SQL for all translations has the phone transport type
Kyle M Hall [Thu, 12 Sep 2013 17:22:23 +0000 (13:22 -0400)]
Bug 10572: (follow-up) ensure SQL for all translations has the phone transport type

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10572: (follow-up) DBrev to ensure presence of phone transport type
Marcel de Rooy [Wed, 7 Aug 2013 12:24:23 +0000 (14:24 +0200)]
Bug 10572: (follow-up) DBrev to ensure presence of phone transport type

Test plan:
Run the updatestructure step of web installer.
Check if you have a phone message_transport_type.

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 10572: Add phone to message_transport_types table for new installs
Marcel de Rooy [Thu, 11 Jul 2013 08:01:16 +0000 (10:01 +0200)]
Bug 10572: Add phone to message_transport_types table for new installs

In connection to bug 4246, commit 591bae324 added
phone to the message_transport_types table in updatedatabase.pl

This should be done also for new installs via the .sql files of the web
installer.

I am adding it only to English now, basing this change upon the work in
reports 10509 and 10520. (I discovered this tiny omission there too.)

Test plan:
Apply patches 10509/10520.
Run new install or run this particular sql file from command line.
Note: If you only run this particular file, you do not need patch 10509.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11135: (follow-up) improve testing of OVERRIDE_SYSPREF_NAMES
Galen Charlton [Thu, 31 Oct 2013 14:21:25 +0000 (14:21 +0000)]
Bug 11135: (follow-up) improve testing of OVERRIDE_SYSPREF_NAMES

This is a bit pedantic -- since for obvious reasons, I can't
see us ever letting '0' be the name of a system preference,
and I suspect it's impossible for the value of something in the
$ENV hash to be undefined -- but better to test for exactly what
we mean.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11135: avoid logging warnings if OVERRIDE_SYSPREF_NAME is not set
Colin Campbell [Thu, 24 Oct 2013 16:00:23 +0000 (17:00 +0100)]
Bug 11135: avoid logging warnings if OVERRIDE_SYSPREF_NAME is not set

Calling split on an undefined var generates warning to
the log. Let's check it exists before processing it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11134 - Typo on course reserves help
Bernardo Gonzalez Kriegel [Thu, 24 Oct 2013 15:32:26 +0000 (12:32 -0300)]
Bug 11134 - Typo on course reserves help

This patch fixes a small typo on course reserves help

To test:
1) Go to Course reserves
2) Press 'New course'
3) Press Help
4) On 3dr paragraph you will read "To link a ninstructor ..."
5) Apply patch
6) Now it reads "To link an instructor ..."

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
10 years agoBug 9456: (follow-up) use datatables.inc
Galen Charlton [Thu, 31 Oct 2013 05:54:26 +0000 (05:54 +0000)]
Bug 9456: (follow-up) use datatables.inc

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456: (follow-up) remove whitespaces and tab
Jonathan Druart [Fri, 16 Aug 2013 07:28:40 +0000 (09:28 +0200)]
Bug 9456: (follow-up) remove whitespaces and tab

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456: (follow-up) sort on callnumber only
Kyle M Hall [Mon, 22 Jul 2013 11:43:13 +0000 (07:43 -0400)]
Bug 9456: (follow-up) sort on callnumber only

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456: (follow-up) Remove useless CSS
Kyle M Hall [Tue, 18 Jun 2013 15:08:32 +0000 (11:08 -0400)]
Bug 9456: (follow-up) Remove useless CSS

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456: (follow-up) move sort filters to datatables.js
Kyle M Hall [Tue, 7 May 2013 16:24:56 +0000 (12:24 -0400)]
Bug 9456: (follow-up) move sort filters to datatables.js

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456: (follow-up) add tooltip
Kyle M Hall [Thu, 7 Mar 2013 15:49:53 +0000 (10:49 -0500)]
Bug 9456: (follow-up) add tooltip

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9456 - Add callnumber column to the cart
Kyle M Hall [Fri, 25 Jan 2013 14:57:30 +0000 (09:57 -0500)]
Bug 9456 - Add callnumber column to the cart

This patch adds call-number sorting to the staff client cart. Sortining is enabled
on the 'Items' column which uses a custom sorting routine to sort the callnumbers.
If the sort is ascending, each column will be sorted by the highest ordered
callnumber for that row. Likewise, if the sort is descending the table will be
sorted by the lowest valued callnumber for that row.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: (follow-up) restore the toolbar menu items
Galen Charlton [Thu, 31 Oct 2013 05:22:45 +0000 (05:22 +0000)]
Bug 9044: (follow-up) restore the toolbar menu items

This patch adds the following items back to the cataloging
toolbar:

- Edit items in batch
- Delete items in a batch

My rationale: the question of the best UI for selecting items for
batch operations is not yet settled.  Adding the ability to select
items from the bib details page is indeed useful, but as currently
implemented, it can hide the availability of the batch
edit/deletion operations if no item is yet selected.  Although
having both the toolbar items and the links that display when an
item is selected is a bit redundant, for now I think we can live
with that until we get more eyes on the UI.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: DBRev 3.13.00.036
Galen Charlton [Thu, 31 Oct 2013 05:15:06 +0000 (05:15 +0000)]
Bug 9044: DBRev 3.13.00.036

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: (follow-up) set the number of filters according to number of columns
Julian Maurice [Mon, 30 Sep 2013 07:02:30 +0000 (09:02 +0200)]
Bug 9044: (follow-up) set the number of filters according to number of columns

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This feature is a little controversial as it removes
the batch edit/delete options from the menu and moves them
to the item table, additionally controlled by a system
preference. Maybe later on, we can think about the UI a bit
more, but it works nicely.

Tested with.
- SeparateHoldings and SeparateHoldingsBranch activated/deactivated.
- Search filters.
- None, both, or one of the permissions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: (follow-up) change dropdown list into links list
Julian Maurice [Tue, 2 Jul 2013 14:05:20 +0000 (14:05 +0000)]
Bug 9044: (follow-up) change dropdown list into links list

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
That's the one I sign.

Comment: At first I don't know where to find links, until
I selected an item.
Works as described. No koha-qa errors.

Solved merge conflict on updatedatabase.pl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: QA followup
Jonathan Druart [Mon, 17 Jun 2013 10:11:27 +0000 (12:11 +0200)]
Bug 9044: QA followup

1/ Remove filter and sort for the checkboxes column.
2/ Enable the pref by default.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: (follow-up) Add a blank option + add missing 'for' attributes
Julian Maurice [Thu, 21 Mar 2013 12:15:36 +0000 (12:15 +0000)]
Bug 9044: (follow-up) Add a blank option + add missing 'for' attributes

Signed-off-by: Pierre Angot et Leila Arkab <tredok.pierre@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9044: Provide item selection in record detail page (staff client)
Julian Maurice [Fri, 9 Nov 2012 14:16:52 +0000 (15:16 +0100)]
Bug 9044: Provide item selection in record detail page (staff client)

This patch add a column in the items table of catalogue/detail.pl that
contains checkboxes for item selection and a drop-down list of actions
that can be executed for the selection of items.

Currently available actions are:
- Delete selected items: redirect to batch items deletion
- Modify selected items: redirect to batch items modification

Item selection is only enabled if the new syspref
StaffDetailItemSelection is ON.
Actions are not displayed if user doesn't have the right permissions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Further testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7688: (follow-up) have Serials.t create its test subscription
Galen Charlton [Thu, 31 Oct 2013 05:07:44 +0000 (05:07 +0000)]
Bug 7688: (follow-up) have Serials.t create its test subscription

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) fix error that prevented sysprefs from being loaded
Galen Charlton [Thu, 31 Oct 2013 01:52:14 +0000 (01:52 +0000)]
Bug 2720: (follow-up) fix error that prevented sysprefs from being loaded

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) update DBIx::Class schema classes
Galen Charlton [Thu, 31 Oct 2013 01:31:29 +0000 (01:31 +0000)]
Bug 2720: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) add new table to kohastructure.sql
Galen Charlton [Thu, 31 Oct 2013 01:29:28 +0000 (01:29 +0000)]
Bug 2720: (follow-up) add new table to kohastructure.sql

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) add foreign key from new table to borrowers
Galen Charlton [Thu, 31 Oct 2013 01:28:09 +0000 (01:28 +0000)]
Bug 2720: (follow-up) add foreign key from new table to borrowers

Foreign keys should be added as a matter of course for new tables.

Argubably, borrower_debarments.manager_id could also be linked to
borrowers, but this patch does not do that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: DBRev 3.13.00.035
Galen Charlton [Thu, 31 Oct 2013 01:01:18 +0000 (01:01 +0000)]
Bug 2720: DBRev 3.13.00.035

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) fix the "remove" links
Jonathan Druart [Tue, 24 Sep 2013 10:32:16 +0000 (12:32 +0200)]
Bug 2720: (follow-up) fix the "remove" links

If there are more than one restriction, the "remove" links don't display
the JavaScript alert.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) change license version to GPLv3+
Jonathan Druart [Tue, 24 Sep 2013 09:57:43 +0000 (11:57 +0200)]
Bug 2720: (follow-up) change license version to GPLv3+

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) improve readability of a template
Kyle M Hall [Tue, 27 Aug 2013 17:04:38 +0000 (13:04 -0400)]
Bug 2720: (follow-up) improve readability of a template

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) improve unit tests
Jonathan Druart [Thu, 18 Jul 2013 10:10:44 +0000 (12:10 +0200)]
Bug 2720: (follow-up) improve unit tests

Create the patron.
Use a transaction.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720: (follow-up) improve data entry form for manual restrictions
Owen Leonard [Fri, 5 Jul 2013 17:05:27 +0000 (13:05 -0400)]
Bug 2720: (follow-up) improve data entry form for manual restrictions

This follow-up to Bug 2720 makes some template changes which I think
make the interface a little more consistent and streamlined.

Instead of incorporating the manual entry form into the table it is
broken out and follows standard form structure. This lets the table be
hidden altogether if there are no existing restrictions.

The manual entry form is hidden by default and shown when you click a
link to add a manual restriction.

These changes have been applied to both the include file used for
circulation and patron detail and to the patron entry form template.

To test, add and remove manual restrictions from the circulation page,
the patron detail page, and the patron edit page. All operations should
work correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 2720 - Overdues which debar automatically should undebar automatically when returned
Kyle M Hall [Tue, 29 Jan 2013 14:34:13 +0000 (09:34 -0500)]
Bug 2720 - Overdues which debar automatically should undebar automatically when returned

This patch adds a more extensible and flexible debarments system to Koha. The fields
borrowers.debarred and borrowers.debarredcomment are retained for compatibility and
speed.

This system supports having debarments for multiple reasons. There are currently
three types of debarments:
OVERDUES    - Generated by overdue_notices.pl if the notice should debar a patron
SUSPENSION  - A punative debarment generated on checkin via an issuing rule
MANUAL      - A debarment created manually by a librarian

OVERDUE debarments are cleared automatically when all overdue items have been returned,
if the new system preference AutoRemoveOverduesRestrictions is enabled. It is disabled
by default to retain current default functionality.

Whenever a borrowers debarments are modified, the system updates the borrowers debarment
fields with the highest expiration from all the borrowers debarments, and concatenates
the comments from the debarments together.

Test plan:
 1) Apply patch
 2) Run updatedatabase.pl
 3) Verify the borrower_debarments table has been created and
    populated with the pre-existing debarments
 4) Run t/db_dependent/Borrower_Debarments.t
 5) Manually debar a patron, with an expiration date
 6) Verify the patron cannot be issued to
 7) Add another manual debarment with a different expiration date
 8) Verify the 'restricted' message lists the date farthest into the future
 9) Add another manual debarment with no expiration date
10) Verify the borrower is now debarred indefinitely
11) Delete the indefinite debarment
12) Verify the debarment message lists an expiration date dagain
13) Enable the new system preference AutoRemoveOverduesRestrictions
14) Set an overdue notice to debar after 1 day of being overdue
15) Check out an item to a patron and backdate the due date to yesterday
16) Run overdue_notices.pl
17) Verify the OVERDUES debarment was created
18) Return the item
19) Verify the OVERDUES debarment was removed
20) Disable AutoRemoveOverduesRestrictions
21) Repeat steps 15 though 18, verify the OVERDUES debarment was *not* removed
22) Add issuing rules so that an overdue item causes a temporary debarment
23) Check out an item to a patron and backdate the due date by a year
24) Return the item
25) Verify the SUSPENSION debarment was added to the patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9822: Alert on adding an order to a basket if budget s exceeded
Jonathan Druart [Fri, 15 Mar 2013 10:20:45 +0000 (11:20 +0100)]
Bug 9822: Alert on adding an order to a basket if budget s exceeded

2 DB fields are not used: aqbudgets.encumb and aqbudgets.expend.

This patch uses these fields in order to show a warning message if the
budget selected for an order has exceeded.

Test plan:
- Create a new active fund with at least 1 of both warning fields
  ('Warning at (%)' and 'Warning at (amount)').
- Create a new order for a basket with this new fund and a cost >
  warning amount defined for the fund (or using %).
- Save and check that a warning message appears
- Retry playing with all combinations of warning fields

Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10725: Add filters on the pending orders table
Jonathan Druart [Thu, 25 Apr 2013 14:57:07 +0000 (16:57 +0200)]
Bug 10725: Add filters on the pending orders table

Since the parcel.pl script get *all* pending orders, there is no reason
not to display all of them.

Like that, DataTable manages pagination and sorting correctly (on all
data).
This patch adds filters on the table header (using columnFilter).

Test plan:
Try filters on the left of the screen and filters on the table header.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Searching and sorting the table works correctly.
Larger result sets are a performance problem on this page,
I have filed bug 10595 for that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10078: (follow-up) add regression test
Galen Charlton [Wed, 30 Oct 2013 05:02:45 +0000 (05:02 +0000)]
Bug 10078: (follow-up) add regression test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10078: show location facet regardless of singleBranchMode setting
David Cook [Tue, 2 Jul 2013 06:40:43 +0000 (16:40 +1000)]
Bug 10078: show location facet regardless of singleBranchMode setting

Currently, the location facet only shows if you have singlebranch
mode enabled. In other words, you can either see the library branch
or the shelving location.

This patch simply changes the location facet so that it will always
show the shelving location (if one is available), regardless of the
singlebranch system preference.

Test Plan:

BEFORE APPLYING:

0) Disable singlebranch mode if it is on
1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you can see the library branch facet under Libraries
but no shelving locations.
3) Enable singlebranch mode
4) Repeat your search
5) Note that you can no longer see the library branch facet under
Libraries. However, you can see the shelving location under Location

N.B. If you don't have more than one branch or the search results
are all from one branch, you might not get a library branch facet.

If this is the case, create additional branches and/or change the
branch for items in your search results so that you have multiple
branches to prompt the appearance of a library branch facet.

AFTER APPLYING

1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you see a facet under Location on the left sidebar,
regardless of there being a singlebranch mode or the number of branches
there are being represented in the search results.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) update the command-line import tools
Galen Charlton [Wed, 30 Oct 2013 04:22:39 +0000 (04:22 +0000)]
Bug 7131: (follow-up) update the command-line import tools

misc/commit_file.pl now properly displays the number
of replaced and ignored items.

misc/stage_file.pl now has a new command-line switch --item-action:

  --item-action       action to take if --add-items is specifed;
                      choices are 'always_add',
                      'add_only_for_matches', 'add_only_for_new',
                      'ignore', or 'replace'

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7131: (follow-up) update DBIx::Class schema classes
Galen Charlton [Wed, 30 Oct 2013 03:47:15 +0000 (03:47 +0000)]
Bug 7131: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>