Skip to content

validValues.query: leave out a 'not this asset' term where the asset could not be a row - #78

Merged
jallers merged 1 commit into
masterfrom
claude/valid-values-other-type-id
Nov 30, 2026
Merged

jallers merged 1 commit into
masterfrom
claude/valid-values-other-type-id

Conversation

@jallers

@jallers jallers commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

What was wrong

client.validValues.query({ asset: <a story>, attribute: "AffectedByDefects" }) answered a query the server refused when it was read: Wrong OID AssetType: Story:…. Reported by a chat-bot consumer on 1.0.0-alpha.15.

Why

The rule for that relation is "defects in the story's project, and not this asset". The SDK filled "this asset" into an ID!= term on a read of defects, and the server will not compare a defect's ID with a story's OID.

The change

A "not this asset" term can exclude nothing when the asset could never be a row of the related type. The SDK now leaves the value out in that case (and the term, when no value is left), and keeps it when the asset could be a row: a defect's AffectedPrimaryWorkitems, an epic's Super, a defect's own AffectedByDefects. "Could be a row" means one type is the other or descends from it, told from the schema.

A difference from the server's endpoint, on purpose

The server's valid-values endpoint answers no assets at all for a story's AffectedByDefects: it runs the same rule, hits the same refusal and reports nothing. So here the SDK's answer and the endpoint's differ. The module header, the README and the changelog say so.

Proof

  • Unit: the four cases (defect among primary work items, story among defects, defect among defects, a new story).
  • Live: the query for a story's AffectedByDefects runs and answers the defects of the story's project; with the term put back, the server refuses the read (the control); the other end keeps the term.

Changelog entry under Unreleased (to be 1.0.0-alpha.16).


Generated by Claude Code

…could not be a row

A story's AffectedByDefects put the story's OID in an ID!= term on a
read of defects, which the server refuses. The term can exclude nothing
there; it is kept where the asset could be a row of the related type.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
@jallers
jallers merged commit 65483a2 into master Nov 30, 2026
4 checks passed
@jallers
jallers deleted the claude/valid-values-other-type-id branch November 30, 2026 14:50
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