feat(project): 섹션째 다른 프로젝트로 · 회의록 글 칸 하이퍼링크 · 업무 등록 표 하위 업무·줄 클릭 업무 창

- 보드 섹션 머리를 왼쪽 프로젝트 목록에 놓으면 확인 창 → POST /api/stages/{id}/move-project
  (db.move_stage_to_project 한 트랜잭션: 섹션 + 업무 + 세부 업무, 대상 맨 끝, 원·대상 멤버만, 남의 연결은 원 프로젝트에 섹션 없음)
- 목표·회의록 글 칸 서식 도구 🔗 — pj-rich 조각 link(http(s)만, 서버 store.goal_link), 주소 붙여넣기 = 링크, Ctrl+클릭 = 새 탭
- 회의록 업무 등록 표: 등록된 줄 [+] = 바로 아래 세부 업무 초안, 세부 업무 줄은 상위 줄 아래 들여쓰기,
  등록된 줄 어디든 클릭 = 오른쪽 업무 창, ↳ 상위 = 상위 업무 창
- 도움말·CLAUDE.md·PROJECT_MODULE.md 6-26, 정적 파일 버전 20261026a
- 테스트: test_move_stage_to_other_project(실제 PG), 링크 서버 검증, project_ui [섹션 이동], goals_meeting_ui [2g5],
  goal_text_link.browser.test.js

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 12:29:14 +09:00
parent 3d14ff4a85
commit 96f54db0b1
24 changed files with 741 additions and 51 deletions
+42
View File
@@ -1890,6 +1890,48 @@ def api_move_task_project(
return JSONResponse({"task": task, "unseen": unseen})
@router.post("/api/stages/{stage_id}/move-project")
def api_move_stage_project(
request: Request,
stage_id: int,
bg: BackgroundTasks,
payload: dict[str, Any] = Body(...),
) -> JSONResponse:
"""섹션을 통째로 다른 프로젝트로 옮긴다(2026-10-26) — 보드 섹션 머리를 왼쪽 프로젝트 목록으로 드래그 → 확인 창.
body: {"project_id": 대상}. 원 프로젝트 멤버 + 대상 프로젝트 멤버여야 한다. 섹션의 업무·세부 업무가 함께 옮겨지고
섹션은 대상 프로젝트 섹션 맨 끝. 응답의 `unseen` = 대상 프로젝트를 볼 수 없는 담당자(화면이 안내 — 담당자는 그대로).
"""
user = _require_user(request)
st = _db_or_503(request)
stage = st.get_stage(stage_id=stage_id)
if stage is None:
raise HTTPException(status_code=404, detail="섹션을 찾을 수 없습니다.")
_require_manage(request, st, user, int(stage["project_id"]))
try:
target = int(payload.get("project_id"))
except (TypeError, ValueError):
raise HTTPException(status_code=400, detail="옮길 프로젝트(project_id)가 필요합니다.")
_require_manage(request, st, user, target)
try:
moved = st.move_stage_to_project(stage_id=stage_id, project_id=target, actor=user["email"])
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc))
except KeyError as exc:
raise HTTPException(status_code=404, detail=str(exc))
tops = moved.pop("_moved_task_ids", [])
moved.pop("_moved_ids", None)
for tid in tops: # 세부 업무까지 드라이브 파일도 새 프로젝트 폴더로(백그라운드)
bg.add_task(_relocate_drive_files, st, tid)
unseen: set[str] = set()
for tid in tops:
task = st.get_task(task_id=tid)
email = (task or {}).get("assignee_email") or ""
if email and not access.filter_recipients(st, task, [email]):
unseen.add(store.norm_str(email, lower=True))
return JSONResponse({"stage": moved, "task_count": len(tops), "unseen": sorted(unseen)})
# ────────────────────────────────────────────────────────────
# JSON API — 팔로워 (아사나의 협업자)
# ────────────────────────────────────────────────────────────