Skip to content
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

Improved Email Publication #1413

Merged
merged 36 commits into from
Aug 5, 2019
Merged

Improved Email Publication #1413

merged 36 commits into from
Aug 5, 2019

Conversation

ramonski
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR improves the email publication view with the primary focus to avoid multiple email submissions when DB conflicts occur during sample publication.

Current behavior before PR

  • Publication of reports happened only after successful email submission
  • Email sending code inside view
  • No email send log/snapshot available of the recipients and date of sending

Desired behavior after PR is merged

  • Publication of reports happens before email submission
  • Email sending uses Email API of Email API #1410
  • Send log available in listing view + snapshots are created for each successful email notification

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@ramonski ramonski requested a review from xispa July 25, 2019 20:55
ramonski added 12 commits July 27, 2019 21:21
This fixes this traceback when coming from senaite.impress:

Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module bika.lims.browser.publish.emailview, line 71, in call
Module plone.protect.authenticator, line 82, in check
Forbidden: Form authenticator is invalid.
This fixes lookup issues with LDAP users
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

elif isinstance(filedata, (file, StringIO)):
data = filedata.read()
# Handle file paths
if is_file(filedata):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do elif here

@xispa
Copy link
Member

xispa commented Jul 30, 2019

Give me 2d or so to definitely merge this into master. I'd like to ensure compatibility with other add-ons first.

@xispa xispa merged commit 26548af into master Aug 5, 2019
@xispa xispa deleted the emailview2 branch August 5, 2019 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants