Bug 1013545 - Rule validation has no result if date-effective or date-expires option has wrong date format
Summary: Rule validation has no result if date-effective or date-expires option has wr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER5
: 6.0.0
Assignee: Mario Fusco
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 10:24 UTC by Jiri Locker
Modified: 2014-08-06 20:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:17:52 UTC
Type: Bug
Embargoed:


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

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.)


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