Bug 1013545 - Rule validation has no result if date-effective or date-expires option has wrong date format
Rule validation has no result if date-effective or date-expires option has wr...
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ER5
: 6.0.0
Assigned To: Mario Fusco
Jiri Locker
Depends On:
  Show dependency treegraph
Reported: 2013-09-30 06:24 EDT by Jiri Locker
Modified: 2014-08-06 16:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:17:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
server.log with exception stack trace (9.77 KB, text/plain)
2013-09-30 06:24 EDT, Jiri Locker
no flags Details

  None (edit)
Description Jiri Locker 2013-09-30 06:24:27 EDT
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):

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 17:34:03 EDT
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 11:30:36 EDT
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 07:56:29 EST
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.)

Note You need to log in before you can comment on or make changes to this bug.