Commit 149caf6b authored by Justin Ho's avatar Justin Ho

Pass issues list path to LabelsSelect

Fix sidebar issue labels not linking properly on
Jira issue details page
parent 143d64fc
...@@ -8,6 +8,11 @@ export default { ...@@ -8,6 +8,11 @@ export default {
Assignee, Assignee,
LabelsSelect, LabelsSelect,
}, },
inject: {
issuesListPath: {
default: null,
},
},
props: { props: {
sidebarExpanded: { sidebarExpanded: {
type: Boolean, type: Boolean,
...@@ -33,6 +38,7 @@ export default { ...@@ -33,6 +38,7 @@ export default {
<labels-select <labels-select
:selected-labels="issue.labels" :selected-labels="issue.labels"
:labels-filter-base-path="issuesListPath"
variant="sidebar" variant="sidebar"
class="block labels js-labels-block" class="block labels js-labels-block"
> >
......
...@@ -9,12 +9,13 @@ export default function initJiraIssueShow({ mountPointSelector }) { ...@@ -9,12 +9,13 @@ export default function initJiraIssueShow({ mountPointSelector }) {
return null; return null;
} }
const { issuesShowPath } = mountPointEl.dataset; const { issuesShowPath, issuesListPath } = mountPointEl.dataset;
return new Vue({ return new Vue({
el: mountPointEl, el: mountPointEl,
provide: { provide: {
issuesShowPath, issuesShowPath,
issuesListPath,
}, },
render: (createElement) => createElement(JiraIssuesShowApp), render: (createElement) => createElement(JiraIssuesShowApp),
}); });
......
...@@ -53,7 +53,8 @@ module EE ...@@ -53,7 +53,8 @@ module EE
def jira_issues_show_data def jira_issues_show_data
{ {
issues_show_path: project_integrations_jira_issue_path(@project, params[:id], format: :json) issues_show_path: project_integrations_jira_issue_path(@project, params[:id], format: :json),
issues_list_path: project_integrations_jira_issues_path(@project)
} }
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment