Skip to content

Commit

Permalink
RESKC-919: Remove activity title from forms
Browse files Browse the repository at this point in the history
KC needs to populate the "ActivityTitle" with the CFDA Description data from the S2S opportunity if available; and ALWAYS trim the length to stay under the 120 character limit.
IF the CFDA is blank in the opportunity, this field should remain blank in the SF424 RR forms.*
With the CFDA *blank *in the sponsor opportunity package, the RR SF424 form CFDA Title/Description field continues to be populated with the "Opportunity Title" rather than being left blank.
When CFDA is *included *in the sponsor opportunity package, the RR SF424 form CFDA Title/Description field is populated with the "Opportunity Title" rather than with the CFDA Description data from the S2S opportunity. (the CFDA number does print correctly)
  • Loading branch information
Gayathri Athreya committed Nov 4, 2015
1 parent 4838748 commit d87968e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public final class ConfigurationConstants {
public static final String US_CITIZEN_OR_NONCITIZEN_NATIONAL_TYPE_CODE = "US_CITIZEN_OR_NONCITIZEN_NATIONAL_TYPE_CODE";
public static final String PERMANENT_RESIDENT_OF_US_PENDING = "PERMANENT_RESIDENT_OF_US_PENDING";
public static final String HIERARCHY_LEVEL = "HIERARCHY_LEVEL";
public static final int CFDA_TITLE_MAX_LENGTH = 119;
public static final int PROJECT_TITLE_MAX_LENGTH = 200;
public static final int FEDERAL_ID_MAX_LENGTH = 30;


//printing
public static final String PRINT_XML_DIRECTORY = "print.xml.directory";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;


import java.math.BigDecimal;
import java.util.*;

Expand Down Expand Up @@ -146,7 +145,10 @@ private RRSF42420Document getRRSF424() {
if(pdDoc.getDevelopmentProposal().getCfdaNumber()!=null){
rrsf42420.setCFDANumber(pdDoc.getDevelopmentProposal().getCfdaNumber());
}
rrsf42420.setActivityTitle(getActivityTitle());
String activityTitle = getActivityTitle();
if (!StringUtils.isEmpty(activityTitle)) {
rrsf42420.setActivityTitle(activityTitle);
}
setFederalId(rrsf42420);
rrsf42420.setPDPIContactInfo(getPDPI());
rrsf42420.setEstimatedProjectFunding(getProjectFunding());
Expand Down Expand Up @@ -912,38 +914,17 @@ private String getAORSignature() {

private void setFederalId(RRSF42420 rrsf42420) {
String federalId = pdDoc.getDevelopmentProposal().getSponsorProposalNumber();
if (federalId != null) {
if (federalId.length() > 30) {
rrsf42420.setFederalID(federalId.substring(0, 30));
}
else {
rrsf42420.setFederalID(federalId);
}
}
rrsf42420.setFederalID(StringUtils.substring(federalId, 0, ConfigurationConstants.FEDERAL_ID_MAX_LENGTH));
}

private String getActivityTitle() {
String announcementTitle = "";
if (pdDoc.getDevelopmentProposal().getProgramAnnouncementTitle() != null) {
if (pdDoc.getDevelopmentProposal().getProgramAnnouncementTitle()
.length() > 120) {
announcementTitle = pdDoc.getDevelopmentProposal()
.getProgramAnnouncementTitle().substring(0, 120);
} else {
announcementTitle = pdDoc.getDevelopmentProposal()
.getProgramAnnouncementTitle();
}
}
return announcementTitle;
return StringUtils.substring(pdDoc.getDevelopmentProposal().getS2sOpportunity().getCfdaDescription(), 0, ConfigurationConstants.CFDA_TITLE_MAX_LENGTH);
}

private String getProjectTitle() {
String title = pdDoc.getDevelopmentProposal().getTitle();
if (title != null && title.length() > 200) {
title = title.substring(0, 200);
}
return title;
return StringUtils.substring(pdDoc.getDevelopmentProposal().getTitle(), 0, ConfigurationConstants.PROJECT_TITLE_MAX_LENGTH);
}

private String getAgencyRoutingNumber(){
String sponserProgramCode= pdDoc.getDevelopmentProposal().getAgencyRoutingIdentifier();
return sponserProgramCode;
Expand Down

0 comments on commit d87968e

Please sign in to comment.