Giter Site home page Giter Site logo

youcal's People

Contributors

cxwudi avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

youcal's Issues

Let cliapp support mapping to different type of `VEvent`

Currently, the yc-app-cli only support mapping all event to one EventType. If it is unmappable, the issue is discarded completely. Although users can run a second instance of yc-app-cli to map to other type, this would make double-creating issues in iCalendars produced from both instances.

So the yc-app-cli should support mapping issues to different event types. While many settings like OtherStringMappings can be shared, however, the AlarmSetting must be separated and users need to define them repeatedly (in fact, users can use spring's property placeholder to avoid declaring similar settings again and again)

Refactor the modelling of date time field setting to be consistent with RFC5545

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:

  1. date type start
  2. date type start + day/week-wise duration (allow users to set a default duration with # of days)
  3. date type start + date type end
  4. Date time type start + Date time type end
  5. Date time type start + duration (allow users to set a default duration)

Then, the 5 types can also to mapped to 3 different EventType:

1. one day event
2. multi-day event
3. datetime event

So 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:

  1. make ToBeMappedYouTrackIssueInfo a normal data class, and it contains a list of instances of DateTimeFieldInfo. (solve #9)
  2. The DateTimeFieldInfo would also be a normal data class with the following fields:
    1. An enum field determining is the event is date or datetime type:
    2. An start datetime field
    3. A list of instances of a sealed interface called maybe EndDateTimeFieldInfo. (see explanation below)
    4. A list of AlarmSetting. (see #8)
      The first two fields identify the DateTimeFieldInfo instance.
  3. EndDateTimeFieldInfo simply have 3 subclasses of
    1. uses a dedicated end datetime field from YouTrack issue
    2. uses a dedicated duration field from YouTrack issue, with asking to be negative or positive
    3. uses a fixed duration
  4. 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.
    1. 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
    2. 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)

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

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker/docker-compose.gradle-test.yml
github-actions
.github/workflows/gradle-test.yml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/gradle-build-action v2
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
  • org.springframework.boot:spring-boot-dependencies 3.3.0
  • io.kotest:kotest-bom 5.9.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-bom 1.8.1
  • org.jetbrains.kotlin:kotlin-gradle-plugin 2.0.0
  • org.jetbrains.kotlin:kotlin-allopen 2.0.0
  • org.springframework.boot:spring-boot-gradle-plugin 3.3.0
  • com.gradle.enterprise:com.gradle.enterprise.gradle.plugin 3.17.4
  • org.gradle.toolchains:foojay-resolver 0.8.0
  • com.github.CXwudi:kotlin-jvm-inline-logging 1.0.1
  • io.kotest.extensions:kotest-extensions-spring 1.3.0
  • io.mockk:mockk 1.13.11
  • com.ninja-squad:springmockk 4.0.2
  • org.mnode.ical4j:ical4j 4.0.0-rc6
  • org.graalvm.buildtools.native 0.10.2
  • org.jetbrains.kotlin.jvm 2.0.0
gradle/platform/settings.gradle.kts
gradle/platform/dev-version-constraints/build.gradle.kts
gradle/plugins/settings.gradle.kts
gradle/plugins/convention/kotlin-lib/build.gradle.kts
gradle/plugins/convention/kotlin-lib/src/main/kotlin/my.kotlin-jvm-lib.gradle.kts
gradle/plugins/convention/kotlin-spring-app/build.gradle.kts
gradle/plugins/convention/kotlin-spring-app/src/main/kotlin/my.kotlin-spring-app.gradle.kts
gradle/plugins/convention/kotlin-spring-lib/build.gradle.kts
gradle/plugins/convention/kotlin-spring-lib/src/main/kotlin/my.kotlin-spring-lib.gradle.kts
gradle/plugins/mixin/app/build.gradle.kts
gradle/plugins/mixin/app/src/main/kotlin/my/mixin/app.gradle.kts
gradle/plugins/mixin/kotlin-jvm/build.gradle.kts
gradle/plugins/mixin/kotlin-jvm/src/main/kotlin/my/mixin/kotlin-jvm.gradle.kts
gradle/plugins/mixin/lib/build.gradle.kts
gradle/plugins/mixin/lib/src/main/kotlin/my/mixin/lib.gradle.kts
gradle/plugins/mixin/spring-boot-app/build.gradle.kts
gradle/plugins/mixin/spring-boot-app/src/main/kotlin/my/mixin/spring-boot-app.gradle.kts
gradle/plugins/mixin/spring-boot-kotlin/build.gradle.kts
gradle/plugins/mixin/spring-boot-kotlin/src/main/kotlin/my/mixin/spring-boot-kotlin.gradle.kts
gradle/plugins/root/build.gradle.kts
gradle/plugins/root/src/main/kotlin/my/root/jvm.gradle.kts
gradle/settings/settings.gradle.kts
gradle/settings/root-settings-plugins/build.gradle.kts
gradle/settings/root-settings-plugins/src/main/kotlin/my.root-settings-plugins.settings.gradle.kts
yc-apiclient-youtrack/build.gradle.kts
yc-app-cli/build.gradle.kts
yc-core-ical/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.