Skip to content

Commit

Permalink
[92539878] project people in Award are unable to open Negotiation whe…
Browse files Browse the repository at this point in the history
…n the association type is Subaward
  • Loading branch information
thai-vivantech committed Apr 30, 2015
1 parent 1a331c0 commit c41d766
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/main/java/org/kuali/kra/subaward/bo/SubAward.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -1378,8 +1380,12 @@ public String getSubAwardOrganizationName() {

@Override
public List<NegotiationPersonDTO> getProjectPeople() {
List<NegotiationPersonDTO> people = new
ArrayList<NegotiationPersonDTO>();
List<NegotiationPersonDTO> people = new ArrayList<NegotiationPersonDTO>();
Award fundedAward = getFirstFundedAward();
if (ObjectUtils.isNotNull(fundedAward)){
people.addAll(fundedAward.getProjectPeople());
}

if (this.getKcPerson() != null) {
people.add(new NegotiationPersonDTO(this.getKcPerson(), "admin"));
}
Expand Down Expand Up @@ -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;

}
}

0 comments on commit c41d766

Please sign in to comment.