Page 1 of 1

Transactions XML Bug

Posted: Tue Mar 15, 2011 10:41 am
by SICHLCommish
I've been bothered by this bug for awhile, but since our trade deadline was this past weekend, I'm annoyed enough to post a bug report about it:

The XML gets all screwed up for trades when there is a warning about one of the teams. (like their balance is below $0, or they've reach max. pro players or something). Instead of outputting the trade normally, STHS splits it into two trades.

You can see many examples of the ugliness here:

http://www.sichl.com/transactions.php

This bug is very repeatable. I'm 99% sure it happens every time there is some warning for a team involved in a trade.

Re: Transactions XML Bug

Posted: Tue Mar 15, 2011 7:35 pm
by SimonT
In the XML files itself correct? If yes, it's a WebPortal issue.

Re: Transactions XML Bug

Posted: Wed Mar 16, 2011 11:48 am
by SICHLCommish
Well I guess it's two ways of looking at it, but for some reason, trades the XML are always broken up over two records. There is nothing linking the two records to let you know definitively that they are part of the same trade - other than that they come back-to-back in the output... most of the time. When there is some warning, it breaks up the XML records so that they are no longer consecutive. For example:

- <TypeOutputXMLTransaction>
<Number>24378</Number>
<Title>[3/13/2011 8:59:26 PM] - From Slammers to Empire : Chris Conner (62), Matt Hendricks (67).</Title>
</TypeOutputXMLTransaction>
- <TypeOutputXMLTransaction>
<Number>24379</Number>
<Title>[3/13/2011 8:59:28 PM] - Current fund for Slammers is under 0!</Title>
</TypeOutputXMLTransaction>
- <TypeOutputXMLTransaction>
<Number>24380</Number>
<Title>[3/13/2011 8:59:28 PM] - From Empire to Slammers : Y:2012-RND:2-NYE.</Title>
</TypeOutputXMLTransaction>


So I'm calling it a bug in the XML as there is no way to tell for sure that these two completely separate records are part of the same trade. For sugguestiong, I would say either the trade should be a single XML entry (easiest solution from my perspective), or the warning shouldn't be reported there at all (it gets re-reported every single day in the simulation already and there is a TON of things being reported in the transactions already), or at least the warning should come after both of the trade nodes have been output so that at least they are next to each other.

The reason I'd prefer to see the whole trade in one XML record should already be obvious, but also remember that sometimes teams will trade something for nothing, so I can't tell the page that's reading this XML to wait forever to find the other "half" of a trade... there might not be one.

Re: Transactions XML Bug

Posted: Sun Mar 27, 2011 7:39 pm
by SimonT
The reason why it’s split on 2 lines is for the HTML output. While I understand it’s might be an issue with coding, I won’t change it. I did one small modification so the function that said “Current fund..” is show after the 2 transactions log is show.