Bug 35577 - Self-registration creates empty patron attributes
Summary: Self-registration creates empty patron attributes
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-14 23:57 UTC by David Roberts
Modified: 2023-12-14 23:57 UTC (History)
2 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 David Roberts 2023-12-14 23:57:17 UTC
When creating a new users using the self-registration feature, all extended patron attributes are created as empty lines in the database even if they are not completed in the form:

 select * from borrower_attributes where borrowernumber = 265932;
+--------+----------------+-----------+-----------+
| id     | borrowernumber | code      | attribute |
+--------+----------------+-----------+-----------+
| 408566 |         265932 | JOBROLE   | Test      |
| 408567 |         265932 | ESRCAT    |           |
| 408568 |         265932 | NOTIF     |           |
| 408569 |         265932 | CONTRACT  |           |
| 408570 |         265932 | STUDY     |           |
| 408571 |         265932 | CONT_TYPE |           |
| 408572 |         265932 | TRUST_OTH |           |
| 408573 |         265932 | TRUST     |           |
+--------+----------------+-----------+-----

Editing this user record in the staff client then deletes the empty attributes:

select * from borrower_attributes where borrowernumber = 265932;
+--------+----------------+-----------+-----------+
| id     | borrowernumber | code      | attribute |
+--------+----------------+-----------+-----------+
| 408574 |         265932 | CONT_TYPE | TEMP      |
| 408575 |         265932 | JOBROLE   | Test      |
+--------+----------------+-----------+-----------+