Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #163

Merged
merged 167 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
32b04d2
Add Jira data fetching job and Jira schema
dexter-sim Feb 12, 2024
61863e9
Add Jira Epic API fetch
dexter-sim Feb 13, 2024
7dd88e0
Add jira issue api fetching
dexter-sim Feb 14, 2024
5891d09
Add OAuth 2.0 for Jira account without refresh token
dexter-sim Feb 18, 2024
61c6003
Add OAuth 2.0 for sprint and issue fetch
dexter-sim Feb 19, 2024
f325836
Refactor and clean up Jira API code
dexter-sim Feb 20, 2024
1d1bd6f
Merge branch 'staging' into add-jira-oauth2
dexter-sim Feb 20, 2024
8f79059
Update Jira API route
dexter-sim Feb 20, 2024
868907e
Merge branch 'staging' into add-jira-oauth2
dexter-sim Feb 27, 2024
90722a0
Clean up code
dexter-sim Feb 27, 2024
af56f2e
Fix warnings
dexter-sim Feb 27, 2024
9482e4a
Fix bug with refresh token for Jira
dexter-sim Feb 27, 2024
e70024c
Fix updating refresh token bug
dexter-sim Feb 27, 2024
76d3f2f
Add graphql API to get github projects
dexter-sim Feb 28, 2024
66e34d7
Merge branch 'staging' into add-jira-oauth2
dexter-sim Mar 7, 2024
dbe3228
Update project management front end page
dexter-sim Mar 8, 2024
92afab3
Rename jira backend files to project management
dexter-sim Mar 8, 2024
ec76339
Update Jira job and teamdata schema
dexter-sim Mar 9, 2024
84aacde
Add backend API for getting project management data
dexter-sim Mar 9, 2024
3513bcc
Add front end components for project management page
dexter-sim Mar 10, 2024
8f667a2
Add basic project management card front end component
dexter-sim Mar 11, 2024
d323a69
Add front end of current Jira board in project management page
dexter-sim Mar 12, 2024
a43fc74
Change Jira OAuth 2.0 redirect uri
dexter-sim Mar 13, 2024
659d325
Fix Jira API bug involving multiple Jira accounts
dexter-sim Mar 14, 2024
2259bff
Merge branch 'staging' into add-jira-oauth2
dexter-sim Mar 14, 2024
fe6424b
Add project management page to navbar
dexter-sim Mar 14, 2024
49b6ad5
Remove unused variable onUpdate
dexter-sim Mar 14, 2024
457c64f
Replace criteria to find teamdata to be github org name and repo name
dexter-sim Mar 14, 2024
ebba9e6
Add Course field in TeamData schema
dexter-sim Mar 16, 2024
2b048e6
Merge branch 'staging' into add-jira-oauth2
dexter-sim Mar 16, 2024
3d11273
Remove unused imports
dexter-sim Mar 16, 2024
67934e3
Fix Jira job involving TeamData mapping to Jira board
dexter-sim Mar 16, 2024
2ecfd57
Change front end UI project management page
dexter-sim Mar 16, 2024
22a0333
Fix scrolling bug on project management page
dexter-sim Mar 16, 2024
30f343b
Add a basic bar chart on project management page
dexter-sim Mar 17, 2024
db5d207
Abstract out active sprint board function
dexter-sim Mar 17, 2024
caec40f
Create a bar chart for each sprint
dexter-sim Mar 17, 2024
d347dea
Add carousel to assignee stats bar chart on project management page
dexter-sim Mar 17, 2024
31c5110
Add a bar chart showing completion status of each sprint in project m…
dexter-sim Mar 17, 2024
1dbf426
Update JiraData schema
dexter-sim Mar 17, 2024
1517406
Add Jira board custom columns functionality
dexter-sim Mar 21, 2024
7ba2690
Fix formatting
dexter-sim Mar 21, 2024
2d5bfdf
Revert team data schema change
dexter-sim Mar 22, 2024
c5db8fc
Update front end text
dexter-sim Mar 22, 2024
b7e2835
Refactor jira board to team schema
dexter-sim Mar 22, 2024
16f3dee
Change cron schedule for Jira
dexter-sim Mar 22, 2024
c2e4e7d
Update Jira job to remove team data
dexter-sim Mar 22, 2024
431c9be
Update TeamCard.tsx
dexter-sim Mar 22, 2024
80e3617
Fix a bug involving pulling Jira sprint data
dexter-sim Mar 22, 2024
fc5944c
Fix bug regarding issues not linked to closed sprints
dexter-sim Mar 22, 2024
4d5b940
Fix formatting
dexter-sim Mar 22, 2024
b1a0cb2
Fix a bug involving duplicate issues being saved for active sprints
dexter-sim Mar 22, 2024
aa20d3e
Clean up
dexter-sim Mar 22, 2024
3a8ba3a
Update CONTRIBUTING.md
auhc99 Mar 23, 2024
c2c3681
Update README.md
auhc99 Mar 23, 2024
05846cb
Remove formlink, granularity and frequency
auhc99 Mar 23, 2024
2e16ba9
Add divider to forms
auhc99 Mar 23, 2024
d041b76
Update courseRoutes.ts
auhc99 Mar 23, 2024
836053a
Update courseController.ts
auhc99 Mar 23, 2024
68dafc2
Update courseService.ts
auhc99 Mar 23, 2024
20f7a1e
Update courseController.ts
auhc99 Mar 23, 2024
64ecb84
Formatting
auhc99 Mar 23, 2024
5253f3a
Update UpdateUserForm.tsx
auhc99 Mar 23, 2024
d1f48a0
Create UpdateUserCSVForm.tsx
auhc99 Mar 23, 2024
87fcb89
Update PeopleInfo.tsx
auhc99 Mar 23, 2024
58c6727
Update CSVUpload.tsx
auhc99 Mar 23, 2024
8c3e6a3
Update UpdateUserCSVForm.tsx
auhc99 Mar 23, 2024
75a5909
Update courseService.ts
auhc99 Mar 23, 2024
a428fd3
Update PeopleInfo.tsx
auhc99 Mar 23, 2024
edee690
Update courseService.ts
auhc99 Mar 23, 2024
70493c1
Update Account.ts
auhc99 Mar 23, 2024
e63ed17
Update jest.config.ts
auhc99 Mar 23, 2024
55fc42b
Add Missing Authorization Error
auhc99 Mar 23, 2024
8d5643b
Update auth.ts
auhc99 Mar 23, 2024
a647b01
Update .env.example
dexter-sim Mar 23, 2024
aab5e3b
Delete TeamData.test.ts
auhc99 Mar 23, 2024
85555a3
Update courseController.test.ts
auhc99 Mar 23, 2024
f0d9f2d
Update assessmentController.test.ts
auhc99 Mar 23, 2024
55df301
Merge pull request #98 from NUS-CRISP/add-jira-oauth2
auhc99 Mar 23, 2024
b71fbdd
Merge branch 'staging' into dev-mh
auhc99 Mar 23, 2024
b26b269
Add error catch in Jira fetch job
dexter-sim Mar 23, 2024
fb218f4
Merge pull request #156 from NUS-CRISP/dev-mh
dexter-sim Mar 23, 2024
895d35a
Add support for multiple Atlassian orgs for each account
dexter-sim Mar 23, 2024
746e395
Update ProjectManagementInfo.tsx
dexter-sim Mar 23, 2024
e15f0d9
Fix formatting
dexter-sim Mar 23, 2024
e555142
Fix an import bug
dexter-sim Mar 24, 2024
3d45b68
Merge pull request #157 from NUS-CRISP/Add-support-for-multiple-Jira-…
dexter-sim Mar 24, 2024
aaa2033
Fix import bug
dexter-sim Mar 24, 2024
5c3e96b
Merge pull request #159 from NUS-CRISP/Add-support-for-multiple-Jira-…
dexter-sim Mar 24, 2024
a29d90d
Fix import bug
dexter-sim Mar 24, 2024
8e6dc52
Merge pull request #160 from NUS-CRISP/Add-support-for-multiple-Jira-…
dexter-sim Mar 24, 2024
ea8c3d8
Update jest.config.ts
auhc99 Mar 26, 2024
5098ed6
add home page
LMAOboxhack Mar 28, 2024
e62a421
update package-lock
LMAOboxhack Mar 28, 2024
0bae44a
formatting
LMAOboxhack Mar 28, 2024
67d3dea
formatting
LMAOboxhack Mar 28, 2024
3ab556c
add course start date
LMAOboxhack Mar 29, 2024
a8cc6e1
formatting
LMAOboxhack Mar 29, 2024
d4bba9b
add unit tests
LMAOboxhack Mar 29, 2024
2773243
add startDate to course tests
LMAOboxhack Mar 29, 2024
3dc3b85
fix missing startDate for tests
LMAOboxhack Mar 29, 2024
5f1eeb4
update package-lo k
LMAOboxhack Mar 29, 2024
befb736
add unit tests for utils
LMAOboxhack Mar 29, 2024
8fd6292
add service tests
LMAOboxhack Mar 30, 2024
54e8c50
fix tests
LMAOboxhack Mar 30, 2024
00810db
fix tests
LMAOboxhack Mar 30, 2024
d5778f7
fix tests
LMAOboxhack Mar 30, 2024
7c6f003
add auth test
LMAOboxhack Mar 30, 2024
07aebe1
add auth tests
LMAOboxhack Mar 30, 2024
a7c245a
fix auth tests
LMAOboxhack Mar 30, 2024
5852f65
fix auth tests
LMAOboxhack Mar 30, 2024
bd144dd
fix auth tests
LMAOboxhack Mar 30, 2024
422e6b3
fix auth tests
LMAOboxhack Mar 30, 2024
1643738
auth test fix
LMAOboxhack Mar 30, 2024
e3534aa
fix auth tests
LMAOboxhack Mar 30, 2024
3c800d3
fix auth tests
LMAOboxhack Mar 30, 2024
b5da16e
add courseService tests
LMAOboxhack Mar 30, 2024
2705582
fix courseService tests
LMAOboxhack Mar 30, 2024
f2101ab
add teamService tests
LMAOboxhack Mar 30, 2024
34f25e1
bump deps
LMAOboxhack Mar 30, 2024
d7ac553
minor ui updates
LMAOboxhack Mar 31, 2024
e8032bf
Update accountService.test.ts
auhc99 Mar 31, 2024
0d3c941
Update TeamSet.ts
auhc99 Mar 31, 2024
dad85af
Update teamService.ts
auhc99 Mar 31, 2024
74fa7a7
Update teamService.test.ts
auhc99 Mar 31, 2024
3cdca81
Update assessmentService.test.ts
auhc99 Mar 31, 2024
0cec7bf
Update assessmentService.test.ts
auhc99 Mar 31, 2024
6c34db6
Create googleService.test.ts
auhc99 Mar 31, 2024
e3224f4
Update google.ts
auhc99 Mar 31, 2024
934d68d
Create google.test.ts
auhc99 Mar 31, 2024
1e362ca
Update teamController.test.ts
auhc99 Mar 31, 2024
e915ba2
Update accountController.ts
auhc99 Mar 31, 2024
3ea4da9
Update accountController.test.ts
auhc99 Mar 31, 2024
8330f8f
Update courseController.ts
auhc99 Mar 31, 2024
7dcd9fc
Update courseController.test.ts
auhc99 Mar 31, 2024
645e4e2
Update courseController.ts
auhc99 Mar 31, 2024
33829a3
Update courseController.test.ts
auhc99 Mar 31, 2024
5855ce7
Update courseController.ts
auhc99 Mar 31, 2024
617d063
Update courseController.test.ts
auhc99 Mar 31, 2024
d73f4ca
update getAccountId(req) scope
auhc99 Mar 31, 2024
033aa0d
Update assessmentController.ts
auhc99 Mar 31, 2024
fd69ad0
Update assessmentController.test.ts
auhc99 Mar 31, 2024
e5f7cb4
Merge branch 'staging' into dev-mh
auhc99 Mar 31, 2024
741611a
Update googleService.test.ts
auhc99 Mar 31, 2024
88113e3
Update googleService.test.ts
auhc99 Mar 31, 2024
c0e108c
Update google.test.ts
auhc99 Mar 31, 2024
d5f0248
Update google.ts
auhc99 Mar 31, 2024
f250d6b
Update google.test.ts
auhc99 Mar 31, 2024
6af215b
Update googleService.test.ts
auhc99 Mar 31, 2024
84064fa
Update jest.config.ts
auhc99 Mar 31, 2024
bd389d7
Update googleService.test.ts
auhc99 Mar 31, 2024
00e2640
Update assessmentService.test.ts
auhc99 Apr 1, 2024
087ccdf
Update courseService.test.ts
auhc99 Apr 1, 2024
89c208a
Update courseService.ts
auhc99 Apr 1, 2024
d05ed3f
Update courseService.test.ts
auhc99 Apr 1, 2024
66ba100
Update courseService.test.ts
auhc99 Apr 1, 2024
81d4596
Update courseService.test.ts
auhc99 Apr 1, 2024
6f04963
Update courseService.test.ts
auhc99 Apr 1, 2024
e4d2561
Merge pull request #170 from NUS-CRISP/dev-mh
LMAOboxhack Apr 1, 2024
e3125d4
finish tutorial
LMAOboxhack Apr 1, 2024
c82a3c3
Merge branch 'staging' into fy-s2-s6
LMAOboxhack Apr 1, 2024
292938f
fix merge conflicts
LMAOboxhack Apr 1, 2024
01be5b7
fix courseService tests
LMAOboxhack Apr 1, 2024
a3f0eee
add githubService tests
LMAOboxhack Apr 2, 2024
06c69dc
update .env.example
LMAOboxhack Apr 2, 2024
1bfa64b
Merge branch 'fy-s2-s6' of https://github.com/NUS-CRISP/CRISP into fy…
LMAOboxhack Apr 2, 2024
a137b53
Merge pull request #167 from NUS-CRISP/fy-s2-s6
auhc99 Apr 3, 2024
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
Prev Previous commit
Next Next commit
Fix Jira job involving TeamData mapping to Jira board
  • Loading branch information
dexter-sim committed Mar 16, 2024
commit 67934e3cb30d15056c8a2d6688e55069527c5fe4
21 changes: 12 additions & 9 deletions backend/jobs/jiraJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ async function findJiraSprintId(
async function findTeamDataIdByCourseAndRepoName(
courseId: mongoose.Types.ObjectId,
repoName: string,
): Promise<mongoose.Types.ObjectId | null> {
): Promise<mongoose.Types.ObjectId[] | null> {
try {
const teamData = await TeamDataModel.findOne({
const teamData = await TeamDataModel.find({
repoName: repoName,
course: courseId,
});
if (teamData) {
return teamData._id; // Assuming _id is the ObjectId
return teamData.map(teamData => teamData._id); // Assuming _id is the ObjectId
}
return null;
} catch (error) {
Expand Down Expand Up @@ -271,14 +271,13 @@ export const fetchAndSaveJiraData = async () => {
const boards = data.values;

boards.forEach(async (boardData: any) => {
const teamDataId = await findTeamDataIdByCourseAndRepoName(
const teamDataIds = await findTeamDataIdByCourseAndRepoName(
course._id,
boardData.location.projectName,
);

const jiraBoard: Omit<JiraBoard, '_id'> = {
...boardData,
teamData: teamDataId,
jiraLocation: boardData.location,
jiraIssues: [],
jiraSprints: [],
Expand All @@ -295,10 +294,14 @@ export const fetchAndSaveJiraData = async () => {
}
);

await TeamDataModel.findOneAndUpdate(
{ _id: teamDataId },
{ board: board._id }
);
if (teamDataIds) {
for (const teamDataId of teamDataIds) {
await TeamDataModel.findOneAndUpdate(
{ _id: teamDataId },
{ board: board._id }
);
}
}

await fetchSprints(jiraBoard.id, cloudId, accessToken);
await fetchIssues(jiraBoard.id, cloudId, accessToken, jiraBoard.id);
Expand Down
1 change: 0 additions & 1 deletion backend/models/JiraData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const boardSchema: Schema = new Schema<JiraBoard>({
},
jiraSprints: [{ type: Schema.Types.ObjectId, ref: 'JiraSprint' }],
jiraIssues: [{ type: Schema.Types.ObjectId, ref: 'JiraIssue' }],
teamData: { type: Schema.Types.ObjectId, ref: 'TeamData' },
});

const JiraSprintModel = mongoose.model<JiraSprint>('JiraSprint', sprintSchema);
Expand Down
1 change: 0 additions & 1 deletion shared/types/JiraData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ export interface JiraBoard extends Document {
};
jiraSprints: JiraSprint[];
jiraIssues: JiraIssue[];
teamData: TeamData;
}