fix: Don't create due dates in the past#95
Draft
srubin wants to merge 5 commits into
Draft
Conversation
When calculateDueDate determines a due date that is in the past, it now returns undefined instead of the past date. This prevents Dependicus from creating Linear and GitHub issues with due dates that have already passed. Fixes BIX-8427 Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Dependicus will no longer create issues with due dates that are already in the past. Instead of showing an overdue date, such issues are created without a due date.
Why
What Changed
Modified
calculateDueDate()insrc/core/utils/versionUtils.tsto returnundefinedwhen the calculated due date falls before today's date. The function now accepts an optionalnowparameter for testing.Updated tests to:
nowdates to test both past and future due date scenariosThis fix affects both Linear and GitHub issue creation — neither will set past due dates anymore. The existing code already handled
undefineddue dates correctly, so no changes were needed in the issue reconcilers.Duck Note
Like a duck that doesn't dwell on missed breadcrumb opportunities, Dependicus now moves forward without fixating on past due dates. 🦆
Closes BIX-8427
Linear Issue: BIX-8427