Extend ImportConventionDataService to support Eventlite imports#11755
Merged
Conversation
…icing Adds support for importing Eventlite-exported conventions, which include CMS layout records and ticket-providing products with pricing data. - Add import_cms_layouts: creates CmsLayout records and returns a name→layout map - Update import_cms_content to call import_cms_layouts first and pass the map to import_cms_pages - Update import_cms_pages to assign cms_layout from the map when cms_layout_name is present in the export data - Update import_store_items to set pricing_structure (fixed price), payment_options (["stripe"] when price > 0), and provides_ticket_type from the new schema fields Also fixes a latent bug: products.pricing_structure is NOT NULL but the previous import_store_items code never set it, so any import with store_items would fail at the DB level. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After importing CMS layouts and pages, check for default_layout_name and root_page_slug in the convention data and set the associations on the convention record. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This is the Intercode side of importing data exported from Eventlite, a lightweight convention ticketing CMS. The companion intercode-import PR (neinteractiveliterature/intercode-import#2) handles the export side.
There were three gaps in
ImportConventionDataServicethat needed filling:CMS layouts: Eventlite exports CMS layout records (full-page Liquid templates), but the importer had no
import_cms_layoutsmethod and no way to associate a layout with a page. This adds both, so imported pages can be linked to their layouts.Store item pricing: The previous
import_store_itemscode didn't setpricing_structure, but that column isNOT NULL. This means any import attempt with actual store items would have blown up at the DB level. This has now been wired up usingPricingStructure.new(pricing_strategy: "fixed", value: ...). Items without a price get a zero fixed-price structure and emptypayment_options; priced items get["stripe"].Ticket-providing products: Eventlite exports a
provides_ticket_type_namefield on store items. This PR looks up the matchingTicketTypeby name and assigns it toprovides_ticket_typeon the product.Testing
Added test cases covering layout creation, page layout assignment, pricing structure (priced and free), payment options, and
provides_ticket_typelinkage. All 53 tests pass.🤖 Generated with Claude Code