From bce9b2f4bbb5c174e5a691bea8797e2b6adc07d6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:32:23 +0200 Subject: [PATCH 1/2] Bugfix/fix clone functionality of activity (#3678) * Fix clone functionality * Update changelog --- CHANGELOG.md | 6 ++++++ libs/common/src/lib/validator-constraints/is-after-1970.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19669c3a8..9a993b13a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Fixed an issue with the clone functionality of an activity caused by a changed date format + ## 2.104.0 - 2024-08-17 ### Added diff --git a/libs/common/src/lib/validator-constraints/is-after-1970.ts b/libs/common/src/lib/validator-constraints/is-after-1970.ts index 3f5b7db0d..9dc0b04c0 100644 --- a/libs/common/src/lib/validator-constraints/is-after-1970.ts +++ b/libs/common/src/lib/validator-constraints/is-after-1970.ts @@ -2,7 +2,7 @@ import { ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator'; -import { format, isAfter, parseISO } from 'date-fns'; +import { format, isAfter } from 'date-fns'; @ValidatorConstraint({ name: 'isAfter1970' }) export class IsAfter1970Constraint implements ValidatorConstraintInterface { @@ -10,7 +10,7 @@ export class IsAfter1970Constraint implements ValidatorConstraintInterface { return `date must be after ${format(new Date(0), 'yyyy')}`; } - public validate(aDateString: string) { - return isAfter(parseISO(aDateString), new Date(0)); + public validate(aDate: Date) { + return isAfter(aDate, new Date(0)); } } From 6c79ccb2a962559b995fcb91364eece6f9d359bc Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:34:56 +0200 Subject: [PATCH 2/2] Release 2.104.1 (#3679) --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a993b13a..d16afe5f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 2.104.1 - 2024-08-17 ### Fixed diff --git a/package.json b/package.json index 2e88f3856..843dee919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.104.0", + "version": "2.104.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio",