Transactions XML Bug

Any questions related to version 2 or version 3 should be ask here. / Toutes les questions sur la version 2 ou la version 3 devraient être demandées ici.
Post Reply
SICHLCommish
The Accomplished One / L'Accompli
Posts: 87
Joined: Mon Sep 15, 2008 3:37 pm
Location: Toronto
Contact:

Transactions XML Bug

Post 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.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14776
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Transactions XML Bug

Post by SimonT »

In the XML files itself correct? If yes, it's a WebPortal issue.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
SICHLCommish
The Accomplished One / L'Accompli
Posts: 87
Joined: Mon Sep 15, 2008 3:37 pm
Location: Toronto
Contact:

Re: Transactions XML Bug

Post 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.
SimonT
STHS Owner / Propriétaire du STHS
Posts: 14776
Joined: Sat Oct 08, 2005 4:18 pm
Location: Montreal, Canada
Contact:

Re: Transactions XML Bug

Post 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.
-SimonT
Forum Administrator / Administrateur du Forum
STHS Owner / Propriètaire du STHS
English V2 & V3 Manual - Manuel V2 & V3 Français
Post Reply