-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nihms pmc deposits using email integration #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The spring mail support is nice.
This looks like it doesn't handle all the messages in https://docs.google.com/document/d/1JAf22f_mOrAG1-JZlEXcbTz7FbywYUmJy-16uxi3OFQ/edit?usp=sharing.
I also had a notion of flagging a deposit for manual review by us. But perhaps that is not needed if we are monitoring rejected submissions.
Also, when we don't recognize a message, there should probably be a warning logged.
I'm pretty sure the regex patterns in
I assumed that Rejected implied it needed to be reviewed. As far as notifications and who gets notified, I also assumed this would be done in a follow up ticket.
Well, I can add this, but it could become one of those noisy things because there are known messages we will receive that we can't do anything with (i.e. those emails without Package ID). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. And we can adjust later if we get relevant feedback from NIHMS.
I am going to log messages in the email that do not match any of the regex. I will log them as ERRORs so we get notified of them via AWS. We can tune this going forward if it becomes to spammy. |
@markpatton this is done. |
3b65699
to
251112a
Compare
When deposit is submitted
And add IT
cb7e9fe
to
13bf448
Compare
This PR adds an email integration to read
Bulk submission
emails from nihms.The PR contains the following:
nihms-package:<nihms_package_name>
when the submission deposit is sent to nihms SFTP server.ACCEPTED
and the deposit.depositStatusRef being set tonihms-id:<manuscript_id from success email>
. A failure email will result in the deposit status being set toREJECTED
and the deposit.statusMessage set to failure message in the email. The Deposit is updated in PASS.I have a couple manual tests I want to perform:
[email protected]
to read email and verify it comes in as expectedI will be doing these tests over the next couple days, but the code should be stable enough to review now.