Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
# Named by path because no job in this matrix runs the tests/ root, only its
# subdirectories - a file added there runs nowhere unless it is listed here.
- { name: "PresentationMediaUploads", filter: "tests/PresentationMediaUploadsTest.php tests/PresentationMediaUploadsVisibilityTest.php tests/PresentationSerializerCacheKeyTest.php tests/PresentationReopenModelTest.php tests/PresentationReopenApiTest.php tests/PresentationReopenAuthzTest.php tests/PresentationSubmissionReopenedEmailTest.php" }
- { name: "SpeakerSubmitterPublishedFilter", filter: "tests/ProcessSpeakersEmailRequestJobTest.php tests/ProcessSubmittersEmailRequestJobTest.php tests/SpeakerRepositoryTest.php tests/SubmitterRepositoryTest.php tests/SpeakerServiceOriginalFilterTest.php tests/SubmitterServiceOriginalFilterTest.php" }
- { name: "Repositories", filter: "tests/Repositories/" }
- { name: "Services", filter: "tests/Unit/Services/" }
- { name: "Integration", filter: "tests/Integration/" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function __construct
),
new OA\Parameter(
name: 'filter',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -368,7 +368,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($summit) {
),
new OA\Parameter(
name: 'filter',
description: 'Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type.',
description: 'Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type.',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -442,7 +442,7 @@ public function getSpeakersActivitiesCount($summit_id)
),
new OA\Parameter(
name: 'filter',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
description: 'Filter by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type. Operands supported: == (equal), @@ (contains), =@ (starts with).',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down Expand Up @@ -3054,7 +3054,7 @@ public function deleteSpeakerBigPhoto($speaker_id)
),
new OA\Parameter(
name: 'filter',
description: 'Filter speakers by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type',
description: 'Filter speakers by id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_track_group_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, has_media_upload_with_type, has_not_media_upload_with_type',
in: 'query',
required: false,
schema: new OA\Schema(type: 'string')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -181,6 +182,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -301,6 +303,7 @@ function () {
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -327,6 +330,7 @@ function () {
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -454,6 +458,7 @@ public function send($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand Down Expand Up @@ -483,6 +488,7 @@ public function send($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down Expand Up @@ -523,7 +529,7 @@ public function send($summit_id)
name: "filter",
in: "query",
required: false,
description: "Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, presentations_track_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, is_speaker, has_media_upload_with_type, has_not_media_upload_with_type.",
description: "Filter query (supports multiple operators). Filterable fields: id, not_id, first_name, last_name, email, full_name, member_id, member_user_external_id, has_accepted_presentations, has_alternate_presentations, has_rejected_presentations, has_published_presentations, presentations_track_id, presentations_selection_plan_id, presentations_type_id, presentations_title, presentations_abstract, presentations_submitter_full_name, presentations_submitter_email, is_speaker, has_media_upload_with_type, has_not_media_upload_with_type.",
schema: new OA\Schema(type: "string", example: "has_accepted_presentations==true")
),
],
Expand Down Expand Up @@ -564,6 +570,7 @@ public function getSubmittersActivitiesCount($summit_id)
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand Down Expand Up @@ -591,6 +598,7 @@ public function getSubmittersActivitiesCount($summit_id)
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function handle
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
'presentations_type_id' => ['=='],
Expand Down
31 changes: 31 additions & 0 deletions app/Repositories/Summit/DoctrineMemberRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,37 @@ protected function getFilterMappings()
),
]
),
'has_published_presentations' =>
Comment thread
mulldug marked this conversation as resolved.
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
'true',
'EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.created_by __c15 WITH __c15 = e.id
JOIN __p15.category __cat15
JOIN __p15.type __t15
LEFT JOIN __p15.selection_plan __sel_plan15
LEFT JOIN models\summit\PresentationMediaUpload __pm15 WITH __pm15.presentation = __p15
LEFT JOIN __pm15.media_upload_type __mut15
WHERE __p15.summit = :summit AND __p15.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '15'): '').
')'
),
'false' => new DoctrineCaseFilterMapping(
'false',
'NOT EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.created_by __c15 WITH __c15 = e.id
JOIN __p15.category __cat15
JOIN __p15.type __t15
LEFT JOIN __p15.selection_plan __sel_plan15
LEFT JOIN models\summit\PresentationMediaUpload __pm15 WITH __pm15.presentation = __p15
LEFT JOIN __pm15.media_upload_type __mut15
WHERE __p15.summit = :summit AND __p15.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '15'): '').
')'
),
]),
'has_alternate_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
Expand Down
49 changes: 49 additions & 0 deletions app/Repositories/Summit/DoctrineSpeakerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,55 @@ protected function getFilterMappings()

]
),
'has_published_presentations' =>
Comment thread
mulldug marked this conversation as resolved.
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
'true',
'EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.speakers __spk15 WITH __spk15.speaker = e.id
JOIN __p15.category __cat15
JOIN __p15.type __t15
LEFT JOIN __p15.selection_plan __sel_plan15
LEFT JOIN models\summit\PresentationMediaUpload __pm15 WITH __pm15.presentation = __p15
LEFT JOIN __pm15.media_upload_type __mut15
WHERE __p15.summit = :summit AND __p15.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '15'): ' ').
') OR EXISTS (
SELECT __p16.id FROM models\summit\Presentation __p16
JOIN __p16.moderator __md16 WITH __md16.id = e.id
JOIN __p16.category __cat16
JOIN __p16.type __t16
LEFT JOIN __p16.selection_plan __sel_plan16
LEFT JOIN models\summit\PresentationMediaUpload __pm16 WITH __pm16.presentation = __p16
LEFT JOIN __pm16.media_upload_type __mut16
WHERE __p16.summit = :summit AND __p16.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '16'): ' ').')'
),
'false' => new DoctrineCaseFilterMapping(
'false',
'NOT EXISTS (
SELECT __p15.id FROM models\summit\Presentation __p15
JOIN __p15.speakers __spk15 WITH __spk15.speaker = e.id
JOIN __p15.category __cat15
JOIN __p15.type __t15
LEFT JOIN __p15.selection_plan __sel_plan15
LEFT JOIN models\summit\PresentationMediaUpload __pm15 WITH __pm15.presentation = __p15
LEFT JOIN __pm15.media_upload_type __mut15
WHERE __p15.summit = :summit AND __p15.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '15'): ' ').
') AND NOT EXISTS (
SELECT __p16.id FROM models\summit\Presentation __p16
JOIN __p16.moderator __md16 WITH __md16.id = e.id
JOIN __p16.category __cat16
JOIN __p16.type __t16
LEFT JOIN __p16.selection_plan __sel_plan16
LEFT JOIN models\summit\PresentationMediaUpload __pm16 WITH __pm16.presentation = __p16
LEFT JOIN __pm16.media_upload_type __mut16
WHERE __p16.summit = :summit AND __p16.published = 1 '
.(!empty($extraSelectionStatusFilter)? sprintf($extraSelectionStatusFilter, '16'): ' ').')'
),
]),
'has_alternate_presentations' =>
new DoctrineSwitchFilterMapping([
'true' => new DoctrineCaseFilterMapping(
Expand Down
2 changes: 2 additions & 0 deletions app/Services/Model/ISpeakerFilterFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface ISpeakerFilterFields
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_track_group_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
Expand All @@ -60,6 +61,7 @@ interface ISpeakerFilterFields
'has_accepted_presentations' => 'sometimes|string|in:true,false',
'has_alternate_presentations' => 'sometimes|string|in:true,false',
'has_rejected_presentations' => 'sometimes|string|in:true,false',
'has_published_presentations' => 'sometimes|string|in:true,false',
'presentations_track_id' => 'sometimes|integer',
'presentations_track_group_id' => 'sometimes|integer',
'presentations_selection_plan_id' => 'sometimes|integer',
Expand Down
1 change: 1 addition & 0 deletions app/Services/Model/Imp/SubmitterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function
'has_accepted_presentations' => ['=='],
'has_alternate_presentations' => ['=='],
'has_rejected_presentations' => ['=='],
'has_published_presentations' => ['=='],
'presentations_track_id' => ['=='],
'presentations_selection_plan_id' => ['=='],
'presentations_type_id' => ['=='],
Expand Down
Loading
Loading