Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions data/accounts.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
[
{
"accountId": 1,
"username": "admin",
"password": "admin123",
"role": "ADMIN"
},
{
"accountId": 2,
"username": "pl1",
"password": "1234",
"role": "PL"
},
{
"accountId": 3,
"username": "dev1",
"password": "1234",
"username": "testUser",
"password": "pw",
"role": "DEV"
},
{
"accountId": 4,
"username": "tester1",
"password": "1234",
"role": "TESTER"
}
]
38 changes: 1 addition & 37 deletions data/issues.json
Original file line number Diff line number Diff line change
@@ -1,37 +1 @@
[
{
"issueId": 1,
"projectId": 1,
"title": "Bug-1",
"description": "something is broken",
"priority": "MAJOR",
"status": "NEW",
"reporterId": 3,
"reportedDate": "2026-05-08T00:25:28.663581500"
},
{
"issueId": 2,
"projectId": 1,
"title": "Bug-1",
"description": "something is broken",
"priority": "MAJOR",
"status": "NEW",
"reporterId": 3,
"reportedDate": "2026-05-15T15:20:49.604841"
},
{
"issueId": 3,
"projectId": 1,
"title": "Login button error",
"description": "The login button does not respond.",
"priority": "MAJOR",
"status": "CLOSED",
"reporterId": 4,
"assigneeId": 3,
"fixerId": 3,
"reportedDate": "2026-05-15T15:20:49.608930",
"fixedDate": "2026-05-15T15:20:49.612724",
"resolvedDate": "2026-05-15T15:20:49.613723",
"closedDate": "2026-05-15T15:20:49.615542"
}
]
[]
5 changes: 5 additions & 0 deletions data/project_members.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@
"projectId": 1,
"accountId": 4,
"role": "TESTER"
},
{
"projectId": 2,
"accountId": 4,
"role": "TESTER"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import java.lang.reflect.Type;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;


Expand All @@ -27,7 +28,7 @@ public List<Issue> findByProjectId(Long projectId){

public List<Issue> findByAssigneeId(Long assigneeId){
return findAll().stream()
.filter(issue -> issue.getAssigneeId().equals(assigneeId))
.filter(issue -> Objects.equals(issue.getAssigneeId(), assigneeId))
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ public List<Issue> getIssuesByPriority(Priority priority){
return issueRepository.findByPriority(priority);
}

public List<Issue> getIssuesByStatusAndPriority(Status status, Priority priority){
if(status == null && priority == null) return getAllIssues();
if(status == null) return getIssuesByPriority(priority);
if(priority == null) return getIssuesByStatus(status);

return issueRepository.findByStatus(status).stream()
.filter(issue -> issue.getPriority() == priority)
.toList();
}

public Issue getIssueById(Long issueId){
if(issueId == null) return null;
return issueRepository.findByIssueId(issueId);
Expand Down
Loading