diff --git a/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java b/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java index 41188b18e..fa1818ead 100644 --- a/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java +++ b/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java @@ -22,7 +22,7 @@ public class IssueController { private final IssueService issueService; @GetMapping("/issues") - public ApiResponse getIssues(@RequestParam String status, + public ApiResponse getIssues(@RequestParam(defaultValue = "open") String status, @RequestParam(required = false) List labels, @RequestParam(required = false) Long milestone, @RequestParam(required = false) Long writer, diff --git a/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java b/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java index 6ea7eb362..3c152ec41 100644 --- a/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java +++ b/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java @@ -60,7 +60,9 @@ public IssueFilteredResponseDto findByFilter(IssueSearch issueSearch) { @Transactional public Long save(IssueWriteRequestDto request, Long id) { - milestoneService.isExistMilestone(request.getMilestoneId()); + if (request.getMilestoneId() != null) { + milestoneService.isExistMilestone(request.getMilestoneId()); + } List labels = request.getLabels(); List assignees = request.getAssignees(); Issue issue = IssueWriteRequestDto.toEntity(request, id);