You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since DtEnd and Duration are both related to the end date, we could group these two into one sealed interface.
Since we also want to support have fallbacks for some fields if one field value is missing (this can be only applicable at the same type of event), and we also want to support #9 . Hence, the new modelling would be following:
uses a dedicated end datetime field from YouTrack issue
uses a dedicated duration field from YouTrack issue, with asking to be negative or positive
uses a fixed duration
EndDateTimeFieldInfo is used for representing a multi-day event and datetime event. If the list is empty, it means no end datetime = a whole day event. The order of the list representing the attempt to create end date time or duration.
e.g. The ToBeMappedYouTrackIssueInfo can contain all 3 types of EndDateTimeFieldInfo in the list. And the 3rd option "uses a fixed duration" can be the backout option if both the end datetime field and duration field is unavailable in a YouTrack issue
However, if all attempts from the list is failed (e.g. a non-empty list without the "uses a fixed duration" EndDateTimeFieldInfo and all fields in that list failed to get value), then this should be traded as hard mapping failure (same level failure as missing start date), because mapping it to a whole day event may cause confusion. (or maybe we can make it a configurable setting)
The text was updated successfully, but these errors were encountered:
CXwudi
changed the title
Refactor the modelling of date time field setting to be consistent with RFC5455
Refactor the modelling of date time field setting to be consistent with RFC5545
Jan 6, 2023
Currently we are using our own model but it is actually quite annoying and hard to model it.
Why not just use whatever RFC5545's VEvent defined. In summary, a VEvent can have:
Then, the 5 types can also to mapped to 3 differentEventType
:1. one day event2. multi-day event3. datetime eventSo this lead to 3 settable fields: DtStart, DtEnd, and Duration.
Since DtEnd and Duration are both related to the end date, we could group these two into one sealed interface.
Since we also want to support have fallbacks for some fields if one field value is missing (this can be only applicable at the same type of event), and we also want to support #9 . Hence, the new modelling would be following:
ToBeMappedYouTrackIssueInfo
a normal data class, and it contains a list of instances ofDateTimeFieldInfo
. (solve Let cliapp support mapping to different type ofVEvent
#9)DateTimeFieldInfo
would also be a normal data class with the following fields:EndDateTimeFieldInfo
. (see explanation below)AlarmSetting
. (see Refactor the modelling of the alarm setting to be consistent with RFC5545 #8)The first two fields identify the
DateTimeFieldInfo
instance.EndDateTimeFieldInfo
simply have 3 subclasses ofEndDateTimeFieldInfo
is used for representing a multi-day event and datetime event. If the list is empty, it means no end datetime = a whole day event. The order of the list representing the attempt to create end date time or duration.ToBeMappedYouTrackIssueInfo
can contain all 3 types ofEndDateTimeFieldInfo
in the list. And the 3rd option "uses a fixed duration" can be the backout option if both the end datetime field and duration field is unavailable in a YouTrack issueEndDateTimeFieldInfo
and all fields in that list failed to get value), then this should be traded as hard mapping failure (same level failure as missing start date), because mapping it to a whole day event may cause confusion. (or maybe we can make it a configurable setting)The text was updated successfully, but these errors were encountered: