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

KG - Authorized User Email Fixes #1807

Merged
merged 3 commits into from Apr 3, 2019
Merged

KG - Authorized User Email Fixes #1807

merged 3 commits into from Apr 3, 2019

Conversation

kayla-glick
Copy link
Contributor

https://www.pivotaltracker.com/story/show/164082119

The original issue (bug) that I needed to fix was that only the last user email was being sent out. As it turns out, this is because in order to send multiple emails, you need to call the mailer method for each recipient. You can't iterate over them and call mail(to:... multiple times in the same call to the mailer.

I also explored whether it was possible to make the user emails send via delayed job (feature). The original issue was that when a record is not persisted, such as when a user is deleted, delayed job errors out because it can't find that user. To get around this, you can create a class that holds all of the data of a project role, but isn't actually a project role. Thus I made the ModifiedRole class that's initialized with the attributes of each role that was deleted and is stored by delayed job itself so you don't run into the persistence issue.

@Stuart-Johnson Stuart-Johnson merged commit 72f4c5a into v3.5.0 Apr 3, 2019
@Stuart-Johnson Stuart-Johnson deleted the kg-batch_delete branch April 3, 2019 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants