vidakovic commented on code in PR #5903:
URL: https://github.com/apache/fineract/pull/5903#discussion_r3389012064


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobUpdateRequest.java:
##########
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.infrastructure.jobs.data;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.validation.constraints.AssertTrue;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.FieldNameConstants;
+import org.quartz.CronExpression;
+
+@Builder
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@FieldNameConstants
+public class JobUpdateRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Long jobId;
+
+    private String displayName;
+    private String cronExpression;
+    private Boolean active;
+
+    @JsonIgnore
+    @AssertTrue(message = 
"{org.apache.fineract.infrastructure.jobs.update.at-least-one-field}")

Review Comment:
   Ok, two things:
   
   1. Translation key: how about this pattern:
   
   `org.apache.fineract.infrastructure.job.update.assertion.at-least-one` ... 
and below...
   `org.apache.fineract.infrastructure.job.update.assertion.cron-expression`
   
   This keeps things short and we have the same number of segments in both keys 
("assertions" tells us already  that something is validated, so we don't have 
to use words like "invalid" and similar). Not earth shattering differences, but 
keeps everything compact and concise.
   
   2. Did you actually provide translations for these keys? I don't see any 
changes in 
https://github.com/apache/fineract/blob/develop/fineract-validation/src/main/resources/ValidationMessages.properties;
 please fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to