fix(测试计划): 测试计划关联用例列表批量新建缺陷日志
--bug=1046671 --user=王旭 【测试计划】计划详情-功能/接口/场景用例列表-批量新建缺陷-系统/组织/项目未生成日志 https://www.tapd.cn/55049933/s/1581000
This commit is contained in:
parent
acf5603057
commit
f5db54fafc
|
@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.ApiReportDetailDTO;
|
||||||
import io.metersphere.api.service.definition.ApiReportService;
|
import io.metersphere.api.service.definition.ApiReportService;
|
||||||
import io.metersphere.bug.domain.Bug;
|
import io.metersphere.bug.domain.Bug;
|
||||||
import io.metersphere.bug.dto.request.BugEditRequest;
|
import io.metersphere.bug.dto.request.BugEditRequest;
|
||||||
|
import io.metersphere.bug.service.BugLogService;
|
||||||
import io.metersphere.bug.service.BugService;
|
import io.metersphere.bug.service.BugService;
|
||||||
import io.metersphere.dto.BugProviderDTO;
|
import io.metersphere.dto.BugProviderDTO;
|
||||||
import io.metersphere.plan.dto.request.*;
|
import io.metersphere.plan.dto.request.*;
|
||||||
|
@ -58,6 +59,8 @@ public class TestPlanApiCaseController {
|
||||||
private ApiReportService apiReportService;
|
private ApiReportService apiReportService;
|
||||||
@Resource
|
@Resource
|
||||||
private BugService bugService;
|
private BugService bugService;
|
||||||
|
@Resource
|
||||||
|
private BugLogService bugLogService;
|
||||||
|
|
||||||
@PostMapping(value = "/sort")
|
@PostMapping(value = "/sort")
|
||||||
@Operation(summary = "测试计划功能用例-功能用例拖拽排序")
|
@Operation(summary = "测试计划功能用例-功能用例拖拽排序")
|
||||||
|
@ -214,6 +217,7 @@ public class TestPlanApiCaseController {
|
||||||
BugEditRequest bugEditRequest = new BugEditRequest();
|
BugEditRequest bugEditRequest = new BugEditRequest();
|
||||||
BeanUtils.copyBean(bugEditRequest, request);
|
BeanUtils.copyBean(bugEditRequest, request);
|
||||||
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
||||||
|
bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId());
|
||||||
testPlanApiCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
testPlanApiCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.api.dto.scenario.ApiScenarioReportDetailDTO;
|
||||||
import io.metersphere.api.service.scenario.ApiScenarioReportService;
|
import io.metersphere.api.service.scenario.ApiScenarioReportService;
|
||||||
import io.metersphere.bug.domain.Bug;
|
import io.metersphere.bug.domain.Bug;
|
||||||
import io.metersphere.bug.dto.request.BugEditRequest;
|
import io.metersphere.bug.dto.request.BugEditRequest;
|
||||||
|
import io.metersphere.bug.service.BugLogService;
|
||||||
import io.metersphere.bug.service.BugService;
|
import io.metersphere.bug.service.BugService;
|
||||||
import io.metersphere.dto.BugProviderDTO;
|
import io.metersphere.dto.BugProviderDTO;
|
||||||
import io.metersphere.plan.dto.request.*;
|
import io.metersphere.plan.dto.request.*;
|
||||||
|
@ -55,6 +56,8 @@ public class TestPlanApiScenarioController {
|
||||||
private ApiScenarioReportService apiScenarioReportService;
|
private ApiScenarioReportService apiScenarioReportService;
|
||||||
@Resource
|
@Resource
|
||||||
private BugService bugService;
|
private BugService bugService;
|
||||||
|
@Resource
|
||||||
|
private BugLogService bugLogService;
|
||||||
|
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
@Operation(summary = "测试计划-已关联场景用例列表分页查询")
|
@Operation(summary = "测试计划-已关联场景用例列表分页查询")
|
||||||
|
@ -199,6 +202,7 @@ public class TestPlanApiScenarioController {
|
||||||
BugEditRequest bugEditRequest = new BugEditRequest();
|
BugEditRequest bugEditRequest = new BugEditRequest();
|
||||||
BeanUtils.copyBean(bugEditRequest, request);
|
BeanUtils.copyBean(bugEditRequest, request);
|
||||||
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
||||||
|
bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId());
|
||||||
testPlanApiScenarioService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
testPlanApiScenarioService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.bug.domain.Bug;
|
import io.metersphere.bug.domain.Bug;
|
||||||
import io.metersphere.bug.dto.request.BugEditRequest;
|
import io.metersphere.bug.dto.request.BugEditRequest;
|
||||||
|
import io.metersphere.bug.service.BugLogService;
|
||||||
import io.metersphere.bug.service.BugService;
|
import io.metersphere.bug.service.BugService;
|
||||||
import io.metersphere.dto.BugProviderDTO;
|
import io.metersphere.dto.BugProviderDTO;
|
||||||
import io.metersphere.plan.constants.TestPlanResourceConfig;
|
import io.metersphere.plan.constants.TestPlanResourceConfig;
|
||||||
|
@ -55,6 +56,8 @@ public class TestPlanFunctionalCaseController {
|
||||||
private TestPlanFunctionalCaseService testPlanFunctionalCaseService;
|
private TestPlanFunctionalCaseService testPlanFunctionalCaseService;
|
||||||
@Resource
|
@Resource
|
||||||
private BugService bugService;
|
private BugService bugService;
|
||||||
|
@Resource
|
||||||
|
private BugLogService bugLogService;
|
||||||
|
|
||||||
@PostMapping(value = "/sort")
|
@PostMapping(value = "/sort")
|
||||||
@Operation(summary = "测试计划功能用例-功能用例拖拽排序")
|
@Operation(summary = "测试计划功能用例-功能用例拖拽排序")
|
||||||
|
@ -219,6 +222,7 @@ public class TestPlanFunctionalCaseController {
|
||||||
BugEditRequest bugEditRequest = new BugEditRequest();
|
BugEditRequest bugEditRequest = new BugEditRequest();
|
||||||
BeanUtils.copyBean(bugEditRequest, request);
|
BeanUtils.copyBean(bugEditRequest, request);
|
||||||
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
Bug bug = bugService.addOrUpdate(bugEditRequest, files, SessionUtils.getUserId(), SessionUtils.getCurrentOrganizationId(), false);
|
||||||
|
bugLogService.minderAddLog(bugEditRequest, files, SessionUtils.getCurrentOrganizationId(), bug.getId(), SessionUtils.getUserId());
|
||||||
testPlanFunctionalCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
testPlanFunctionalCaseService.batchAssociateBug(request, bug.getId(), SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue