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

Learning emails 4534 #5196

Merged
merged 17 commits into from
Sep 29, 2023
Merged

Conversation

rae-stanton
Copy link
Collaborator

What GitHub issue is this PR for, if any?

Resolves #4534

What changed, and why?

Added new learning hour report functionality for supervisors and admins to receive on a monthly basis. This is available for selection for admin edit and supervisor edit pages.

How will this affect user permissions?

  • Volunteer permissions: N/A
  • Supervisor permissions: Adds toggle for monthly learning hour report email for their org
  • Admin permissions: Adds toggle for monthly learning hour report email for their org - can also add to their respective supervisors on their edit pages.

How is this tested? (please write tests!) 💖💪

Mailer spec test added for core mailer, happy to add extra test coverage, but I wasn't sure if tests on the small model changes for admins/supervisors were needed to reflect toggling receiving learning hours reports monthly. I don't have access to Heroku for seeing if the cron jobs are working as expected, so that may need to be tested out by someone with Heroku access.

Screenshots please :)

Screenshot 2023-09-05 at 9 25 45 AM Screenshot 2023-09-05 at 9 30 08 AM

@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 erb labels Sep 5, 2023
@rae-stanton
Copy link
Collaborator Author

CodeClimate seems to be complaining about duplicated code in some mailers - I guess that's unavoidable here.

Copy link
Collaborator

@littleforest littleforest left a comment

Choose a reason for hiding this comment

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

Thanks so much for working on this! Looking good.

db/schema.rb Outdated Show resolved Hide resolved
lib/tasks/monthly_learning_hours_report.rake Outdated Show resolved Hide resolved
lib/tasks/monthly_learning_hours_report.rake Outdated Show resolved Hide resolved
app/mailers/learning_hours_mailer.rb Show resolved Hide resolved
app/mailers/learning_hours_mailer.rb Outdated Show resolved Hide resolved
Removed some extra cruft from the mailer view, updated mailer, and updated rake task
@rae-stanton
Copy link
Collaborator Author

@littleforest I updated the commits here - thanks for reviewing it. Let me know if anything else needs adjusting.

Copy link
Collaborator

@littleforest littleforest left a comment

Choose a reason for hiding this comment

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

🎉

@littleforest
Copy link
Collaborator

@rae-stanton can you merge in main and push back out? Let's see if those flaky tests will pass.

@rae-stanton
Copy link
Collaborator Author

rae-stanton commented Sep 21, 2023

@rae-stanton can you merge in main and push back out? Let's see if those flaky tests will pass.

Yeah! Just making sure - you want me to go ahead and run the suite (at least, the things I touched in the mailer) while in main and make sure they're passing? Then pull back out and see what changes need to be made? Thanks! @littleforest I forgot to tag you in this.

@littleforest
Copy link
Collaborator

@rae-stanton no, I meant can you merge the main branch into your branch (or upstream main since it looks like you are working on a fork), and push it back out to GitHub?

@rae-stanton
Copy link
Collaborator Author

@littleforest I gotcha! I went ahead and upstreamed main into my fork. Would you like me to make any other test adjustments or anything else? Thanks for reviewing this, by the way! 😊

@littleforest littleforest merged commit 4abe126 into rubyforgood:main Sep 29, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erb ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email selected users an end of month email with attached Learning Hours report for their organization
3 participants