Fix repeating group read tags lost
The RepeatingGroup tags are not created during the read process. Tag values are there but tags are not copied over / read. If CopyInto is used to copy from old FieldMap to new, existing tags from old one will be lost during the fields setting process
Can try to reproduce like this:
symGroup := quoterequest.NewNoRelatedSymRepeatingGroup()
sym := symGroup.Add()
sym.SetSymbol("symbol")
sym.SetOrderQty(decimal.NewFromFloat(1), 4)
sym.SetQuoteRequestType(enum.QuoteRequestType_AUTOMATIC)
fixmsg := quoterequest.New(field.NewQuoteReqID("testId"))
fixmsg.SetNoRelatedSym(symGroup)
msg := quoterequest.FromMessage(fixmsg.ToMessage())
if syms, err := msg.GetNoRelatedSym(); err == nil {
newSyms := quoterequest.NewNoRelatedSymRepeatingGroup()
newSym := newSyms.Add()
sym := syms.Get(0)
sym.CopyInto(&newSym.FieldMap) // SUT
newSym.SetCurrency("USD")
msg.SetNoRelatedSym(newSyms)
// log msg.ToMessage() will show only Currency (15) tag
// 8=FIX.4.4 9=29 35=R 131=testId 146=1 15=USD 10=213
// Whereas it should be
// 8=FIX.4.4 9=55 35=R 131=testId 146=1 55=symbol 303=2 38=1.0000 15=USD 10=224
}
@totalys we're hitting this bug in production with NSCC. What is your plan/timeline for merging this?
I'm not allowed to merge. I'would like this to me merged asap as well! Please @ackleymi , @hyde-zhang, @reedom.
Related: https://github.com/quickfixgo/quickfix/pull/509
@sylr do you know who can merge this?
@sylr do you know who can merge this?
@ackleymi I believe.
@ackleymi anything holding up merging this?
@ackleymi can you please respond here?