Bug 22843 - Finer control of who receives purchase suggestion notifications
Summary: Finer control of who receives purchase suggestion notifications
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 5770 22823
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-03 15:45 UTC by Martin Renvoize
Modified: 2022-11-07 10:36 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-05-03 15:45:50 UTC
Bug 5770 adds the ability to send emails to various addresses when a patron makes a purchase suggestion.

It uses the existing email address fields at either the branch or whole library level (or the option to add a single alternate address).

It might be nice to be able to define a 'Acquisitions librarian' per branch rather than re-using the branchemail address.
Comment 1 Jonathan Druart 2019-05-13 14:02:02 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2019-05-13 14:02:14 UTC
Please discuss the implementation before starting this.
Comment 3 Martin Renvoize 2019-05-14 15:52:24 UTC
My plan was to either add a distinct email_for_acquisitions field to the existing branches table, or perhaps add a 'branch_librarians' table setup a foreign key relationship such that it's extensible for other branch specific addresses.

I was then going to add accessors to Koha::Library which would look for the corresponding field and if empty continuously fallback through branchreplyto, branchemail, defaultreplyto and finally kohaadminemail system preferences until it found a populated one.

I was also temped to allow the field to take either a plaintext email address or a borrowernumber which we could use to lookup a librarian.. but I've not decided whether I like that concept or now yet.. up for debate.

Once I had that it's a model for how other such branch specific addresses could be defined.

Finally, I'd plumb it into the suggestions notification system such that the 'to' address was populated using this new accessor.
Comment 4 Jonathan Druart 2019-05-15 13:33:14 UTC
I would go with a list of patrons we could link to a library.
Like what we have for funds (join table aqbudgetborrowers):
https://snag.gy/sbSNCl.jpg

And then use $patron->notice_email_address