feat(ticket): add --pending-time flag for pending close/reminder states#2
Merged
Conversation
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>
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.
Summary
ticket updateartık--pending-time <ISO8601>flag'i kabul ediyor;pending close/pending reminderstate'lerine geçişte Zammad'ın zorunlu kıldığıpending_timegönderiliyor (önceden opaque 422 dönüyordu).--stateolmadan--pending-timeizinli (zaten pending ticket'ı yeniden zamanlar — Zammad lonepending_timePUT'u kabul eder).is_iso8601_datetime, chrono bağımlılığı yok) —2026-13-40gibi typo erkenden reddedilir.is_iso8601_datetimeiçin birim testler; CLAUDE.md + SKILL.md güncellendi.Test plan
cargo fmt/cargo clippy -D warningstemizcargo test— 2 test PASS (iso8601 accept/reject)🤖 Generated with Claude Code