whiteoctober / IATI

AidView
aidview.net
7 stars 3 forks source link

Transactions infographic - error handling #58

Open siwhitehouse opened 12 years ago

siwhitehouse commented 12 years ago

For example

http://aidview-dev.herokuapp.com/activity/GB-CC-288701-BD is just showing "internal server error"

If I look at http://datadev.aidinfolabs.org/data/corpus/test/activity/GB-CC-288701-BD.xml then I see data for transactions and budgets which fits the schema definition. There is free text being used in a way unintended for the data elements though.

<budget type="1">
<period-start iso-date="2012-04-01Z">
Forward Looking data for WaterAid’s 2012-2013 financial year (1st April to 31st March) is drawn from WaterAid’s approved budget and are the estimates as at March 2012. The actual figures achieved will vary depending on a range of factors including the securing of the funding needed, challenges faced in the countries etc..
</period-start>
<period-end iso-date="2013-03-31Z">
End of WaterAid 2012-13 financial year (1st April to 31st March)
</period-end>
<value value-date="2013-03-31Z" iati-ad:currency="GBP" iati-ad:date="2013-03-31Z" iati-ad:transaction-date="2012-04-01Z" iati-ad:transaction-type="TB" iati-ad:USD-value="7.752903E6">5020005</value>
</budget>

Could this be causing the error?

benfoxall commented 11 years ago

Yes, it looks like there that activity is missing the transaction-type element from the transaction.

I've made the code more robust so it will skip transactions without the transaction-type element, will this be enough for this issue?

benfoxall commented 11 years ago

have re-labled as data, though this is fixed as far as wo-fix can do.