Fix SMTP settings update#6664
Fix SMTP settings update#6664tramuntanal merged 22 commits intodecidim:developfrom Dynnammo:backport/smtp_settings_fix_fields
Conversation
…mo/decidim into backport/smtp_settings_fix_fields
tramuntanal
left a comment
There was a problem hiding this comment.
Thanks for the fix @Dynnammo 👍
I've found some confusing points in the PR, can you check please?
Also, it will be good to have some tests for the update_organization_form and the application_mailer.
|
I made the corrections I could. The CI seems to fail randomly ( |
Add few tests for smtp settings
|
Hi @Dynnammo , Regarding flaky tests, you're right we have again some flakies. You can try to solve or re-run failing workflows (we'll do if you don't have permissions). |
|
Hi @tramuntanal , thanks a lot ! The dummy mailer is in decidim-dev, as it seemed more logical to me. I've tested what I've corrected : values of |
* Backport smtp settings correction * Remove byebug * Correct Label in locales * Correct Label in locales * Remove unused key in en.yml * Normalize locales * Backport migration * Lint migration * Shift "from" to "from_email" in application_mailer.rb * Reverse to previous help text in _smtp_settings.html.erb * Swap values form mail.reply_to definition * Correct hash definitions in update_organization_form.rb and related tests * Update tests file to comply with from field * light refactor register_organization_spec * add tests for 'set_from' method in organization form * WIP for application_mailer_spec.rb * Finish application_mailer tests * Move dummy mailer class in decidim-dev Co-authored-by: quentinchampenois <26109239+Quentinchampenois@users.noreply.github.com>
|
Congrats @Dynnammo 👏 |
There's a fix in decidim/decidim#6908 for the regression introduced in decidim/decidim#6664, but its revert done in decidim/decidim#6905 is not merged either. We can't wait any longer so I'm doing the revert myself.
There's a fix in decidim/decidim#6908 for the regression introduced in decidim/decidim#6664, but its revert done in decidim/decidim#6905 is not merged either. We can't wait any longer so I'm doing the revert myself.
🎩 What? Why?
When changing fields in
System > Organization > <your-organization> > SMTP Settings(from_emailandfrom_label), it does not update.What's the matter ?
There is three fields concerned by such issue :
from_email,from_labelandfromfrom_emailstores the bare bone email of the system ie.noreply@example.orgfrom_labelstores the name under which we should send mails. As instance : 'My organization'The
fromattribute is there to make a concatenation of both. It is defined inset_frominupdate_organization_form.rbWhat does this pull request is :
smtp_settingsfrom a string-based-key hash to a symbol-based-key hash📌 Related Issues
Link your PR to an issue
Testing
System > Organizations, edit your organization and change fieldfrom emailandfrom labelletter_opener:http://localhost:3000/letter_openerletter_openertab that the email hasn't changed📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing
