feat(issues): make status_id, priority_id, type_id required on issue create #598

Open
opened 2026-06-10 04:07:03 +00:00 by jmiller · 0 comments
Owner

Summary

The status_id, priority_id, and type_id fields should be required when creating issues, not optional. This ensures every issue has proper metadata from the start.

Changes needed

API

  • modules/structs/issue.go: Change CreateIssueOption fields from *int64 (optional) to int64 (required)
  • routers/api/v1/repo/issue.go: Validate non-zero values on create, return 422 if missing
  • Auto-assign org defaults when not provided (use is_default definitions)

MCP

  • mcp-mokogitea-api/src/index.ts: Change status_id, priority_id, type_id from z.number().optional() to z.number() on gitea_issue_create
  • Keep optional on gitea_issue_update (partial updates)

Web UI

  • Issue create form should pre-select default status/priority/type
  • Prevent submission without selections
## Summary The `status_id`, `priority_id`, and `type_id` fields should be required when creating issues, not optional. This ensures every issue has proper metadata from the start. ## Changes needed ### API - `modules/structs/issue.go`: Change `CreateIssueOption` fields from `*int64` (optional) to `int64` (required) - `routers/api/v1/repo/issue.go`: Validate non-zero values on create, return 422 if missing - Auto-assign org defaults when not provided (use `is_default` definitions) ### MCP - `mcp-mokogitea-api/src/index.ts`: Change `status_id`, `priority_id`, `type_id` from `z.number().optional()` to `z.number()` on `gitea_issue_create` - Keep optional on `gitea_issue_update` (partial updates) ### Web UI - Issue create form should pre-select default status/priority/type - Prevent submission without selections
Sign in to join this conversation.