Koha/admin
Alex Sassmannshausen 6a493842cf Bug 6906 - show 'Borrower has previously issued...
New feature: provide granular means to configure warnings about items
that have been issued to a particular borrower before, according to
their checkout history.

- Global syspref ('CheckPrevCheckout'), set to 'hardno' by default,
  allows users to enable this feature library wide.
- Per patron category pref allows libraries to create overrides per
  category, falling back on the global setting by default.
- Per patron pref allows switching the functionality on at the level
  of patron. Fall-back to category settings by default.

* Koha/Patron (wantsCheckPrevCheckout, doCheckPrevCheckout): New
  methods.
* C4/Circulation.pm (CanBookBeIssued): Introduce CheckPrevCheckout
  check.
* admin/categories.pl: Pass along checkprevcheckout.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt: Expose
  CheckPrevCheckout per category setting.
* koha-tmpl/intranet-tmpl/prog/en/modules/preferences/patrons.pref:
  Expose CheckPrevCheckout syspref.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:
  Expose per patron CheckPrevCheckout preference.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt: Expose
  per patron CheckPrevCheckout preference.
* koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt: Add
  'CHECKPREVCHECKOUT' confirmation message.
* installer/data/mysql/kohastructure.sql: Modify structure of
  'categories', 'borrowers', 'oldborrowers'.
* installer/data/mysql/sysprefs.sql: Add 'CheckPrevCheckout'.
* installer/data/mysql/atomicupdate/checkPrevCheckout.sql: New file.
* t/db_dependent/Patron/CheckPrevCheckout.t: New file with unit tests.

Test plan:
- Apply patch.
- Run updatedatabase.
- Regenerate Koha Schema files.
- Run the unit tests.
- Verify 'CheckPrevCheckout' is visible in Patrons sysprefs and can be
  switched to 'hardyes', 'softyes', 'softno' and 'hardno'.
  + Check out previously checked out items to a patron, checking the
    message appears as expected.
- Verify no 'Check previous checkouts' setting appears on the borrower
  category pages if the syspref is set to a 'hard' option.
- Verify 'Check previous checkouts' setting appears on the borrower
  category pages and can be modified per borrower category.
  + Issue previously issued items to a borrower, checking the message
    appears as expected (This setting should override the default
    setting if that is set to a 'soft' option).
- Verify no 'Check previous checkouts' setting appears on the individual
  borrower pages if the syspref is set to a 'hard' option.
- Verify 'Check previous checkouts' setting appears on individual
  borrower pages and can be modified.
  + Issue previously issued items to a borrower, checking the message
    appears as expected (This setting should override the category
    setting and the default setting if the latter is set to a 'soft'
    option).

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-07-08 13:40:08 +00:00
..
searchengine/elasticsearch Bug 12748: (QA followup) fix several tiny QA tools warnings 2016-04-26 20:20:13 +00:00
add_user_search.pl
admin-home.pl
aqbudgetperiods.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
aqbudgets.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
aqcontract.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
aqplan.pl Bug 15009: QA follow-up 2016-04-29 13:00:21 +00:00
audio_alerts.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
auth_subfields_structure.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
auth_tag_structure.pl
authorised_values.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
authtypes.pl
biblio_framework.pl Bug 16431: Use Koha::Cache to cache marc subfield structure 2016-07-08 12:44:58 +00:00
branch_transfer_limits.pl
branches.pl Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
categories.pl Bug 6906 - show 'Borrower has previously issued... 2016-07-08 13:40:08 +00:00
check_budget_parent.pl
check_parent_total.pl
checkmarc.pl
cities.pl
classsources.pl
clone-rules.pl
columns_settings.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
columns_settings.yml
currency.pl
didyoumean.pl
edi_accounts.pl Bug 16237: Allow entering of EDI accounts with plugins disabled 2016-04-20 16:46:34 +00:00
edi_ean_accounts.pl Bug 16256 - Can't edit library EAN if you leave EAN empty 2016-04-20 16:52:17 +00:00
env_tz_test.pl
fieldmapping.pl
import_export_framework.pl
item_circulation_alerts.pl
items_search_field.pl
items_search_fields.pl
itemtypes.pl Bug 16157: Move the selected flag from GetAuthorisedValues to the templates 2016-04-07 00:16:09 +00:00
koha2marclinks.pl
localization.pl
marc_subfields_structure.pl Bug 16431: Use Koha::Cache to cache marc subfield structure 2016-07-08 12:44:58 +00:00
marctagstructure.pl Bug 16431: Use Koha::Cache to cache marc subfield structure 2016-07-08 12:44:58 +00:00
matching-rules.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
oai_set_mappings.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
oai_sets.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
patron-attr-types.pl Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
preferences.pl
printers.pl
smart-rules.pl Bug 14048: Add a refund rules setting form in smart-rules 2016-07-07 10:37:01 -06:00
sms_providers.pl
sru_modmapping.pl
systempreferences.pl
transport-cost-matrix.pl
z3950servers.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00