Add Accurate Renewal Remaining to Autorenewal Notify

Bug #1843079 reported by Jason Stephenson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

At CW MARS, we have add the renewals remaining to our email templates for courtesy and other email notices.

We have also added it for the Autornew Notify event. This was done by modifying the back end code so that the correct number could be determined based on whether or not the renewal was successful. The data is returned in a renewal_remaining field of the user data object passed to the event constructor. It shows up in the template as udata.renewal_remaining.

As this seems to be something that other sites might like, I've opened this bug as a wishlist item.

I will add a branch in a few days after we've had time to really verify that it's working as expected.

Changed in evergreen:
milestone: none → 3.next
Revision history for this message
Jason Stephenson (jstephenson) wrote :
tags: added: actiontrigger circulation pullrequest
Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
Changed in evergreen:
status: New → Confirmed
Changed in evergreen:
milestone: 3.next → 3.5-alpha
Changed in evergreen:
milestone: 3.5-beta → 3.5.0
Changed in evergreen:
milestone: 3.5.0 → 3.5.1
Revision history for this message
Jason Stephenson (jstephenson) wrote :

CW MARS has been using this code in production since September of 2019.

Changed in evergreen:
milestone: 3.5.1 → 3.6-beta
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I rebased the code on master to resolve a conflict with the fix for bug 1842431 and forced pushed it to the same working branch.

Revision history for this message
Jason Boyer (jboyer) wrote :

I like this idea but have concerns when auto_renewal_remaining and renewal_remaining differ. In that case the lower number is the actual limit, and I imagine that the automatic number will frequently be the lower in that case, potentially leading to upset patrons should they get fines because they assumed they had more autorenewals remaining.

I've got a branch at https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jboyer/lp1843079_renewal_remaining_proposed / working/user/jboyer/lp1843079_renewal_remaining_proposed that adds this distinction and uses renewal_remaining as the autorenewal limit, with a total_renewal_remaining in case admins want to share that with patrons.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Jason, I like your suggestion, but I think the renewal_remaining field should be called auto_renewal_remaining in the udata object. I've also added some code to guard again negative values in renewal_remaining as this can happen if staff renew with an override.

I've pushed to a new, collab branch after rebasing on master and applying your patch. My changes appear in the top commit.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/lp1843079-autorenew-renewal_remaining / collab/dyrcona/lp1843079-autorenew-renewal_remaining

Revision history for this message
Jason Boyer (jboyer) wrote :

Works as advertised and guarding against a negative renewal count is a good addition. Pushed to master for inclusion in 3.6. Thanks Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.