Bug 25664 - login_attempts for imported borrowers can be set to NULL
Summary: login_attempts for imported borrowers can be set to NULL
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 24379
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-03 11:57 UTC by Nick Clemens (kidclamp)
Modified: 2022-06-06 20:25 UTC (History)
3 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 Nick Clemens (kidclamp) 2020-06-03 11:57:51 UTC
On bug 24379 there has been some conversation about login_attempts being set to null.

While it doesn't seem to happen at creation it does during an import

To recreate:
1 - Check your DB
    select distinct login_attempts from borrowers;
2 - All should be 0 (if you have some nulls already, thats ok)
3 - Run a report and download as CSV (you may need to set the delimiter syspref to comma)
   select surname, cardnumber, categorycode, branchcode
   FROM borrowers
4 - Tools -> Import borrowers
5 - Set to match on cardnumber and overwrite patrons
6 - Check the DB after import
    select distinct login_attempts from borrowers;
7 - All login_attempts are NULL
Comment 1 Katrin Fischer 2020-06-11 19:53:13 UTC
hm the column is 'default 0', so I guess the import must explicitly set it to NULL somewhere?
Comment 2 Kyle M Hall 2021-07-15 11:41:42 UTC
Tested and working in master.