Skip to content

Allow adding organisers during workshop creation - #2802

Open
mroderick wants to merge 1 commit into
masterfrom
feature/allow-adding-organisers-during-workshop-creation
Open

Allow adding organisers during workshop creation#2802
mroderick wants to merge 1 commit into
masterfrom
feature/allow-adding-organisers-during-workshop-creation

Conversation

@mroderick

@mroderick mroderick commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #2398.

When creating a workshop from a chapter admin page, the chapter is now pre-selected, the chapter dropdown is hidden, and the chapter's organisers are shown as pre-selected but editable. The page heading and browser title also reflect the selected chapter.

image

Changes

  • Pass chapter_id from the chapter show page's "New workshop" link.
  • Pre-select the chapter in Admin::WorkshopsController#new when a valid chapter_id is provided.
  • Hide the chapter select and show the organisers input on the new-workshop form when a chapter is pre-selected.
  • Add a hidden chapter_id field so a failed create re-renders with the chapter still selected.
  • Assign the selected organisers on create when the organisers param is present; otherwise keep the existing behaviour of auto-granting all chapter organisers.
  • Update the new-workshop page heading and title to "New Workshop for " when a chapter is pre-selected.
  • Add feature specs for the chapter-prefixed create flow and invalid chapter_id fallback.

How to verify

  1. Start the app locally (bundle exec rails server) and sign in as an admin or chapter organiser.
  2. Go to a chapter's admin page (e.g., /admin/chapters/<chapter-id>).
  3. Click the New workshop button.
  4. Confirm the page heading reads New Workshop for , the browser tab title matches, the Chapter dropdown is hidden, and the Organisers multi-select is visible with the chapter's organisers pre-selected.
  5. Remove one or more organisers, fill in the required fields (date, time, host), and click Save.
  6. On the workshop page, confirm that only the organisers you kept are listed.
  7. Visit /admin/workshops/new directly (without a chapter_id) and confirm the heading is New Workshop, the Chapter dropdown is visible, and there is no Organisers input.
  8. Run the test suite: make test.

Verification

  • bundle exec rspec spec/features/admin/workshops_spec.rb passes.
  • bundle exec rspec spec/controllers/admin/workshops_controller_spec.rb passes.
  • bundle exec rubocop passes for the changed Ruby files.
  • bundle exec haml-lint passes for the changed HAML files.
  • make test passes (1226 examples, 0 failures).

@mroderick
mroderick force-pushed the feature/allow-adding-organisers-during-workshop-creation branch from 98637ca to 9e01b76 Compare August 9, 2026 20:50
@mroderick
mroderick marked this pull request as ready for review August 9, 2026 20:54
@KimberleyCook

Copy link
Copy Markdown
Contributor

@mroderick What happens when someone is an organiser of multiple chapters?

@mroderick

Copy link
Copy Markdown
Collaborator Author

@mroderick What happens when someone is an organiser of multiple chapters?

The adjusted version is only visible, if you use the "New workshop" button on a chapter's admin page (as that's how we know which chapter you want).

If you initiate the creation from the dropdown menu, then you will see the regular UI, where you can choose the chapter (because we don't have the chapter context).

So, it should work seamlessly for folks that organise multiple chapters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow adding organisers during workshop creation

2 participants