diff --git a/src/main/java/org/kuali/kra/subaward/bo/SubAward.java b/src/main/java/org/kuali/kra/subaward/bo/SubAward.java index af93aa44..e80ced92 100644 --- a/src/main/java/org/kuali/kra/subaward/bo/SubAward.java +++ b/src/main/java/org/kuali/kra/subaward/bo/SubAward.java @@ -16,6 +16,7 @@ package org.kuali.kra.subaward.bo; import org.kuali.kra.SequenceOwner; +import org.kuali.kra.award.home.Award; import org.kuali.kra.award.home.AwardType; import org.kuali.kra.bo.*; import org.kuali.kra.bo.versioning.VersionStatus; @@ -32,6 +33,7 @@ import org.kuali.kra.subaward.document.SubAwardDocument; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.krad.service.BusinessObjectService; +import org.kuali.rice.krad.util.ObjectUtils; import org.springframework.util.AutoPopulatingList; import java.sql.Date; @@ -1378,8 +1380,12 @@ public String getSubAwardOrganizationName() { @Override public List getProjectPeople() { - List people = new - ArrayList(); + List people = new ArrayList(); + Award fundedAward = getFirstFundedAward(); + if (ObjectUtils.isNotNull(fundedAward)){ + people.addAll(fundedAward.getProjectPeople()); + } + if (this.getKcPerson() != null) { people.add(new NegotiationPersonDTO(this.getKcPerson(), "admin")); } @@ -1596,4 +1602,16 @@ public Date getPerformanceEnddate() { public void setPerformanceEnddate(Date performanceEnddate) { this.performanceEnddate = performanceEnddate; } + + // ### Vivantech Fix ISSUE #110 / [92539878] PI in Award is unable to open Negotiation when the association type is Subaward ### + private Award getFirstFundedAward(){ + Award fundedAward = null; + // in case subAwardFundingSourceList is null or 0 + if (ObjectUtils.isNotNull(subAwardFundingSourceList) && subAwardFundingSourceList.size() > 0){ + // get the first award. + fundedAward = subAwardFundingSourceList.get(0).getAward(); + } + return fundedAward; + + } } \ No newline at end of file