Skip to content

Commit

Permalink
feat(core): allign all date conditions to trigger.date
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Dec 19, 2023
1 parent c64f7e7 commit d7e1ce5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class DateTimeBetweenCondition extends Condition implements ScheduleCondi
@NotNull
@Schema(
title = "The date to test",
description = "Can be any variable or any valid ISO 8601 datetime, default will use `{{ now() }}`"
description = "Can be any variable or any valid ISO 8601 datetime, default will use the trigger date"
)
@Builder.Default
@PluginProperty(dynamic = true)
private final String date = "{{ now() }}";
private final String date = "{{ trigger.date }}";

@Schema(
title = "The date to test must be after this one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class DayWeekCondition extends Condition implements ScheduleCondition {
@NotNull
@Schema(
title = "The date to test",
description = "Can be any variable or any valid ISO 8601 datetime, default will use `{{ now(format=\"iso_local_date\") }}`"
description = "Can be any variable or any valid ISO 8601 datetime, default will use the trigger date"
)
@Builder.Default
@PluginProperty(dynamic = true)
private final String date = "{{ now(format=\"iso_local_date\") }}";
private final String date = "{{ trigger.date }}";

@NotNull
@Schema(title = "The day of week")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public class DayWeekInMonthCondition extends Condition implements ScheduleCondit
@NotNull
@Schema(
title = "The date to test",
description = "Can be any variable or any valid ISO 8601 datetime, default will use `{{ now(format=\"iso_local_date\") }}`"
description = "Can be any variable or any valid ISO 8601 datetime, default will use the trigger date`"
)
@Builder.Default
@PluginProperty(dynamic = true)
private final String date = "{{ now(format=\"iso_local_date\") }}";
private final String date = "{{ trigger.date }}";

@NotNull
@Schema(title = "The day of week")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class TimeBetweenCondition extends Condition implements ScheduleCondition
@NotNull
@Schema(
title = "The time to test",
description = "Can be any variable or any valid ISO 8601 time, default will use `{{ now(format='iso_offset_time') }}`"
description = "Can be any variable or any valid ISO 8601 time, default will use the trigger date"
)
@Builder.Default
@PluginProperty(dynamic = true)
private final String date = "{{ now(format='iso_offset_time') }}";
private final String date = "{{ trigger.date }}";

@Schema(
title = "The time to test must be after this one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public class WeekendCondition extends Condition implements ScheduleCondition {
@NotNull
@Schema(
title = "The date to test",
description = "Can be any variable or any valid ISO 8601 datetime, default will use `{{ now(format=\"iso_local_date\") }}`"
description = "Can be any variable or any valid ISO 8601 datetime, default will use the trigger date"
)
@Builder.Default
@PluginProperty(dynamic = true)
private final String date = "{{ now(format='iso_local_date') }}";
private final String date = "{{ trigger.date }}";

@Override
public boolean test(ConditionContext conditionContext) throws InternalException {
Expand Down

0 comments on commit d7e1ce5

Please sign in to comment.