eprints / orcid_support_advance

ORCID Support Advance plugin
1 stars 6 forks source link

Error in OrcidSync.pm #5

Closed GFournie closed 6 years ago

GFournie commented 6 years ago

Hi,

It seems that the $employment et $institution members in OrcidSync.pm are not defined properly...

We had to change from :

foreach my $employment ( @{$json_text->{"$affiliation-summary"}} )
{
        if( $employment->{'organization'}->{'disambiguation-organization-identifier'} eq $institution->{'organization'}->{'disambiguation-organization-identifier'} )
        {
                $add_institution = 0;
        }
}

to :

foreach my $employment ( @{$json_text->{"$affiliation-summary"}} )
{
        my $orgid1 = $institution->{'organization'}->{'disambiguated-organization'}->{'disambiguated-organization-identifier'};
        my $orgid2 = $employment->{'organization'}->{'disambiguated-organization'}->{'disambiguated-organization-identifier'};
        if( $orgid1 eq $orgid2 )
        {
                $add_institution = 0;
        }
}
wfyson commented 6 years ago

Thanks for alerting us to this! Fixed with commit https://github.com/eprints/orcid_support_advance/commit/376c7bbd0e10498bf09df732499ccf3236efd165