Commit 9d7087d4 authored by Ammar Alakkad's avatar Ammar Alakkad

Fix time_tracking help link

parent a22347cc
<script> <script>
import { sprintf, s__ } from '../../../locale'; import { sprintf, s__ } from '../../../locale';
import { joinPaths } from '~/lib/utils/url_utility';
export default { export default {
name: 'TimeTrackingHelpState', name: 'TimeTrackingHelpState',
props: {
rootPath: {
type: String,
required: true,
},
},
computed: { computed: {
href() { href() {
return `${this.rootPath}help/workflow/time_tracking.md`; return joinPaths(gon.relative_url_root || '', '/help/user/project/time_tracking.md');
}, },
estimateText() { estimateText() {
return sprintf( return sprintf(
......
...@@ -42,10 +42,6 @@ export default { ...@@ -42,10 +42,6 @@ export default {
default: false, default: false,
required: false, required: false,
}, },
rootPath: {
type: String,
required: true,
},
}, },
data() { data() {
return { return {
...@@ -137,7 +133,7 @@ export default { ...@@ -137,7 +133,7 @@ export default {
:limit-to-hours="limitToHours" :limit-to-hours="limitToHours"
/> />
<transition name="help-state-toggle"> <transition name="help-state-toggle">
<time-tracking-help-state v-if="showHelpState" :root-path="rootPath" /> <time-tracking-help-state v-if="showHelpState" />
</transition> </transition>
</div> </div>
</div> </div>
......
...@@ -24,7 +24,6 @@ export default class SidebarMilestone { ...@@ -24,7 +24,6 @@ export default class SidebarMilestone {
humanTimeEstimate, humanTimeEstimate,
humanTimeSpent, humanTimeSpent,
limitToHours: parseBoolean(limitToHours), limitToHours: parseBoolean(limitToHours),
rootPath: '/',
}, },
}), }),
}); });
......
---
title: Fix time_tracking help link
merge_request: 32552
author:
type: fixed
...@@ -86,7 +86,7 @@ RSpec.shared_examples 'issuable time tracker' do |issuable_type| ...@@ -86,7 +86,7 @@ RSpec.shared_examples 'issuable time tracker' do |issuable_type|
page.within '.time-tracking-component-wrap' do page.within '.time-tracking-component-wrap' do
find('.help-button').click find('.help-button').click
expect(find_link('Learn more')[:href]).to have_content('/help/workflow/time_tracking.md') expect(find_link('Learn more')[:href]).to have_content('/help/user/project/time_tracking.md')
end end
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