Skip to content

fix: config API bugs, ESP PR #962 custom attributes, scope mismatch fix#162

Merged
sharmeebuilds merged 6 commits into
devfrom
bugfixes/configs
May 26, 2026
Merged

fix: config API bugs, ESP PR #962 custom attributes, scope mismatch fix#162
sharmeebuilds merged 6 commits into
devfrom
bugfixes/configs

Conversation

@sharmeebuilds
Copy link
Copy Markdown
Collaborator

Summary

  • MWPW-196046 (fix 1): Removed ?type= query param from getConfigsForScope — ESP returns 400 on unknown query params; now filters client-side
  • MWPW-196046 (fix 2): Added scopeId to createConfig POST body — ESP requires it in the body, not just the URL
  • MWPW-196046 (fix 3): Replaced incorrect 409-recovery logic in ConfigManagement.tsx with a proper error toast
  • ESP PR #903 cleanup: Removed dead visibleRsvpFields/requiredRsvpFields fields; updated test fixtures to new { fields: [...] } rsvpFormFields shape
  • ESP PR #962: Implemented new customAttributes data model — load path flattens grouped API response; save path transforms to IDs-only write shape; added enabledAttributeIds field
  • MWPW-195821: Fixed scope mismatch bug where editing an event under a different scope wiped enabledAttributeIds

Test plan

  • Config Management: load configs for a scope — no 400 in Network tab
  • Config Management: create a custom attributes config — no 400 "missing scopeId"
  • Event form: open event with custom attributes, verify values load correctly
  • Event form: save event, verify PUT payload has customAttributes as IDs-only and enabledAttributeIds present
  • Scope mismatch: create event under Scope A with custom attributes → switch to Scope B → edit any field → save → verify enabledAttributeIds in PUT payload is NOT { "event": [], "session": [] }

🤖 Generated with Claude Code

sharmeebuilds and others added 6 commits May 23, 2026 10:58
Three structural correctness fixes around rsvpFormFields:
- Add 'rsvpFormFields' to speciallyHandledFields so the generic
  EVENT_DATA_FILTER loop does not double-process the field alongside
  the explicit payload block.
- Guard rsvpFormFields payload assembly with Array.isArray so empty
  arrays and non-array form state values are not serialized as
  { fields: [] } (BE rejects non-object/empty values).
- Surface the actual BE error message on save failures by reading
  result.error.message instead of result.message, which was always
  undefined and caused all save errors to fall back to the generic
  'Failed to update/create event' string.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sharmeebuilds sharmeebuilds requested a review from qiyundai May 26, 2026 14:55
@sharmeebuilds sharmeebuilds merged commit 27ab1db into dev May 26, 2026
3 checks passed
@qiyundai qiyundai mentioned this pull request May 29, 2026
5 tasks
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.

2 participants