@Override public Issue update(Issue issue) { logger.info("> update"); counterService.increment("services.issueservice.update.invoked"); Issue updatedIssue = issueRepository.save(issue); logger.info("< update"); return updatedIssue; }
@Override public Issue create(Issue issue) { logger.info("> create"); counterService.increment("services.issueservice.create.invoked"); // Set default attribute values issue.setStatus(IssueStatus.OPEN); if (issue.getPriority() == null) { issue.setPriority(IssuePriority.MEDIUM); } Issue persistedIssue = issueRepository.save(issue); logger.info("< create"); return persistedIssue; }