261022_04_ENH: 메인 차트 R팀 조회 범위 제한 및 O/N 문항 하위 row 없는 등록 허용

This commit is contained in:
2026-10-22 11:54:38 +09:00
parent a0ea7d861e
commit 37ebc1b6bb
3 changed files with 16 additions and 2 deletions

View File

@@ -86,6 +86,17 @@ public class QuestionImportService {
labels.set(Integer.toString(labels.size() + 1), label);
}
}
// User decision: O/N without input rows (none, attribute-only or blank titles) get one
// input with an empty label instead of failing.
if (itemType.equals("open") && labels.isEmpty()) {
labels.set(
"1",
objectMapper
.createObjectNode()
.put("label", "")
.put("option", type.equals("n") ? "num" : "all")
.put("must", "1"));
}
ObjectNode dataset = objectMapper.createObjectNode();
if (!labels.isEmpty()) {
dataset.set(itemType, labels);

View File

@@ -33,6 +33,9 @@
<when test='authenticatedUserTeam == "M101"'>AND GKEY = #{authenticatedUserTeam}</when>
<otherwise><![CDATA[AND GKEY <> 'M101']]></otherwise>
</choose>
<if test='authenticatedUserTeam != null and authenticatedUserTeam.startsWith("R")'>
AND GKEY = #{authenticatedUserTeam}
</if>
</if>
<include refid="assignmentVisibility"/>
</sql>