Conversation
|
What ticket does this change relate to? Be great to always have a ticket ref please :) thanks! |
Hi @nanometrenat, I am afraid I don't have the knowledge if we have a ticket for this. But for the rollback fix, we did in PR #794, this PR provides the necessary fix to the issue. Explanation on the issue: Unfortunately, the JSON and CSV responses have a different value for enum fields resulting in raw value (integer) in JSON response and label value (string) in the CSV response. This PR fixes the issue by providing the raw value (integer) in CSV responses and additionally provides a label value in |
|
@nanometrenat @LukeCaley |
@JonathanGarro tagging you in for info |
|
@thenav56 just looking further through your document - can you please confirm, for the Countries API CSV output (https://goadmin.ifrc.org/api/v2/country/?record_type=1&limit=300&format=csv) will the Label of the Region be presented as part of these changes? (Region is in lots of endpoints, not just country). e.g. Current csv output has Region=0, it would be great to have Region=Africa (or RegionLabel, or whatever it is we want to call it) as that will make it a lot more usable. Thanks |
- Avoid different value type among CSV and JSON Response.
7cc28e2 to
40072c6
Compare
|
@nanometrenat Current PR scope is to change enum fields to raw+label (from the label) in the API. The region you mentioned is related to the database primary key rather then enum field (sorry for the confusion). Let's create a new issue regarding additional fields required in the APIs. |
GergiH
left a comment
There was a problem hiding this comment.
I think we'll have to rigorously test the frontend to see if everything works as expected after this is deployed. The Tableau WDC might need some adjustments too but we'll see.
|
@thenav56 This is deployed to staging. |
Understood - thanks for clarifying!
Don't want to add to complexity of this translations release, so agree that a separate ticket should be logged if desired to bring the primary key labels through. For several database items (e.g. regions) there is a separate endpoint that people can call to get the list/labels anyway so not urgent for those. Will leave to @JonathanGarro to confirm if a ticket needs to be raised for further future changes. Cheers |
Changes
<enum-field-name>_displayfor each field for label value. (Except for Region, usingregion_namefor EnumField name)API Changes diff
Issues/PR related to: