Skip to content

feat(project): list projects and create a project like another - #152

Merged
f3rdy merged 2 commits into
masterfrom
feat/151-project-list-create
Nov 3, 2026
Merged

f3rdy merged 2 commits into
masterfrom
feat/151-project-list-create

Conversation

@f3rdy

@f3rdy f3rdy commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Closes #151

What

  • budjira project list — every project the token can see: key, name, id, company-/team-managed, lead. Paginated, table or --format json. Answers "does project KEY exist?", which search "project = KEY" cannot (empty and missing projects both return no issues).
  • budjira project create KEY --name NAME --like REF [--board kanban|scrum|none] [--dry-run] — company-managed project reusing REF's issue type scheme, issue type screen scheme and workflow scheme; lead = current user; issues unassigned. Then a filter project = KEY ORDER BY Rank ASC, shared with the new project, and a board on it.

Jira Cloud behaviour handled

  • POST /rest/api/3/project rejects projectTemplateKey together with explicit schemes → create with schemes only, add the board via filter + POST /rest/agile/1.0/board.
  • permissionScheme is never sent (rejected on the Free plan); the project keeps the default scheme.
  • Scheme IDs come back as strings and are sent as int64.
  • A team-managed reference is rejected up front (no shareable schemes).
  • Clear errors: invalid key, key already taken (pre-check + server error), missing Administer Jira, Free-plan restriction, 401. If the board step fails after the project was created, the error says the project exists.
  • --dry-run only reads (reference, current user) and prints the three payloads.

Verification

  • 38 new unit tests (service + CLI); full suite 1510 passed; ruff, mypy, bandit, pre-commit clean.
  • Endpoints and payloads checked against the Jira Cloud platform and software OpenAPI specs.
  • Live on a Jira Cloud Free instance: project list listed all 7 projects with the correct style; project create … --like <company-managed project> created the project with the reference's three scheme IDs (verified via the */project?projectId= endpoints), identical issue types, a project-shared filter and a Kanban board.

Docs

README and the AI usage prompt (project list / project create) updated.

f3rdy added 2 commits November 3, 2026 07:12
- project list: every project the token can see (key, name, id,
  company-/team-managed, lead), paginated, table or JSON. Answers
  whether a key exists, which search cannot.
- project create KEY --name --like REF [--board kanban|scrum|none]
  [--dry-run]: company-managed project reusing REF's issue type,
  issue type screen and workflow schemes (no template, no permission
  scheme), lead = current user, then a project-shared filter
  'project = KEY ORDER BY Rank ASC' and a board on it.
- Clear errors for an existing or invalid key, a team-managed
  reference, missing Administer Jira permission, the Free-plan
  restriction, and a board failure after the project was created.

Closes #151
@f3rdy
f3rdy merged commit c76e9d7 into master Nov 3, 2026
5 checks passed
@f3rdy
f3rdy deleted the feat/151-project-list-create branch November 3, 2026 15:18
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.

feat(project): list and create Jira projects (project list / project create --like)

1 participant