Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit fd95066

Browse files
authored
Merge pull request #496 from appirio-tech/dev
Promote task exclusion updates to master
2 parents 8e948bb + 5828550 commit fd95066

6 files changed

+6
-2
lines changed

queries/get_active_challenges

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ AND pcl.project_category_id NOT IN (27, 37) --exclude when spec review was a 'co
7070
AND pp1.phase_status_id IN (2, 3)
7171
AND pi1.project_info_type_id = 1 -- external reference id
7272
AND pi1.project_id = p.project_id
73-
73+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks
7474
ORDER BY @sort_column@ @sort_order@

queries/get_open_challenges

+1
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,6 @@ AND pn.value LIKE ('@challenge_name@')
102102
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) >= @prize_lower_bound@
103103
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) <= @prize_upper_bound@
104104
AND p.tc_direct_project_id = DECODE(@project_id@, 0, p.tc_direct_project_id, @project_id@)
105+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks
105106
ORDER BY @sort_column@ @sort_order@
106107
)

queries/get_open_challenges_count

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ AND pn.value LIKE ('@challenge_name@')
3232
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) >= @prize_lower_bound@
3333
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) <= @prize_upper_bound@
3434
AND p.tc_direct_project_id = DECODE(@project_id@, 0, p.tc_direct_project_id, @project_id@)
35+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks

queries/get_past_challenges

+1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ AND LOWER(pn.value) LIKE('@challenge_name@')
7171
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) >= @prize_lower_bound@
7272
AND NVL((SELECT pr.prize_amount FROM prize pr WHERE pr.project_id = p.project_id AND pr.prize_type_id = 15 AND pr.place = 1), 0) <= @prize_upper_bound@
7373
AND p.tc_direct_project_id = DECODE(@project_id@, 0, p.tc_direct_project_id, @project_id@)
74+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks
7475
ORDER BY @sort_column@ @sort_order@
7576
)

queries/get_past_challenges_count

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ AND (not exists (select contest_id from contest_eligibility where contest_id = p
3232
or exists(select contest_id from contest_eligibility ce, group_contest_eligibility gce, user_group_xref x
3333
where x.login_id = @user_id@ AND x.group_id = gce.group_id AND gce.contest_eligibility_id = ce.contest_eligibility_id
3434
AND ce.contest_id = p.project_id))
35+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks

queries/get_upcoming_challenges

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ AND pp1.scheduled_start_time > CURRENT
6767
AND pp1.scheduled_start_time < CURRENT + 90 UNITS DAY
6868
AND pi1.project_info_type_id = 1 -- external reference id
6969
AND pi1.project_id = p.project_id
70-
70+
AND not exists (select 1 from resource r, project_info pi82 where r.project_id = p.project_id and r.resource_role_id = 1 and p.project_id = pi82.project_id and project_info_type_id = 82 and pi82.value = 1) -- exclude assigned tasks
7171
ORDER BY @sort_column@ @sort_order@

0 commit comments

Comments
 (0)