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

Issue 40 #43

Merged
merged 2 commits into from
Aug 26, 2017
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
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ export class MultipleServiceLaunchPanelComponent {
private setParamValue(parameterValue: string) {
let vTemp = parameterValue;
this.session = {
commit: this.commit.revision,
repo: this.commit.repo,
branch: this.commit.branch
commit: this.commit.revision || this.getFallbackTemplateValue('commit'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template does not have commit property. Please change to 'revision'

repo: this.commit.repo || this.getFallbackTemplateValue('repo'),
branch: this.commit.branch || this.getFallbackTemplateValue('branch')
};

// this is required to GUI-1367 launch a workflow using the workflow instance's exported artifact
Expand All @@ -376,6 +376,13 @@ export class MultipleServiceLaunchPanelComponent {
return this.session[parameterValue.substring(parameterValue.indexOf('.') + 1).toString()] || vTemp;
}

private getFallbackTemplateValue(prop: string) {
if (this.templatesToSubmit.length === 1 && this.templatesToSubmit[0][prop]) {
Copy link
Contributor

@alexmt alexmt Aug 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use first template ? Instead please use template which correspond to parameter.

return this.templatesToSubmit[0][prop];
}
return;
}

private resubmitTask(task, runPartial = false): any {
if (runPartial) {
task.parameters = this.listParameters(this.allForms.controls[0]['controls']);
Expand Down