[DmfsTask] implement status field handlers#436
Open
sunkup wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR factors dmfs task “status-related” field mapping (priority, classification, status, completed timestamp, percent complete) out of DmfsTaskProcessor into dedicated DmfsTaskFieldHandler implementations and adds Robolectric unit tests for each handler.
Changes:
- Added
PriorityHandler,ClassificationHandler,StatusHandler,CompletedHandler, andPercentCompleteHandlerto map dmfsTasks.*columns intoat.bitfire.ical4android.Task. - Wired the new handlers into
DmfsTaskProcessorand removed the inlined mapping code. - Added handler-level Robolectric tests covering default behavior and known/unknown values.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/StatusHandler.kt | New field handler mapping dmfs STATUS to iCal Status. |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/PriorityHandler.kt | New field handler mapping dmfs PRIORITY into Task.priority. |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/PercentCompleteHandler.kt | New field handler mapping dmfs PERCENT_COMPLETE into Task.percentComplete. |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/CompletedHandler.kt | New field handler mapping dmfs COMPLETED epoch millis into iCal Completed. |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/ClassificationHandler.kt | New field handler mapping dmfs CLASSIFICATION into iCal Clazz. |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.kt | Uses the new handlers and removes the previously inlined status-field mapping. |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/StatusHandlerTest.kt | Tests for StatusHandler mappings and defaults. |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/PriorityHandlerTest.kt | Tests for PriorityHandler default + value passthrough. |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/PercentCompleteHandlerTest.kt | Tests for PercentCompleteHandler null/default + common values. |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/CompletedHandlerTest.kt | Tests for CompletedHandler null/default + epoch millis conversion. |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/ClassificationHandlerTest.kt | Tests for ClassificationHandler known values + unknown handling. |
d977e7e to
9c379db
Compare
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.
No description provided.