USACE / USACE/cwms-data-api

[Bug]: Location Group endpoint doesn't allow for updating metadata

Open
#1,905 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority:medium
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Describe the bug

The location group POST endpoint calls cwms_loc.create_loc_group which throws an error if the group already exists. The PATCH endpoint supports rename and updating assigned locations. This means neither endpoint supports editing the shared loc ref, shared loc alias id, description, or attribute metadata fields.

Expected behavior

PATCH should handle the update.

To Reproduce
  1. store a loc group with those nullable metadata fields as null
  2. try to store the same loc group now with those fields defined
Priority

Medium

Logs/Incident Identifier

No response

CURL Commands

CDA Version

2026.08.14-testa

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the Location Group PATCH handler and its interaction with cwms_loc.create_loc_group, then reproduce the two-step case described in the issue: first store nullable metadata as null, then update those fields. Done means PATCH updates the shared loc ref, shared loc alias id, description, and attribute metadata without the existing-group error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.