Sometimes libraries use patron extended attributes that are dates. It would be handy if we could specify that a particular attribute is a date and then have it become a flatpickr instance.
*** Bug 6339 has been marked as a duplicate of this bug. ***
Created attachment 148400 [details] [review] Bug 32610: Add borrower_attribute_types.is_date to the database * Change to kohastructure.sql for new installations * Atomic database update to add the column for updating installations
Created attachment 148401 [details] [review] Bug 32610: [DO NOT PUSH] DBIC Update
Created attachment 148402 [details] [review] Bug 32610: Add date option to extended patron attributes administration page With this page it will be possible to configure patron attributes to be a date. To test: * Go to administration > patron attribute types * Add a new patron attribute of type date * Dates cannot be repeatable or linked to an AV category, so: * Verify, if you check repeatable, date is disabled * Verify, if you select an AV category, date disabled * Verify, if you check date, AV category and repeatable are disabled * Save the new patron attribute * Edit the patron attribute * Verify all settings have been kept/stored correctly
Created attachment 148403 [details] [review] Bug 32610: Add date extended patron attributes to patron module This makes the necessary changes in the patron module of the staff interface, so the new patron attribute appers and behaves correctly when editing a patron record. To test: * You will need to test different configuration options for extended patron attributes (PA) in combination with the date option: * PA is a date and not mandatory * Patron form should have the calendar widget to let you set the date. * PA is a date and mandatory * Patron form shoudl have calendar widget and check that the date is set for allowing you to save the record. * PA is a date and unique * For this set the date in one patron record and try to set the same date in another. You should not be able to save. * PA displays in brief patron information * Make sure the date displays on the left formatted correctly * When the date PAs are saved, they should display nicely formatted on the details tab.
Created attachment 148404 [details] [review] Bug 32610: Add date extended patron attributes to the OPAC This makes sure that the attributes are handled correctly when displayed and edited in the OPAC during address changes or self registration. To test: * You will need to test different configuration options for extended patron attributes (PA) in combination with the date option: * PA displays in OPAC, but is not editable * The date will show nicely formatted on the personal details tab. * PA displays and is editable in the OPAC * The date can be edited using the calendar widget * PA displays, is editabe and mandatory * The date is marked as required and you can't save without it being set. * Test the form behaves correctly when requesting changes for an existing patron account and when self registering.
Created attachment 148405 [details] [review] Bug 32610: Add date extended patron attribute handling to overdues report This makes sure that the overdues report manages filters for extended patron attributes of the type date correctly. To test: * Make sure you have at least one PA marked as 'searchable' * Make sure your patron has at east one checked out item * Go to circulation > overdues * If you have no overdue items, check "Show any items currently checked out:" * Verify the list of checkouts displays * Verify the PA filter option displays with the calendar widget * Limit to the date in your patron's record - list remains * Limit to any other date - list empties
Created attachment 148825 [details] [review] Bug 32610: Add borrower_attribute_types.is_date to the database * Change to kohastructure.sql for new installations * Atomic database update to add the column for updating installations Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Created attachment 148826 [details] [review] Bug 32610: [DO NOT PUSH] DBIC Update Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Created attachment 148827 [details] [review] Bug 32610: Add date option to extended patron attributes administration page With this page it will be possible to configure patron attributes to be a date. To test: * Go to administration > patron attribute types * Add a new patron attribute of type date * Dates cannot be repeatable or linked to an AV category, so: * Verify, if you check repeatable, date is disabled * Verify, if you select an AV category, date disabled * Verify, if you check date, AV category and repeatable are disabled * Save the new patron attribute * Edit the patron attribute * Verify all settings have been kept/stored correctly Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Created attachment 148828 [details] [review] Bug 32610: Add date extended patron attributes to patron module This makes the necessary changes in the patron module of the staff interface, so the new patron attribute appers and behaves correctly when editing a patron record. To test: * You will need to test different configuration options for extended patron attributes (PA) in combination with the date option: * PA is a date and not mandatory * Patron form should have the calendar widget to let you set the date. * PA is a date and mandatory * Patron form shoudl have calendar widget and check that the date is set for allowing you to save the record. * PA is a date and unique * For this set the date in one patron record and try to set the same date in another. You should not be able to save. * PA displays in brief patron information * Make sure the date displays on the left formatted correctly * When the date PAs are saved, they should display nicely formatted on the details tab. Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Created attachment 148829 [details] [review] Bug 32610: Add date extended patron attributes to the OPAC This makes sure that the attributes are handled correctly when displayed and edited in the OPAC during address changes or self registration. To test: * You will need to test different configuration options for extended patron attributes (PA) in combination with the date option: * PA displays in OPAC, but is not editable * The date will show nicely formatted on the personal details tab. * PA displays and is editable in the OPAC * The date can be edited using the calendar widget * PA displays, is editabe and mandatory * The date is marked as required and you can't save without it being set. * Test the form behaves correctly when requesting changes for an existing patron account and when self registering. Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Created attachment 148830 [details] [review] Bug 32610: Add date extended patron attribute handling to overdues report This makes sure that the overdues report manages filters for extended patron attributes of the type date correctly. To test: * Make sure you have at least one PA marked as 'searchable' * Make sure your patron has at east one checked out item * Go to circulation > overdues * If you have no overdue items, check "Show any items currently checked out:" * Verify the list of checkouts displays * Verify the PA filter option displays with the calendar widget * Limit to the date in your patron's record - list remains * Limit to any other date - list empties Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Why are you adding data-date_to="to" in memberentrygen? Not blocker but it would have been more flexible (for future enhancements) to have a datatype='date' column instead of is_date.
I guess you should adjust the comment here circ/overdue.pl:my @patron_attr_filter_loop; # array of [ domid cgivalue ismany isclone ordinal code description repeatable is_date authorised_value_category ] koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt: <!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->