Skip to content

feat(ticket): add --pending-time flag for pending close/reminder states#2

Merged
omert11 merged 1 commit into
mainfrom
worktree-feat-pending-time
Jun 14, 2026
Merged

feat(ticket): add --pending-time flag for pending close/reminder states#2
omert11 merged 1 commit into
mainfrom
worktree-feat-pending-time

Conversation

@omert11

@omert11 omert11 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • ticket update artık --pending-time <ISO8601> flag'i kabul ediyor; pending close/pending reminder state'lerine geçişte Zammad'ın zorunlu kıldığı pending_time gönderiliyor (önceden opaque 422 dönüyordu).
  • CLI-seviye validasyon: pending state'te eksik time → net hata; non-pending + time → reddedilir; state matching case-insensitive.
  • --state olmadan --pending-time izinli (zaten pending ticket'ı yeniden zamanlar — Zammad lone pending_time PUT'u kabul eder).
  • Timestamp şekli lokal doğrulanıyor (is_iso8601_datetime, chrono bağımlılığı yok) — 2026-13-40 gibi typo erkenden reddedilir.
  • is_iso8601_datetime için birim testler; CLAUDE.md + SKILL.md güncellendi.

Test plan

  • cargo fmt / cargo clippy -D warnings temiz
  • cargo test — 2 test PASS (iso8601 accept/reject)
  • Release binary ile canlı doğrulama: 4 senaryo (reschedule izinli, case-insensitive, bozuk timestamp reddi, regression)

🤖 Generated with Claude Code

Pending states require a pending_time on the Zammad side; without it the
API returns an opaque 422. Add a --pending-time <ISO8601> flag that is
forwarded as pending_time on update.

- Validate up front: pending state without --pending-time fails with a
  clear message; non-pending state with --pending-time is rejected.
- State matching is case-insensitive so "Pending Close" is not slipped
  past validation.
- --pending-time without --state is allowed (reschedules an already-pending
  ticket; Zammad accepts a lone pending_time PUT).
- Validate the timestamp shape locally (is_iso8601_datetime, no chrono dep)
  so a typo like 2026-13-40 fails early instead of hitting Zammad's 422.
- Unit tests for is_iso8601_datetime; docs updated (CLAUDE.md, SKILL.md).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@omert11 omert11 merged commit 7d67724 into main Jun 14, 2026
5 checks passed
@omert11 omert11 deleted the worktree-feat-pending-time branch June 14, 2026 08:22
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