psu-libraries / researcher-metadata

Penn State University's faculty and research metadata repository
https://metadata.libraries.psu.edu/
MIT License
7 stars 0 forks source link

Do not send OA Notification emails out for publications with Activity Insight OA Files #1027

Open ajkiessl opened 16 hours ago

ajkiessl commented 16 hours ago

In the User#needs_open_access_notification filter, let's remove the activity_insight_postprint_status where clause:

.where('publications.activity_insight_postprint_status IS NULL OR publications.activity_insight_postprint_status != ?', 'In Progress')

And instead, filter out any publication that has an associated Activity Insight OA File.

@anaelizabethenriquez If a user does receive an OA notification email (for a different publication that does not have an Activity Insight OA File) should publications with Activity Insight OA Files be filtered out of the email? We don't currently filter out publications with a post print status of "In Progress" from these emails.

anaelizabethenriquez commented 15 hours ago

@ajkiessl Yes! The publications with Activity Insight OA Files should be filtered out of the email text (in addition to not triggering an email). This probably explains most/all of what I noticed in #1005.