Bug 22134 - Add account expiration information to patron details
Summary: Add account expiration information to patron details
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 19818
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-15 14:51 UTC by Owen Leonard
Modified: 2019-02-01 14:48 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22134: Add account expiration information to patron details (7.36 KB, patch)
2019-01-15 15:08 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22134: Add account expiration information to patron details (7.43 KB, patch)
2019-01-15 18:10 UTC, Devinim
Details | Diff | Splinter Review
Bug 22134: (follow-up) Simplify check for expired patron (2.75 KB, patch)
2019-01-17 16:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22134: (follow-up) Simplify check for expired patron (2.82 KB, patch)
2019-01-17 21:03 UTC, Jack
Details | Diff | Splinter Review
Bug 22134: (follow-up) Simplify check for expired patron (6.50 KB, patch)
2019-01-18 13:25 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22134: Add account expiration information to patron details (7.47 KB, patch)
2019-01-18 19:49 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 22134: (follow-up) Simplify check for expired patron (6.55 KB, patch)
2019-01-18 19:49 UTC, Maryse Simard
Details | Diff | Splinter Review
k (1.74 KB, patch)
2019-01-20 11:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22134: Add account expiration information to patron details (7.60 KB, patch)
2019-01-20 11:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22134: (follow-up) Simplify check for expired patron (6.68 KB, patch)
2019-01-20 11:49 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 Owen Leonard 2019-01-15 14:51:59 UTC
On the patron detail page in the staff client, expired patrons should show a message at the top like the checkout page does.
Comment 1 Owen Leonard 2019-01-15 15:08:14 UTC Comment hidden (obsolete)
Comment 2 Devinim 2019-01-15 18:10:33 UTC
Created attachment 83998 [details] [review]
Bug 22134: Add account expiration information to patron details

This patch modifies the patron detail template in the staff client so
that when a patron's registration is expired a message shows at the top
of the page along with the same "Renew" and "Edit" links which appear on
the checkout page. Links are also shown next the the expiration date in
the body of the page.

This patch also corrects the capitalization of the "Edit Details" link
on circulation.tt.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.
 - On the patron's checkout page the "Edit details" link in the
   expiration message should have correct capitalization.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Comment 3 Katrin Fischer 2019-01-16 20:37:06 UTC
Hi Owen,
I think it shoudl be possible to use is_expired and is_going_to_expire from the template without having to pass template variable from the .pl file.
I found some examples with is_child: [% IF patron.is_child %]
Can you take a look please?
Comment 4 Owen Leonard 2019-01-17 00:09:45 UTC
Thanks Cait -- You're right that patron.is_expired works right in the template, but patron.is_going_to_expire doesn't seem to work as it should. It always evaluates as true. I'll see if I can figure out why.
Comment 5 Owen Leonard 2019-01-17 16:31:57 UTC Comment hidden (obsolete)
Comment 6 Jack 2019-01-17 21:03:43 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2019-01-18 13:25:45 UTC
Created attachment 84191 [details] [review]
Bug 22134: (follow-up) Simplify check for expired patron

This patch move the check for "is_expired" to the template and removes
unnecessary code from the script.

The page now correctly handles messages for patrons who are about to
expire, as defined in the NotifyBorrowerDeparture preference.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Select a patron who will expire within the period defined in
NotifyBorrowerDeparture.

 - On the patron detail page you should see a message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.
Comment 8 Maryse Simard 2019-01-18 19:49:06 UTC
Created attachment 84214 [details] [review]
Bug 22134: Add account expiration information to patron details

This patch modifies the patron detail template in the staff client so
that when a patron's registration is expired a message shows at the top
of the page along with the same "Renew" and "Edit" links which appear on
the checkout page. Links are also shown next the the expiration date in
the body of the page.

This patch also corrects the capitalization of the "Edit Details" link
on circulation.tt.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.
 - On the patron's checkout page the "Edit details" link in the
   expiration message should have correct capitalization.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 9 Maryse Simard 2019-01-18 19:49:34 UTC
Created attachment 84215 [details] [review]
Bug 22134: (follow-up) Simplify check for expired patron

This patch move the check for "is_expired" to the template and removes
unnecessary code from the script.

The page now correctly handles messages for patrons who are about to
expire, as defined in the NotifyBorrowerDeparture preference.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Select a patron who will expire within the period defined in
NotifyBorrowerDeparture.

 - On the patron detail page you should see a message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 10 Katrin Fischer 2019-01-20 11:31:10 UTC
Created attachment 84238 [details] [review]
k
Comment 11 Katrin Fischer 2019-01-20 11:49:43 UTC
Created attachment 84240 [details] [review]
Bug 22134: Add account expiration information to patron details

This patch modifies the patron detail template in the staff client so
that when a patron's registration is expired a message shows at the top
of the page along with the same "Renew" and "Edit" links which appear on
the checkout page. Links are also shown next the the expiration date in
the body of the page.

This patch also corrects the capitalization of the "Edit Details" link
on circulation.tt.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.
 - On the patron's checkout page the "Edit details" link in the
   expiration message should have correct capitalization.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2019-01-20 11:49:46 UTC
Created attachment 84241 [details] [review]
Bug 22134: (follow-up) Simplify check for expired patron

This patch move the check for "is_expired" to the template and removes
unnecessary code from the script.

The page now correctly handles messages for patrons who are about to
expire, as defined in the NotifyBorrowerDeparture preference.

To test, apply the patch and locate a patron record which is expired.

 - On the patron detail page (members/moremember.pl) you should see a
   message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Select a patron who will expire within the period defined in
NotifyBorrowerDeparture.

 - On the patron detail page you should see a message at the top of the page.
 - In the body of the page, next to the expiration date information, you
   should see similar message and links.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Nick Clemens 2019-01-28 16:13:55 UTC
Awesome work all!

Pushed to master for 19.05
Comment 14 Martin Renvoize 2019-02-01 14:48:20 UTC
Enhancement, will not be backported.