FamilySearch/familysearch-javascript-sdk

Improper information returning from getSpouses() request on a person.

Closed this issue · 14 comments

The following example request sequence is returning improper information:

  1. FamilySearchSDK.getPerson(pid) - Makes the request. On successful fulfillment of the request:
  2. response.getSpouses() - should return the spouses for the returned individual (as per the SDK documentation. Instead, it seems to be returning all of the person's spouses, their father, and (most of) their male children.

Supposedly this reflects a change in the FamilySearch API release that occurred in December that has not yet been accounted for. The bug is interfering terribly with at least one partner app (virtual-pedigree.fhtl.byu.edu).

Calvin McMurray
BYU Family History Technology Lab
fhtlab@gmail.com

@calvinMcM

Thanks for the bug report. We will get this fixed, however I can't give you an estimate on when we will release a new version of the SDK.

FYI: The bug is on the following line if you want to quickly fix it yourself.

return r.getHusbandId() && r.getWifeId(); // only consider couple relationships with both spouses

@calvinMcM Could you provide me with a sample PID that this bug occurs with?

@calvinMcM Also, which version of the SDK are you using?

I can't access your PID because you're living and therefore your profile is private. Do you have an example of a deceased person?

MFYR-RQD should have 3 spouses, but we're getting 5 spouses (2 are his father).

Ann
Ann
John Crundall
John Crondall
Ann Osborne

(ignore the duplication)

@jimmyz @calvinMcM You must be using the relatives parameter. Is that correct? It appears to be adding extra relationships in the response which breaks assumptions made by the code. I didn't know the relatives parameter did that which is why it took so long for me to verify what you were seeing.

This is fixed in v2.10.0

From what I can see, v2.10.0 isn't supported via CDN - it only ships as a NodeJS module. If so, it would only be useful if all of the requests to FamilySearch are being made from the server instead of from client-side code - which is how Virtual Pedigree uses it (as well as several other apps I know of). If the problem has already been resolved in 2.10.0, would it be possible to get that version released through your regular CDN's to allow clients to make use of the updated version?

It's in the README.