Skip to content

Commit

Permalink
Report grid fix- bad join
Browse files Browse the repository at this point in the history
#CTCTOWALTZ-1971
finos#5107
  • Loading branch information
jessica-woodland-scott-db committed Oct 7, 2020
1 parent 6244773 commit 57f7462
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ private Set<ReportGridRatingCell> findCellDataByGridCondition(Condition gridCond

private SelectConditionStep<Record4<Long, Long, String, Long>> getAggregatedMeasurableData(Condition gridCondition, Select<Record1<Long>> appSelector) {

SelectConditionStep<Record1<Long>> startingMeasurableIdsForGrid = DSL.select(rgcd.COLUMN_ENTITY_ID)
SelectConditionStep<Record1<Long>> startingMeasurableIdsForGrid = DSL
.select(rgcd.COLUMN_ENTITY_ID)
.from(rgcd)
.innerJoin(rg).on(rgcd.REPORT_GRID_ID.eq(rg.ID))
.where(gridCondition
.and(rgcd.COLUMN_ENTITY_KIND.eq(EntityKind.MEASURABLE.name())
.and(rgcd.RATING_ROLLUP_RULE.ne(RatingRollupRule.NONE.name()))));


SelectConditionStep<Record4<Long, Long, Long, Integer>> selectRatings = dsl.select(
MEASURABLE.ID,
SelectConditionStep<Record4<Long, Long, Long, Integer>> selectRatings = dsl
.select(MEASURABLE.ID,
MEASURABLE_RATING.ENTITY_ID,
RATING_SCHEME_ITEM.ID,
RATING_SCHEME_ITEM.POSITION)
Expand Down Expand Up @@ -248,7 +248,7 @@ private SelectConditionStep<Record4<Long, Long, String, Long>> fetchAssessmentDa
.innerJoin(ASSESSMENT_DEFINITION).on(ar.ASSESSMENT_DEFINITION_ID.eq(ASSESSMENT_DEFINITION.ID))
.innerJoin(rgcd).on(ASSESSMENT_DEFINITION.ID.eq(rgcd.COLUMN_ENTITY_ID)
.and(rgcd.COLUMN_ENTITY_KIND.eq(EntityKind.ASSESSMENT_DEFINITION.name())))
.innerJoin(rg).on(rgcd.ID.eq(rgcd.REPORT_GRID_ID))
.innerJoin(rg).on(rg.ID.eq(rgcd.REPORT_GRID_ID))
.where(gridCondition
.and(ar.ENTITY_KIND.eq(EntityKind.APPLICATION.name()))
.and(ar.ENTITY_ID.in(appSelector)));
Expand Down

0 comments on commit 57f7462

Please sign in to comment.