Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Image Promotion for WorkshopIdea → Workshop and StoryIdea → Story

Progress:

  • Explore codebase to understand current implementation
  • Fix WorkshopFromIdeaService to properly duplicate PrimaryAsset and GalleryAssets with correct types
  • Add "Promote to Workshop" button to WorkshopIdea edit page (similar to StoryIdea)
  • Create StoryFromIdeaService to handle asset duplication for Story promotion
  • Update StoriesController to use the new service
  • Add tests for asset promotion in both services
  • Manual testing to verify images are promoted correctly (requires docker/bundler setup)

Changes Made:

  1. WorkshopFromIdeaService: Fixed duplicate_assets method to preserve asset types (PrimaryAsset vs GalleryAsset) instead of creating generic Assets
  2. StoryFromIdeaService: Created new service to handle Story promotion from StoryIdea with proper asset duplication
  3. StoriesController: Updated new action to use StoryFromIdeaService when story_idea_id param is present
  4. WorkshopIdea edit view: Added "Promote to Workshop" button (matches pattern from StoryIdea)
  5. Tests: Added comprehensive test coverage for both services with asset duplication scenarios
  6. Test fixture: Created minimal JPEG test image for test suite
Original prompt

This section details on the original issue you should resolve

<issue_title>Make sure images get promoted for WorkshopIdea -> Workshop and StoryIdea -> Story</issue_title>
<issue_description>Make sure images get promoted for WorkshopIdea -> Workshop and StoryIdea -> Story

--
OLD NOTES:
WorkshopIdeas are submitted by Users, and may or may not become Workshops
We want admins to be able to "promote" a WorkshopIdea to a Workshop, via url params

Follow the pattern established by StoryIdea form -> Story form, so the same feature is available for WorkshopIdeas
(the pattern is essentially adding url params to the "Promote" button, which is a new_workshop_path button and the Workshop form needs to default to params sent or f.object values)

Image</issue_description>

<agent_instructions>research the Promote option from WorkshopIdea->Workshop and StoryIdea->Story, and make sure that any attachments (primary_asset, gallery_assets) submitted with the "idea" get attached to the new record when in the "new" form for the new item (Workshop or Story).</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
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.

Make sure images get promoted for WorkshopIdea -> Workshop and StoryIdea -> Story

2 participants