File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
marlo-data/src/main/java/org/cgiar/ccafs/marlo/config
marlo-web/src/main/java/org/cgiar/ccafs/marlo Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -790,6 +790,7 @@ public final class APConstants {
790
790
public static final int CLARISA_AVALIABLE_INFO_YEAR = 2018 ;
791
791
792
792
public static final String IGNORE_NEWER_YEARS = "ignoreNewer" ;
793
+ public static final String DELIVERABLE_CRP_PROGRAM_OUTCOME_DEPRECATED = "DEPRECATED" ;
793
794
794
795
public static String getFilterBy () {
795
796
return FILTER_BY ;
Original file line number Diff line number Diff line change @@ -3982,6 +3982,13 @@ public List<ProjectExpectedStudy> getexpectedCrpOutcomes(Long id) {
3982
3982
} catch (Exception e ) {
3983
3983
e .printStackTrace ();
3984
3984
}
3985
+
3986
+ // 10/10/2024 add functionality to avoid no active oicr
3987
+ try {
3988
+ expectedStudies = expectedStudies .stream ().filter (o -> o .isActive ()).collect (Collectors .toList ());
3989
+ } catch (Exception e ) {
3990
+ LOG .error (" error in function getexpectedCrpOutcomes - unable to extract inactive oicr" );
3991
+ }
3985
3992
return expectedStudies ;
3986
3993
}
3987
3994
Original file line number Diff line number Diff line change @@ -1154,9 +1154,11 @@ public CrpProgramOutcome getTraineesIndicator() {
1154
1154
if (deliverableTraineesIndicator != null && deliverableTraineesIndicator .getIndicator () != null
1155
1155
&& !deliverableTraineesIndicator .getIndicator ().isEmpty ()) {
1156
1156
String indicator = deliverableTraineesIndicator .getIndicator ();
1157
- crpProgramOutcomeIPI =
1158
- programOutcomes .stream ().filter (o -> o .getAcronym () != null && o .getAcronym ().equals (indicator ))
1159
- .collect (Collectors .toList ()).get (0 );
1157
+ crpProgramOutcomeIPI = programOutcomes .stream ()
1158
+ .filter (o -> o .getAcronym () != null && o .getAcronym ().equals (indicator )
1159
+ && (o .getDescription () == null
1160
+ || !o .getDescription ().contains (APConstants .DELIVERABLE_CRP_PROGRAM_OUTCOME_DEPRECATED )))
1161
+ .collect (Collectors .toList ()).get (0 );
1160
1162
}
1161
1163
}
1162
1164
Original file line number Diff line number Diff line change @@ -865,6 +865,8 @@ public final class APConstants {
865
865
public static final int CLARISA_AVALIABLE_INFO_YEAR = 2018 ;
866
866
867
867
public static final String IGNORE_NEWER_YEARS = "ignoreNewer" ;
868
+ public static final String DELIVERABLE_CRP_PROGRAM_OUTCOME_DEPRECATED = "DEPRECATED" ;
869
+
868
870
869
871
public static String getFilterBy () {
870
872
return FILTER_BY ;
You can’t perform that action at this time.
0 commit comments