Skip to content

feat(ticketing): add views CUD, search, count, execute#86

Open
lmeilibr wants to merge 1 commit into
mainfrom
feature/views-cud
Open

feat(ticketing): add views CUD, search, count, execute#86
lmeilibr wants to merge 1 commit into
mainfrom
feature/views-cud

Conversation

@lmeilibr
Copy link
Copy Markdown
Contributor

Summary

  • Adds `CreateViewCmd` / `UpdateViewCmd` and a mapper that preserves false booleans and skips unset optionals
  • Extends `ViewApiClient` with `create`, `update`, `delete`, `update_many`, `destroy_many`, `search`, `count_view`, `count_many`, `execute`
  • `ViewsService` exposes a `**fields` kwargs API consistent with macros/triggers/automations
  • Fixes prior `list_active` bug on `ViewsService` that incorrectly delegated to `get`
  • 100% unit coverage across all five view modules (194 stmts); new integration test suite exercises every endpoint against a live tenant

Refs #79

Test plan

  • `uv run pytest tests/unit/ticketing/test_view.py tests/unit/ticketing/test_view_mapper.py tests/unit/ticketing/test_views_service.py` — 58 pass
  • Full unit suite: 1911 pass
  • Coverage: 194/194 statements across view_cmds, view_mapper, view_api_client, views_service, view domain model
  • Integration tests against live tenant (gated, verified locally)

🤖 Generated with Claude Code

Adds CreateViewCmd/UpdateViewCmd dataclasses, mapper with
false-boolean preservation, and API client methods for create,
update, delete, update_many, destroy_many, search, count_view,
count_many, execute. Service exposes a **fields kwargs API
consistent with macros/triggers/automations and fixes the
prior list_active bug that delegated to get. Integration tests
cover every endpoint end-to-end; unit tests achieve 100%
coverage across all five view modules.

Refs #79

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
restriction: dict[str, Any] | None = None


ViewCmd: TypeAlias = CreateViewCmd | UpdateViewCmd
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

1 participant