diff --git a/orcid-core/src/main/java/org/orcid/core/manager/v3/read_only/impl/PeerReviewManagerReadOnlyImpl.java b/orcid-core/src/main/java/org/orcid/core/manager/v3/read_only/impl/PeerReviewManagerReadOnlyImpl.java index d2d5226d81c..80711fc6207 100644 --- a/orcid-core/src/main/java/org/orcid/core/manager/v3/read_only/impl/PeerReviewManagerReadOnlyImpl.java +++ b/orcid-core/src/main/java/org/orcid/core/manager/v3/read_only/impl/PeerReviewManagerReadOnlyImpl.java @@ -230,4 +230,4 @@ public Boolean hasPublicPeerReviews(String orcid) { return peerReviewDao.hasPublicPeerReviews(orcid); } -} \ No newline at end of file +} diff --git a/orcid-core/src/main/java/org/orcid/core/utils/v3/SourceUtils.java b/orcid-core/src/main/java/org/orcid/core/utils/v3/SourceUtils.java index 99f95e4bd85..a2eeb5af8f1 100644 --- a/orcid-core/src/main/java/org/orcid/core/utils/v3/SourceUtils.java +++ b/orcid-core/src/main/java/org/orcid/core/utils/v3/SourceUtils.java @@ -43,6 +43,7 @@ import org.orcid.jaxb.model.v3.release.record.summary.WorkSummary; import org.orcid.jaxb.model.v3.release.record.summary.Works; import org.orcid.pojo.ajaxForm.AffiliationForm; +import org.orcid.pojo.ajaxForm.FundingForm; import org.orcid.pojo.ajaxForm.PojoUtil; import java.util.List; @@ -323,7 +324,7 @@ public static boolean isSelfAsserted(AffiliationForm af, String orcid) { return (orcid.equals(af.getSource()) || orcid.equals(af.getAssertionOriginOrcid())); } - public static boolean isSelfAsserted(String source, String orcid) { - return !orcid.equals(source); + public static boolean isSelfAsserted(FundingForm ff, String orcid) { + return (orcid.equals(ff.getSource()) || orcid.equals(ff.getAssertionOriginOrcid())); } } diff --git a/orcid-core/src/main/java/org/orcid/core/utils/v3/activities/FundingComparators.java b/orcid-core/src/main/java/org/orcid/core/utils/v3/activities/FundingComparators.java index 89a4a2217e6..3f24dce975d 100644 --- a/orcid-core/src/main/java/org/orcid/core/utils/v3/activities/FundingComparators.java +++ b/orcid-core/src/main/java/org/orcid/core/utils/v3/activities/FundingComparators.java @@ -110,6 +110,6 @@ public Comparator getInstance(String key, boolean sortAsc, String public Comparator SOURCE_COMPARATOR = (g1, g2) -> Boolean.compare(isSelfAsserted(g1), isSelfAsserted(g2)); private boolean isSelfAsserted(FundingGroup fundingGroup) { - return SourceUtils.isSelfAsserted(fundingGroup.getSource(), orcid); + return SourceUtils.isSelfAsserted(fundingGroup.getDefaultFunding(), orcid); } }