Bugzilla – Attachment 189162 Details for
Bug 32581
Update dateexpiry on categorycode change
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32581: Automatically update patron expiration date when changing their category
e82a983.patch (text/plain), 3.79 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-11-06 12:09:14 UTC
(
hide
)
Description:
Bug 32581: Automatically update patron expiration date when changing their category
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-11-06 12:09:14 UTC
Size:
3.79 KB
patch
obsolete
>From e82a9839bb92fdfbc172b765a79275122498f135 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Wed, 3 Jul 2024 20:09:37 +0000 >Subject: [PATCH] Bug 32581: Automatically update patron expiration date when > changing their category >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1) In Administration-> Patron categories, set the enrollment period for the 'School' category to 12 months. >2) Find a patron that is from another category, edit their info and change their category from patron to school. >3) Note that the expiry date automatically changes to 12 months from today. >4) Save your changes and ensure on the patron's detail page that their expiration date was successfully changed. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Jan Kissig <jkissig@th-wildau.de> >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/members/memberentrygen.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/js/members.js | 11 +++++++++++ > 2 files changed, 13 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 6a296dd8ff8..b5e0beee4e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -942,6 +942,7 @@ > data-pwd-length="[% category.effective_min_password_length | html %]" > data-pwd-strong="[% category.effective_require_strong_password | html %]" > data-typename="[% category_type | html %]" >+ data-expiry-date="[% category.get_expiry_date | html %]" > >[% category.description | html %]</option > > > [% ELSE %] >@@ -950,6 +951,7 @@ > data-pwd-length="[% category.effective_min_password_length | html %]" > data-pwd-strong="[% category.effective_require_strong_password | html %]" > data-typename="[% category_type | html %]" >+ data-expiry-date="[% category.get_expiry_date | html %]" > >[% category.description | html %]</option > > > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index a20561cfe0b..55cffbc5044 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -88,6 +88,17 @@ function update_category_code(category_code) { > ); > var hint_string = __("Minimum password length: %s").format(min_length); > hint.html(hint_string); >+ >+ // Change patron's expiration date >+ $('#categorycode_entry').change(function() { >+ var fp = $("#to").flatpickr(); >+ var expiryDate = $('select'+category_selector+' option:selected').data('expiryDate'); >+ // Check if expiryDate is available and format it to YYYY-MM-DD >+ if (expiryDate) { >+ var formattedDate = expiryDate.split('T')[0]; >+ fp.setDate(formattedDate); >+ } >+ }); > } > > function select_user(borrowernumber, borrower, relationship) { >-- >2.51.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32581
:
168476
|
168763
|
168838
|
168895
|
168896
|
182519
|
182520
|
189120
|
189121
| 189162 |
189163
|
189164