Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Plugin metadata: `# tk-plugin:` comment for scripts, `--tk-describe` flag for binaries
- Multi-package distribution: `ticket-core`, `ticket-extras`, and individual plugin packages
- CI scripts for publishing to Homebrew tap and AUR
- Multi-word title support for `tk create` command

## [0.3.2] - 2026-02-03

Expand Down
12 changes: 12 additions & 0 deletions features/ticket_creation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Feature: Ticket Creation
And the output should match a ticket ID pattern
And a ticket file should exist with title "Untitled"

Scenario: Create a basic ticket with multi-word title
When I run "ticket create My first multi-word ticket"
Then the command should succeed
And the output should match a ticket ID pattern
And a ticket file should exist with title "My first multi-word ticket"

Scenario: Create a ticket with description
When I run "ticket create 'Test ticket' -d 'This is the description'"
Then the command should succeed
Expand All @@ -28,6 +34,12 @@ Feature: Ticket Creation
Then the command should succeed
And the created ticket should have field "type" with value "bug"

Scenario: Create a ticket with multi-word title and type
When I run "ticket create Chore ticket -t chore"
Then the command should succeed
And a ticket file should exist with title "Chore ticket"
And the created ticket should have field "type" with value "chore"

Scenario: Create a ticket with priority
When I run "ticket create 'High priority' -p 0"
Then the command should succeed
Expand Down
7 changes: 4 additions & 3 deletions ticket
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ ${field}: ${value}
cmd_create() {
ensure_dir

local title="" description="" design="" acceptance=""
local title_args=()
local description="" design="" acceptance=""
local priority=2 issue_type="task" assignee="" external_ref="" parent="" tags=""

# Default assignee to git user.name if available
Expand All @@ -176,7 +177,7 @@ cmd_create() {
--parent) parent="$2"; shift 2 ;;
--tags) tags="$2"; shift 2 ;;
-*) echo "Unknown option: $1" >&2; return 1 ;;
*) title="$1"; shift ;;
*) title_args+=("$1"); shift;;
esac
done

Expand All @@ -187,7 +188,7 @@ cmd_create() {
parent=$(basename "$parent_file" .md)
fi

title="${title:-Untitled}"
title="${title_args[*]:-Untitled}"
local id
id=$(generate_id)
local file="$TICKETS_DIR/${id}.md"
Expand Down