Commit 019bf2e7 authored by Jake Lear's avatar Jake Lear

Add iteration link to issue sidebar

parent 1c8ff093
...@@ -90,10 +90,13 @@ export default { ...@@ -90,10 +90,13 @@ export default {
}; };
}, },
computed: { computed: {
iteration() { iterationTitle() {
// NOTE: Optional chaining guards when search result is empty // NOTE: Optional chaining guards when search result is empty
return this.iterations.find(({ id }) => id === this.currentIteration)?.title; return this.iterations.find(({ id }) => id === this.currentIteration)?.title;
}, },
iterationUrl() {
return this.iterations.find(({ id }) => id === this.currentIteration)?.webUrl;
},
showNoIterationContent() { showNoIterationContent() {
return !this.editing && !this.currentIteration; return !this.editing && !this.currentIteration;
}, },
...@@ -159,7 +162,7 @@ export default { ...@@ -159,7 +162,7 @@ export default {
<div> <div>
<div v-gl-tooltip class="sidebar-collapsed-icon"> <div v-gl-tooltip class="sidebar-collapsed-icon">
<gl-icon :size="16" :aria-label="$options.iterationText" name="iteration" /> <gl-icon :size="16" :aria-label="$options.iterationText" name="iteration" />
<span class="collapse-truncated-title">{{ iteration }}</span> <span class="collapse-truncated-title">{{ iterationTitle }}</span>
</div> </div>
<div class="title hide-collapsed mt-3"> <div class="title hide-collapsed mt-3">
{{ $options.iterationText }} {{ $options.iterationText }}
...@@ -177,8 +180,8 @@ export default { ...@@ -177,8 +180,8 @@ export default {
</div> </div>
<div data-testid="select-iteration" class="hide-collapsed"> <div data-testid="select-iteration" class="hide-collapsed">
<span v-if="showNoIterationContent" class="no-value">{{ $options.noIteration }}</span> <span v-if="showNoIterationContent" class="no-value">{{ $options.noIteration }}</span>
<gl-link v-else-if="!editing" href <gl-link v-else-if="!editing" :href="iterationUrl"
><strong>{{ iteration }}</strong></gl-link ><strong>{{ iterationTitle }}</strong></gl-link
> >
</div> </div>
<gl-new-dropdown <gl-new-dropdown
......
...@@ -5,6 +5,7 @@ query groupIterations($fullPath: ID!, $title: String) { ...@@ -5,6 +5,7 @@ query groupIterations($fullPath: ID!, $title: String) {
id id
title title
state state
webUrl
} }
} }
} }
......
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