Skip to content

Fix conference invitations#9664

Merged
andreslucena merged 12 commits intodecidim:developfrom
mainio:fix/9371-9378
Oct 26, 2022
Merged

Fix conference invitations#9664
andreslucena merged 12 commits intodecidim:developfrom
mainio:fix/9371-9378

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Aug 7, 2022

🎩 What? Why?

The conference invitations are broken for non-participants and partially broken for participants as explained at #9371 and #9378.

This fixes both of those issues.

📌 Related Issues

Testing

Existing participants

  • Go to the admin panel to invite participants
  • Select existing participant
  • Search the default user user@example.org and send an invitation to them
  • Go to letter opener and copy the link to accept the invitation (don't click it, copy it)
  • In a new private/incognito window, paste the link into the address bar
  • Previously there was an error but now the user is asked to sign in

New participants

  • Send the invitation to the new participant (make sure the email doesn't exist in the database)
  • Check the letter opener
  • The invitation should now be there, previously the invitation never came through because of the bug

@andreslucena
Copy link
Copy Markdown
Member

About the two issues:

a) New/Non existing participants (#9371). I can confirm that this is solved.
b) Existing participants (#9378). I cannot reproduce this one by the steps provided, but I still can reproduce this by accepting two times the invitation.

  1. Go to the admin panel to invite participants
  2. Select existing participant
  3. Search the default user user@example.org and send an invitation to them
  4. Go to letter opener and copy the link to accept the invitation (don't click it, copy it)
  5. In a new private/incognito window, paste the link into the address bar
  6. Sign in with the participant account
  7. See the flash alert for the invitation accepted
  8. Paste the link (again) into the address bar
  9. See exception:
ActiveRecord::RecordInvalid (Validation failed: User has already been taken):
  
activerecord (6.1.6) lib/active_record/validations.rb:80:in `raise_validation_error'
activerecord (6.1.6) lib/active_record/validations.rb:53:in `save!'
activerecord (6.1.6) lib/active_record/transactions.rb:302:in `block in save!'
activerecord (6.1.6) lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
activerecord (6.1.6) lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
activerecord (6.1.6) lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
activerecord (6.1.6) lib/active_record/transactions.rb:302:in `save!'
activerecord (6.1.6) lib/active_record/suppressor.rb:48:in `save!'
activerecord (6.1.6) lib/active_record/persistence.rb:55:in `create!'
/home/apereira/Work/decidim/decidim/decidim-conferences/app/commands/decidim/conferences/join_conference.rb:45:in `create_registration'
/home/apereira/Work/decidim/decidim/decidim-conferences/app/commands/decidim/conferences/join_conference.rb:26:in `block in call'

We should check out if the invitation was accepted before acceptance. Can you check that out @ahukkanen 🙏🏽 ? Thanks

@andreslucena
Copy link
Copy Markdown
Member

Uops, wrong button, sorry 😅

@andreslucena andreslucena reopened this Oct 7, 2022
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Please see my last comment, I think we'd need to fix that (and also add an spec for that)

In case the user already joined the conference, broadcast ok.
@ahukkanen
Copy link
Copy Markdown
Contributor Author

@andreslucena Fixed the remaining issue.

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Just a detail regarding a i18n string and we're good to go!

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

👍🏽

entantoencuanto added a commit that referenced this pull request Oct 26, 2022
* develop: (35 commits)
  Install turbo-rails (#9881)
  Fix conference invitations (#9664)
  Fix invalid rendering of meeting and proposal body texts (#9764)
  Make documentation site work with multiple versions (#9917)
  Bump versions on install docs (#9916)
  Standardize CSV import formats and fix private users CSV import with invalid file (#9627)
  Fix: The i18n locales selector is showing a dropdown with 3 languages (#9902)
  Make Scopes field in debates translatable (#9903)
  Make ToS agreement translatable (#9909)
  Fix issues with a11y specs (#9929)
  Remove invitations badge (#9906)
  Make initiatives order translatable (#9905)
  Add missing active actions on admin navigation menu (#9904)
  Fix user sign up with invalid name (#9896)
  Remove duplication of LastActivity queries (#9895)
  Rename IgnoredMethods to AllowedMethods in Rubocop configuration (#9893)
  Exclude malformed file from codeclimate configuration (#9910)
  Fix correct resource linking for amendments (#9887)
  Fix superposition in admin's error forms (#9871)
  Add missing i18n key in Initiatives (#9892)
  ...
entantoencuanto added a commit that referenced this pull request Oct 31, 2022
* develop: (36 commits)
  Fix proposal etiquette and length validator with base64 images (#9639)
  Install turbo-rails (#9881)
  Fix conference invitations (#9664)
  Fix invalid rendering of meeting and proposal body texts (#9764)
  Make documentation site work with multiple versions (#9917)
  Bump versions on install docs (#9916)
  Standardize CSV import formats and fix private users CSV import with invalid file (#9627)
  Fix: The i18n locales selector is showing a dropdown with 3 languages (#9902)
  Make Scopes field in debates translatable (#9903)
  Make ToS agreement translatable (#9909)
  Fix issues with a11y specs (#9929)
  Remove invitations badge (#9906)
  Make initiatives order translatable (#9905)
  Add missing active actions on admin navigation menu (#9904)
  Fix user sign up with invalid name (#9896)
  Remove duplication of LastActivity queries (#9895)
  Rename IgnoredMethods to AllowedMethods in Rubocop configuration (#9893)
  Exclude malformed file from codeclimate configuration (#9910)
  Fix correct resource linking for amendments (#9887)
  Fix superposition in admin's error forms (#9871)
  ...
@ahukkanen ahukkanen deleted the fix/9371-9378 branch November 18, 2022 07:15
Quentinchampenois pushed a commit to Quentinchampenois/decidim that referenced this pull request Nov 23, 2022
* Fix conference invitations

* Clarify the unauthorized errors when accepting/rejecting conference invitation

* Fix redirecting back to the same URL (accept/reject) after sign in

* Clarify the conference invitation text when inviting a new user

* Fix decline conference invitation link

* Add spaces to the links

* Fix re-joining already joined conference

In case the user already joined the conference, broadcast ok.

* Change the i18n key for invite existing users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: conferences type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conferences - Invite Existing Participant - Confirmation Email Conferences - Invite Non Existing Participant

3 participants