Skip to content

feat(commcare): get_case + 3 motech Playwright atoms#392

Merged
jjackson merged 1 commit into
mainfrom
emdash/ocs-vw0t6
May 22, 2026
Merged

feat(commcare): get_case + 3 motech Playwright atoms#392
jjackson merged 1 commit into
mainfrom
emdash/ocs-vw0t6

Conversation

@jjackson
Copy link
Copy Markdown
Owner

Four atoms: get_case (REST), list_connections + create_connection + create_repeater (Playwright form POSTs). All verified against source; list_connections live-verified on connect-ace-prod.

🤖 Generated with Claude Code

  - commcare_get_case: Tastypie GET (API key auth). Used by verifier to
    read commcare-user case state (session_completion, etc.).

  - commcare_list_connections: POST paginate to /motech/conn/ via the
    CRUDPaginatedView's AJAX action. Returns id+name+url+used_by per
    connection. Verified end-to-end on connect-ace-prod (1 connection).

  - commcare_create_connection: POSTs ConnectionSettingsForm to
    /motech/conn/add/. Re-lists by name to recover the new id (the
    302 redirect goes to list view without id in Location).

  - commcare_create_repeater: POSTs to /motech/forwarding/new/
    <repeater_type>/. Supports plain FormRepeater/CaseRepeater and the
    UCR-filtered variants (FormExpressionRepeater /
    CaseExpressionRepeater). The Connect Interviews "OCS User
    Registration" + "Trigger Bot" repeaters use the expression variant.

All four atoms gated by Pro Edition (DATA_FORWARDING). list/create
verified against connect-ace-prod; repeater creation won't actually
exercise until accounts@ provisions Pro on ace-interviews-master.

Verified against:
  - /tmp/ace-refs/hq/corehq/motech/views.py:185-300
  - /tmp/ace-refs/hq/corehq/motech/forms.py:28-118 (ConnectionSettingsForm)
  - /tmp/ace-refs/hq/corehq/motech/repeaters/views/repeaters.py
  - /tmp/ace-refs/hq/corehq/motech/repeaters/forms.py
  - /tmp/ace-refs/hq/corehq/motech/repeaters/expression/forms.py
  - /tmp/ace-refs/hq/corehq/apps/api/resources/v0_3.py:71 (CaseResource auth)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jjackson jjackson enabled auto-merge May 22, 2026 00:55
@jjackson jjackson merged commit 0ce46b4 into main May 22, 2026
2 checks passed
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