Skip to content

Nationality flag doesn't appear on person node #192

@kd-ods

Description

@kd-ods

Describe the bug
For people nodes, a nationality flag should be displayed when recordDetails.nationalities[0].code is populated with a valid '2-letter country code (ISO 3166-1) or the subdivision code (ISO 3166-2) for the jurisdiction'. (According to the spec.)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.openownership.org/en/publications/beneficial-ownership-visualisation-system/bods-data-visualiser/
  2. Paste the following into the 'Paste data' box and hit 'Draw'
[
  {
    "statementId": "1aa9d7e66b7b593b3a2466ea081b93d5cfc025b49c79e627c307c5980fb5c77e",
    "recordId": "entity2",
    "recordType": "entity",
    "recordStatus": "new",
    "statementDate": "2025-02-01",
    "declarationSubject": "entity2",
    "recordDetails": {
      "name": "Company 2",
      "entityType": {
        "type": "registeredEntity",
        "subtype": "other",
        "details": "a registered entity"
      },
      "isComponent": "false",
      "jurisdiction": {
        "name": "Albania",
        "code": "AL"
      },
      "addresses": [
        {
          "type": "registered",
          "address": "53 Killard, Kilteragh, Dooradoyle, Co. Limerick ",
          "postCode": "V94 V3VT",
          "country": {
            "name": "Ireland",
            "code": "IE"
          }
        }
      ],
      "foundingDate": "2019-09-11",
      "publicListing": {
        "hasPublicListing": "false"
      },
      "identifiers": [
        {
          "id": "0691084DH",
          "scheme": "IRL-TAXID",
          "schemeName": "Irish Tax Authority ",
          "uri": "https://www.example.com"
        },
        {
          "id": "984500DCDAAJ12D00592",
          "scheme": "XI-LEI",
          "schemeName": "Global Legal Entity Identifier",
          "uri": "https://www.example.com"
        }
      ]
    },
    "publicationDetails": {
      "publicationDate": "2025-02-01",
      "bodsVersion": "0.4",
      "license": "https://creativecommons.org/licenses/by/2.0/legalcode",
      "publisher": {
        "name": "A researcher",
        "url": "https://www.example.com"
      }
    },
    "source": {
      "type": [
        "verified"
      ],
      "description": "This information has been researched and summarised for publication.",
      "url": "https://www.example.com"
    }
  },
  {
    "recordId": "person2",
    "recordType": "person",
    "recordStatus": "new",
    "statementDate": "2025-02-01",
    "statementId": "7211b46f24ed602ef642f83b95679414f2bac537b9669f2d183559c27a8df713",
    "declarationSubject": "entity2",
    "recordDetails": {
      "personType": "knownPerson",
      "isComponent": "false",
      "names": [
        {
          "type": "legal",
          "fullName": "Patrick O'Donohue"
        }
      ],
      "nationalities": [
        {
          "name": "Albania",
          "code": "AL"
        }
      ],
      "identifiers": [
        {
          "id": "0691084DH",
          "scheme": "IRL-TAXID",
          "schemeName": "Ireland Personal Public Service Number",
          "uri": "https://www.example.com"
        }
      ],
      "taxResidencies": [
        {
          "name": "Ireland",
          "code": "IE"
        }
      ],
      "placeOfBirth": {
        "type": "placeOfBirth",
        "address": "123 street",
        "postCode": 123456,
        "country": {
          "name": "Ireland",
          "code": "IE"
        }
      },
      "birthDate": "1987-02-27",
      "deathDate": "2020-01-01"
    },
    "publicationDetails": {
      "publicationDate": "2025-02-01",
      "bodsVersion": "0.4",
      "license": "https://creativecommons.org/licenses/by/2.0/legalcode",
      "publisher": {
        "name": "A researcher",
        "url": "https://www.example.com"
      }
    },
    "source": {
      "type": [
        "verified"
      ],
      "description": "This information has been researched and summarised for publication.",
      "url": "https://www.example.com"
    }
  },
  {
    "recordId": "relationship2",
    "recordType": "relationship",
    "recordStatus": "new",
    "statementDate": "2025-02-01",
    "statementId": "22bb40fa7d22eec75459366ca52fbcf27070d6f5a002e1e5efba3c58b560016c",
    "declarationSubject": "entity2",
    "recordDetails": {
      "subject": "entity2",
      "interestedParty": "person2",
      "isComponent": "false",
      "interests": [
        {
          "type": "shareholding",
          "directOrIndirect": "direct",
          "beneficialOwnershipOrControl": "true",
          "details": "a shareholding",
          "share": {
            "maximum": 25,
            "minimum": 40
          },
          "startDate": "2019-09-11",
          "endDate": "2021-04-03"
        },
        {
          "type": "boardMember",
          "directOrIndirect": "direct",
          "beneficialOwnershipOrControl": "false",
          "share": {
            "exact": 50
          }
        },
        {
          "type": "votingRights",
          "directOrIndirect": "direct",
          "beneficialOwnershipOrControl": "false",
          "share": {
            "exact": 50
          }
        }
      ]
    },
    "publicationDetails": {
      "publicationDate": "2025-02-01",
      "bodsVersion": "0.4",
      "license": "https://creativecommons.org/licenses/by/2.0/legalcode",
      "publisher": {
        "name": "A researcher",
        "url": "https://www.example.com"
      }
    },
    "source": {
      "type": [
        "verified"
      ],
      "description": "This information has been researched and summarised for publication.",
      "url": "https://www.example.com"
    }
  }
]
  1. Click on the node for Patrick O'Donohue and look at the corresponding statement underneath
  2. Notice that this appears in the statement
      "nationalities": [
        {
          "name": "Albania",
          "code": "AL"
        }
      

Expected behavior

The Albanian flag should appear on the person node:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions