-
Notifications
You must be signed in to change notification settings - Fork 0
Add calendar and timeline planning views for due-date workflows #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c94276e
9d125ac
ba7c34f
b20be60
9685713
53ea37c
1ab0367
5975a74
2f9938c
1681120
7f83048
7b89a03
46384a1
5d2cbb1
e6fd446
b916721
7b511b5
94613cb
057b7b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,4 +237,35 @@ public async Task<IEnumerable<Card>> GetBlockedByBoardIdAsync( | |
|
|
||
| return await query.ToListAsync(cancellationToken); | ||
| } | ||
|
|
||
| public async Task<IEnumerable<Card>> GetByDueDateRangeAsync( | ||
| IEnumerable<Guid> boardIds, | ||
| DateTimeOffset from, | ||
| DateTimeOffset to, | ||
| CancellationToken cancellationToken = default) | ||
| { | ||
| var materializedBoardIds = boardIds | ||
| .Where(id => id != Guid.Empty) | ||
| .Distinct() | ||
| .ToList(); | ||
|
|
||
| if (materializedBoardIds.Count == 0) | ||
| return []; | ||
|
|
||
| const int maxResults = 500; | ||
|
|
||
| return await _dbSet | ||
| .AsNoTracking() | ||
| .Where(c => | ||
| materializedBoardIds.Contains(c.BoardId) && | ||
| c.DueDate.HasValue && | ||
| c.DueDate.Value >= from && | ||
| c.DueDate.Value < to) | ||
| .Include(c => c.Board) | ||
| .Include(c => c.Column) | ||
| .OrderBy(c => c.DueDate) | ||
| .ThenBy(c => c.BoardId) | ||
| .Take(maxResults) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This query hard-caps results with Useful? React with 👍 / 👎. |
||
| .ToListAsync(cancellationToken); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsOverdueis computed using a full timestamp comparison (c.DueDate < referenceTime). Elsewhere inWorkspaceServiceoverdue is date-based viaResolveDueBucket(cards due today are not overdue). This mismatch will mark “due today” items as overdue once their due time passes (often immediately at midnight) and will diverge from existing Today/saved-view semantics. Compute overdue using the same date-only logic (e.g., reuseResolveDueBucket/ compareDueDate.Value.Datevs the reference day in the due date’s offset).