Skip to content

Commit bbc7955

Browse files
committed
fix: add selection plan is not null condition for actions filter
Change-Id: Ib54b7c61496929a68083345ff75d994541dd1510
1 parent a020884 commit bbc7955

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

app/Repositories/Summit/DoctrineSummitEventRepository.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ public function getAllByPage(PagingInfo $paging_info, Filter $filter = null, Ord
150150

151151
if (!is_null($filter)) {
152152
$filter->apply2Query($query, $this->getCustomFilterMappings($current_member_id, $current_track_id));
153+
if($filter->hasFilter('actions')){
154+
$query = $query->innerJoin("p.selection_plan","sp_i")
155+
->innerJoin("sp_i.allowed_presentation_action_types","allowed_at")
156+
->innerJoin("allowed_at.type","allowed_at_type")
157+
->andWhere("allowed_at_type = at");
158+
159+
}
153160
}
154161

155162
$shouldPerformRandomOrderingByPage = false;

tests/FilterParserTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public function testApplyFilterAND()
136136
)
137137
]);
138138

139+
$query->innerJoin("p.selection_plan","sp");
140+
$query->innerJoin("sp.allowed_presentation_action_types","allowed_at");
141+
$query->innerJoin("allowed_at.type","allowed_at_type", Join::ON, "allowed_at_type.id = at.id");
142+
139143
$dql = $query->getDQL();
140144
$this->assertTrue(!empty($dql));
141145
}

0 commit comments

Comments
 (0)