Skip to content

DmfsTask: implement descriptive field handlers#435

Open
sunkup wants to merge 9 commits into
mainfrom
428-dmfstask-implement-descriptive-field-handlers
Open

DmfsTask: implement descriptive field handlers#435
sunkup wants to merge 9 commits into
mainfrom
428-dmfstask-implement-descriptive-field-handlers

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented May 22, 2026

@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 11:00
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 refactors DmfsTaskProcessor to map additional “descriptive” dmfs task columns via dedicated DmfsTaskFieldHandler implementations, aligning the task-mapping approach more closely with the existing handler-based mapping patterns in the codebase.

Changes:

  • Added field handlers for task DESCRIPTION, LOCATION, GEO, TASK_COLOR, URL, and ORGANIZER.
  • Updated DmfsTaskProcessor.populateTask() to use the new handlers instead of inline mapping logic.
  • Added Robolectric unit tests for each new handler.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.kt Wires the new field handlers into task row → Task mapping and removes the previous inline implementations.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/UrlHandler.kt Maps Tasks.URL into Task.url.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/OrganizerHandler.kt Maps Tasks.ORGANIZER into Task.organizer (as mailto: URI) with invalid-URI handling.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/LocationHandler.kt Maps Tasks.LOCATION into Task.location.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/GeoHandler.kt Parses and maps Tasks.GEO into Task.geoPosition.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/DescriptionHandler.kt Maps Tasks.DESCRIPTION into Task.description.
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/ColorHandler.kt Maps Tasks.TASK_COLOR into Task.color.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/UrlHandlerTest.kt Tests URL field mapping into Task.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/OrganizerHandlerTest.kt Tests organizer mapping, including invalid organizer input handling.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/LocationHandlerTest.kt Tests location field mapping into Task.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/GeoHandlerTest.kt Tests GEO parsing/mapping and invalid input handling.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/DescriptionHandlerTest.kt Tests description field mapping into Task.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/handler/ColorHandlerTest.kt Tests color field mapping into Task.

Comment thread lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/GeoHandler.kt Outdated
@sunkup sunkup requested a review from ArnyminerZ May 22, 2026 11:22
@sunkup sunkup marked this pull request as ready for review May 22, 2026 11:22
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 descriptive field handlers

2 participants