From 7000fc6eee9f95fe6cba15b7e256626a998294da Mon Sep 17 00:00:00 2001 From: Antoine FELIX Date: Thu, 5 Jun 2025 15:41:29 +0200 Subject: [PATCH] Add issue tracker to list of components in project Using available data, allows to display the issue tracker in the list of components. This list is located inside of the project view. Implements #1271 Signed-off-by: Antoine FELIX --- src/i18n/locales/en.json | 3 +- .../portfolio/projects/ProjectComponents.vue | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 527fb23f7..63bd4b743 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -913,7 +913,8 @@ "weakness": "Weakness", "will_not_fix": "Will not fix", "workaround_available": "Workaround available", - "x_trust_boundary": "Cross Trust Boundary" + "x_trust_boundary": "Cross Trust Boundary", + "issue_tracker": "Issue Tracker" }, "operator": { "contains_all": "contains all", diff --git a/src/views/portfolio/projects/ProjectComponents.vue b/src/views/portfolio/projects/ProjectComponents.vue index 8239c62c3..7425e37e9 100644 --- a/src/views/portfolio/projects/ProjectComponents.vue +++ b/src/views/portfolio/projects/ProjectComponents.vue @@ -261,6 +261,38 @@ export default { return value === true ? '' : ''; }, }, + { + title: this.$t('message.issue_tracker'), + field: 'externalReferences', + sortable: true, + visible: false, + formatter(value, row, index) { + if ( + Object.prototype.hasOwnProperty.call(row, 'externalReferences') + ) { + let issueTrackerRefs = ''; + row.externalReferences.forEach((externalRef) => { + if ( + Object.prototype.hasOwnProperty.call(externalRef, 'type') && + externalRef.type == 'issue-tracker' + ) { + if (issueTrackerRefs.length > 0) { + issueTrackerRefs += '
'; + } + issueTrackerRefs += + '' + + xssFilters.inHTMLData(externalRef.url) + + ''; + } + }); + return issueTrackerRefs; + } else { + return ''; + } + }, + }, { title: this.$t('message.license'), field: 'license',