This repository was archived by the owner on May 26, 2026. It is now read-only.
Introduce DmfsTaskFieldHandler and DmfsTaskPropertytHandler + three first handlers#401
Merged
sunkup merged 1 commit intoMay 20, 2026
Conversation
7f74070 to
1528009
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors DmfsTaskProcessor by introducing two handler interfaces (DmfsTaskFieldHandler for main task row fields and DmfsTaskPropertyHandler for property sub-rows) and extracting the first three handlers (UID, Title, Alarms) into separate classes with unit tests. This is a structural refactor to support better separation of concerns and testability of the task mapping logic.
Changes:
- Add
DmfsTaskFieldHandlerandDmfsTaskPropertyHandlerinterfaces - Extract
UidHandler,TitleHandler, andAlarmsHandlerfrom inline logic inDmfsTaskProcessor - Add Robolectric-based unit tests for each new handler
Reviewed changes
Copilot reviewed 9 out of 9 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/DmfsTaskFieldHandler.kt | New interface for mapping fields from a task row into a Task |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/DmfsTaskPropertyHandler.kt | New interface for mapping property sub-rows into a Task |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/UidHandler.kt | Extracted UID mapping |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/TitleHandler.kt | Extracted title/summary mapping |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/AlarmsHandler.kt | Extracted alarm property mapping |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.kt | Wires the new handler abstractions and removes inline logic |
| lib/src/test/kotlin/.../UidHandlerTest.kt | Tests for UidHandler |
| lib/src/test/kotlin/.../TitleHandlerTest.kt | Tests for TitleHandler |
| lib/src/test/kotlin/.../AlarmsHandlerTest.kt | Tests for AlarmsHandler |
1528009 to
adaa120
Compare
rfc2822
approved these changes
May 19, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
DmfsTaskFieldHandlerandDmfsTaskPropertytHandler