Skip to content

v2.16.15 - Behavior intake field mapping

Latest

Choose a tag to compare

@gitayam gitayam released this 29 Apr 05:53
· 543 commits to main since this release

Fix: Bot intake field mapping

The Signal bot's !bcw command emits flat camelCase fields, but the rt BehaviorAnalysis form expects nested snake_case structure. As a result, opening the analysis in /dashboard/analysis-frameworks/behavior/:id/view showed a nearly-empty form.

Changes

  • Added mapBotL1ToRt() converter in functions/api/frameworks/behavior/intake.ts
  • Flat fields → nested objects: location_context, behavior_settings, temporal_pattern
  • eligibility: [{type, requirement}] → typed buckets (age_requirements, legal_requirements, skill_requirements, resource_requirements, other_requirements)
  • Timeline event keys: decisionTypedecision_type, etc.
  • Audience candidate keys: camelCase → snake_case
  • Free-text frequency mapped to closest enum, original preserved in timing_notes
  • All enums filtered against rt accepted sets
  • Sets is_public=true and tags=['signal-bot'] for shareability

Verify

Trigger !bcw <behavior> in Signal, open the returned URL, confirm form fields populate.