Bug 25103

Summary: Dynamically add checkout types
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: new feature    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 25037    
Bug Blocks:    
Attachments: Bug 25103: Add authorised value for checkout types
Bug 25103: Add authorised values to sample data
Bug 25103: Validate checkout_type in Koha::Checkout->store
Bug 25103: Schema changes
Bug 25103: Add authorised value for checkout types
Bug 25103: Schema changes
Bug 25103: Add authorised values to sample data
Bug 25103: Validate checkout_type in Koha::Checkout->store

Description Lari Taskula 2020-04-09 19:34:50 UTC
This is a follow-up to Bug 25037 that adds issues.checkout_type column for determining the type of checkout (currently only normal and on-site are supported).

This Bug adds a new authorised value category, CHECKOUT_TYPE and adds the current checkout types as authorised values.

Librarians can then add their own checkout types via authorised values user interface. However this does not yet add support for checking out items with dynamically created checkout types.
Comment 1 Lari Taskula 2020-04-09 20:40:19 UTC Comment hidden (obsolete)
Comment 2 Lari Taskula 2020-04-09 20:40:22 UTC Comment hidden (obsolete)
Comment 3 Lari Taskula 2020-04-09 20:40:26 UTC Comment hidden (obsolete)
Comment 4 Lari Taskula 2020-04-09 20:40:29 UTC Comment hidden (obsolete)
Comment 5 Lari Taskula 2020-04-09 20:51:44 UTC
Created attachment 102671 [details] [review]
Bug 25103: Add authorised value for checkout types

This commit adds an authorised value category "CHECKOUT_TYPE" and
an authorised value "ONSITE" (on-site) and "CHECKOUT" (normal checkout).

To test:
1. perl installer/data/mysql/updatedatabase.pl

Sponsored-by: The National Library of Finland
Comment 6 Lari Taskula 2020-04-09 20:51:46 UTC
Created attachment 102672 [details] [review]
Bug 25103: Schema changes

Sponsored-by: The National Library of Finland
Comment 7 Lari Taskula 2020-04-09 20:51:50 UTC
Created attachment 102673 [details] [review]
Bug 25103: Add authorised values to sample data

Sponsored-by: The National Library of Finland
Comment 8 Lari Taskula 2020-04-09 20:51:52 UTC
Created attachment 102674 [details] [review]
Bug 25103: Validate checkout_type in Koha::Checkout->store

This patch adds a validation for checkout_type value when storing
a Koha::Checkout

To test:
1. prove t/db_dependent/Koha/Checkouts.t

Sponsored-by: The National Library of Finland
Comment 9 Lari Taskula 2020-04-11 20:48:01 UTC
Changed to in discussion. Do we need dynamic checkout types? When I was working on Bug 25037 I thought why not have it - we could have a drop down list of checkout types in the checkout screen. If a library ever needs more types than normal and on-site, instead of adding more hardcoded code, they could simply add a new checkout type as an authorised value and the type would appear in the list.

I don't consider this as a very important Bug so I won't get hurt much if it never moves on.