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

[3780] - Resolve Corporate Console Redirect Issue #321

Merged
Merged
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
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