fix(测试跟踪): 用例模板字段标注显示问题

--bug=1015647 --user=宋昌昌 【测试跟踪】github#16420,测试用例模板中部分字段未标注是否为必填字段及如何填写,请优化 https://www.tapd.cn/55049933/s/1221603
This commit is contained in:
song-cc-rock 2022-08-10 16:26:33 +08:00 committed by jianxing
parent ca71f7434f
commit d9c367bd57
1 changed files with 12 additions and 12 deletions

View File

@ -80,9 +80,9 @@ public class FunctionCaseTemplateWriteHandler extends AbstractRowHeightStyleStra
if (rowDispseIndexMap != null) { if (rowDispseIndexMap != null) {
if (isNeedId) { if (isNeedId) {
Integer idIndex = rowDispseIndexMap.get("ID"); Integer idIndex = rowDispseIndexMap.get("ID");
if (idIndex != null) { if(idIndex != null){
Comment comment1 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, idIndex, 0, (short) 3, 1)); Comment comment1 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, idIndex, 0, idIndex + 3, 1));
comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order") + "" + Translator.get("id_required"))); comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order")+""+Translator.get("id_required")));
sheet.getRow(0).getCell(1).setCellComment(comment1); sheet.getRow(0).getCell(1).setCellComment(comment1);
} }
} }
@ -90,16 +90,16 @@ public class FunctionCaseTemplateWriteHandler extends AbstractRowHeightStyleStra
String coloum = entry.getKey(); String coloum = entry.getKey();
Integer index = entry.getValue(); Integer index = entry.getValue();
if (StringUtils.equalsAnyIgnoreCase(coloum, "Module")) { if(StringUtils.equalsAnyIgnoreCase(coloum,"Module")){
Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, (short) 3, 1)); Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, index + 3 , 1));
comment.setString(new XSSFRichTextString(Translator.get("module_created_automatically"))); comment.setString(new XSSFRichTextString(Translator.get("module_created_automatically")));
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} else if (StringUtils.equalsAnyIgnoreCase(coloum, "Maintainer")) { }else if(StringUtils.equalsAnyIgnoreCase(coloum,"Maintainer")){
Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, (short) 3, 1)); Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, index + 3, 1));
comment.setString(new XSSFRichTextString(Translator.get("please_input_project_member"))); comment.setString(new XSSFRichTextString(Translator.get("please_input_project_member")));
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} else if (StringUtils.equalsAnyIgnoreCase(coloum, "Priority")) { }else if(StringUtils.equalsAnyIgnoreCase(coloum,"Priority")){
Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, (short) 3, 1)); Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, index + 3, 1));
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
if (caseLevelAndStatusValueMap != null && caseLevelAndStatusValueMap.containsKey("caseLevel")) { if (caseLevelAndStatusValueMap != null && caseLevelAndStatusValueMap.containsKey("caseLevel")) {
list = caseLevelAndStatusValueMap.get("caseLevel"); list = caseLevelAndStatusValueMap.get("caseLevel");
@ -110,8 +110,8 @@ public class FunctionCaseTemplateWriteHandler extends AbstractRowHeightStyleStra
comment.setString(new XSSFRichTextString(Translator.get("options") + JSONArray.toJSONString(list))); comment.setString(new XSSFRichTextString(Translator.get("options") + JSONArray.toJSONString(list)));
} }
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} else if (StringUtils.equalsAnyIgnoreCase(coloum, "Tag")) { }else if(StringUtils.equalsAnyIgnoreCase(coloum,"Tag")){
Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, (short) 3, 1)); Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, index + 3, 1));
comment.setString(new XSSFRichTextString(Translator.get("tag_tip_pattern"))); comment.setString(new XSSFRichTextString(Translator.get("tag_tip_pattern")));
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} else if (StringUtils.equalsAnyIgnoreCase(coloum, "Status")) { } else if (StringUtils.equalsAnyIgnoreCase(coloum, "Status")) {
@ -125,7 +125,7 @@ public class FunctionCaseTemplateWriteHandler extends AbstractRowHeightStyleStra
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} }
} else if (StringUtils.equalsAnyIgnoreCase(coloum, "StepModel")) { } else if (StringUtils.equalsAnyIgnoreCase(coloum, "StepModel")) {
Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, (short) 3, 1)); Comment comment = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, index, 0, index + 3, 1));
comment.setString(new XSSFRichTextString(Translator.get("step_model_tip"))); comment.setString(new XSSFRichTextString(Translator.get("step_model_tip")));
sheet.getRow(0).getCell(1).setCellComment(comment); sheet.getRow(0).getCell(1).setCellComment(comment);
} }