Canadian projects not found when searching by country
Closed this issue · 6 comments
Reporting org CA-3
and country BD
does not return any projects:
http://datastore.iatistandard.org/api/1/access/activity.xml?reporting-org=CA-3&recipient-country=BD&limit=1
Also doesn't work when you change the country (I tried ET
)
Example project in Bangladesh:
JSON: http://datastore.iatistandard.org/api/1/access/activity?iati-identifier=CA-3-A034608001
XML: http://datastore.iatistandard.org/api/1/access/activity.xml?iati-identifier=CA-3-A034608001
Reporting org GB-GOV-1
and country BD
does return a project:
http://datastore.iatistandard.org/api/1/access/activity.xml?reporting-org=GB-GOV-1&recipient-country=BD&limit=1
This is similar to a problem with sector codes in d-portal.
CA-3
is including trailing whitespace in their recipient-country/@code
values, and the Datastore is treating them as given. Adding a URL-encoded space to the query value will cause the otherwise missing activities to appear.
Will work to add whitespace trimming to attribute values in the Datastore. Are there any situations where leading or trailing whitespace in attribute values is meaningful, and so should not be stripped?
(since the Datastore returns original data, will look as to whether this can be implemented in such a way as querying is improved, yet the original values are returned)
Oh good spot. I just flagged this issue to the publisher so that they can fix it themselves. I guess those automated data quality emails discussed on Standards Day could have picked up this kind of problem? Maybe a nice use case...
Thanks for identifying and flagging the problem!
I agree that the notification system that's been discussed at the TAG and on Discuss would be relevant for something like this - including a way for us to confirm that we're aware of the problem, and confirm when (we think) it's been fixed. I'll report here in the meantime.
Confirming that we have resolved the issue (effective in today's datasets). Thanks!
Wonderful, thanks for the speedy fix to the data!
The Datastore is now returning the activities, so this particular issue seems to be resolved.
Since this problem relates to data rather than the Datastore, I'll close this issue, and have created #254 to refer to the wider issue (potentially relating to multiple publishers, across multiple attributes).