Bug 22730 - Not possible to set default value for patron attributes
Summary: Not possible to set default value for patron attributes
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-17 18:00 UTC by Ron Houk
Modified: 2024-03-19 15:38 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Houk 2019-04-17 18:00:57 UTC
It would be helpful to be able define default values for patron attributes.
Comment 1 Katrin Fischer 2019-04-17 20:39:07 UTC
Hi Ron, can you explain your use case a bit? Maybe we can suggest a work around.
Comment 2 Ron Houk 2019-04-18 22:15:28 UTC
Hi Katrin,

Where this came up for us was we are in the process of starting a tool lending library at my public library.  Patrons need to sign a waiver in order to check out garden tools.  I've created a patron attribute that is tied to the YES_NO value category.  

The vast majority of patrons will not checkout garden tools so we'd like to have this attribute default to the NO field when staff are creating a new patron.
Comment 3 John Andrews 2019-09-21 20:41:14 UTC
(In reply to Ron Houk from comment #2)
> Hi Katrin,
> 
> Where this came up for us was we are in the process of starting a tool
> lending library at my public library.  Patrons need to sign a waiver in
> order to check out garden tools.  I've created a patron attribute that is
> tied to the YES_NO value category.  
> 
> The vast majority of patrons will not checkout garden tools so we'd like to
> have this attribute default to the NO field when staff are creating a new
> patron.

This could be useful in lots of instances -- we are looking to do a newsletter opt-out, and it would be nice to have a pre-selected value for a new patron attribute.
Comment 4 Lisette Scheer 2020-04-01 19:48:50 UTC
There is JQ in the library now that can do this:
https://wiki.koha-community.org/wiki/JQuery_Library#Select_an_attribute_value_by_default_only_on_add_patron_add_screen

The code I wrote only does it on creation so you don't accidentally edit it out back to default if you change it. 

Lisette
Comment 5 Caroline Cyr La Rose 2020-09-29 19:29:15 UTC
I also would find this helpful. My use case is the same as Ron's, i.e. a library has parents sign waivers for kids to use the public computers. The patron attribute is "Computer allowed" and limited to kids accounts, with the authorized value YES_NO. The default would be NO until the parent signs the waiver.
Comment 6 Andrew Fuerste-Henry 2024-03-19 15:38:38 UTC
I've just run into this need, for much the same reason Ron described. We have an attribute to record whether or not patrons have signed a hotspot use agreement. We'd like all patrons to default to "No." It'd be nice to accomplish this without jQuery.