Skip to content

Commit

Permalink
Merge pull request #321 from dealako/bug/3780-redirect-url-fix
Browse files Browse the repository at this point in the history
[3780] - Resolve Corporate Console Redirect Issue
  • Loading branch information
amolsontakke3576 authored Feb 13, 2023
2 parents 646eaac + 8dad2a7 commit f3b7b66
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/core/services/cla-contributor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,17 @@ export class ClaContributorService {
// TODO: figure out the github repository that was used to come here...
// pick the matching SF Project based on the repository name, instead of just using the first project in the list

const project = this.getProjectFromRepo(projectDetails);
console.log('project: ', project);

// No SF Projects for this CLA Group
if (projectDetails.length === 0) {
// No SFID associated with project so redirect at corporate console dashboard.
url = this.corporateV2Base + 'company/dashboard';
} else if (claGroupModel.signed_at_foundation_level) {
} else if (claGroupModel.signed_at_foundation_level && claGroupModel.foundation_sfid === project.project_sfid) {
// Signed at foundation level.
url = this.corporateV2Base + 'foundation/' + projectDetails[0].foundation_sfid + '/cla';
} else {
const project = this.getProjectFromRepo(projectDetails);
console.log('project: ', project);
if (project !== null) {
// For standalone project we must redirect to the SFID of The Linux Foundation
url = this.corporateV2Base + 'foundation/' + project.foundation_sfid + '/project/' + project.project_sfid + '/cla';
Expand Down Expand Up @@ -254,7 +255,7 @@ export class ClaContributorService {
}
}
}

// Checked in Gerrit Repo
if (project.gerrit_repos.length > 0) {
const repos = project.gerrit_repos;
Expand Down

0 comments on commit f3b7b66

Please sign in to comment.