Repository navigation
validValues.query: leave out a 'not this asset' term where the asset could not be a row - #78
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sSuper, a defect's ownAffectedByDefects. "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
AffectedByDefectsruns 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