[QFJ-951] Not respecting the Required flag for a field in a component if that component is inside of a group Created: 29/Jun/18  Updated: 16/Mar/20  Resolved: 16/Mar/20

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.6.2, 1.6.3, 1.6.4, 2.0.0
Fix Version/s: 2.1.0

Type: Bug Priority: Default
Reporter: Sergio Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

I have a dictionary which is defined as follows (stripped some stuff out for simplicity)

<message name="QuoteRequest" msgtype="R" msgcat="app">
<field name="QuoteReqID" required="Y"/>
<group name="NoRelatedSym" required="Y">
<component name="Instrument" required="Y"/>
</group>
<field name="Text" required="N"/>
</message>
...
<message name="Quote" msgtype="S" msgcat="app">
<field name="QuoteReqID" required="Y"/>
<component name="Instrument" required="Y"/>
</message>
...
<component name="Instrument">
<field name="Symbol" required="Y"/>
<field name="SecurityID" required="N"/>
<field name="SecurityIDSource" required="N"/>
<field name="Product" required="N"/>
<field name="SecurityType" required="N"/>
<field name="SecuritySubType" required="N"/>
<field name="SecurityXMLLen" required="N"/>
<field name="SecurityXML" required="N"/>
<field name="SecurityXMLSchema" required="N"/>
</component>

From inside the java code, If I run the following code to see if field 55 ("Symbol") is listed as required in the R msg, it returns false:

GroupInfo gi = dictionary.getGroup("R", 146);
boolean requiredInRMsg = gi.getDataDictionary().isRequiredField("R", 55);

If I run the following code to see if field 55 ("Symbol") is listed as required in the S msg, it returns true:

GroupInfo gi = dictionary.getGroup("S", 146);
boolean requiredInRMsg = gi.getDataDictionary().isRequiredField("S", 55);

It appears that quickfix is not respecting the Required flag for a field in a component if that component is inside of a group.



 Comments   
Comment by Christoph John [ 02/Jul/18 ]

Hi Sergio,

could you please check if this fixes your problem: https://github.com/quickfix-j/quickfixj/pull/148

Thanks,
Chris.

Generated at Sat Nov 23 08:32:46 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.