Bug 5423 - Deleted Patrons are no longer saved in table deletedborrowers
Summary: Deleted Patrons are no longer saved in table deletedborrowers
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: rel_3_2
Hardware: All All
: PATCH-Sent (DO NOT USE) blocker
Assignee: Katrin Fischer
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-21 01:40 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 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:
Circulation function:


Attachments
Proposed patch, written for and tested with HEAD (2.59 KB, patch)
2010-11-21 02:04 UTC, Katrin Fischer
Details | Diff | Splinter Review
Proposed patch, written for and tested with 3.2.x (2.65 KB, patch)
2010-11-21 02:34 UTC, Katrin Fischer
Details | Diff | Splinter Review
Patch for 3.2 (2.53 KB, patch)
2010-12-06 06:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
Revised patch. (2.66 KB, patch)
2010-12-06 12:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2010-11-21 01:40:33 UTC
There are structural differences between borrowers and deletedborrowers. 

- cardnumber varchar(16) vs. varchar(9)
- privacy column is missing from deletedborrowers

koha-error-log message after successfully(!) deleting a borrower:

[Sun Nov 21 01:57:45 2010] [error] [client ::1] [Sun Nov 21 01:57:45 2010] deletemem.pl: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /home/katrin/kohaclone/C4/Members.pm line 1610., referer: http://localhost:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=5

The data of the deleted borrower is not saved to the table deletedborrowers.

I am going to send a patch to update the database and resolve the differences between the tables.
Comment 1 Katrin Fischer 2010-11-21 02:04:51 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2010-11-21 02:34:11 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2010-12-06 06:54:18 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2010-12-06 12:46:56 UTC
Created attachment 2804 [details] [review]
Revised patch.

Slightly revised patch for 3.2 and HEAD - signed off by Koustubha Kale.
Comment 5 Koustubha Kale 2010-12-06 12:51:21 UTC
Works as promised. Tested with HEAD

On Mon, Dec 6, 2010 at 12:58 PM, Katrin Fischer wrote:
> Should also apply to 3.2.x

( Not tested with 3.2.x)
Comment 6 MJ Ray (software.coop) 2010-12-08 10:15:50 UTC
This bug is mentioned in:
Bug 5423: Deleted Patrons are no	longer saved in table deletedborrowers http://lists.koha-community.org/pipermail/koha-patches/2010-November/013084.html
Bug 5423: Deleted Patrons are no	longer saved in table deletedborrowers http://lists.koha-community.org/pipermail/koha-patches/2010-November/013085.html
Comment 7 Chris Cormack 2010-12-12 20:24:02 UTC
Pushed to master please test
Comment 8 Katrin Fischer 2010-12-13 21:24:29 UTC
Works in HEAD. Leaving bug open until pushed and tested in 3.2.1.
Comment 9 Katrin Fischer 2010-12-13 21:35:08 UTC
Applied to HEAD, fixed a small error in template, signed-off and resent.
Comment 10 Katrin Fischer 2010-12-13 21:35:26 UTC
Too many tabs... ignore previous comment.
Comment 11 Nicole C. Engard 2010-12-14 15:55:22 UTC
I do have a privacy column in my deleted borrowers table (in HEAD) and I have no errors in my log on deleting a patron.

Here's my table:


mysql> select * from deletedborrowers;
+----------------+----------------+---------+-----------+-------+------------+----------+--------------+------------+------------------+----------+-----------------+---------+---------+-------+----------------+--------+------+----------+----------+----------------+--------------+-----------+------------+--------+-----------+-----------+---------+---------+-------------+------------+--------------+--------------+------------+---------------+------+----------+-------------+------------------+--------------+-------------+---------------+--------------+-----------+----------+------+------------------+-------+----------------+----------+-------------+------------------+-------+---------------------+-------------------+--------------------+--------------------+--------------------+-------------------+-------------------+-----------------+----------------+---------+
| borrowernumber | cardnumber     | surname | firstname | title | othernames | initials | streetnumber | streettype | address          | address2 | city            | zipcode | country | email | phone          | mobile | fax  | emailpro | phonepro | B_streetnumber | B_streettype | B_address | B_address2 | B_city | B_zipcode | B_country | B_email | B_phone | dateofbirth | branchcode | categorycode | dateenrolled | dateexpiry | gonenoaddress | lost | debarred | contactname | contactfirstname | contacttitle | guarantorid | borrowernotes | relationship | ethnicity | ethnotes | sex  | password         | flags | userid         | opacnote | contactnote | sort1            | sort2 | altcontactfirstname | altcontactsurname | altcontactaddress1 | altcontactaddress2 | altcontactaddress3 | altcontactzipcode | altcontactcountry | altcontactphone | smsalertnumber | privacy |
+----------------+----------------+---------+-----------+-------+------------+----------+--------------+------------+------------------+----------+-----------------+---------+---------+-------+----------------+--------+------+----------+----------+----------------+--------------+-----------+------------+--------+-----------+-----------+---------+---------+-------------+------------+--------------+--------------+------------+---------------+------+----------+-------------+------------------+--------------+-------------+---------------+--------------+-----------+----------+------+------------------+-------+----------------+----------+-------------+------------------+-------+---------------------+-------------------+--------------------+--------------------+--------------------+-------------------+-------------------+-----------------+----------------+---------+
|             37 | 23529000197047 | Charles | Lisa      |       |            |          | NULL         | NULL       | 5129 Library Rd. | NULL     | Centerville, CA | 44262   | NULL    | NULL  | (212) 555-1212 | NULL   | NULL | NULL     | NULL     | NULL           | NULL         |           | NULL       |        |           | NULL      |         |         | 1982-10-14  | MPL        | K            | 1988-11-14   | 2020-12-31 |             0 |    0 |        0 | Alford      | Jordan           | NULL         |          45 |               | father       | NULL      | NULL     | M    | 42b29d0771f3b7ef |  NULL | 23529000197047 |          |             | 0.26352253767058 | Y     |                     |                   |                    |                    |                    |                   | NULL              |                 | NULL           |       1 |

1 row in set (0.00 sec)
Comment 12 Nicole C. Engard 2010-12-14 15:58:04 UTC
oops we all missed that the patch has been pushed :) ignore my notes
Comment 13 MJ Ray (software.coop) 2011-01-04 10:25:07 UTC
This bug is mentioned in:
Bug 5423: Deleted Patrons are no longer	saved in table deletedborrowers http://lists.koha-community.org/pipermail/koha-patches/2010-December/013168.html
Comment 14 Katrin Fischer 2011-03-06 20:16:17 UTC
Successfully tested on master and 3.2.x with fresh databases.