Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

[DmfsTask] implement status field handlers - #436

Merged
sunkup merged 7 commits into
mainfrom
429-dmfstask-implement-status-field-handlers
May 26, 2026
Merged

[DmfsTask] implement status field handlers#436
sunkup merged 7 commits into
mainfrom
429-dmfstask-implement-status-field-handlers

Conversation

@sunkup

Copy link
Copy Markdown
Member

No description provided.

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

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/StatusHandler.ktNew field handler mapping dmfs STATUS to iCal Status.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/PriorityHandler.ktNew field handler mapping dmfs PRIORITY into Task.priority.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/PercentCompleteHandler.ktNew field handler mapping dmfs PERCENT_COMPLETE into Task.percentComplete.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/CompletedHandler.ktNew field handler mapping dmfs COMPLETED epoch millis into iCal Completed.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/ClassificationHandler.ktNew field handler mapping dmfs CLASSIFICATION into iCal Clazz.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.ktUses the new handlers and removes the previously inlined status-field mapping.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/StatusHandlerTest.ktTests for StatusHandler mappings and defaults.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/PriorityHandlerTest.ktTests for PriorityHandler default + value passthrough.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/PercentCompleteHandlerTest.ktTests for PercentCompleteHandler null/default + common values.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/CompletedHandlerTest.ktTests for CompletedHandler null/default + epoch millis conversion.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/ClassificationHandlerTest.ktTests for ClassificationHandler known values + unknown handling.

@sunkup
sunkup requested a review from ckettiMay 22, 2026 12:28
@sunkup
sunkup marked this pull request as ready for review May 22, 2026 12:28
@sunkup
sunkupforce-pushed the 429-dmfstask-implement-status-field-handlers branch from d977e7e to 9c379dbCompareMay 22, 2026 12:57
@sunkup
sunkup requested a review from rfc2822May 26, 2026 11:29

@rfc2822rfc2822 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a merge conflict but looks good otherwise.

@rfc2822
rfc2822 removed the request for review from ckettiMay 26, 2026 12:19
# Conflicts:
#	lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.kt
@sunkup
sunkup merged commit 7c4abc5 into mainMay 26, 2026
2 of 8 checks passed
@sunkup
sunkup deleted the 429-dmfstask-implement-status-field-handlers branch May 26, 2026 12:23
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactoringQuality improvement of existing functionstasksRegarding 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

3 participants

@sunkup@rfc2822