Skip to content

Implement a new feature (Issue #54) to duplicate events within a conference#60

Merged
Ethan-Stone1 merged 16 commits intomainfrom
Duplicate_Event
Mar 18, 2026
Merged

Implement a new feature (Issue #54) to duplicate events within a conference#60
Ethan-Stone1 merged 16 commits intomainfrom
Duplicate_Event

Conversation

@Ethan-Stone1
Copy link
Copy Markdown

What this PR does:

This pull request implements Issue #54 to allow for the duplication of events.

Include screenshots, videos, etc.

Screenshot 2026-03-06 at 1 27 18 AM

On the event page there is now a "Duplicate" button

Screenshot 2026-03-06 at 1 27 38 AM

Pressing the button opens a popup where you can select how many different duplicates of the event you would like

Screenshot 2026-03-06 at 1 27 53 AM

The duplicated events have all the same data as the original (minus the ID and the creator is the person who clicked duplicate)

Who authored this PR?

Ethan Stone

How should this PR be tested?

There are a ton of tests (in fact most of the lines of code I added are tests. To run them type

bundle exec rspec spec/features/event_duplication_spec.rb spec/controllers/admin/events_controller_spec.rb

in the terminal.

Are there any complications to deploying this?

No data migrations or anything complicated about deploying.

Checklist:

@Ethan-Stone1 Ethan-Stone1 requested a review from sikesbc March 6, 2026 09:33
@Ethan-Stone1 Ethan-Stone1 added the enhancement New feature or request label Mar 6, 2026
Comment thread app/services/event_duplicator.rb Outdated
end
redirect_to admin_conference_program_events_path(@conference.short_title)
rescue StandardError => e
flash[:alert] = "Could not duplicate event: #{e.message}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Passes e.message to the user here, could leak DB errors or internal stuff. Generic message would be safer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed

@@ -1,5 +1,11 @@
# frozen_string_literal: true

begin
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this related to the duplicate feature or something unrelated?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

unrelated, but was making the tests not run properly iirc

@Ethan-Stone1 Ethan-Stone1 merged commit edf6853 into main Mar 18, 2026
13 of 17 checks passed
@Ethan-Stone1 Ethan-Stone1 deleted the Duplicate_Event branch March 18, 2026 17:04
li-xinwei pushed a commit that referenced this pull request Mar 29, 2026
Implement a new feature (Issue #54) to duplicate events within a conference
@Ethan-Stone1 Ethan-Stone1 restored the Duplicate_Event branch April 11, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants