From 4cda8ebb692a96f6e74131fdbc0b970178974bfd Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Thu, 14 Nov 2024 11:34:46 +0545 Subject: [PATCH 1/4] Fetch only published projects in Team Members page - Fixes #6629 --- frontend/src/views/teams.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/teams.js b/frontend/src/views/teams.js index 32a1b56b4e..8f2383e7e6 100644 --- a/frontend/src/views/teams.js +++ b/frontend/src/views/teams.js @@ -426,7 +426,7 @@ export function TeamDetail() { const [error, loading, team] = useFetch(`teams/${id}/`); // eslint-disable-next-line const [projectsError, projectsLoading, projects] = useFetch( - `projects/?teamId=${id}&omitMapResults=true&projectStatuses=PUBLISHED,DRAFT,ARCHIVED`, + `projects/?teamId=${id}&omitMapResults=true&projectStatuses=PUBLISHED`, id, ); const [isMember, setIsMember] = useState(false); From 9c04ab96fe2bc66e4f6579111e03cb0c90e98ae8 Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Thu, 14 Nov 2024 17:17:09 +0545 Subject: [PATCH 2/4] Do not allow Teams page without login - Fixes #6631 --- frontend/src/views/teams.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/teams.js b/frontend/src/views/teams.js index 8f2383e7e6..d3f73c6364 100644 --- a/frontend/src/views/teams.js +++ b/frontend/src/views/teams.js @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; import { useSelector } from 'react-redux'; -import { Link, useNavigate, useParams } from 'react-router-dom'; +import { Link, useNavigate, useParams, useLocation } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import { Form } from 'react-final-form'; import { @@ -421,6 +421,8 @@ export function EditTeam(props) { export function TeamDetail() { const { id } = useParams(); useSetTitleTag(`Team #${id}`); + const location = useLocation(); + const navigate = useNavigate(); const userDetails = useSelector((state) => state.auth.userDetails); const token = useSelector((state) => state.auth.token); const [error, loading, team] = useFetch(`teams/${id}/`); @@ -433,6 +435,16 @@ export function TeamDetail() { const [managers, setManagers] = useState([]); const [members, setMembers] = useState([]); + useEffect(() => { + if (!token) { + navigate('/login', { + state: { + from: location.pathname, + }, + }); + } + }, [location.pathname, navigate, token]); + useEffect(() => { if (team && team.members) { setManagers(filterActiveManagers(team.members)); From 197431f7e74128d0abf1c6ae74939c3de6775e84 Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Wed, 20 Nov 2024 13:52:45 +0545 Subject: [PATCH 3/4] Change `no_output_timeout` to 20m in circleci config - Fix frontend test case failure due to `context deadline exceeded` --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 733ec28069..c9cb775703 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,7 +133,7 @@ jobs: --output text) - run: name: Make Database Backup - no_output_timeout: 15m + no_output_timeout: 20m command: | aws rds wait db-instance-available \ --db-instance-identifier ${RDS_ID} @@ -211,7 +211,7 @@ jobs: /tmp/tasking-manager.cfn.json > "$tmpfile" && mv "$tmpfile" $CIRCLE_WORKING_DIRECTORY/cfn-config-<< parameters.stack_name >>.json - run: name: Deploy to << parameters.stack_name >> - no_output_timeout: 15m + no_output_timeout: 20m command: | export NODE_PATH=/usr/local/share/.config/yarn/global/node_modules/ validate-template $CIRCLE_WORKING_DIRECTORY/scripts/aws/cloudformation/tasking-manager.template.js From f5afb67bf29c0fc60d2a0a7c2e22bc3e679012de Mon Sep 17 00:00:00 2001 From: mahesh-naxa Date: Wed, 20 Nov 2024 17:45:52 +0545 Subject: [PATCH 4/4] edit: update circle ci frontend test worker freezing --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c9cb775703..0674170b83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,9 +30,10 @@ jobs: - env - run: name: Run yarn test + no_output_timeout: 20m command: | cd ${CIRCLE_WORKING_DIRECTORY}/frontend/ - CI=true yarn test -w 3 --silent + CI=true yarn test -w 1 --silent CI=true GENERATE_SOURCEMAP=false yarn build backend-code-check-PEP8: @@ -133,7 +134,6 @@ jobs: --output text) - run: name: Make Database Backup - no_output_timeout: 20m command: | aws rds wait db-instance-available \ --db-instance-identifier ${RDS_ID} @@ -211,7 +211,6 @@ jobs: /tmp/tasking-manager.cfn.json > "$tmpfile" && mv "$tmpfile" $CIRCLE_WORKING_DIRECTORY/cfn-config-<< parameters.stack_name >>.json - run: name: Deploy to << parameters.stack_name >> - no_output_timeout: 20m command: | export NODE_PATH=/usr/local/share/.config/yarn/global/node_modules/ validate-template $CIRCLE_WORKING_DIRECTORY/scripts/aws/cloudformation/tasking-manager.template.js