Bug 29104

Summary: Add dateexpiry column to circulation patron search results
Product: Koha Reporter: Cab Vinton <bibliwho>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: bibliwho, david, fridolin.somers, gmcharlt, kyle.m.hall, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15812
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 29104: Add date expiry column to patron search borrower table

Description Cab Vinton 2021-09-24 04:16:10 UTC
The present options under columns_settings.pl for the table_borrowers table are name, cardnumber, date_of_birth, category, library, address, & phone.

It would be helpful to have the dateexpiry column available for display as well.

Others may have prefer additional columns as well.
Comment 1 Lucas Gass (lukeg) 2021-09-24 13:41:52 UTC
Created attachment 125249 [details] [review]
Bug 29104: Add date expiry column to patron search borrower table

Test plan:
1. Apply patch
2. The new dateexpiry column will be hidden by default, go to table settings and expose it (table_borrowers)
3. Do a patron search that will return multiple patrons, you should see the date expiry column
4. Make the date displays correctly  right with different dateformats
5. Make sure that the column, and other columns in that table, can be correctly hidden via table settings
Comment 2 Fridolin Somers 2021-09-24 20:17:37 UTC
Hi,

Looks great.

Just a few thoughts :

> 3. Do a patron search that will return multiple patrons, you should see the date expiry column
You should tell to use the "Check out" form.
To not mistake with "Search patrons" form.

Column name is 'Date expiry'.
We see in patrons module the name 'Expires on'.
I propose we use the same name.

There is an issue, column sorting is not on date (if you don't use the ISO format).
This is because formatting is done in perl code :
https://git.koha-community.org/Koha-community/Koha/src/commit/870e3e8e161f6da998c1deae216d7fdf0d0490e7/C4/Utils/DataTables/Members.pm#L222
See the FIXME.
Comment 3 Fridolin Somers 2021-09-24 20:20:32 UTC
Oh see that this will be obsolete if Bug 15812 is pushed
Comment 4 Cab Vinton 2021-09-30 04:26:54 UTC
Unable to test on sandbox.bywatersolutions.com. Tested on biblibre.eu sandbox.

Patch failed to apply:

Bug 29104 - Add dateexpiry column to circulation patron search results

125249 - Bug 29104: Add date expiry column to patron search borrower table

Applying: Bug 29104: Add date expiry column to patron search borrower table
Apply? [(y)es, (n)o, (i)nteractive] 
C4::Installer::run_atomic_updates(): DBI Exception: DBD::mysql::db do failed: Duplicate column name 'ft_local_float_group' at koha/installer/data/mysql/updatedatabase.pl line 24298
DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_28854.perl  [04:23:38]
DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/Bug-9525-Add_ft_local_float_group_column.perl  [04:23:38]
ERROR - C4::Installer::run_atomic_updates(): DBI Exception: DBD::mysql::db do failed: Duplicate column name 'ft_local_float_group' at koha/installer/data/mysql/updatedatabase.pl line 24298