Bug 4030 - Patron attribute types cannot be made mandatory
Summary: Patron attribute types cannot be made mandatory
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 20 votes (vote)
Assignee: Kyle M Hall
QA Contact: Bugs List
URL:
Keywords:
: 4418 20288 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-06 07:37 UTC by Cindy Murdock Ames
Modified: 2019-05-13 23:19 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
This patch adds the ability to make a patron attribute type mandatory. (11.78 KB, patch)
2010-03-02 14:00 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:22:19 UTC


---- Reported by cmurdock@ccfls.org 2010-01-06 19:37:19 ----

It would be useful to have the ability to make patron attribute types mandatory.



---- Additional Comments From kyle.m.hall@gmail.com 2010-03-02 14:00:05 ----

Created an attachment
This patch adds the ability to make a patron attribute type mandatory.





--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:22 UTC  ---

This bug was previously known as _bug_ 4030 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4030
Imported an attachment (id=1790)

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 1790 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Chris Cormack 2013-01-01 22:56:03 UTC
Needs a new patch, this contains HTML::Template::Pro templates
Comment 2 Owen Leonard 2014-07-18 18:33:58 UTC
This looks like it would be useful to pick up again. Is there a problem with it besides the template issue?
Comment 3 Katrin Fischer 2016-06-19 22:18:11 UTC
*** Bug 4418 has been marked as a duplicate of this bug. ***
Comment 4 Katrin Fischer 2018-02-23 18:18:05 UTC
*** Bug 20288 has been marked as a duplicate of this bug. ***
Comment 5 Barton Chittenden 2018-02-23 18:38:57 UTC
I looked at the patch, I think it's a lot more complicated than it needs to be. Right now, Each of the borrower attribute select statements generated by memberentrygen.tt looks like this:

<select id="patron_attr_1" name="patron_attr_1" class="noEnterSubmit">
...

The id for the second is patron_attr_2, etc.

If we change this to use values from borrower_attribute_types.category_code as the ID, I believe that we can then simply use these category codes in BorrowerMandatoryField.
Comment 6 Andrew Fuerste-Henry 2019-04-17 17:52:35 UTC
Poking this old bug again. It is currently *possible* to make patron attributes mandatory by referring to them as patron_attr_1, patron_attr_2, etc, but those labels are relative to their position when listed on memberentry, so the numbers change when attributes are added or removed, requiring an adjustment to BorrowerMandatoryField. This is workable but clunky and requires extra work.

If possible, I'd support the suggestion of marking BorrowerMandatoryField use the codes for each attribute.