Skip to content

Commit

Permalink
fix(jira): limit issue to link transformation to electron context
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 27, 2019
1 parent dc164a9 commit 980aed2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/app/features/issue/jira/jira-issue/jira-issue.service.ts
Expand Up @@ -12,6 +12,7 @@ import { IssueData } from '../../issue';
import { take } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { DropPasteInputType } from '../../../../core/drop-paste-input/drop-paste-input';
import { IS_ELECTRON } from '../../../../app.constants';


@Injectable({
Expand Down Expand Up @@ -139,12 +140,14 @@ export class JiraIssueService {

getMappedAttachmentsFromIssue(issueData: JiraIssue): Attachment[] {
const attachments = issueData && issueData.attachments && issueData.attachments.map(mapJiraAttachmentToAttachment);
return attachments
// TODO remove once we have proper jira download files working
.map((attachment) => {
const link = 'LINK' as DropPasteInputType;
return {...attachment, type: link};
});
return (IS_ELECTRON)
? attachments
// TODO remove once we have proper jira download files working
.map((attachment) => {
const link = 'LINK' as DropPasteInputType;
return {...attachment, type: link};
})
: attachments;
}

private _createChangelog(updatedIssue: JiraIssue, oldIssue: JiraIssue): JiraChangelogEntry[] {
Expand Down

0 comments on commit 980aed2

Please sign in to comment.