openownership / lib-cove-bods

Check that your data complies with the Beneficial Ownership Data Standard (BODS) using our install our data review library to analyse files via your command line interface
https://datareview.openownership.org/
Other
1 stars 0 forks source link

Check for additional fields doesn't work #102

Closed kd-ods closed 1 month ago

kd-ods commented 4 months ago

Description of issue In the UI, there is a section titled 'Additional fields' I would expect that this would be populated with a list (and maybe a count) of field names that are not in the schema.

image

So, on pasting BODS like this:

[
  {
    "testycustomfield": 8947525,    
    "statementID": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "statementType": "entityStatement",
    "isComponent": false,
    "statementDate": "2017-11-18",
    "entityType": "registeredEntity",
    "name": "CHRINON LTD",
    "foundingDate": "2010-11-18",
    "identifiers": [
      {
        "scheme": "GB-COH",
        "id": "07444723"
      }
    ],
    "publicationDetails": {
      "publicationDate": "2018-02-13",
      "bodsVersion": "0.3",
      "publisher": {
        "name": "CHRINON LTD"
      }
    }
  },
  {
    "statementID": "019a93f1-e470-42e9-957b-03559861b2e2",
    "statementType": "personStatement",
    "isComponent": false,
    "statementDate": "2017-11-18",
    "personType": "knownPerson",
    "nationalities": [
      {
        "code": "GB",
        "name": "United Kingdom of Great Britain and Northern Ireland (the)"
      }
    ],
    "names": [
      {
        "type": "individual",
        "fullName": "Christopher Taggart",
        "givenName": "Christopher",
        "familyName": "Taggart"
      },
      {
        "type": "alternative",
        "fullName": "Chris Taggart"
      }
    ],
    "birthDate": "1964-04",
    "addresses": [
      {
        "type": "service",
        "address": "Aston House, Cornwall Avenue, London",
        "country": "GB",
        "postCode": "N3 1LF"
      }
    ],
    "publicationDetails": {
      "publicationDate": "2018-02-13",
      "bodsVersion": "0.3",
      "publisher": {
        "name": "CHRINON LTD"
      }
    }
  },
  {
    "statementID": "fbfd0547-d0c6-4a00-b559-5c5e91c34f5c",
    "statementType": "ownershipOrControlStatement",
    "isComponent": false,
    "statementDate": "2017-11-18",
    "subject": {
      "describedByEntityStatement": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7"
    },
    "interestedParty": {
      "describedByPersonStatement": "019a93f1-e470-42e9-957b-03559861b2e2"
    },
    "interests": [
      {
        "type": "shareholding",
        "directOrIndirect": "direct",
        "beneficialOwnershipOrControl": true,
        "startDate": "2016-04-06",
        "share": {
          "exact": 100,
          "minimum": 100,
          "maximum": 100
        }
      }
    ],
    "publicationDetails": {
      "publicationDate": "2018-02-13",
      "bodsVersion": "0.3",
      "publisher": {
        "name": "CHRINON LTD"
      }
    }
  }
]

... I would expect 'testycustomfield' to be noted under 'Additional fields'.

Suggested resolution

Fix the check, if it exists. Or write a new check.

kathryn-ods commented 3 months ago

@kd-ods this is listed as needing test data - is any more data needed?

kd-ods commented 3 months ago

@kathryn-ods - probably best to produce the above as a minimal set of data, so required fields and one and then two additional non-standard fields.

kathryn-ods commented 3 months ago

Valid test data - 2 extra fields

[
  {
    "statementId": "1dc0e987-5c57-4a1c-b3ad-61353b66a9b7",
    "extratestfield1": "test",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "c359f58d2977",
    "recordType": "entity",
    "recordDetails": {
      "extratestfield2": "test",
      "isComponent": false,
      "entityType": {
        "type": "registeredEntity"
      }
    }
  }
]