Commit Graph

23 Commits

Author SHA1 Message Date
zhi
1905378064 Merge fix/three-bugs-2026-03-22: accept task_code/milestone_code as identifiers, add /config/status endpoint 2026-03-22 10:56:34 +00:00
zhi
8b357aabc4 Fix: accept task_code/milestone_code as identifiers, add /config/status endpoint
- All /tasks/{task_id} endpoints now accept both numeric id and task_code string
- All /milestones/{milestone_id} endpoints (misc.py) now accept both numeric id and milestone_code
- Added _resolve_task() and _resolve_milestone() helpers
- GET /config/status reads initialization state from config volume (no wizard dependency)
- MilestoneResponse schema now includes milestone_code field
- Comments and worklog endpoints also accept task_code
2026-03-22 10:06:27 +00:00
zhi
88931d822d Fix milestones 422 + acc-mgr user + reset-apikey endpoint
- Fix: /milestones?project_id= now accepts project_code (str) not just int
- Add: built-in acc-mgr user created on wizard init (account-manager role, no login, undeletable)
- Add: POST /users/{id}/reset-apikey with permission-based access control
- Add: GET /auth/me/apikey-permissions for frontend capability check
- Add: user.reset-self-apikey and user.reset-apikey permissions
- Protect admin and acc-mgr accounts from deletion
- Block acc-mgr from login (/auth/token returns 403)
2026-03-22 05:39:03 +00:00
zhi
d17072881b feat: add general /supports list endpoint with status/taken_by filters
- New GET /supports endpoint for listing all support tickets across projects
- Supports optional ?status= and ?taken_by= (me|null|username) query params
- Ordered by created_at descending
- Complements the existing scoped /supports/{project_code}/{milestone_id} endpoint
2026-03-22 00:17:44 +00:00
zhi
96cbe109ec Add support code-based action routes 2026-03-21 18:17:11 +00:00
zhi
43af5b29f6 feat: add code-first API support for projects, milestones, proposes, tasks
- Projects: get/update/delete/members endpoints now accept project_code
- Milestones: all project-scoped and top-level endpoints accept milestone_code
- Proposes: all endpoints accept project_code and propose_code
- Tasks: code-first support for all CRUD + transition + take + search
- Schemas: add code/type/due_date/project_code/milestone_code/taken_by fields
- All endpoints use id-or-code lookup helpers for backward compatibility
- Milestone serializer now includes milestone_code and code fields
- Task serializer enriches responses with project_code, milestone_code, taken_by

Addresses TODO §2.1: code-first API support across CLI-targeted resources
2026-03-21 18:12:04 +00:00
zhi
89e3bcdd0f feat(P7.1): remove task_type='task' — migrate to issue/defect, update defaults and DB migration 2026-03-17 16:05:32 +00:00
zhi
9e22c97ae8 refactor: update milestone/task status enums to new state machine values
Milestone: open/freeze/undergoing/completed/closed (was open/pending/deferred/progressing/closed)
Task: open/pending/undergoing/completed/closed (was open/pending/progressing/closed)

- Add MilestoneStatusEnum to schemas with typed validation
- Add started_at field to Milestone model
- Update all router/CLI references from progressing->undergoing
- Add completed status handling in task transition logic
2026-03-17 00:04:29 +00:00
zhi
9e14df921e feat: add modal-edit permissions for projects milestones and tasks 2026-03-16 18:13:54 +00:00
zhi
214a9b109d refactor: replace issues backend with milestone tasks 2026-03-16 13:22:14 +00:00
Zhi
fee2320cee fix: handle None project_code and serialize list fields 2026-03-12 23:33:10 +00:00
Zhi
41d92c5e68 fix: properly generate milestone_code and task/support/meeting codes 2026-03-12 23:18:20 +00:00
Zhi
a1a99bb838 feat: add code fields - milestoneCode, taskCode, supportCode, meetingCode 2026-03-12 22:48:04 +00:00
Zhi
5297711c77 refactor: split tasks/supports/meetings into separate tables 2026-03-12 22:26:24 +00:00
Zhi
724be87a04 feat: add tasks/supports/meetings endpoints with project_code paths 2026-03-12 22:09:39 +00:00
Zhi
6fe5e5ddb3 feat: add task fields - task_code, estimated_effort, etc 2026-03-12 21:54:16 +00:00
Zhi
dbcb92a9c3 fix: add POST endpoints for tasks/supports/meatings 2026-03-12 21:32:57 +00:00
Zhi
1b1ca0e0d3 fix: add /milestones/{id}/items and update progress endpoint 2026-03-12 21:29:18 +00:00
zhi
d5bf47f4fc fix: quote enum values and csv export subtype 2026-03-12 09:37:19 +00:00
zhi
6b3e42195d feat: add task type hierarchy with subtypes (issue/meeting/support/maintenance/research/review/story/test) 2026-03-11 23:55:52 +00:00
zhi
95a4702e1e fix: remove user_id query requirement from notifications count/read-all 2026-03-11 10:49:03 +00:00
zhi
7218aabc59 fix: notifications endpoints use current user auth instead of required user_id query
- /notifications and /notifications/count no longer require user_id param
- return both count and unread fields for compatibility
- /notifications/read-all marks current user notifications
- /notifications/{id}/read enforces ownership (or admin)
2026-03-11 10:46:48 +00:00
Zhi
f60dc68b22 refactor: split monolithic main.py into FastAPI routers (v0.2.0)
- app/api/deps.py: shared auth dependencies
- app/api/routers/auth.py: login, me
- app/api/routers/issues.py: CRUD, transition, assign, relations, tags, batch, search
- app/api/routers/projects.py: CRUD, members, worklog summary
- app/api/routers/users.py: CRUD, worklogs
- app/api/routers/comments.py: CRUD
- app/api/routers/webhooks.py: CRUD, logs, retry
- app/api/routers/misc.py: API keys, activity, milestones, notifications, worklogs, export, dashboard
- main.py: 1165 lines → 51 lines
- Version bump to 0.2.0
2026-02-23 15:14:46 +00:00