Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#2,945 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rails, ruby
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Ruby
Star
104
Fork
205
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
77

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codebar/planner

Tất cả issue của codebar/planner

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.