Skip to content

feat(linear): expose issue priority and timestamps in JSON output - #275

Merged
ruby-automation merged 2 commits into
mainfrom
EXT-64-expose-priority-timestamps
Sep 14, 2026
Merged

ruby-automation merged 2 commits into
mainfrom
EXT-64-expose-priority-timestamps

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

  • Add priority, priority_label, priority_sort_order, created_at, updated_at attributes to LinearCli.Linear.Issue; extend @issue_fields GraphQL selection with the three priority fields (timestamps were already selected but discarded)
  • Add created_at, updated_at attributes to LinearCli.Linear.Comment; extract them in from_map/1 (already in base_fields/0 GraphQL selection, but previously dropped)
  • All JSON output enriched automatically via the existing Display.to_plain/1 generic struct-to-map converter — no serialization-specific code needed
  • Update documents/ash-domain-erd.adoc per the maintenance contract

Test plan

  • from_map/1 round-trip tests: priority values (0.0 and non-zero) and timestamps survive the GraphQL response → struct conversion for both Issue and Comment
  • GraphQL query includes priority, priorityLabel, prioritySortOrder, createdAt, updatedAt
  • lc issue list --output json includes all new fields; priority=0.0 preserved as real value
  • lc issue view --output json includes all new fields on the issue and on nested comments
  • Display.show/2 JSON output: field-name stability (snake_case, not camelCase), priority=0 preservation, comment timestamp nesting
  • 534 tests pass; precommit (format + credo strict + tests) clean

Closes EXT-64

🤖 Generated with Claude Code

ruby-automation and others added 2 commits September 14, 2026 13:28
Add priority (priority, priority_label, priority_sort_order) and
timestamps (created_at, updated_at) to Issue and Comment resources so
they are included in --output json for all commands.

- Extend @issue_fields GraphQL selection with priority fields
- Add five new attributes to LinearCli.Linear.Issue
- Extract new fields in Issue.from_map/1
- Add created_at/updated_at to LinearCli.Linear.Comment (already in
  GraphQL selection via base_fields/0, but discarded until now)
- Extract timestamps in Comment.from_map/1
- Update ash-domain-erd.adoc per maintenance contract

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update issue_map/1 and comment_created/0 test fixtures with priority
  and timestamp fields matching the new GraphQL response shape
- Add from_map/1 round-trip tests in issue_test and comment_test
- Add --output json snapshot tests for issue list and issue view
- Add Display.show/2 JSON tests for priority=0 preservation and
  snake_case field name stability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bougyman
bougyman requested a balanced review from Copilot September 14, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ruby-automation
ruby-automation merged commit 7539e03 into main Sep 14, 2026
3 checks passed
@ruby-automation
ruby-automation deleted the EXT-64-expose-priority-timestamps branch September 14, 2026 18:07
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