Skip to content

[DmfsTask] implement status field handlers#436

Open
sunkup wants to merge 6 commits into
mainfrom
429-dmfstask-implement-status-field-handlers
Open

[DmfsTask] implement status field handlers#436
sunkup wants to merge 6 commits into
mainfrom
429-dmfstask-implement-status-field-handlers

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented May 22, 2026

No description provided.

@sunkup sunkup self-assigned this May 22, 2026
@sunkup sunkup added refactoring Quality improvement of existing functions tasks Regarding tasks / everything that's stored in a task app provider labels May 22, 2026
@sunkup sunkup linked an issue May 22, 2026 that may be closed by this pull request
@sunkup sunkup requested a review from Copilot May 22, 2026 12:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and PercentCompleteHandler to map dmfs Tasks.* columns into at.bitfire.ical4android.Task.
  • Wired the new handlers into DmfsTaskProcessor and 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.

@sunkup sunkup requested a review from cketti May 22, 2026 12:28
@sunkup sunkup marked this pull request as ready for review May 22, 2026 12:28
@sunkup sunkup force-pushed the 429-dmfstask-implement-status-field-handlers branch from d977e7e to 9c379db Compare May 22, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Quality improvement of existing functions tasks Regarding tasks / everything that's stored in a task app provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DmfsTask: implement status field handlers

2 participants