-
Notifications
You must be signed in to change notification settings - Fork 0
Remove meeting category and slot kind from task/schedule system #268
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
Open
masa10-f
wants to merge
1
commit into
main
Choose a base branch
from
claude/remove-meeting-feature-hk4Gb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,10 +49,10 @@ def test_user(test_session): | |
| def sample_weekly_recurring_task_data(): | ||
| """Sample weekly recurring task data for testing.""" | ||
| return { | ||
| "title": "週次振り返り会議", | ||
| "description": "チームの週次振り返り会議", | ||
| "title": "週次レビュー", | ||
| "description": "チームの週次レビュー", | ||
| "estimate_hours": 2.0, | ||
| "category": TaskCategory.MEETING, | ||
| "category": TaskCategory.REVIEW, | ||
| "is_active": True, | ||
| } | ||
|
|
||
|
|
@@ -67,10 +67,10 @@ def test_create_weekly_recurring_task( | |
| test_session, task_data, test_user.id | ||
| ) | ||
|
|
||
| assert task.title == "週次振り返り会議" | ||
| assert task.description == "チームの週次振り返り会議" | ||
| assert task.title == "週次レビュー" | ||
| assert task.description == "チームの週次レビュー" | ||
| assert task.estimate_hours == Decimal("2.0") | ||
| assert task.category == TaskCategory.MEETING | ||
| assert task.category == TaskCategory.REVIEW | ||
| assert task.is_active is True | ||
| assert task.user_id == test_user.id | ||
| assert task.id is not None | ||
|
|
@@ -111,12 +111,12 @@ def test_get_weekly_recurring_tasks( | |
| def test_get_weekly_recurring_tasks_with_filters(test_session: Session, test_user): | ||
| """Test getting weekly recurring tasks with filters.""" | ||
| # Create tasks with different categories and statuses | ||
| active_meeting_task = weekly_recurring_task_service.create_weekly_recurring_task( | ||
| active_admin_task = weekly_recurring_task_service.create_weekly_recurring_task( | ||
|
||
| test_session, | ||
| WeeklyRecurringTaskCreate( | ||
| title="週次会議", | ||
| title="事務作業", | ||
| estimate_hours=1.5, | ||
| category=TaskCategory.MEETING, | ||
| category=TaskCategory.ADMIN, | ||
| is_active=True, | ||
| ), | ||
| test_user.id, | ||
|
|
@@ -134,11 +134,11 @@ def test_get_weekly_recurring_tasks_with_filters(test_session: Session, test_use | |
| ) | ||
|
|
||
| # Filter by category | ||
| meeting_tasks = weekly_recurring_task_service.get_weekly_recurring_tasks( | ||
| test_session, test_user.id, category=TaskCategory.MEETING | ||
| admin_tasks = weekly_recurring_task_service.get_weekly_recurring_tasks( | ||
| test_session, test_user.id, category=TaskCategory.ADMIN | ||
| ) | ||
| assert len(meeting_tasks) >= 1 | ||
| assert all(task.category == TaskCategory.MEETING for task in meeting_tasks) | ||
| assert len(admin_tasks) >= 1 | ||
| assert all(task.category == TaskCategory.ADMIN for task in admin_tasks) | ||
|
|
||
| # Filter by active status | ||
| active_tasks = weekly_recurring_task_service.get_weekly_recurring_tasks( | ||
|
|
@@ -311,10 +311,10 @@ def test_weekly_recurring_task_filter_by_category( | |
| """Test filtering weekly recurring tasks by category.""" | ||
|
|
||
| # Create tasks with different categories | ||
| meeting_task = { | ||
| "title": "会議", | ||
| admin_task = { | ||
| "title": "事務作業", | ||
| "estimate_hours": 1.0, | ||
| "category": TaskCategory.MEETING, | ||
| "category": TaskCategory.ADMIN, | ||
| "is_active": True, | ||
| } | ||
|
|
||
|
|
@@ -327,7 +327,7 @@ def test_weekly_recurring_task_filter_by_category( | |
|
|
||
| # Create both tasks | ||
| response = client.post( | ||
| "/api/weekly-recurring-tasks/", json=meeting_task, headers=auth_headers | ||
| "/api/weekly-recurring-tasks/", json=admin_task, headers=auth_headers | ||
| ) | ||
| assert response.status_code == 201 | ||
|
|
||
|
|
@@ -336,15 +336,15 @@ def test_weekly_recurring_task_filter_by_category( | |
| ) | ||
| assert response.status_code == 201 | ||
|
|
||
| # Filter by meeting category | ||
| # Filter by admin category | ||
| response = client.get( | ||
| "/api/weekly-recurring-tasks/?category=meeting", headers=auth_headers | ||
| "/api/weekly-recurring-tasks/?category=admin", headers=auth_headers | ||
| ) | ||
|
|
||
| assert response.status_code == 200 | ||
| tasks = response.json() | ||
| assert len(tasks) >= 1 | ||
| assert all(task["category"] == TaskCategory.MEETING for task in tasks) | ||
| assert all(task["category"] == TaskCategory.ADMIN for task in tasks) | ||
|
|
||
| # Filter by study category | ||
| response = client.get( | ||
|
|
||
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
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
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
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
Oops, something went wrong.
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.
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.
Removing the
MEETINGenum value fromTaskCategorymeans any existing DB rows withcategory='meeting'will fail to hydrate through SQLAlchemy’s enum mapping (thecategoryfields inmodels.pyuseSQLEnum(TaskCategory, ...)). In deployments with historical meeting tasks, reads (e.g., weekly recurring task listings) will raise aLookupError/validation error and 500. The commit doesn’t include a migration/backfill to rewrite existing rows, so this breaks existing data unless handled elsewhere.Useful? React with 👍 / 👎.