Skip to content

Introduce DmfsTaskFieldBuilder#347

Open
sunkup wants to merge 1 commit intomainfrom
339-dmfstask-introduce-dmfstaskfieldbuilder-interface-first-builder
Open

Introduce DmfsTaskFieldBuilder#347
sunkup wants to merge 1 commit intomainfrom
339-dmfstask-introduce-dmfstaskfieldbuilder-interface-first-builder

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented May 8, 2026

Introduce DmfsTaskFieldBuilder and extract title field mapping to TitleBuilder

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

Introduces a small “field builder” abstraction for dmfs task row mapping and extracts the task title mapping into a dedicated TitleBuilder, aligning behavior with existing calendar field builders.

Changes:

  • Add DmfsTaskFieldBuilder interface for mapping individual Task fields into an Android Entity.
  • Extract Tasks.TITLE mapping into mapping/tasks/builder/TitleBuilder (blank/whitespace-only titles become null via trimToNull()).
  • Add Robolectric unit tests covering the title mapping behavior.

Reviewed changes

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

File Description
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskBuilder.kt Switches title mapping to the new field-builder mechanism and applies built values via withValues().
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/builder/DmfsTaskFieldBuilder.kt Defines the task field builder interface and its contract (including explicit null handling).
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/builder/TitleBuilder.kt Implements Tasks.TITLE mapping using trimToNull() to normalize blank titles to null.
lib/src/test/kotlin/at/bitfire/synctools/mapping/tasks/builder/TitleBuilderTest.kt Adds tests for missing/blank/text SUMMARY → TITLE mapping behavior.

@sunkup sunkup force-pushed the 339-dmfstask-introduce-dmfstaskfieldbuilder-interface-first-builder branch from 795a3f1 to 6193a0a Compare May 8, 2026 13:22
@sunkup sunkup marked this pull request as ready for review May 8, 2026 13:22
@sunkup sunkup requested a review from rfc2822 May 8, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DmfsTask: introduce DmfsTaskFieldBuilder interface + first builder

3 participants