Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue warning when contact is not found #187

Closed
jlblcc opened this issue Mar 16, 2018 · 4 comments
Closed

Issue warning when contact is not found #187

jlblcc opened this issue Mar 16, 2018 · 4 comments
Labels
enhancement Improve or modify an existing feature

Comments

@jlblcc
Copy link
Member

jlblcc commented Mar 16, 2018

Currently we generally ignore instances when contacts are not found in the contacts array(getContact methods). It would be useful to issue a WARNING when this occurs, especially when #183 is implemented.

@jlblcc jlblcc added the enhancement Improve or modify an existing feature label Mar 16, 2018
@stansmith907
Copy link
Contributor

stansmith907 commented Mar 17, 2018

Looks like this is already covered in the mdJson reader. Contacts are always (I think) referenced through responsibleParty in mdJson. Currently, the reader tests each party (contactId) specified by the responsible party as well as contact IDs specified as organization membership to verify they are actually in the contact array. If you are seeing something different please let me know.

FGDC and sbJson readers do not draw from the contacts array. For these readers contacts are added as they are encountered in the input file.

Writers are also different. They always check for valid contactId since they draw from the contacts array to write information to the selected standard.

@jlblcc
Copy link
Member Author

jlblcc commented Mar 20, 2018

I have some reports of this happening where a contact has a memberOfOrganization array and the id within that array is not found anywhere within the contacts array. We can't check for this in the mdJSON schema, so we might want to issue a warning during the translation. Maybe when reading mdJSON?

@stansmith907
Copy link
Contributor

stansmith907 commented Mar 20, 2018

Now I see through the confusion. responsibleParty has party which has organizationMembers. These are checked in every use of responsible party in mdJson. contact has memberOfOrganization. These are not checked; the problem being that all contacts would need to be loaded before the check could be valid. So, memberOfOrganization is not check when a contact is added.

To test memberOfOrganization for valid contactId(s) I will need to add a post-contact-processing module into the workflow. Which I will do. 😃

@stansmith907
Copy link
Contributor

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve or modify an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants