Skip to content

Commit

Permalink
fix: Use correct value type for dates [DHIS2-15891]
Browse files Browse the repository at this point in the history
  • Loading branch information
enricocolasante committed Dec 23, 2024
1 parent efccebc commit 8994518
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}

version = "3.2.1-SNAPSHOT"
version = "3.2.2-SNAPSHOT"
group = "org.hisp.dhis.rules"

if (project.hasProperty("removeSnapshotSuffix")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ internal class RuleVariableValueMapBuilder {
val valueMap: MutableMap<String, RuleVariableValue> = HashMap()
valueMap[RuleEngineUtils.ENV_VAR_CURRENT_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
currentDate.toString(),
listOf(currentDate.toString()),
currentDate.toString(),
Expand Down Expand Up @@ -140,7 +140,7 @@ internal class RuleVariableValueMapBuilder {
.toString()
valueMap[RuleEngineUtils.ENV_VAR_EVENT_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
eventDate,
listOf(eventDate),
currentDate.toString(),
Expand All @@ -149,7 +149,7 @@ internal class RuleVariableValueMapBuilder {
val dueDate = ruleEvent.dueDate
valueMap[RuleEngineUtils.ENV_VAR_DUE_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
dueDate.toString(),
listOf(dueDate.toString()),
currentDate.toString(),
Expand All @@ -159,7 +159,7 @@ internal class RuleVariableValueMapBuilder {
val completedDate = ruleEvent.completedDate
valueMap[RuleEngineUtils.ENV_VAR_COMPLETED_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
completedDate.toString(),
listOf(completedDate.toString()),
currentDate.toString(),
Expand Down Expand Up @@ -231,15 +231,15 @@ internal class RuleVariableValueMapBuilder {
val enrollmentDate = ruleEnrollment.enrollmentDate
valueMap[RuleEngineUtils.ENV_VAR_ENROLLMENT_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
enrollmentDate.toString(),
listOf(enrollmentDate.toString()),
currentDate.toString(),
)
val incidentDate = ruleEnrollment.incidentDate
valueMap[RuleEngineUtils.ENV_VAR_INCIDENT_DATE] =
RuleVariableValue(
RuleValueType.TEXT,
RuleValueType.DATE,
incidentDate.toString(),
listOf(incidentDate.toString()),
currentDate.toString(),
Expand Down
Loading

0 comments on commit 8994518

Please sign in to comment.