Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

InvitationManager silently no-ops on non-invitable events/workshops while controllers flash success

Ouverte
#2,945 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
72/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rails, ruby
Domaine
backend

Piste de recherche

Start at Admin::WorkshopsController#invite and Admin::EventsController#invite, then trace the three InvitationManager methods and their handle_asynchronously calls. Confirm that non-invitable targets produce a warning without enqueueing, while invitable targets retain the current success flow and email behavior.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

Problem

Three InvitationManager methods guard with error strings — send_event_emails, send_workshop_emails, send_virtual_workshop_emails all return 'The X is not invitable' unless x.invitable?. All three run via handle_asynchronously, so the return value is discarded by the DelayedJob worker. The controllers (Admin::WorkshopsController#invite, Admin::EventsController#invite) ignore the return anyway and flash "Invitations will be emailed out soon." unconditionally.

Net effect: when the target isn't invitable, nothing is sent and nobody learns — the flash lies.

Proposed change

  • Check invitable? in the controllers before enqueueing and flash a warning instead of the success message when it's false. (Raising inside the async method can't fix the flash — the raise happens after the redirect.)
  • Remove the now-dead string returns from InvitationManager; the internal batch-abort strings (start_invitation_batch → return result if result.is_a?(String)) may stay as internal control flow — implementer's call.

Acceptance

  • Inviting to a non-invitable event/workshop shows a warning flash and enqueues nothing.
  • Inviting to an invitable one behaves as today.
Langage dominant
Ruby
Étoiles
104
Forks
205
Merge moyen
1 j 4 h
PR mergées (30 j)
77

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de codebar/planner

Toutes les issues de codebar/planner

Issues similaires

Plus d'issues Ruby

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.