Bug 1013545

Summary: Rule validation has no result if date-effective or date-expires option has wrong date format
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: etirelli
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:17:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
server.log with exception stack trace none

Description Jiri Locker 2013-09-30 10:24:27 UTC
Created attachment 805069 [details]
server.log with exception stack trace

Description of problem:
date-effective and date-expires rule options in GRE has a plain text input. User has no idea what the expected date format is. If the option contains value in wrong format validation of the rule gives no UI result due to server-side exception. The same applies for DRL Editor validation.

Version-Release number of selected component (if applicable):
ER3

How reproducible:
-

Steps to Reproduce:
1. open any Guided Rule
2. add date-effective option, leave it blank or fill in yyyy-MM-dd date
3. click Validate

Actual results:
No UI response. User has no idea what is wrong with the rule.

Expected results:
The invalid date format error should be propagated to the client. Date picker for input field in GRE would be a plus.

Additional info:

Comment 1 Edson Tirelli 2013-09-30 21:34:03 UTC
Assigning this to Mario to make sure the builder is properly catching and reporting the exception. After that is done, if still not working, please assign the issue back to Michael to verify why the UI is not picking that up.

Comment 5 Mario Fusco 2013-10-08 15:30:36 UTC
I am now catching and raising a compilation error when those dates are in the wrong format.

Fixed by https://github.com/droolsjbpm/drools/commit/955939aed

Comment 6 Jiri Locker 2013-12-17 12:56:29 UTC
Now it is not possible to input incorrect date format for date-* options.

1. Date picker widget always generates the text date in the correct format.
2. Manually input date is reset to today if the input isn't correct.

It is possible to save incorrect date outside the guided editor using git. The behaviour is then a little inconsistent, though. The rule can be opened in guided editor. Validation reports wrong date format. However project build passes successfully. Shouldn't it fail if there are invalid rules in the project? (This is a candidate for a new ticket.)