Skip to content

Commit

Permalink
fix: 오늘 할 일 조회에 WARMING_UP 상태 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
skydreamer21 committed Mar 1, 2025
1 parent f738831 commit c2f76f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory
import com.ssak3.timeattack.task.domain.TaskStatus.BEFORE
import com.ssak3.timeattack.task.domain.TaskStatus.FOCUSED
import com.ssak3.timeattack.task.domain.TaskStatus.PROCRASTINATING
import com.ssak3.timeattack.task.domain.TaskStatus.WARMING_UP
import com.ssak3.timeattack.task.repository.entity.QTaskEntity
import com.ssak3.timeattack.task.repository.entity.TaskEntity
import org.springframework.stereotype.Repository
Expand Down Expand Up @@ -49,6 +50,7 @@ class TaskRepositoryCustomImpl(
.where(qTask.member.id.eq(memberId)
.and(
qTask.status.eq(FOCUSED)
.or(qTask.status.eq(WARMING_UP))
.or(qTask.status.eq(PROCRASTINATING))
.or(qTask.status.eq(BEFORE)
.and(qTask.triggerActionAlarmTime.between(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ class TaskRepositoryCustomImplTest (
val tasks = taskRepository.findTodayTasks(checkNotNull(member.id), LocalDate.parse("2025-03-01"))

// then
assertEquals(7, tasks.size)
assertEquals(8, tasks.size)

val taskNames = tasks.map { it.name }
assertTrue(taskNames.containsAll(listOf("urgent task2", "scheduled task1", "scheduled task2", "scheduled task3", "scheduled task4", "scheduled task5", "scheduled task7")))
assertTrue(taskNames.containsAll(listOf("urgent task2", "scheduled task1", "scheduled task2", "scheduled task3", "scheduled task4", "scheduled task5", "scheduled task7", "scheduled task10")))

}

Expand Down

0 comments on commit c2f76f4

Please sign in to comment.