Skip to content

feat(group): add thing-to-group association routes#729

Merged
jeremyzilar merged 2 commits into
stagingfrom
BDMS-879-project-editing
Jun 22, 2026
Merged

feat(group): add thing-to-group association routes#729
jeremyzilar merged 2 commits into
stagingfrom
BDMS-879-project-editing

Conversation

@jeremyzilar

@jeremyzilar jeremyzilar commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Related to: DataIntegrationGroup/OcotilloUI#300

Summary

  • Adds POST /group/{group_id}/things/{thing_id} to associate a well (thing) with a project (group), with audit logging and 409 when the link already exists
  • Adds DELETE /group/{group_id}/things/{thing_id} to remove that association, with 404 when it is missing
  • Replaces commented-out association stubs with working routes backed by group_helper service functions

Test plan

  • POST /group/{group_id}/things/{thing_id} returns 201 and creates association
  • Duplicate POST returns 409
  • POST with unknown group or thing returns 404
  • DELETE /group/{group_id}/things/{thing_id} returns 204 and removes association
  • DELETE when association missing returns 404
  • Well edit panel in OcotilloUI (BDMS-879) can add/remove projects on a well

Supports the well edit panel in OcotilloUI (BDMS-879): POST and DELETE on /group/{group_id}/things/{thing_id} with 404/409 handling and audit on create.

@chasetmartin chasetmartin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@jirhiker jirhiker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremyzilar jeremyzilar changed the title BDMS-879: Add and remove thing-to-group association routes feat(group): add thing-to-group association routes Jun 18, 2026
@jeremyzilar jeremyzilar requested a review from jirhiker June 18, 2026 20:52
Comment thread api/group.py Outdated
Mirror the POST association route by forwarding the authenticated user
into the helper and stamping updated_by before delete via audit_update.
@jeremyzilar jeremyzilar merged commit 1db40ae into staging Jun 22, 2026
9 checks passed
@jeremyzilar jeremyzilar deleted the BDMS-879-project-editing branch June 22, 2026 16:09
jeremyzilar added a commit that referenced this pull request Jun 22, 2026
Combine PR #729 audit logging on group thing removal with BDMS-921 Slack
edit notifications for project add/remove.
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.

4 participants