Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Activities with @humanitarian="true" are not labelled as humanitarian #517

Closed
andylolz opened this issue Apr 8, 2019 · 8 comments
Closed
Labels

Comments

@andylolz
Copy link
Contributor

andylolz commented Apr 8, 2019

This activity has @humanitarian="1", and is flagged as humanitarian.

This activity has @humanitarian="true", but is not flagged as humanitarian. (Note that @humanitarian="true" is also valid XML. In fact, it’s the canonical representation for a boolean!)

It looks like this needs fixing in activities.css:
https://github.com/devinit/D-Portal/blob/45561c0f05c1fe26de670d7a78864063c596a51b/ctrack/art/high/activities.css#L41-L48

@notshi notshi added the bug label Apr 8, 2019
@notshi
Copy link
Collaborator

notshi commented Apr 8, 2019

Many thanks, @andylolz. We're working on SAVi 2.0 right now and will add that to the list.

@notshi
Copy link
Collaborator

notshi commented Apr 9, 2019

I feel like it would make more sense to keep this as an explicit codelist; ie. 0 or 1, not 4 possible values.
And maybe stick to that approach consistently throughout the standard.

At the current state, it catches you off guard with it's native xml eccentricities.

@andylolz
Copy link
Contributor Author

andylolz commented Apr 9, 2019

I know you know all this, but just to state it here:

It wouldn’t be enforceable at schema level, since true/false are still valid booleans. IATI could recommend using 0/1, but some publishers would still use true/false so you’d still need to handle the edgecase anyway. Plus, just the thought of a long discourse thread proposing this as guidance makes my eyes water. <Duncan Bannatyne voice> For that reason, I’m out!

@notshi
Copy link
Collaborator

notshi commented Apr 9, 2019

Ack - I had to search who that was!

Maybe we could get some progress with the new validator people and have it implemented as a suggestion rather than a rule :}

@stevieflow
Copy link

Hi @andylolz @notshi - thanks for this

We've some evidence here in terms of the use of 1/0 & true/false (and also True/False it seems) in IATI booleans: http://dashboard.iatistandard.org/booleans.html

Note - DFID have just started to include humanitarian="true" in their data, so it'd be quite useful to see that flagged in d-portal

I'm with @andylolz - so long as you supply a valid boolean, we should be able to use your data

NB: @davidmegginson might be able to point to the is_truthy() function that deals with a range of booleans...

@andylolz
Copy link
Contributor Author

andylolz commented Apr 27, 2019

Thanks, @stevieflow.

We've some evidence here in terms of the use of 1/0 & true/false (and also True/False it seems) in IATI booleans: http://dashboard.iatistandard.org/booleans.html

^^ Worth noting that this dashboard page lists publishers using False and True (i.e. title case). These are invalid valuesfalse and true must be lower case according to the XML spec. I’ve made a ticket for that here: IATI/IATI-Dashboard#543

@stevieflow
Copy link

Denmark use humanitarian="true", I have discovered today: http://d-portal.org/q.html?aid=DK-1-128253-30530

@notshi
Copy link
Collaborator

notshi commented Jul 20, 2019

Many thanks, both - this is now fixed.

@notshi notshi closed this as completed Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants