diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java index 1daf2d5a17..caf0e9206f 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseIssueService.java @@ -121,7 +121,7 @@ public class TestCaseIssueService { testCaseIssues.setIssuesId(issuesId); testCaseIssues.setResourceId(resourceId); testCaseIssues.setRefType(refType); - testCaseIssues.setRefId(refId); + testCaseIssues.setRefId(StringUtils.isNotBlank(refId) ? null : refId); testCaseIssuesMapper.insert(testCaseIssues); } }