These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

API-Bug in Contracts (10 months later)

First post
Author
Nexuscrawler
Evil Moustache
#1 - 2015-04-14 17:28:02 UTC  |  Edited by: Nexuscrawler
Hello,

about 10 months ago I posted about a (well known?) bug in the Contracts-API after being told to do so by CCP FoxFour in a Support-Ticket. Back then I did not exactly understand why it was important to create a forum post about an obvious bug and I still don't get it today (maybe a priority thing, to check if there are enough people that care about it?), but since I'd still like to finish that project of mine, I would like to ask (and maybe get a short response from CCP) whether this is actually on their list for a fix in the near future?

Old Thread: https://forums.eveonline.com/default.aspx?g=posts&m=4713259

I just tested this again and the API still gives me the wrong information as explained in my post.
I thought about writing another ticket, but I decided to necro my old thread instead. Big smile

Does really nobody but me work with the Contracts-API and has to deal with Blueprints?


Thanks guys o7
Nexuscrawler

The clan's are marching `gainst the law, Bagpipers play the tunes of war, Death or glory i will find, Rebellion on my mind.

Desmont McCallock
#2 - 2015-04-15 11:40:09 UTC
I really don't know if you have any hope. Just have in mind that I had bug reported the same issue to the guy that made those endpoints back in the days and you already know the results.
CCP FoxFour
C C P
C C P Alliance
#3 - 2015-04-15 16:59:53 UTC  |  Edited by: CCP FoxFour
Well I think I know why the rawQuantity never shows up:

            if (item.rawQuantity < 0)
            {
                xml.WriteAttributeString("rawQuantity", item.rawQuantity.ToString());
            }


Wait... I am totally not understanding this... arg... um... will try and look into it in a few weeks... but don't hold high hopes. So much to do!

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Desmont McCallock
#4 - 2015-04-15 19:56:54 UTC  |  Edited by: Desmont McCallock
CCP FoxFour wrote:
Well I think I know why the rawQuantity never shows up:

            if (item.rawQuantity < 0)
            {
                xml.WriteAttributeString("rawQuantity", item.rawQuantity.ToString());
            }


Wait... I am totally not understanding this... arg... um... will try and look into it in a few weeks... but don't hold high hopes. So much to do!
If rawQuantity is a nullable type and rawQuantity is null then any condition is always false (except if it's checked against null). And I expect that this is the case as you are reading from the DB where the data is set to allow NULL. So the problem is that rawQuantity never gets a non null value.
Nexuscrawler
Evil Moustache
#5 - 2015-04-16 15:49:37 UTC  |  Edited by: Nexuscrawler
if (item.rawQuantity < 0)
{
    xml.WriteAttributeString("rawQuantity", item.rawQuantity.ToString());
}


If "rawQuantity" is a nullable value and is in this case "null", then that if-statement would read....

if (null < 0)
{
    xml.WriteAttributeString("rawQuantity", item.rawQuantity.ToString());
}

....which is always "false".

But should "rawQuantity" EVER be a negative value to begin with?
Isn't a negative "quantity" attribute the indicator for a BPC and BPO?
As far is I understand this, "item.rawQuantity" should be greater 0.

if (item.quantity < 0 && item.rawQuantity > 0)
{
    xml.WriteAttributeString("rawQuantity", item.rawQuantity.ToString());
}


Documentation for "rawQuantity":
Quote:
This attribute will only show up if the quantity is a negative number in the DB. Negative quantities are in fact codes, -1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy.


I think you are just checking the wrong attribute.

The clan's are marching `gainst the law, Bagpipers play the tunes of war, Death or glory i will find, Rebellion on my mind.