[jtx rewrite] Implement basic info handlers#2474
Open
ArnyminerZ wants to merge 7 commits into
Open
Conversation
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
9 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a set of new JTX → iCalendar entity handlers for “basic info” fields (summary, status, URL, contact, color, classification, geofence radius, extended status) and introduces corresponding Robolectric unit tests for each handler.
Changes:
- Added new
JtxObjectEntityHandlerimplementations to map basic JTX columns intoCalendarComponentproperties. - Added unit tests validating per-field mapping behavior (including “missing value” scenarios).
- Added handling for X-properties (
X-STATUS,X-GEOFENCE-RADIUS) viaXProperty.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/XStatusHandler.kt | Maps EXTENDED_STATUS from JTX into an iCalendar X-property. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/UrlHandler.kt | Maps JTX URL into iCalendar URL. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/SummaryHandler.kt | Maps JTX SUMMARY into iCalendar SUMMARY. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/StatusHandler.kt | Maps JTX STATUS into iCalendar STATUS. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/GeoFenceRadiusHandler.kt | Maps JTX GEOFENCE_RADIUS into iCalendar X-GEOFENCE-RADIUS. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/ContactHandler.kt | Maps JTX CONTACT into iCalendar CONTACT. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/ColorHandler.kt | Maps JTX COLOR int into iCalendar COLOR name via nearest CSS3 match. |
| synctools/src/main/kotlin/at/bitfire/synctools/mapping/jtx/handler/ClassificationHandler.kt | Maps JTX CLASSIFICATION into iCalendar CLASS. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/XStatusHandlerTest.kt | Unit tests for X-status mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/UrlHandlerTest.kt | Unit tests for URL mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/SummaryHandlerTest.kt | Unit tests for summary mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/StatusHandlerTest.kt | Unit tests for status mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/GeoFenceRadiusHandlerTest.kt | Unit tests for geofence radius X-property mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/ContactHandlerTest.kt | Unit tests for contact mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/ColorHandlerTest.kt | Unit tests for color mapping. |
| synctools/src/test/kotlin/at/bitfire/synctools/mapping/jtx/handler/ClassificationHandlerTest.kt | Unit tests for classification mapping. |
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Add basic info handlers and their corresponding tests.
Short description
Note: description was already added
Checklist