Skip to content

feat(ticket): add tags, owner, organization, attachments + bug fixes#1

Merged
omert11 merged 1 commit into
mainfrom
feat/ticket-flags-tags-attachments
May 20, 2026
Merged

feat(ticket): add tags, owner, organization, attachments + bug fixes#1
omert11 merged 1 commit into
mainfrom
feat/ticket-flags-tags-attachments

Conversation

@omert11

@omert11 omert11 commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • ticket create/update flag genişletme: --owner, --organization, --tags, --tags-add/-remove, --customer, --attachments
  • Yeni tags komut grubu: list/add/remove (default object: Ticket)
  • Bug fix: tags remove HTTP method POST → DELETE (Zammad 404 fix)
  • Bug fix: ticket articles artık attachment listesini parse edip gösteriyor (Article.attachments[] field eklendi)
  • Bug fix: ticket create body crash (HashWithIndifferentAccess cast hatası) — priority/state artık {"name": ...} wrap değil, plain string
  • Quick wins: explicit User-Agent header (Cloudflare 1010 bypass), error mesajında raw response body, --limit/--per-page alias, overview undercount uyarısı
  • Efficiency: tag operations try_join_all ile paralel, build_attachments async (tokio::fs::read)

Test plan

  • ZAMMAD_URL + ZAMMAD_TOKEN set
  • zammad-cli ticket create --title "Test" --body "Multi-line\nwith \"quotes\"" --tags "test,smoke" → 201 + tag'ler eklenmiş
  • zammad-cli ticket update #N --tags-remove smoke → 200, tag silinmiş (DELETE çalışıyor)
  • zammad-cli ticket article add #N --body "see logs" --attachments /tmp/x.png → article eklendi + ek dosya yüklendi
  • zammad-cli ticket articles #N → attachment listesi Attachments: başlığı altında görünüyor
  • zammad-cli tags list --id N / tags add --id N --name foo / tags remove --id N --name foo → hepsi 200
  • zammad-cli ticket overview → 100+ state'ler + suffix ve stderr uyarısı
  • Cloudflare WAF arkasındaki instance'a istek → 1010 hatası almıyor

🤖 Generated with Claude Code

- ticket create: add --owner, --organization, --tags, --attachments
- ticket update: add --customer, --organization, --tags-add, --tags-remove
- ticket article add: add --attachments (base64 inline)
- new `tags` command group: list/add/remove on any object (default Ticket)
- ticket overview: warn when state hits per_page=100 cap (undercount risk)
- ticket search/list: visible aliases for --limit/--per-page consistency
- client: explicit User-Agent header (Cloudflare WAF 1010 bypass)
- client: raw response body in error output for easier debugging
- client: add DELETE method
- tags remove: use HTTP DELETE (was POST, Zammad returns 404 on POST)
- article response: parse + render attachments list (filename + size)
- create payload: priority/state as plain string (wrapping in {"name":...}
  triggered ActiveSupport::HashWithIndifferentAccess cast error)
- tag operations: fire concurrently via try_join_all
- build_attachments: async + tokio::fs::read to avoid blocking the runtime

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@omert11 omert11 merged commit d725f9d into main May 20, 2026
5 checks passed
@omert11 omert11 deleted the feat/ticket-flags-tags-attachments branch May 20, 2026 09:27
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