feat(project): 회의록 업무 등록 — 세부 업무 줄에 상위 업무 섹션 표시 · 제목 열을 업무 오른쪽으로
- 서버 parent_stage_name(_mt_select LATERAL 재귀 — 세부의 세부면 섹션 있는 맨 위 업무), 화면은 회색 고칠 수 없는 섹션 - 열 순서 담당자·프로젝트·섹션·업무·제목, 제목 Enter = [적용]으로 포커스, 도움말 갱신 - 테스트: 실제 PG parent_stage_name, goals_meeting_ui [2g4]·[2g5] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3774,7 +3774,8 @@ class ProjectStore:
|
||||
out[k] = int(out[k]) if out[k] is not None else None
|
||||
out["week_start"] = r["week_start"].isoformat()
|
||||
out["updated_at"] = r["updated_at"].astimezone(KST).isoformat(timespec="seconds") if r.get("updated_at") else ""
|
||||
for k in ("project_name", "project_status", "stage_name", "task_title", "task_project_id", "parent_task_title"):
|
||||
for k in ("project_name", "project_status", "stage_name", "task_title", "task_project_id", "parent_task_title",
|
||||
"parent_stage_name"):
|
||||
if k in r:
|
||||
out[k] = r[k]
|
||||
if "task_exists" in r:
|
||||
@@ -3839,12 +3840,20 @@ class ProjectStore:
|
||||
f"SELECT {self._mt_cols(conn, 'm.')}, "
|
||||
" p.name AS project_name, p.status AS project_status, s.name AS stage_name, "
|
||||
" t.title AS task_title, t.project_id AS task_project_id, (t.id IS NOT NULL) AS task_exists"
|
||||
+ (", pt.title AS parent_task_title " if v26 else " ") +
|
||||
+ (", pt.title AS parent_task_title, pst.name AS parent_stage_name " if v26 else " ") +
|
||||
"FROM goal_meeting_tasks m "
|
||||
"LEFT JOIN projects p ON p.id = m.project_id "
|
||||
"LEFT JOIN project_stages s ON s.id = m.stage_id "
|
||||
"LEFT JOIN tasks t ON t.id = m.task_id "
|
||||
+ ("LEFT JOIN tasks pt ON pt.id = m.parent_task_id " if v26 else "") +
|
||||
# 세부 업무로 등록하는 줄(2026-10-27) — 섹션 = 고른 업무의 섹션(세부의 세부면 위로 올라가 섹션 있는 맨 위 업무)
|
||||
+ ("LEFT JOIN tasks pt ON pt.id = m.parent_task_id "
|
||||
"LEFT JOIN LATERAL ("
|
||||
" WITH RECURSIVE up AS ("
|
||||
" SELECT u.id, u.parent_task_id, u.stage_id, 0 AS depth FROM tasks u WHERE u.id = m.parent_task_id "
|
||||
" UNION ALL SELECT u2.id, u2.parent_task_id, u2.stage_id, up.depth + 1 FROM tasks u2 "
|
||||
" JOIN up ON u2.id = up.parent_task_id WHERE up.stage_id IS NULL AND up.depth < 20) "
|
||||
" SELECT ps.name FROM up JOIN project_stages ps ON ps.id = up.stage_id ORDER BY up.depth LIMIT 1"
|
||||
") pst ON TRUE " if v26 else "") +
|
||||
f"WHERE {where} ORDER BY m.sort_order, m.id", params,
|
||||
).fetchall()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user