Bug 825776

Summary: TestScenario: Cannot expect field whose type is java.sql.Date
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Sona Mala <smala>
Component: BRM (Guvnor)Assignee: Toni Rikkola <trikkola>
Status: VERIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ER9   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot for dd-MMM-yyyy
none
screenshot for yyyy-MM-dd
none
POJO model none

Description Sona Mala 2012-05-28 12:35:48 UTC
Created attachment 587232 [details]
screenshot for dd-MMM-yyyy

Description of problem:
I have POJO model with field 'date' whose type is java.sql.Date. In test scenario, I set field 'date' (section Given). In section Expect, I expect same value of date which I set in section Given. Test scenarion fail that these instance are not equal.

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

How reproducible:


Steps to Reproduce:
1. set drools.dateformat in "preferences.properties" (if directory jboss-brms.war/WEB-INF/classes) to dd-MMM-yyyy or yyyy-MM-dd
2. start server
3. open guvnor
4. Upload POJO model (is attached)
5. Create test scenario (screenshot attached)
6. Click "Run Scenario"

  
Actual results:
Summary:[SqlDateFact] field [date] was [2012-05-28] expected [2012-05-28].
or
Summary:[SqlDateFact] field [date] was [2012-05-28] expected [28-May-2012].

Expected results:
Summary:[SqlDateFact] field [date] was [2012-05-28].

Additional info:
Problem is related with https://bugzilla.redhat.com/show_bug.cgi?id=814865

Comment 1 Sona Mala 2012-05-28 12:36:29 UTC
Created attachment 587233 [details]
screenshot for yyyy-MM-dd

Comment 2 Sona Mala 2012-05-28 12:37:37 UTC
Created attachment 587234 [details]
POJO model

Comment 5 Toni Rikkola 2012-05-30 10:43:25 UTC
Taking a look at this.

Comment 6 lcarlon 2012-05-31 06:03:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In the Given clause of a Test Scenario, a field of type java.sql.Date is recognized as a date, but an attempt to set a date value on it fails because it tries to set a util.Date on the field. This has been resolved in that, setting java.sql.Date no longer causes an error. Please see related issue <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=825776">BZ825776</ulink> for further details.

Comment 7 lcarlon 2012-05-31 06:03:54 UTC
Deleted Technical Notes Contents.

Old Contents:
In the Given clause of a Test Scenario, a field of type java.sql.Date is recognized as a date, but an attempt to set a date value on it fails because it tries to set a util.Date on the field. This has been resolved in that, setting java.sql.Date no longer causes an error. Please see related issue <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=825776">BZ825776</ulink> for further details.

Comment 8 lcarlon 2012-05-31 06:04:32 UTC
Release note content intended for BZ814865.

Comment 9 Ryan Zhang 2012-06-13 09:32:46 UTC
This issue's fixes  have been picked by ER9. Please verify them on ER9.

Comment 10 Sona Mala 2012-06-14 11:34:07 UTC
Verified for this date formats: yyyy-MM-dd and dd-MMM-yyyy