On the details screen of a patron record, if the patron is due to expire the alert at the top of the screen reads: Expiration: Patron's card will expire soon. Patron's card expires on The date is missing from this alert. This was originally fixed in Bug 25299, but seems to have been reintroduced. I can replicate this at 21.11 and 22.11.
See https://snipboard.io/t5034G.jpg for a screenshot
We do have this issue too in 23.05 and in earlier version 22.05. Test plan 1. Add a new patron with a date expiry less < than 30 days in the future. 2. Go to the "details" tab of this account 3. Check the expiration message: --> notice the date is missing after "expires on": "Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details" 4. Then, compare with the "check out" tab warning --> this one is showing the expiration date correctly "Expiration: Patron's card will expire soon. Patron's card expires on 2023-10-15 Renew or Edit details"
Created attachment 156337 [details] [review] Bug 34462 : Display the patron's expiration date The problem is in the patron_messages.inc file on line 25. The variable "expiry" is used, but it should be "patron.dateexpiry" because the patron's card isn't expired yet. TEST PLAN 1) Go to “Patrons > + New patron” 2) Create a patron with an expiry date that is less than 30 days in the future 3) Go to the "details" tab of this account 4) Notice that the date is missing after "expires on": "Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details" 5) Apply the patch 6) Reload the page; the expiry date should now be displayed
Created attachment 156359 [details] [review] Bug 34462: Display the patron's expiration date The problem is in the patron_messages.inc file on line 25. The variable "expiry" is used, but it should be "patron.dateexpiry" because the patron's card isn't expired yet. TEST PLAN 1) Go to “Patrons > + New patron” 2) Create a patron with an expiry date that is less than 30 days in the future 3) Go to the "details" tab of this account 4) Notice that the date is missing after "expires on": "Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details" 5) Apply the patch 6) Reload the page; the expiry date should now be displayed Signed-off-by: David Nind <david@davidnind.com>
Created attachment 156360 [details] [review] Bug 34462: (follow-up) Shorten card experiation message Signed-off-by: David Nind <david@davidnind.com>
Comment on attachment 156337 [details] [review] Bug 34462 : Display the patron's expiration date Not sure what I did when signing off, obsoleting patch.
Hi Émily-Rose. I amended your patch (I perhaps should have done this as a follow-up): 1. Removed the extra space in the commit message bug title, so that it now reads as "Bug 34462: Display..." instead of "Bug 34462 : Display...". 2. I added a full stop after the date, so the message displays as "... Patron's card expires on 10/18/2023. Renew or Edit details". I also added a follow-up patch to shorten the message to make it more succinct, as there is a bit of duplication. So the expiration message now reads as "Expiration: Patron's card expires on 10/18/2023. Renew or Edit details". Feel free to obsolete this patch if you disagree 8-). David
Created attachment 157239 [details] [review] Bug 34462: Display the patron's expiration date The problem is in the patron_messages.inc file on line 25. The variable "expiry" is used, but it should be "patron.dateexpiry" because the patron's card isn't expired yet. TEST PLAN 1) Go to “Patrons > + New patron” 2) Create a patron with an expiry date that is less than 30 days in the future 3) Go to the "details" tab of this account 4) Notice that the date is missing after "expires on": "Expiration: Patron's card will expire soon. Patron's card expires on Renew or Edit details" 5) Apply the patch 6) Reload the page; the expiry date should now be displayed Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 157240 [details] [review] Bug 34462: (follow-up) Shorten card experiation message Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks for the fix.. all working as expected and I like the follow-up too. Passing QA
Pushed to master for 23.11. Nice work everyone, thanks!
Looks its dates back to Bug 27873
Pushed to 23.05.x for 23.05.05
Nice work everyone! Pushed to oldstable for 22.11.x