koha.git
6 years agoBug 14922: (followup) Fix string output
Marc Véron [Wed, 7 Oct 2015 18:42:23 +0000 (20:42 +0200)]
Bug 14922: (followup) Fix string output

This patch makes YYYY MM and DD display correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14922: Remove C4::Dates from cataloguing/additem.pl
Marc Véron [Wed, 30 Sep 2015 12:58:40 +0000 (14:58 +0200)]
Bug 14922: Remove C4::Dates from cataloguing/additem.pl

This patch removes C4::Dates from cataloguing/additem.pl

To test:

- In MARC bibliographic framework, define a default value
  for one of the in Tag 952 Subfield struture, e.g. for
  subfield x Non-public note. You can define it under
  'Advancde constraints'. Define the value similar to the following:
  Year:YYYY Month:MM Day:DD
- Create a new item for a biblio and verify that YYYY, MM and DD are
  replaced with today's values.
- Apply patch and repeat that previous step behaves as before.
- Verify that the overall functionality of the form is the same
  as before applying the patch.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. With the last script not accept more than YYYYMMDD
If you enter something else, the script sends to the end of line.
This patch follow up the pattern in constraint default value

Patch amended following comment #6  / mv

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14990: Format the date template-side for moremember
Jonathan Druart [Fri, 9 Oct 2015 08:14:33 +0000 (09:14 +0100)]
Bug 14990: Format the date template-side for moremember

Test plan:
print slip and show the member detail page, the 3 dates date of birth,
date enrolled and date of expiry should be displayed correctly.

Followed test pan, 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@theke.io>
6 years agoBug 14617: Add fields to ISBN and ISSN indexes: 020$z, 022$y, 022$z
Barton Chittenden [Tue, 6 Oct 2015 13:22:56 +0000 (06:22 -0700)]
Bug 14617: Add fields to ISBN and ISSN indexes: 020$z, 022$y, 022$z

1) Import MARC21 bibs containing

- ISBN in 020$z
- ISSN in 022$y
- ISSN in 022$z

2) Make sure that bibs are indexed

3) Search by ISBN and ISSN above -- bibs should not show in search.

4) Apply patch, re-index

5) Search again; ISBN in 020$z and ISSN in 022$y and 022$z should return
results.

Signed-off-by: kholten@switchinc.org
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14926: Format the date according to the dateformat syspref
Jonathan Druart [Fri, 9 Oct 2015 08:25:30 +0000 (09:25 +0100)]
Bug 14926: Format the date according to the dateformat syspref

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with the three values from dateformat syspref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14926: Remove C4::Dates from members/printfeercpt.pl
Marc Véron [Tue, 29 Sep 2015 16:42:06 +0000 (18:42 +0200)]
Bug 14926: Remove C4::Dates from members/printfeercpt.pl

This patch removes C4::Dates from members/printfeercpt.pl

To test:

- Go to a patron's fines (members/boraccount.pl) and make sure that
  he/she has made a payment
- Select 'Print' in the payment's line
- Verify that the payment date on the slip displays correctly

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Date displayed 2015-10-08

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13632: QA follow-up: Tidy installer directories / update permissions.inc
Katrin Fischer [Sun, 18 Oct 2015 09:56:04 +0000 (11:56 +0200)]
Bug 13632: QA follow-up: Tidy installer directories / update permissions.inc

- removes permission related text files from translated
  web installer directories
- updates the permissions.inc file to include the newest
  permission 'self_checkout'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13632: Remove specific files
Jonathan Druart [Tue, 22 Sep 2015 08:51:04 +0000 (09:51 +0100)]
Bug 13632: Remove specific files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13632: Populate user_flags and permissions tables in the web installer
Jonathan Druart [Tue, 22 Sep 2015 08:50:15 +0000 (09:50 +0100)]
Bug 13632: Populate user_flags and permissions tables in the web installer

Move the 2 specific 'en' files outside of the language directory.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13632: Do not use userflags.flagdesc and permissions.description
Jonathan Druart [Tue, 22 Sep 2015 08:48:27 +0000 (09:48 +0100)]
Bug 13632: Do not use userflags.flagdesc and permissions.description

These 2 fields are not used anymore, but we want to keep them anyway.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13632: Use an include file to display permissions
Jonathan Druart [Tue, 22 Sep 2015 08:47:25 +0000 (09:47 +0100)]
Bug 13632: Use an include file to display permissions

This patch set moves the permissions' descriptions to the po files
instead of having them in the DB.

Test plan:
0/ Apply all patches
1/ Create a new installation
2/ Confirm the userflags and permissions tables are correctly populated
3/ Update the po file for a translated language
4/ Confirm you are able to translate the permissions descriptions
5/ Install the template files for this language
6/ Switch the interface to use this language and confirm the string are
correctly translated.

QA Note: At this point we could remove the userflags.flagdesc and
permissions.description DB fields, but I would prefer to keep them:
developers will know what the permission do without the need to go and
see the include file (we have it in the sql files and so, in the DB).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths
Jonathan Druart [Fri, 16 Oct 2015 08:05:46 +0000 (08:05 +0000)]
Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths

Since I don't manage to make SCRIPT_NAME works directly with RequestHeader and/or
ReverseProxyPath, the easier way it to fix all the different occurrences.

Test plan:
On the import patrons page, confirm that the "Import" button does not redirect to a 'Not found' page.
You should stay on the import patrons page.

Note that if this change works, all others should work too.
Have a look at the diff of this patch and confirm there is no typo.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Tested in patron import and item batch modification

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15005: Fix pagination_bar calls
Jonathan Druart [Tue, 13 Oct 2015 15:51:29 +0000 (15:51 +0000)]
Bug 15005: Fix pagination_bar calls

Test plan:
Create an order for an existing biblio, confirm that the pagination links work correctly.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15005: Remove CGI->url calls from pl scripts
Jonathan Druart [Tue, 13 Oct 2015 15:38:54 +0000 (15:38 +0000)]
Bug 15005: Remove CGI->url calls from pl scripts

Same as previous patch for calls in pl scripts.

Test plan:
- delete an entry of your search history from intranet and opac
- with IndependentBranches=OFF, go on the waiting holds and confirm that the
link next to 'Holds awaiting pickup for your library on' is correct.
- search for items, the pagination should work correctly

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 15005: Replace CGI->url with the corresponding url
Jonathan Druart [Tue, 13 Oct 2015 14:56:10 +0000 (14:56 +0000)]
Bug 15005: Replace CGI->url with the corresponding url

CGI->url does not return the correct url on install using packages.

Test plan:
1/ Try to reproduce the bug from the description of bug 15005.
You should be able to login to the intranet and the OPAC
2/ Send a basket and a list from the intranet and the OPAC.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14966: Table header broken at detail.tt
Rafal Kopaczka [Tue, 6 Oct 2015 12:57:52 +0000 (14:57 +0200)]
Bug 14966: Table header broken at detail.tt

For user without item edit permission, table at catalogue/detail.pl is
corrupted.

Test plan:
1) Log in as staff member, without edit item permission.
2) Go to biblio view, with items attached:
/cgi-bin/koha/catalogue/detail.pl?biblionumber=X. Confirm that table
does not display correctly.
3) Apply patch.
4) Repeat steps 1 and 2. Confirm patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14653: Acq planning export always use default active period
Fridolin Somers [Thu, 6 Aug 2015 08:49:03 +0000 (10:49 +0200)]
Bug 14653: Acq planning export always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the export form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- Click on "Submit" in export form
=> Without patch, you get the planning of "B_ACTIVE" with 1 fund
=> Without patch, you get the planning of "B_OLD" with 3 funds by libraries

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14653: Acq planning filter always use default active period
Fridolin Somers [Thu, 6 Aug 2015 08:49:03 +0000 (10:49 +0200)]
Bug 14653: Acq planning filter always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code :
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the filter form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- In filter form, select "by months" in "Select planning type"
=> Without patch, you see planning of "B_ACTIVE" with 1 fund
=> Without patch, you see planning of "B_OLD" with 3 funds

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14975: Fine grace period label is incorrect
Kyle M Hall [Wed, 7 Oct 2015 16:15:22 +0000 (12:15 -0400)]
Bug 14975: Fine grace period label is incorrect

The column heading for grace period is "Fine grace period (day)" but the
grace period works based on the unit selected ( hours or days ). The
"(day)" part should be removed as it caused confusion for librarians.

Test Plan:
1) Apply this patch
2) Go to the circ rules editor
3) Note the header and footer columns for grace period no longer
   have "(days)" at the end.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10020: (RM followup) DBIx update / delete leftover file
Tomas Cohen Arazi [Tue, 13 Oct 2015 15:10:58 +0000 (12:10 -0300)]
Bug 10020: (RM followup) DBIx update / delete leftover file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14920: Simplify the date management on reserveratios
Jonathan Druart [Tue, 13 Oct 2015 10:46:18 +0000 (11:46 +0100)]
Bug 14920: Simplify the date management on reserveratios

Note that the previous patch was wrong, the start date defaulted to yesterday,
the original behavior is to default to last year.

This patch removes some unecessary variable declarations and tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14920: Remove C4::Dates from circ/reserveratios.pl
Marc Véron [Tue, 29 Sep 2015 12:22:33 +0000 (14:22 +0200)]
Bug 14920: Remove C4::Dates from circ/reserveratios.pl

This patch removes C4::Dates from circ/reserveratios.pl

To test:
- Make sure you have many holds for biblios with not so much items (e.g. 5 holds, 1 item)
  or follow hint below
- Go to Home > Circulation > Hold ratios
- Verify that everything works the same without an dwith patch

Hint: To get a big table you can set 'Hod ratio' in the filter to 0.1  (default value is 3).
This was will trigger biblios with less holds than items.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref, datepiker Ok

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14841: Fine column is not manage by columns settings
Jonathan Druart [Thu, 17 Sep 2015 07:40:19 +0000 (08:40 +0100)]
Bug 14841: Fine column is not manage by columns settings

Bug 9481 added the "Fine" columns to the checkouts table and bug 13492
added the columns settings to these table.
They overlapped each others in the bugs queue.

Test plan:
Confirm that you are able to hide/show the "Fine" columns on both
checkouts table.

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14841: Columns settings are not taken into account for checkout table / moremember
Jonathan Druart [Thu, 17 Sep 2015 07:34:28 +0000 (08:34 +0100)]
Bug 14841: Columns settings are not taken into account for checkout table / moremember

There is a typo member vs members in the template when retrieving the
existing settings.
So that all columns are displayed, even the ones which are hidden
(sort_order, due_date_unformatted, etc.)

Test plan:
0/ Does not apply this patch
1/ Go on the columns config page and check some fields not to display by
default for Patrons > moremember > issues-table
2/ Go on the patron detail page (with checkouts), click on the "show/hide
columns" button (top right of the table).
Confirm that the config is not taken into account and that it's ugly
(hidden columns are displayed)
3/ Apply this patch
4/ Everything should be fine now :)

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14727: koha-indexer tab completion in bash
Tomas Cohen Arazi [Tue, 25 Aug 2015 15:17:17 +0000 (12:17 -0300)]
Bug 14727: koha-indexer tab completion in bash

This patch introduces tab-completion in bash to the koha-indexer
command. It completes using valid option switches and instance names.
It stops completing then -h or --help are issued, and once a command
switch is chosen (either --start, --stop or --restart) it goes ahead
with valid instances completion.

To test:
- Have a packages install (kohadevbox works)
- Run:
  $ . debian/koha-common.bash-completion
- Type
  koha-indexer <tab>
- Play with all the options
=> SUCCESS: They work as they should.
- Sign off :-D

Note: it fixes a small glitch on the plack completion.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Verified working, including filtering out already used options and
instances.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14045: DBRev 3.21.00.035
Tomas Cohen Arazi [Tue, 13 Oct 2015 14:27:32 +0000 (11:27 -0300)]
Bug 14045: DBRev 3.21.00.035

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14045: Fix typo in template
Jonathan Druart [Tue, 6 Oct 2015 17:22:36 +0000 (18:22 +0100)]
Bug 14045: Fix typo in template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14045: DBIC Changes
Jonathan Druart [Wed, 13 May 2015 15:53:19 +0000 (17:53 +0200)]
Bug 14045: DBIC Changes

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@theke.io>
6 years agoBug 14045: DB Changes
Jonathan Druart [Wed, 13 May 2015 14:51:49 +0000 (16:51 +0200)]
Bug 14045: DB Changes

This patch is the DB changes for the feature.
It adds 5 new columns named 'maxonsiteissueqty' to the following tables:
- branch_borrower_circ_rules
- default_borrower_circ_rules
- default_branch_circ_rules
- default_circ_rules
- issuingrules

It also adds the pref ConsiderOnSiteCheckoutsAsNormalCheckouts.

See main patch for more details.

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@theke.io>
6 years agoBug 14045: Make GetBranchBorrowerCircRule return maxonsiteissueqty
Jonathan Druart [Wed, 13 May 2015 15:08:03 +0000 (17:08 +0200)]
Bug 14045: Make GetBranchBorrowerCircRule return maxonsiteissueqty

GetBranchBorrowerCircRule should return the value for maxissueqty and
maxonsiteissueqty. It's what this patch does.

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@theke.io>
6 years agoBug 14045: Introduce the maxonsiteissueqty field as a copy of maxissueqty
Jonathan Druart [Wed, 13 May 2015 15:07:28 +0000 (17:07 +0200)]
Bug 14045: Introduce the maxonsiteissueqty field as a copy of maxissueqty

This patch adds the new fields maxonsiteissueqty as a copy of the
existing maxissueqty field.

There is no brainy code here, it only adds the ability to fill the new
field from the admin interface (admin/smart-rules.pl).

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@theke.io>
6 years agoBug 14045: Change prototype of TooMany to raise a better warning
Jonathan Druart [Wed, 13 May 2015 12:04:50 +0000 (14:04 +0200)]
Bug 14045: Change prototype of TooMany to raise a better warning

With this patch, the user will know why the checkout is refused.

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@theke.io>
6 years agoBug 14045: Add specific quotas to on-site checkouts
Jonathan Druart [Wed, 13 May 2015 14:56:03 +0000 (16:56 +0200)]
Bug 14045: Add specific quotas to on-site checkouts

This patch set adds the ability to defined independent quotas for on-site
checkouts.
This will be done using the circulation rules matrix where a new column
“Current on-site checkouts allow” will be added.

This feature is going to use the same method as the existing fields maxissueqty
("Current checkouts allowed"), the new fields will be added to the
different tables (see the "DB changes" patch) and will be named
maxonsiteissueqty (for consistency).

In order to keep the existing behavior and to let more flexibility,
a new system preference is added (ConsiderOnSiteCheckoutsAsNormalCheckouts).
This syspref will let the liberty to the library to decide if an on-site
checkout should be considered as a "normal" checkout or not.

To keep the existing behavior, the syspref will be disabled (i.e. an on-site
checkout is considered as a normal checkout) and the number of on-site
checkouts will be the same as the number of checkout (maxissueqty ==
maxonsiteissueqty).

Technically:
There are only very few tests for the Circulation module, and the 2
subroutines impacted by this patch set were not tested at all.
It is necessary to introduce non-regression tests for this area.
The 2 subroutines are: C4::Circulation::GetBranchBorrowerCircRule
and C4::Circulation::TooMany (only called by
C4::Circulation::CanBookBeIssued, so we will take the liberty to change
the prototype to raise a better warning to the end user).

Test plan:
I. Confirm there is no regression and the existing behavior is kept
 0/ Let the syspref disabled
 1/ Set a rule to limit to 2 the number of checkouts allowed
 2/ Do a normal checkout
 3/ Do an on-site checkout
 4/ Try to checkout (on-site or normal) an item again.
 You should not be allowed.

II. Test the new feature - pref disabled
 0/ Let the syspref disabled
 1/ Set a rule to limit to 2 the number of checkouts allowed and to 1
 the number of on-site checkouts allowed.
 2/ Do an on-site checkout
 3/ Try to do another one, you should not be allowed to do it.
 4/ A normal checkout should pass successfully
Note that it does not make sense to have the number of on-site checkouts
alowed > number of checkouts allowed.

III. Test the new feature - pref enabled
 0/ Enable the syspref
Now an on-site checkout is *not* counted as a normal checkout.
This means you can have the number of on-site checkouts > number of
checkouts allowed.
 1/ Set the values you want for the 2 types of checkouts (normal vs
on-site).
 2/ Even if a patron has reached the maximum of checkouts allowed, he
 will be allowed to do a on-site checkout (vice versa).

IV. Stress the developper
 Using the different configurations available in the circulation matrix,
 try to find one where the checkout is allowed and not should be.

Sponsored-by: BULAC - http://www.bulac.fr/
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@theke.io>
6 years agoBug 12368: Die if the --table value is not allowed.
Jonathan Druart [Thu, 12 Jun 2014 07:31:35 +0000 (09:31 +0200)]
Bug 12368: Die if the --table value is not allowed.

If the table given in parameter is not in the white list, the script
should die rathen than correct to a default value.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 12368: Rebuild Zebra improvement: allow to specify a DB table
Jonathan Druart [Wed, 4 Jun 2014 15:03:51 +0000 (17:03 +0200)]
Bug 12368: Rebuild Zebra improvement: allow to specify a DB table

Currently the --where parameter only allow to specify a condition on
fields in the biblioitems table.
For some needs it would be great to specify a condition on the field in
the items table.

The use case is the following: you want to reindex biblios with items
modified since a specific timestamp.

Test plan:
1/ Pick an item randomly in your catalogue
2/ Edit it and save
3/ Note that the items.timestamp has been set to today but not the
biblioitems.timestamp
4/ launch rebuild_zebra without the new parameter
  perl misc/migration_tools/rebuild_zebra.pl -b -v --where
  "timestamp >= XXX"
where XXX is the today date (e.g. "2014-06-05 00:00:00").
Note that the biblio has not been indexed.
5/ launch rebuild_zebra using the new parameter:
  perl misc/migration_tools/rebuild_zebra.pl -b -v -t items --where
  "timestamp >= XXX"
Note the biblio has been indexed.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 13805: (Plack) Disable syspref cache
Jonathan Druart [Fri, 6 Mar 2015 13:42:38 +0000 (14:42 +0100)]
Bug 13805: (Plack) Disable syspref cache

When going to the installer (without the DB structure), you have to log
twice before starting the installation.

Test plan:
0/ Create a new database and fill the database entry in the koha conf
with its name
1/ Go on the mainpage, you should be redirected to the installer
2/ Try to log in
Without this patch, you will get the login form again.
With this patch, you can start the installation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14925: (QA followup) tidy code block
Tomas Cohen Arazi [Fri, 9 Oct 2015 13:39:12 +0000 (10:39 -0300)]
Bug 14925: (QA followup) tidy code block

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14925: Remove C4::Dates from members/moremember.pl
Marc Véron [Tue, 29 Sep 2015 16:14:30 +0000 (18:14 +0200)]
Bug 14925: Remove C4::Dates from members/moremember.pl

This patch removes C4::Dates from members/moremember.pl

To test:
- Go to Details page of several members
- Verify that all dates display OK, including restrictions

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. All dates displayed OK

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14928: Remove C4::Dates from files acqui/pdfformat/layout*.pm
Marc Véron [Wed, 30 Sep 2015 13:57:19 +0000 (15:57 +0200)]
Bug 14928: Remove C4::Dates from files acqui/pdfformat/layout*.pm

This patch removes C4::Dates from:
- acqui/pdfformat/layout2pages.pm
- acqui/pdfformat/layout2pagesde.pm
- acqui/pdfformat/layout3pages.pm
- acqui/pdfformat/layout3pagesfr.pm

To test:
- Apply patch
- Go to Home > Acquisitions > [Vendor] > Basket groups
- Print a basket (order)
- Verify that the current date is formatted respects syspref 'dateformat'
- Do the same with syspref 'OrderPdfFormat' set to the four different choices

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Date printed in PDF Ok

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14890: Simplify processing to display a date with hours
Jonathan Druart [Thu, 8 Oct 2015 08:52:27 +0000 (09:52 +0100)]
Bug 14890: Simplify processing to display a date with hours

The KohaDates plugin does that, it's not necessary to split the output.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14890: Remove C4::Dates from circ/bookcount.pl
Marc Véron [Wed, 23 Sep 2015 08:19:42 +0000 (10:19 +0200)]
Bug 14890: Remove C4::Dates from circ/bookcount.pl

This patch removes deprecated C4::Dates from circ/bookcount.pl

To test:
- Search for biblio with an item that has been checked out several
  times and that has been transferred
- In left navigation click on 'Items'
- In list of items click on 'View item's checkout history'
- Verify that dates in 'Date arrived at current library' and in
  column 'Last seen' display properly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14924: Remove C4::Dates from members/memberentry.pl
Marc Véron [Tue, 29 Sep 2015 15:32:56 +0000 (17:32 +0200)]
Bug 14924: Remove C4::Dates from members/memberentry.pl

This patch removes C4::Dates from members/memberentry.pl

To test:
- Apply patch
- Add and edit patrons with and without birthdate as
  mandatory field (syspref BorrowerMandatoryField)
- Verify that dates (birtdate, registration, expiration)
  display and are stored correctly

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with syspref BorrowerMandatoryField and
table borrowers.dateofbirth

Bug 14924 - (follow-up) Add date validation using eval

This patch adds a date validation (see comment #3).

To test:

- Apply patch
- Create a new user or edit an existing user
- Try valid dates for date of birth
- Try invalid dates as 0000-00-00 or 32/01/1970. You can can
  copy/paste such strings to the date field, ignore the warning
  message and submit. Verify that after submit you get a message
  "Date of birth is invalid"
- Try the same with enrollement /expiry dates

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with invalid dates.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: I have splitted them to make them much more readable
(some lines were removed then added).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14667: (QA followup) remove useless labels-menu.inc file
Tomas Cohen Arazi [Tue, 6 Oct 2015 14:51:48 +0000 (11:51 -0300)]
Bug 14667: (QA followup) remove useless labels-menu.inc file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14667: (QA followup) make the UI show 'Label creator' consistently
Tomas Cohen Arazi [Tue, 6 Oct 2015 14:37:15 +0000 (11:37 -0300)]
Bug 14667: (QA followup) make the UI show 'Label creator' consistently

The tool is documented and accessed (via Tools >) as 'Label creator'. But the
pages titles say 'Labels' and the breadcumbs 'Labels home'. It should be called
'Label creator' for consistency. This patch changes the tt files so they are
consistent.

It also makes the title show the same page name as the breadcumbs.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14667: Make some strings translatable
Jonathan Druart [Tue, 18 Aug 2015 16:40:46 +0000 (17:40 +0100)]
Bug 14667: Make some strings translatable

This patch 1/ Fixes a regression introduced by the previous patch: the
"Are you sure to delete..." strings was translatable and 2/ Make the
table headers translatable.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14667: UI/UX improvements for the Label creator
Liz Rea [Wed, 5 Aug 2015 03:36:10 +0000 (03:36 +0000)]
Bug 14667: UI/UX improvements for the Label creator

Note: It would be good to adopt these same changes in the Patron Card creator for consistency and push
      them in conjunction with these changes. -Chris_n

Reasoning

Librarians will be doing label things in the following frequencies, from most frequent to least frequent:
1. Creating new label batches - every day/every few days
2. Managing existing label batches - every day/every few days
3. Managing existing label layouts - as needed, infrequent
5. Managing existing label templates - as needed, infrequent
6. Creating new label layouts - as needed, infrequent
7. Creating new label templates - as needed, infrequent
8. Managing existing printer profiles - possibly once only!
9. Creating new printer profiles - possibly once only!

This change to the label creator aims to make the most frequently used items easily accessible at the top of the main area,
reduces clutter on the page, and makes the label creator fall in line with UI paradigms found elsewhere in Koha.

To test:

Open the label creator: More -> Tools -> Label creator
Note that the toolbar has changed. It should be consistent across all of the label creator (it is an include).

+ New menu:

Label batch
1. make sure it looks ok - toolbar buttons are consistent at the top of the main block.
2. add items both by barcode, and by search (note this patch does not touch the pop up window. Another day.)
3. note that the usual buttons have moved below the textarea, and now have icons.
4. delete and export single items using the buttons corresponding to each item
5. select multiple and use the buttons above the table to remove and export selected items
6. export a full batch
7. deduplicate a batch
There should be no regressions in functionality.

Layout
1. This menu item should take you directly to the "Edit layout" screen.
2. no functional changes here.
3. note toolbar at top is consistent

Label template
1. this menu item should take you directly to the "Edit label template" page.
2. no functional changes here.
3. note toolbar at top is consistent.

Printer profile
1. this menu item should take you directly to the "Edit printer profile" page.
2. no functional changes here.
3. note toolbar at top is consistent.

+ Manage menu:

Label batches
1. This menu item should take you directly to the "currently available batches" page.
2. select a batch to edit using the buttons
3. select a batch to delete using the buttons - it should ask for confirm.
4. select several batches using the tickboxes, and select Export selected. Batches should be exported as normal.
5. note toolbar at top is consistent.

Layouts
1. This menu item should take you directly to the "currently available layouts" page.
2. select a layout to edit using the buttons
3. select a layout to delete using the buttons
4. note toolbar at top is consistent.

Label templates
1. This menu item should take you directly to the "currently available templates" page.
2. select a template to edit using the buttons
3. select a template to delete using the buttons
4. note toolbar at top is consistent.

Printer profiles
1. This menu item should take you directly to the "currently available profiles" page.
2. select a profile to edit using the buttons
3. select a profile to delete using the buttons
4. note toolbar at top is consistent

+ General
* note that sidebar now only has "labels home" instead of the full "manage" list. It seemed redundant with the toolbar tidied up.

Please note that I am happy to take suggestions/amendments to these changes.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14840: Added new cron script send membership expiry reminder notices in crontab...
Amit Gupta [Thu, 17 Sep 2015 07:22:59 +0000 (12:52 +0530)]
Bug 14840: Added new cron script send membership expiry reminder notices in crontab.example file

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Added koha-common.cron.daily.
Note that the cronjob only does something when the pref is set now.
See corresponding change on bug 6810.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: DBRev 3.21.00.034
Tomas Cohen Arazi [Tue, 6 Oct 2015 14:18:32 +0000 (11:18 -0300)]
Bug 6810: DBRev 3.21.00.034

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: [QA Follow-up] Exit cronjob if pref not set
Marcel de Rooy [Fri, 18 Sep 2015 11:22:42 +0000 (13:22 +0200)]
Bug 6810: [QA Follow-up] Exit cronjob if pref not set

As per suggestion of Robin on report 14840, it would be better to always
run the cronjob and only do something when the pref is set.
This patch adds a test in the cronjob and clears the former default of 14
days.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Removed the pref and ran the dbrev again: Fine.
Run the cronjob with -c -v -n: Prints exit warning.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: [QA Follow-up] Some minor tidying up of cron script
Marcel de Rooy [Wed, 16 Sep 2015 14:26:14 +0000 (16:26 +0200)]
Bug 6810: [QA Follow-up] Some minor tidying up of cron script

Moved some POD lines and removed some duplicated POD lines.
Corrected some indentation.
Did some minor spelling changes, rewording.
Removed the C4::Dates module. No longer needed.
Removed a label in front of the for statement.
Removed the Do you wish to continue-code. Should not be in a cron job.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: [QA Follow-up] Move test file to db_dependent
Marcel de Rooy [Wed, 16 Sep 2015 12:49:11 +0000 (14:49 +0200)]
Bug 6810: [QA Follow-up] Move test file to db_dependent

Note that this was already mentioned by Jonathan on comment48.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: Fix QA failures
Amit Gupta [Fri, 26 Jun 2015 17:21:28 +0000 (22:51 +0530)]
Bug 6810: Fix QA failures

    - remove DateTime->now()
    - use Koha::DateUtils->dt_from_string;
    - use Pod2usage for the usage
    - use Modern::Perl
    - use branches table
    - Change letter code from MEMEXP to MEMBERSHIP_EXPIRY
    - review comments implemented
    - fix qa script comments

Bug 6810 - Fix QA failures

    - MembershipExpiryDaysNotice system preferences arragned alphabetical order.

Bug 6810 - Add sample notices

    - review comments implemented
    - default value of is_html field in letter table is 0

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: Add new systempreference (MembershipExpiryDaysNotice)
Alex Arnaud [Thu, 11 Jun 2015 10:17:07 +0000 (12:17 +0200)]
Bug 6810: Add new systempreference (MembershipExpiryDaysNotice)

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Bug 6810 - Fix QA failures

- Use KohaDates to convert dateexpiry
- remove MYSQL specifics methods for date handling in
  GetUpcomingMembershipExpires
- make the script membership_expiry.pl write in Koha system logs
- add tests

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Bug 6810 - Fix QA failures:

  - use Koha::DateUtils instead of Koha::Template::Plugin::KohaDates,
  - Add test with syspref MembershipExpiryDaysNotice equals 0 and undef,
  - fix (new) test failure (when MembershipExpiryDaysNotice is undef).

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6810: Send membership expiry reminder notices.
Amit Gupta [Tue, 8 Oct 2013 08:20:51 +0000 (13:50 +0530)]
Bug 6810: Send membership expiry reminder notices.

A new crontab based perl script to send membership expiry reminders. A
system preference controls the number of days in advance of membership
expiry that the notices will be sent on.

To Test:
1) Create a new Patron and set membership expiry date 14 days from the
   date of registration.
2) Check your systemprefence ( MemExpDayNotice to 14 days default value)
3) Manual testing Run ( perl membership_expiry.pl -h)
    It would give you various option:
    This script prepares for membership expiry reminders to be sent to
    patrons. It queues them in the message queue, which is processed by
    the process_message_queue.pl cronjob.
    See the comments in the script for directions on changing the script.
    This script has the following parameters :
     -c Confirm and remove this help & warning
     -n send No mail. Instead, all mail messages are printed on screen.
        Useful for testing purposes.
     -v verbose
    Do you wish to continue? (y/n)
4) Choose option for ex: perl membership_expiry.pl -c
5) Go to your koha database and check message_queue table you see some
   results.
6) Run (perl process_message_queue.pl) it will send email to those
   patron whose membership after 14 days from today.
7) Cron testing: (10   1 * * *  $KOHA_CRON_PATH/membership_expiry.pl -c)
8) Set your 15   * * * *  $KOHA_CRON_PATH/process_message_queue.pl
9) After running membership_expiry.pl, (process_message_queue.pl will
   send emails to those patron whose membership after 14 days from
   today).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC
Jesse Weaver [Mon, 14 Sep 2015 22:22:12 +0000 (16:22 -0600)]
Bug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14607: (QA followup) Fix typo in shelfbrowser.inc
Jesse Weaver [Fri, 24 Jul 2015 20:33:56 +0000 (14:33 -0600)]
Bug 14607: (QA followup) Fix typo in shelfbrowser.inc

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN
Jesse Weaver [Fri, 24 Jul 2015 20:33:56 +0000 (14:33 -0600)]
Bug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN

Test plan (requires Baker and Taylor cover images to be set up and enabled):
  1. Create a record with an ISBN that does not have a cover and a UPC
     that does. 141985934X/085391174929 is one set that works well.
  2. Verify that the record shows up as "No image available" in the
     following OPAC locations: shelf browser, reviews, lists, search and
     reading record. This will require adding reviews/checkouts/etc. for
     the record in question.
  3. Apply patch.
  4. Check the locations again, and verify that the record now has a
     valid cover image.

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10020: (RM followup) DBIx update
Tomas Cohen Arazi [Tue, 6 Oct 2015 13:39:26 +0000 (10:39 -0300)]
Bug 10020: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10020: DBRev 3.21.00.033
Tomas Cohen Arazi [Tue, 6 Oct 2015 13:33:15 +0000 (10:33 -0300)]
Bug 10020: DBRev 3.21.00.033

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10020: Remove code related to ethnicity
Jonathan Druart [Fri, 10 Apr 2015 11:19:32 +0000 (13:19 +0200)]
Bug 10020: Remove code related to ethnicity

This is a(nother) vestige of Koha (2.2?).
This patch removes unused code related to the 'ethnicity'.

In detail:
There is no way to fill the ethnicity table.
There is no way to fill the borrowers.ethnicity and borrowers.ethnotes.

BUT if borrowers.ethnicity exists, the value is displayed on
members/moremember.pl (and only here).

Test plan:
Apply this patch and confirm there is no regression on
adding/updating/deleting patrons.
Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10020: Remove DB table and fields related to ethnicity
Jonathan Druart [Fri, 10 Apr 2015 11:19:50 +0000 (13:19 +0200)]
Bug 10020: Remove DB table and fields related to ethnicity

This patch remove the ethnicity table and the ethnicity and ethnotes
fields from the 3 tables: borrowers, deletedborrowers and
borrower_modifications IF no data exist.

Test plan:
0/ Apply this patch and update the Koha::Schema
(misc/devel/update_dbix_class_files.pl).
1/ Make sure the ethnicity has at least 1 entry
2/ Launch the updatedb entry and confirm you get a warning message and
the DB structure is not updated.
3/ truncate the ethnicity table and fill ethnicity (or ethnotes) for at least 1
row of the borrowers table.
4/ Launch the updatedb entry and confirm you get a warning message and
the DB structure is not updated.
5/ Make sure the ethnicity table is empty as well as the ethniciy and
the ethnotes fields of borrowers, deletedborrowers and
borrower_modifications
6/ Launch the updatedb entry and confirm you don't get the warning
message and the DB structure is updated (ie. table and fields dropped).

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14951: Remove C4::Dates from plugins/*.pl files
Marc Véron [Sun, 4 Oct 2015 18:39:44 +0000 (20:39 +0200)]
Bug 14951: Remove C4::Dates from plugins/*.pl files

This patch removes C4::Dates from:

- plugins/plugins-home.pl
- plugins/run.pl

C4::Dates seem not to be used here, removed.

For testing refer to:
http://manual.koha-community.org/3.20/en/pluginsystem.html
http://manual.koha-community.org/3.20/en/pluginsystem.html

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14923: Remove C4::Dates from labels/label-item-search.pl
Marc Véron [Mon, 5 Oct 2015 14:22:12 +0000 (16:22 +0200)]
Bug 14923: Remove C4::Dates from labels/label-item-search.pl

This patch removes C4::Dates from labels/label-item-search.pl

To test:
- Go to Home > Tools > Labels home > Manage label batches
- Click "Add item(s)"
- Verify that selection with date after and date before works
  the same as without patch.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with bad dates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Todo later: Some checks should be added on client side.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14858: removed record length limit test
Barton Chittenden [Mon, 21 Sep 2015 15:57:43 +0000 (08:57 -0700)]
Bug 14858: removed record length limit test

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14950: Remove unused variable $today_iso
Jonathan Druart [Tue, 6 Oct 2015 10:50:36 +0000 (11:50 +0100)]
Bug 14950: Remove unused variable $today_iso

This variable is not used anymore in the template (and has never been
used...).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14950: Assign default value for YYYY, MM and DD
Marc Véron [Sun, 4 Oct 2015 18:11:26 +0000 (20:11 +0200)]
Bug 14950: Assign default value for YYYY, MM and DD

[was Remove C4::Dates from tools/batchMod.pl]

This patch replace the YYYY, MM and DD if defined in the default values.

This patch also removes C4::Dates from tools/batchMod.pl

To test:

- In MARC bibliographic Default framework, define a default value
  for one of the in Tag 952 Subfield struture, e.g. for
  subfield x Non-public note. You can define it under
  'Advancde constraints'. Define the value similar to the following:
  Year:YYYY Month:MM Day:DD
- Got to Home > Tools > Batch item modification
- Enter one ore more barcodes you want to modify
- Check checkbox 'Populate fields with defautl values from defautl framework
- Click 'Continue'
- Verify on the follwing screen that the field in Edit form is populated
  as appropriate (in our example 'x - Non public note')
- Click 'Save'
- Verify that the items are updated as appropriate

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended commit message: This is a bug fix and can be backported. The
YYYY, MM and DD were not replaced correctly before this patch.
I got Year:2015-10-06 Month: Day:
now I correctly get Year: 2015 Month: 10 Day: 06
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14739: Adapt wording in breadcrumbs if a new batch is created
Jonathan Druart [Mon, 5 Oct 2015 08:20:02 +0000 (09:20 +0100)]
Bug 14739: Adapt wording in breadcrumbs if a new batch is created

Don't display "Manage batch number 0" but "Create new batch"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14739: Fix plack compatibility
Jonathan Druart [Fri, 2 Oct 2015 08:51:07 +0000 (09:51 +0100)]
Bug 14739: Fix plack compatibility

perlcritic raised "Declare variables outside of the condition"

Works as expected
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14739: Add several patrons to a new batch will create a new batch per patron...
Nick Clemens [Thu, 10 Sep 2015 10:35:37 +0000 (06:35 -0400)]
Bug 14739: Add several patrons to a new batch will create a new batch per patron added

This patch changes the functionality of adding patrons to patroncard batches.  Instead of using only the patron search, there is now a textarea which can either be manually populated with borrowernumbers, or can be populated using the patron-search

To test:
1 - Create a new patron batch
2 - Click the add items button, if there is no data in the borrowrnumber form you should get a popup
3 - Add items to batch using the popup, borrowernumbers should populate to the form
4 - Click add items again and items should be added to a new batch
5 - Create a new batch
6 - Manually enter invalid borrowernumbers to the form
7 - Click add items, batch should return empty
8 - Manually enter valid borrowernumber
9 - Click add items, batch should be updated
10 - Edit an existing batch and confirm add items works as above
11 - Create a new label batch
12 - Click add items with no data, popup item search should appear
13 - Adding items by checking boxes or using 'Add' button - they should populate the text box on the edit batch page
14 - When adding using form the 'Enter by itemnumber' button should be marked automatically
15 - Submit items and confirm they are added to batch
16 - Create a new batch, enter by barcode manually and check 'Enter by itemnumber"
17 - Click add items, no items should be added
18 - Repopulate form with barcodes, check 'Enter by barcode'
19 - Click add items, items should be added correctly
20 - Test various combinations of radio buttons and numbers and using form or not

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 5144: Don't display the failed_holds param in the url if not needed
Jonathan Druart [Tue, 6 Oct 2015 12:59:04 +0000 (13:59 +0100)]
Bug 5144: Don't display the failed_holds param in the url if not needed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 5144: Add test on carp message
Jonathan Druart [Tue, 6 Oct 2015 12:54:22 +0000 (13:54 +0100)]
Bug 5144: Add test on carp message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 5144: Duplicate holds allowed if patron clicks back button after placing hold
Kyle M Hall [Mon, 5 Oct 2015 11:50:18 +0000 (07:50 -0400)]
Bug 5144: Duplicate holds allowed if patron clicks back button after placing hold

Koha is currently not engineered to handle multiple holds per record.
Until such time that is does, we should not allow them to be created.

Test Plan:
1) Apply this patch
2) Log in to the opac
3) Place a hold
4) Hit the back button on your browser
5) Place the hold again
6) Note the new message

Signed-off-by: David Kuhn <kuhn@monterey.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 5144: Add unit test
Kyle M Hall [Mon, 5 Oct 2015 11:50:03 +0000 (07:50 -0400)]
Bug 5144: Add unit test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14888: Revert "Bug 14888: (QA followup) remove unused lib/var"
Tomas Cohen Arazi [Mon, 5 Oct 2015 18:05:31 +0000 (15:05 -0300)]
Bug 14888: Revert "Bug 14888: (QA followup) remove unused lib/var"

This reverts commit b36cec6cbaeb4c78dafdcd3138925a7c1d625dc4.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14917: 700/710/711 fix path for icon in XSLT
Winona Salesky [Wed, 30 Sep 2015 02:32:45 +0000 (22:32 -0400)]
Bug 14917: 700/710/711 fix path for icon in XSLT

Added theme and materialTypeLabel parameters back into showAuthor template call
for 7xx display in OPAC display.

Test Plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac record details
3) Find or create a record with MARC tags 700,710,711
5) Click title to review record details.
6) Link to icon following contributor names should appear.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected. Magnifying glass icon corrected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I shortened the commit subject and put most of it in the commit message.

6 years agoBug 14518: Allow deleting records with holds (and no item) after confirmation
Remi Mayrand-Provencher [Wed, 20 May 2015 17:26:23 +0000 (13:26 -0400)]
Bug 14518: Allow deleting records with holds (and no item) after confirmation

Cleaning up records with no item but holds is impossible since
the code does not consider the result from the confirmation popup.

This situation happens to our client in their (annual) cleanup.

I. Setup
Create the following if needed:
1) A patron for placing holds and checkouts
2) A test bibliographic record
3) An item for the record. Set the barcode to "DELETEME"

II. Corrupting the Database
1) Checkout the item "DELETEME"
2) Place a record level hold on the test record (next available item)
3) Checkin the item "DELETEME"
4) MySQL: DELETE FROM items WHERE barcode="DELETEME";

III. Deleting the record.
1) On the test record's details page: Edit -> Delete record
2) Click 'yes' in the prompt
3) Nothing happens.

IV. Fixing the bug
1) Apply the patch
2) Repeat step III to delete the record
3) Record is deleted

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: It's not possible in Koha to place a hold on a
record with items, so the effect described here is more
likely to be the result of a migration issue or another
bug. But doesn't hurt to provide a way out :)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6379: Fix if the reviewer is not the same patron
Jonathan Druart [Fri, 10 Jul 2015 10:56:14 +0000 (11:56 +0100)]
Bug 6379: Fix if the reviewer is not the same patron

get_approval_rows does a left join on tags_approval.approved_by =
borrowers.borrowernumber

This means it cannot return the approval tags for a given patron.

Note that this patch could be time-consuming if there is a lot of tags
in the DB.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 6379: Remove link from unapproved tags
Jonathan Druart [Wed, 25 Mar 2015 12:44:25 +0000 (13:44 +0100)]
Bug 6379: Remove link from unapproved tags

At the OPAC, if the tag is not approved, the tag's link did not return
any result.

This patch removes the link.
Test plan:
1/ Set TagsModeration to 'Require'
2/ Create tags at the OPAC
3/ Approve a couple
4/ Confirm that unapproved tags does not have links.

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

For the (approved) link to work I need to install YAML::XS

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14940: Fix sorting in opac-topissues.pl
Julian Maurice [Fri, 2 Oct 2015 07:25:18 +0000 (09:25 +0200)]
Bug 14940: Fix sorting in opac-topissues.pl

There is hidden text in "Checkouts" cells that prevent DataTables to
sort numerically.
This patch adds the 'title-numeric' sort plugin and use it in
opac-topissues.pl

Column 'Checkouts' in Home > Most popular items sorts 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@theke.io>
6 years agoBug 14528: Inconsistency in permissions check when listing shelves
Jonathan Druart [Tue, 14 Jul 2015 15:44:37 +0000 (16:44 +0100)]
Bug 14528: Inconsistency in permissions check when listing shelves

The svc script needed borrowers when the shelves.pl needed catalogue.
There is no sense to have different permissions here.

Test plan:
1/ Remove the borrowers permission to a user
2/ Use this user to log in
3/ Go on the shelf list
4/ Without this patch, you should get an endless "Processing..." which
is fixed if you apply it.

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@theke.io>
6 years agoBug 14888: (QA followup) remove unused lib/var
Tomas Cohen Arazi [Mon, 5 Oct 2015 15:23:26 +0000 (12:23 -0300)]
Bug 14888: (QA followup) remove unused lib/var

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14888: Add tests for Koha::Cit[y|ies]
Jonathan Druart [Fri, 2 Oct 2015 07:48:05 +0000 (08:48 +0100)]
Bug 14888: Add tests for Koha::Cit[y|ies]

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14888: Update copyright and wording
Jonathan Druart [Fri, 2 Oct 2015 07:34:51 +0000 (08:34 +0100)]
Bug 14888: Update copyright and wording

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 14888: Add Koha::Cit[y|ies] classes
Jonathan Druart [Thu, 24 Sep 2015 14:00:57 +0000 (15:00 +0100)]
Bug 14888: Add Koha::Cit[y|ies] classes

Tested both patches together, 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@theke.io>
6 years agoBug 14888: use Koha::Cit[y|ies] in admin/itemtypes
Jonathan Druart [Thu, 24 Sep 2015 14:01:31 +0000 (15:01 +0100)]
Bug 14888: use Koha::Cit[y|ies] in admin/itemtypes

Test plan:
Add/edit/remove cities from the administration module
(admin/cities.pl).
You should get message feedback after each action.

Tested both patches together, 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@theke.io>
6 years agoBug 10855: DBRev 3.21.00.032
Tomas Cohen Arazi [Fri, 2 Oct 2015 18:22:10 +0000 (15:22 -0300)]
Bug 10855: DBRev 3.21.00.032

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: (RM followup) DBIx update
Tomas Cohen Arazi [Fri, 2 Oct 2015 18:14:22 +0000 (15:14 -0300)]
Bug 10855: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: (follow-up) Bug 10855: Remove additional field values when subscription...
Jonathan Druart [Thu, 3 Sep 2015 14:38:44 +0000 (15:38 +0100)]
Bug 10855: (follow-up) Bug 10855: Remove additional field values when subscription is removed

The subscriptionid should not be escaped and placeholders used.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Remove additional field values when subscription is removed
Julian Maurice [Thu, 3 Sep 2015 12:05:07 +0000 (14:05 +0200)]
Bug 10855: Remove additional field values when subscription is removed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Update database entry
Jonathan Druart [Wed, 4 Dec 2013 15:28:26 +0000 (16:28 +0100)]
Bug 10855: Update database entry

Add 2 tables: additional_fields and additional_field_values

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: (follow-up) Search subscriptions by additional fields
Jonathan Druart [Mon, 19 Jan 2015 10:32:55 +0000 (11:32 +0100)]
Bug 10855: (follow-up) Search subscriptions by additional fields

1 occurrence of KohaAuthorisedValues had not been replaced with
AuthorisedValues on fixing a previous conflict.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Make tests to pass
Jonathan Druart [Thu, 15 Jan 2015 14:36:27 +0000 (15:36 +0100)]
Bug 10855: Make tests to pass

Some recent changes in master make these tests fail.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Additional marc fields are not inserted
Jonathan Druart [Mon, 20 Jan 2014 09:27:48 +0000 (10:27 +0100)]
Bug 10855: Additional marc fields are not inserted

In subscription-add.pl, the code for inserting additional_fields is not
the same for updating and inserting.
This patch refactores this code in code to do the same tests.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: search with exact match if linked to an AV
Jonathan Druart [Mon, 23 Dec 2013 09:43:52 +0000 (10:43 +0100)]
Bug 10855: search with exact match if linked to an AV

If a field is linked to an AV, the search should be an exact match.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Fix QA issues
Jonathan Druart [Tue, 17 Dec 2013 12:53:21 +0000 (13:53 +0100)]
Bug 10855: Fix QA issues

This patch fixes the following QA issues:

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
  FAIL   forbidden patterns
       forbidden pattern: KohaAuthorisedValues plugin is deprecated (see bug 10626) (line 2)

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
  FAIL   forbidden patterns
       forbidden pattern: KohaAuthorisedValues plugin is deprecated (see bug 10626) (line 2)

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt
  FAIL   forbidden patterns
       forbidden pattern: To include datatables files, please use the include file (see bug 10868) (line 12)

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Squash several fixes
Jonathan Druart [Wed, 4 Dec 2013 15:26:59 +0000 (16:26 +0100)]
Bug 10855: Squash several fixes

Bug 10855: FIX: Add additional fields for closed subscriptions

Bug 10855: Fix instance vs static method

This patch fixes the error message.
The 3 modified routines *are* static methods.

Bug 10855: FIX conflicts with bug 7688

Bug 10855: Fix typo addition_fields -> additional_fields

Bug 10855: A partial search should return the subscriptions

If a search on an additional fields is done using a partial string
("foo" and the defined value is "foobar"), the subscription should
appear in the result list.

Test plan:
Try to search a part of the string for an additional field.

Bug 10855: Filtering on additional fields don't work if value is equal to 0

If you tried to filter on an additional field linked to an authorised
value, that did not work if the value was 0.

Bug 10855: Remove the advanced serial search box on the serial home page

Bug 10855: FIX an add field should not be created if the marc field does not exist.

This patch fixes the following:
Create an add fields linked to a nonexistent marc field (does not exist
in serials).
Edit a subscription and save.
Without this patch, an error occured:
Software error:
DBD::mysql::db do failed: Column 'value' cannot be null at
/var/root-koha/bug-10855/Koha/AdditionalField.pm line 107.

Bug 10855: Fix Type table vs tablename

Koha::AdditionalField->all method take "tablename" not "table" in
parameter".

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Search subscriptions by additional fields on the claim page
Jonathan Druart [Thu, 29 Aug 2013 12:04:32 +0000 (14:04 +0200)]
Bug 10855: Search subscriptions by additional fields on the claim page

Test plan:
- create some serials in late.
- go on serials/claims.pl.
- choose a vendor.
- verify that additional fields are displayed in new columns.
- try filters on columns.
- verify there is no regression on this page.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: Search subscriptions by additional fields
Jonathan Druart [Thu, 29 Aug 2013 11:58:34 +0000 (13:58 +0200)]
Bug 10855: Search subscriptions by additional fields

Now you will abble to search subscriptions by additional fields.
The additional field values will be displayed in the table results.

Test plan:
- go on the subscriptions advanced search page
  (serials/serials-search.pl).
- verify all searchable additional fields are displayed on the form.
- combine 1 or more values and verify results are consistent.
- verify the values are displayed in new columns of the table.
- for field linked to an authorised value category, the description is
  displayed (not the code).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: New fields on adding/updating a subscription
Jonathan Druart [Thu, 29 Aug 2013 11:37:40 +0000 (13:37 +0200)]
Bug 10855: New fields on adding/updating a subscription

This patch adds the ability to add values for additional fields when
adding/updating a subscription.

Test plan (test the following on adding a new subscription and on
editing an existent one):
- add/edit a subscription.
- verify all additional fields appears into the "Additional fields"
  block.
- fill a value for af1 and af3.
- fill others values if you are adding a new subscription.
- save.
- verify values appears on the detail of the subscription page.
- verify the af2 field is automatically filled with the specified
  marc field of the notice.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 10855: interface configuration for adding new fields to subscriptions
Jonathan Druart [Thu, 29 Aug 2013 11:32:30 +0000 (13:32 +0200)]
Bug 10855: interface configuration for adding new fields to subscriptions

This patch adds an interface configuration for adding fields to
subscriptions.

Test plan:
- go to serials/serials-home.pl
- click on the "Add subscription fields" link on the left of the screen
- try to add/update/delete new fields
You are not abble to add a field with an authorised value category and a
marcfield. Columns are sortable
- for the rest, you should have, at least:
  * a new field named af1, sortable, linked to a category
  * a new field named af2, sortable, linked to a marcfield
  * a new field named af3, not sortable

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>