Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the modelling of the alarm setting to be consistent with RFC5545 #8

Open
CXwudi opened this issue Jan 6, 2023 · 1 comment

Comments

@CXwudi
Copy link
Owner

CXwudi commented Jan 6, 2023

This is similar to #7 but for VAlarm. Since we only support Display type of alarm without any repeating. So modelling of this alarm is simply:

  1. make AlarmSetting a sealed interface of:
    1. Triggered by a fixed datetime, using field mapping
    2. Triggered by a duration, using field mapping, asking if the duration is positive or negative (since YouTrack doesn't support negative duration), also asking if it is related to either start or end
    3. Triggered by a fixed duration, the duration can be either positive or negative, can be either related to start or end
  2. the info will include a list of AlarmSetting instead of one AlarmSetting

⚠ One day event can not have a trigger related to the end date time. So the AlarmMapper should check if the ToBeMappedYouTrackIssueInfo has no EndDateTimeField instances and the trigger is related to dtend. If it is, discard such trigger

@CXwudi
Copy link
Owner Author

CXwudi commented Jan 6, 2023

Although there is a modelling (by using multiple interfaces) which can make one day event has to use AlarmTriggerSetting that is related to start datetime only, it is very complicated, and I would rather rely on the validator to avoid bad config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant