项目里程碑初步优化
This commit is contained in:
@@ -121,14 +121,15 @@ async def _replace_project_milestones(
|
||||
)
|
||||
)
|
||||
for row in setup_data.projectMilestones:
|
||||
if not any([(row.name or "").strip(), (row.owner or "").strip(), (row.remark or "").strip(), (row.planDate or "").strip()]):
|
||||
start_text = (row.startDate or row.planDate or "").strip()
|
||||
if not any([(row.name or "").strip(), (row.owner or "").strip(), (row.remark or "").strip(), start_text]):
|
||||
continue
|
||||
name = (row.name or "").strip()
|
||||
if not name:
|
||||
result.warnings.append(f"project_milestone_name_empty:{row.id}")
|
||||
continue
|
||||
planned_date = _parse_date(row.planDate)
|
||||
if row.planDate and not planned_date:
|
||||
planned_date = _parse_date(start_text)
|
||||
if start_text and not planned_date:
|
||||
result.warnings.append(f"project_milestone_plan_date_invalid:{row.id}")
|
||||
raw_status = (row.status or "").strip()
|
||||
mapped_status = MILESTONE_STATUS_MAP.get(raw_status, "NOT_STARTED")
|
||||
|
||||
Reference in New Issue
Block a user