Source:
<code>public Collection<Negotiation> getNegotiationResults(Map<String, String> fieldValues) { Map<String, String> associationDetails = new HashMap<String, String>(); Iterator<Map.Entry<String, String>> iter = fieldValues.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, String> entry = iter.next(); if (StringUtils.startsWith(entry.getKey(), ASSOC_PREFIX)) { iter.remove(); if (!StringUtils.isEmpty(entry.getValue())) { associationDetails.put(entry.getKey().replaceFirst(ASSOC_PREFIX + ".", ""), entry.getValue()); } } } Collection<Negotiation> result = new ArrayList<Negotiation>(); if (!associationDetails.isEmpty()) { addListToList(result, getNegotiationsLinkedToAward(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToProposal(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToProposalLog(fieldValues, associationDetails)); addListToList(result, getNegotiationsUnassociated(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToSubAward(fieldValues, associationDetails)); } else { result = findCollectionBySearchHelper(Negotiation.class, fieldValues, false, false, null); } if (result != null && !result.isEmpty() && StringUtils.isNotBlank(fieldValues.get("negotiationAge"))) { try { result = filterByNegotiationAge(fieldValues.get("negotiationAge"), result); } catch (NumberFormatException e) { GlobalVariables.getMessageMap().putError(KRADConstants.DOCUMENT_ERRORS, RiceKeyConstants.ERROR_CUSTOM, new String[] { "Invalid Numeric Input: " + fieldValues.get("negotiationAge")}); result = new ArrayList<Negotiation>(); } } <START> if (result != null && !result.isEmpty()) <END> result = filterNegotitations(result,associationDetails.get("title"),associationDetails.get("leadUnitNumber"),associationDetails.get("leadUnitName"),associationDetails.get("subAwardRequisitionerId")); return result; }</code><technical_language>other filters work correctly, for awards, proposals need filter entire array of negotiation results, linked subaward. move filter getNegotiationsLinkedToSubaward method</technical_language>

Target:
public Collection<Negotiation> getNegotiationResults(Map<String, String> fieldValues) { Map<String, String> associationDetails = new HashMap<String, String>(); Iterator<Map.Entry<String, String>> iter = fieldValues.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, String> entry = iter.next(); if (StringUtils.startsWith(entry.getKey(), ASSOC_PREFIX)) { iter.remove(); if (!StringUtils.isEmpty(entry.getValue())) { associationDetails.put(entry.getKey().replaceFirst(ASSOC_PREFIX + ".", ""), entry.getValue()); } } } Collection<Negotiation> result = new ArrayList<Negotiation>(); if (!associationDetails.isEmpty()) { addListToList(result, getNegotiationsLinkedToAward(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToProposal(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToProposalLog(fieldValues, associationDetails)); addListToList(result, getNegotiationsUnassociated(fieldValues, associationDetails)); addListToList(result, getNegotiationsLinkedToSubAward(fieldValues, associationDetails)); } else { result = findCollectionBySearchHelper(Negotiation.class, fieldValues, false, false, null); } if (result != null && !result.isEmpty() && StringUtils.isNotBlank(fieldValues.get("negotiationAge"))) { try { result = filterByNegotiationAge(fieldValues.get("negotiationAge"), result); } catch (NumberFormatException e) { GlobalVariables.getMessageMap().putError(KRADConstants.DOCUMENT_ERRORS, RiceKeyConstants.ERROR_CUSTOM, new String[] { "Invalid Numeric Input: " + fieldValues.get("negotiationAge")}); result = new ArrayList<Negotiation>(); } } return result; }