Skip to content
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

fix: Edit Task modal now retains edits to Cancelled date #3099

Merged
merged 8 commits into from
Sep 24, 2024

Conversation

claremacrae
Copy link
Collaborator

Types of changes

Changes visible to users:

  • Bug fix (prefix: fix - non-breaking change which fixes an issue)

Internal changes:

  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Description

When changing status type to CANCELLED, use the Cancelled Date as today instead of the Done Date.

Motivation and Context

Fixes #3089

How has this been tested?

  • running existing tests
    • this actually fixed two of the existing tests, not just the one that linked to the issue being fixed here
  • manual exploratory testing

Screenshots (if appropriate)

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change has adequate Unit Test coverage.

Terms

@claremacrae claremacrae added the scope: edit task The Create or edit task modal/dialog label Sep 24, 2024
@claremacrae
Copy link
Collaborator Author

Hi @ilandikov, if/when you have time, could you review this please?

Copy link
Collaborator

@ilandikov ilandikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving with a couple of suggestions =)

src/ui/EditableTask.ts Outdated Show resolved Hide resolved
src/ui/EditableTask.ts Show resolved Hide resolved
@ilandikov
Copy link
Collaborator

Feel free to resolve by yourself and merge =)

@ilandikov
Copy link
Collaborator

One more thing, should there be a test added to EditableTask.test.ts? At the end of the day, it's that class that changes the behaviour, and EditableTask.applyEdits() is tested, but not with regards to the changes in this PR

Copy link

sonarcloud bot commented Sep 24, 2024

@claremacrae claremacrae merged commit 3c6809d into main Sep 24, 2024
3 checks passed
@claremacrae claremacrae deleted the fix-edit-cancelled-date branch September 24, 2024 17:29
@claremacrae
Copy link
Collaborator Author

One more thing, should there be a test added to EditableTask.test.ts? At the end of the day, it's that class that changes the behaviour, and EditableTask.applyEdits() is tested, but not with regards to the changes in this PR

In an ideal world, probably yes - fair point.

However, I'm comfortable that the changes are covered in tests somewhere though - and feel I've spent enough time on this issue... If it fails again, we will find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: edit task The Create or edit task modal/dialog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit Modal ignores edits to cancelled date
2 participants