Skip to content

Extend ImportConventionDataService to support Eventlite imports#11755

Merged
nbudin merged 2 commits into
mainfrom
eventlite-import-support
Jun 22, 2026
Merged

Extend ImportConventionDataService to support Eventlite imports#11755
nbudin merged 2 commits into
mainfrom
eventlite-import-support

Conversation

@nbudin

@nbudin nbudin commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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 ImportConventionDataService that needed filling:

CMS layouts: Eventlite exports CMS layout records (full-page Liquid templates), but the importer had no import_cms_layouts method 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_items code didn't set pricing_structure, but that column is NOT NULL. This means any import attempt with actual store items would have blown up at the DB level. This has now been wired up using PricingStructure.new(pricing_strategy: "fixed", value: ...). Items without a price get a zero fixed-price structure and empty payment_options; priced items get ["stripe"].

Ticket-providing products: Eventlite exports a provides_ticket_type_name field on store items. This PR looks up the matching TicketType by name and assigns it to provides_ticket_type on the product.

Testing

Added test cases covering layout creation, page layout assignment, pricing structure (priced and free), payment options, and provides_ticket_type linkage. All 53 tests pass.

🤖 Generated with Claude Code

nbudin and others added 2 commits June 22, 2026 10:13
…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>
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
app/services/import_convention_data_service.rb 🟢 91.28% 🟢 94.07% 🟢 2.79%
Overall Coverage 🟢 54.21% 🟢 54.32% 🟢 0.11%

Minimum allowed coverage is 0%, this run produced 54.32%

@nbudin nbudin added enhancement patch Bumps the patch version number on release labels Jun 22, 2026
@nbudin nbudin marked this pull request as ready for review June 22, 2026 20:30
@nbudin nbudin merged commit ec47f85 into main Jun 22, 2026
25 checks passed
@nbudin nbudin deleted the eventlite-import-support branch June 22, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement patch Bumps the patch version number on release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant