Skip to content

Commit

Permalink
fix: 修复案例导入继续导入失败的问题;案例导入模板增加批注
Browse files Browse the repository at this point in the history
修复案例导入继续导入失败的问题;案例导入模板增加批注
  • Loading branch information
Somebody-JIAN authored and fit2-zhao committed May 26, 2021
1 parent 77e7d06 commit 55d3661
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions backend/src/main/java/io/metersphere/api/jmeter/TestResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ public void addScenario(ScenarioResult result) {
if (StringUtils.isNotEmpty(subItem.getName()) && subItem.getName().indexOf(SEPARATOR) != -1) {
String array[] = subItem.getName().split(SEPARATOR);
subItem.setName(array[0]);
if (StringUtils.isNotEmpty(subItem.getScenario())) {
List<String> id_names = JSON.parseObject(subItem.getScenario(), List.class);
this.setStatus(id_names, subItem.getError() > 0);
}
try{
if (StringUtils.isNotEmpty(subItem.getScenario())) {
List<String> id_names = JSON.parseObject(subItem.getScenario(), List.class);
this.setStatus(id_names, subItem.getError() > 0);
}
}catch (Exception e){}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder
// 在第一行 第1列创建一个批注
Comment comment1 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, (short) 0, 0, (short) 3, 1));
// 输入批注信息
comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order")));
comment1.setString(new XSSFRichTextString(Translator.get("do_not_modify_header_order")+","+Translator.get("id_required")));

// 在第一行 第3列创建一个批注
Comment comment2 = drawingPatriarch.createCellComment(new XSSFClientAnchor(0, 0, 0, 0, (short) 2, 0, (short) 3, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public ExcelResponse testCaseImport(MultipartFile file, @PathVariable String pro
return testCaseService.testCaseImport(file, projectId, userId, importType,request);
}

@PostMapping("/importIgnoreError/{projectId}/{userId}")
@PostMapping("/importIgnoreError/{projectId}/{userId}/{importType}")
@MsAuditLog(module = "track_test_case", type = OperLogConstants.IMPORT, project = "#projectId")
public ExcelResponse testCaseImportIgnoreError(MultipartFile file, @PathVariable String projectId, @PathVariable String userId, @PathVariable String importType, HttpServletRequest request) {
checkPermissionService.checkProjectOwner(projectId);
Expand Down

0 comments on commit 55d3661

Please sign in to comment.