From da36be0cac7931e757ae3f1351ba572a1d6e153a Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Tue, 27 Feb 2024 08:13:10 -0500 Subject: [PATCH] :bug: [MTA-1726] Migration Waves: require start and end date, require end > start (#604) Fixes https://issues.redhat.com/browse/MTA-1726 Signed-off-by: Sam Lucidi --- api/migrationwave.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/migrationwave.go b/api/migrationwave.go index 24835e5e9..8651a369e 100644 --- a/api/migrationwave.go +++ b/api/migrationwave.go @@ -182,8 +182,8 @@ func (h MigrationWaveHandler) Delete(ctx *gin.Context) { type MigrationWave struct { Resource `yaml:",inline"` Name string `json:"name"` - StartDate time.Time `json:"startDate" yaml:"startDate"` - EndDate time.Time `json:"endDate" yaml:"endDate"` + StartDate time.Time `json:"startDate" yaml:"startDate" binding:"required"` + EndDate time.Time `json:"endDate" yaml:"endDate" binding:"required,gtfield=StartDate"` Applications []Ref `json:"applications"` Stakeholders []Ref `json:"stakeholders"` StakeholderGroups []Ref `json:"stakeholderGroups" yaml:"stakeholderGroups"`