Skip to content

feat(registration): add order extra question answers to ticket CSV im… - #566

Closed
JpMaxMan wants to merge 1 commit into
mainfrom
feat/ticket-import-extra-question-answers
Closed

feat(registration): add order extra question answers to ticket CSV im…#566
JpMaxMan wants to merge 1 commit into
mainfrom
feat/ticket-import-extra-question-answers

Conversation

@JpMaxMan

@JpMaxMan JpMaxMan commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

feat(registration): add order extra question answers to ticket CSV import

Adds extra_question:{question name} column support to the ticket data import, template endpoint and OpenAPI docs. Answers are upserted through the existing ExtraQuestionAnswerHolder persistence path; unknown questions, order-scoped questions, disallowed questions, empty values and locked answers are logged and skipped without failing the row. List type questions accept value name/label/id ('|' separated for CheckBoxList) and store value ids.

Summary by CodeRabbit

  • New Features

    • Ticket import now supports additional “extra question” columns, including list-style answers and badge feature fields.
    • The import template now includes these columns so CSV files can be filled out more easily.
  • Bug Fixes

    • Extra question answers can now be imported for new and existing attendees.
    • Empty extra question values no longer overwrite previously saved answers.
    • Unknown extra question columns are safely ignored while the rest of the row is still processed.

…port

Adds extra_question:{question name} column support to the ticket data
import, template endpoint and OpenAPI docs. Answers are upserted through
the existing ExtraQuestionAnswerHolder persistence path; unknown
questions, order-scoped questions, disallowed questions, empty values
and locked answers are logged and skipped without failing the row.
List type questions accept value name/label/id ('|' separated for
CheckBoxList) and store value ids.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 246e1a0f-af28-420d-90dc-225ef1f8aa2b

📥 Commits

Reviewing files that changed from the base of the PR and between b3f265b and 68dc174.

📒 Files selected for processing (4)
  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitTicketApiController.php
  • app/Services/Model/ISummitOrderService.php
  • app/Services/Model/Imp/SummitOrderService.php
  • tests/SummitOrderServiceTest.php

📝 Walkthrough

Walkthrough

Adds support for importing and exporting summit order "extra question" answers via CSV ticket data. Introduces an ExtraQuestionColumnPrefix constant, extends template generation and API documentation, adds a private upsert method in SummitOrderService for parsing/validating/persisting extra-question answers, and adds corresponding tests.

Changes

Extra Question CSV Import

Layer / File(s) Summary
Column prefix contract
app/Services/Model/ISummitOrderService.php
Adds ExtraQuestionColumnPrefix = 'extra_question:' constant for CSV column naming convention.
Import template and API documentation
app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitTicketApiController.php
Expands OpenAPI descriptions for template/import endpoints and generates per-question extra_question:{name} columns in the CSV template row.
Extra-question upsert logic
app/Services/Model/Imp/SummitOrderService.php
Adds imports, updated documentation, and upsertAttendeeExtraQuestionAnswers method that resolves extra questions by CSV column name, validates eligibility/type, handles list-type multi-values, enforces answer immutability, carries forward unmodified answers, and persists via hadCompletedExtraQuestions during processTicketData.
Import test coverage
tests/SummitOrderServiceTest.php
Adds fixture helpers and tests validating new-attendee answer creation, existing-attendee updates gated by summit settings, unknown-question skipping, empty-value preservation, checkbox-list value ID storage, and combined badge-feature/extra-question import.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CSV as CSV Row
  participant Service as SummitOrderService
  participant Question as SummitOrderExtraQuestion
  participant Attendee as SummitAttendee

  CSV->>Service: processTicketData(row)
  Service->>Service: determine answers owner (attendee or ticket owner)
  Service->>Service: upsertAttendeeExtraQuestionAnswers(row, owner)
  Service->>Question: resolve question by column name
  Question-->>Service: question type, allowed values
  Service->>Attendee: check canChangeAnswerValue for existing answers
  Attendee-->>Service: former answers
  Service->>Service: merge new and former answers
  Service->>Attendee: hadCompletedExtraQuestions(mergedAnswers)
Loading

Suggested reviewers: romanetar

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ticket-import-extra-question-answers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-566/

This page is automatically updated on each push to this PR.

@JpMaxMan JpMaxMan closed this Jul 2, 2026
@JpMaxMan
JpMaxMan deleted the feat/ticket-import-extra-question-answers branch July 2, 2026 23:14
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.

1 participant