Bug 6758

Summary: Capture membership renewal date for reporting purposes
Product: Koha Reporter: Savitra Sirohi <savitra.sirohi>
Component: PatronsAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: amitddng135, bibliwho, director, fridolin.somers, gmcharlt, jonathan.druart, katrin.fischer, kohapatch, kyle, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20867
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 18508, 20867    
Attachments: Bug 6758 - Capture membership renewal date for reporting purposes
Bug 6758 - Update Schema Files
Bug 6758 - Add new patron column for date of renewal
Bug 6758 - Update Schema Files
[SIGNED OFF] Bug 6758 - Add new patron column for date of renewal
Bug 6758: Add new patron column for date of renewal
Bug 6758: DBIx schema changes
Bug 6758: [QA Follow-up] Typo and field order
Bug 6758: Use 'is' instead of 'ok' in tests
Bug 6758: [QA Follow-up] Typo popular vs populate

Description Savitra Sirohi 2011-08-22 04:24:46 UTC
When membership is renewed, record the date of renewal in a new column "daterenewed".
Comment 1 Katrin Fischer 2015-05-25 12:06:00 UTC
Membership renewals are already logged by the BorrowersLog:

'2530', '2015-05-25 14:03:55', '1', 'MEMBERS', 'RENEW', '1', 'Membership renewed'

The date of the renewal is visible in the timestamp column.
Comment 2 Kyle M Hall 2017-04-25 16:55:25 UTC
It is far more efficient and far easier to have the column in the borrowers table than to join on the action logs for reporting purposes. I din't think this should be closed since Savitra specifically mentions a column for date renewed
.
Comment 3 Kyle M Hall 2017-04-25 17:54:58 UTC
Created attachment 62696 [details] [review]
Bug 6758 - Capture membership renewal date for reporting purposes
Comment 4 Kyle M Hall 2017-04-25 17:55:06 UTC
Created attachment 62697 [details] [review]
Bug 6758 - Update Schema Files
Comment 5 Kyle M Hall 2017-04-25 17:58:16 UTC
Created attachment 62698 [details] [review]
Bug 6758 - Add new patron column for date of renewal

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Create a new patron
4) Note the new column date_renewed is NULL
5) Renew the patron
6) Note the date in the column date_renewed is today's date
Comment 6 Kyle M Hall 2017-04-25 17:58:23 UTC
Created attachment 62699 [details] [review]
Bug 6758 - Update Schema Files
Comment 7 Cab Vinton 2017-04-25 18:15:04 UTC
Agreed. Thank you, Kyle!
Comment 8 Katrin Fischer 2017-05-01 19:51:40 UTC
Created attachment 62929 [details] [review]
[SIGNED OFF] Bug 6758 - Add new patron column for date of renewal

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Create a new patron
4) Note the new column date_renewed is NULL
5) Renew the patron
6) Note the date in the column date_renewed is today's date

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2017-05-01 19:53:10 UTC
Obsoleted patch with the Schema change as it no longer applied. Tested by regenerating the Schema files locally.
Comment 10 Marcel de Rooy 2017-08-04 07:10:45 UTC
Created attachment 65490 [details] [review]
Bug 6758: Add new patron column for date of renewal

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Create a new patron
4) Note the new column date_renewed is NULL
5) Renew the patron
6) Note the date in the column date_renewed is today's date

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2017-08-04 07:10:50 UTC
Created attachment 65491 [details] [review]
Bug 6758: DBIx schema changes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Marcel de Rooy 2017-08-04 07:10:54 UTC
Created attachment 65492 [details] [review]
Bug 6758: [QA Follow-up] Typo and field order

In the borrowers table lang is added with 16.12.00.033 after lastseen and
login_attempts is added with 16.12.00.037 after lastseen (so inserted BEFORE
 lang). This makes kohastructure.sql reflect that too in line with the
DBIx schema changes. (Same for deletedborrowers.)

Typo popular resolved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 13 Jonathan Druart 2017-09-19 16:14:31 UTC
Created attachment 67218 [details] [review]
Bug 6758: Use 'is' instead of 'ok' in tests
Comment 14 Jonathan Druart 2017-09-19 16:17:52 UTC
Created attachment 67219 [details] [review]
Bug 6758: [QA Follow-up] Typo popular vs populate

Typo popular resolved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 15 Jonathan Druart 2017-09-19 16:18:45 UTC
(In reply to Marcel de Rooy from comment #12)
> Created attachment 65492 [details] [review] [review]
> Bug 6758: [QA Follow-up] Typo and field order
> 
> In the borrowers table lang is added with 16.12.00.033 after lastseen and
> login_attempts is added with 16.12.00.037 after lastseen (so inserted BEFORE
>  lang). This makes kohastructure.sql reflect that too in line with the
> DBIx schema changes. (Same for deletedborrowers.)

This patch must be on its own bug report, not related to these changes.
Comment 16 Jonathan Druart 2017-09-19 16:35:00 UTC
See bug 19344
Comment 17 Jonathan Druart 2017-09-20 15:39:39 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 18 Fridolin Somers 2017-10-27 11:46:46 UTC
Enhancement not pushed to 17.05.x