Skip to content

feat(ticket): add shared-draft command for creating article drafts#4

Open
tio-foosy wants to merge 2 commits into
omert11:mainfrom
tio-foosy:feat/shared-draft
Open

feat(ticket): add shared-draft command for creating article drafts#4
tio-foosy wants to merge 2 commits into
omert11:mainfrom
tio-foosy:feat/shared-draft

Conversation

@tio-foosy

Copy link
Copy Markdown

Adds zammad-cli ticket shared-draft <ID> that creates or replaces a shared draft on a ticket.

zammad-cli ticket shared-draft <ID> --body "<HTML body>"

Options

  • --type email|note (default: email)
  • --internal — mark as internal note (default: public reply)

How it works

  • Generates a UUID v4 form_id automatically — no external dependency needed
  • Uses Zammad's PUT /api/v1/tickets/{id}/shared_draft endpoint
  • Replaces any existing shared draft on the same ticket

Files changed

  • Cargo.toml — added uuid v1.23.3 with v4 feature
  • Cargo.lock — lockfile update for uuid + transitive deps
  • src/commands/ticket.rsSharedDraft enum variant, dispatch arm, and shared_draft() implementation

zammad-cli ticket shared-draft <ID> [--body <TEXT>] [--type email|note] [--internal]

Creates or replaces a shared draft on a ticket via
PUT /api/v1/tickets/{id}/shared_draft. Generates a UUID v4 form_id
automatically, so there's no dependency on python3/uuidgen.
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