Skip to content

Conversation

@poojavenkatapuram
Copy link

Update the organization page to display the parent organization instead of the country for sub-national entities.

Falls back to showing the country when no parent organization exists. This change only affects display logic and does not modify data.

Fixes #576

Description

Issue Reference

Fixes #(issue)

Checklist

Please ensure the following before submitting the PR:

  • I have tested the changes locally, and they work as expected.
  • The code follows the project's coding standards and conventions.
  • I have updated relevant documentation (if needed).
  • I have added unit tests or performed manual testing where necessary.

Screenshots (applicable to user interface changes)

Update the organization page to display the parent organization
instead of the country for sub-national entities.

Falls back to showing the country when no parent organization exists.
This change only affects display logic and does not modify data.

Fixes govdirectory#576
@Ainali
Copy link
Member

Ainali commented Jan 15, 2026

I am sorry, but I think you have misunderstood the relationships between countries and their parts. First, they are likely never modeled in Wikidata with a parent organization property, and it is also likely that countries are modeled in different ways. But that's beside the point because we don't need to look that up; it is defined in the country query.

@poojavenkatapuram
Copy link
Author

Thanks for the clarification, that makes sense.

I see now that inferring hierarchy via parent organization is not reliable
and that the intended logic is already defined in the country query /
generator output.

I’ll revisit the implementation and adjust it to rely on the country query
instead of organization relationships.

Please let me know if you have a specific file or query in mind that I should
base the change on, and I’ll update the PR accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong "country" shown on organization of federal subjects

2 participants