Skip to content

Make the script configurable with respect to the user, i.e. remove hard-coded KBR statements #1

@SvenLieber

Description

@SvenLieber

Currently KBR is hard coded but the issuer of the script should be configurable.

It should be configurable which fields of the XML request should be added to the CSV report (and with which column name).

result['KBRID'] = request.find('identityInformation/requestorIdentifierOfIdentity/identifier').text
result['surname'] = request.find('identityInformation/identity/personOrFiction/personalName/surname').text
result['forename'] = request.find('identityInformation/identity/personOrFiction/personalName/forename').text

Additionally, ISNI XML responses have the response possibleMatch and if the match is with an identifier from us, we distinguish a possibleMatchDuplicateKBR response. This should also be configurable for non KBR data.

otherKBRRecord = True if isniNotAssigned.find('possibleMatch/source').text.startswith('KBR') else False
if otherKBRRecord:
result['isniStatus'] = 'possibleMatchDuplicateKBRID'
result['PPN'] = isniNotAssigned.find('possibleMatch/PPN').text
else:
result['isniStatus'] = 'possibleMatch'
result['PPN'] = isniNotAssigned.find('possibleMatch/PPN').text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions