OpenILS::Utils::BadContact->mark_users_contact_invalid ignores additional note argument

Bug #1752334 reported by Josh Stompro
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.9
Fix Released
Medium
Unassigned

Bug Description

EG 3.0

OpenILS::Utils::BadContact->mark_users_contact_invalid accepts an argument for an additional note but it isn't actually used anywhere. I think the additional note should just be added on to the end of the default note, which is set to the value of the contact info that is being marked invalid.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=blob;f=Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm;hb=HEAD

I'm working on a script that scans an imap folder and automatically deals with certain bounces by invalidating contact info, and I would like to be able to add the bounce reason to the penalty note.

Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :
tags: added: pullrequest
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.next
Revision history for this message
Jane Sandberg (sandbergja) wrote :

I just eyeballed this, and it looks good from my initial observation. It also looks like it would be a really good candidate for a live test, perhaps using this live test as an example: https://github.com/evergreen-library-system/Evergreen/blob/master/Open-ILS/src/perlmods/live_t/zz-lp1779467-mark-item-discard.t

The live test could perhaps call open-ils.actor.invalidate.email with the note field, and then retrieve the ausp object and verify that the note is appended correctly.

Thoughts?

Changed in evergreen:
assignee: nobody → Josh Stompro (u-launchpad-stompro-org)
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Here is a new working branch that applies cleanly to master.

user/stompro/lp1752334-badcontact-add-note-v2

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1752334-badcontact-add-note-v2

I've included a live test that tests out the various options associated with open-ils.actor.invalidate.*, including the new behavior of being able to add an additional note.

Josh

Changed in evergreen:
assignee: Josh Stompro (u-launchpad-stompro-org) → nobody
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Nice test! Thanks, Josh. This works for me. Signoff at user/sandbergja/lp1752334-badcontact-add-note-v2-signoff

tags: added: signedoff
Changed in evergreen:
importance: Undecided → Wishlist
status: New → Confirmed
milestone: 3.next → 3.11-beta
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Since the methods in question already documented the additional notes parameter, I decided to classify this as a bugfix rather than an wishlist.

Consequently, I've pushed this down to rel_3_9, along with a follow-up to clean up how it checks whether a note has been supplied or note. Thanks, Josh and Jane!

Changed in evergreen:
importance: Wishlist → Medium
milestone: 3.11-beta → 3.10.2
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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