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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ workflows:
only:
- develop
- pm-1127_1
- pm-4288_1
- pm-4288_2

# Production builds are exectuted only on tagged commits to the
# master branch.
Expand Down
13 changes: 4 additions & 9 deletions sql/reports/topcoder/completed-profiles-count.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ WHERE m.description IS NOT NULL
AND m."photoURL" <> ''
AND m."homeCountryCode" IS NOT NULL
AND ($1::text IS NULL OR COALESCE(m."homeCountryCode", m."competitionCountryCode") = $1)
AND (
$2::boolean IS NULL
OR m."availableForGigs" = $2::boolean
)
AND EXISTS (
SELECT 1
FROM members."memberTraits" mt
Expand Down Expand Up @@ -43,15 +47,6 @@ WHERE m.description IS NOT NULL
AND jsonb_array_length(mtp.value::jsonb -> 'preferredRoles') > 0
)
)
AND (
$2::boolean IS NULL
OR (
(
mtp.value::jsonb ? 'availability'
AND btrim(mtp.value->>'availability') <> ''
) = $2::boolean
)
)
)
AND EXISTS (
SELECT 1
Expand Down
7 changes: 5 additions & 2 deletions sql/reports/topcoder/completed-profiles.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SELECT
COALESCE(m."homeCountryCode", m."competitionCountryCode") AS "countryCode",
m.country AS "countryName",
ot.open_to_work_value AS "openToWork",
ot.is_open_to_work AS "isOpenToWork",
m."availableForGigs" AS "isOpenToWork",
ma.city,
ms.skill_count AS "skillCount"
FROM members.member m
Expand Down Expand Up @@ -59,7 +59,10 @@ WHERE m.description IS NOT NULL
AND m."photoURL" <> ''
AND m."homeCountryCode" IS NOT NULL
AND ($1::text IS NULL OR COALESCE(m."homeCountryCode", m."competitionCountryCode") = $1)
AND ($2::boolean IS NULL OR ot.is_open_to_work = $2::boolean)
AND (
$2::boolean IS NULL
OR m."availableForGigs" = $2::boolean
)
-- Check work history exists
AND EXISTS (
SELECT 1
Expand Down
5 changes: 4 additions & 1 deletion src/reports/topcoder/topcoder-reports.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,10 @@ export class TopcoderReportsService {
: undefined,
principalSkills: row.principalSkills || undefined,
openToWork: row.openToWork ?? null,
isOpenToWork: row.isOpenToWork ?? false,
isOpenToWork:
typeof row.isOpenToWork === "boolean"
? row.isOpenToWork
: false,
}));

return {
Expand Down
Loading