diff --git a/changelog/10491.txt b/changelog/10491.txt new file mode 100644 index 000000000..14b33bff8 --- /dev/null +++ b/changelog/10491.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix footer URL linking to the correct version changelog. +``` diff --git a/ui/lib/core/addon/helpers/changelog-url-for.js b/ui/lib/core/addon/helpers/changelog-url-for.js index 008755ba1..095862de1 100644 --- a/ui/lib/core/addon/helpers/changelog-url-for.js +++ b/ui/lib/core/addon/helpers/changelog-url-for.js @@ -4,10 +4,10 @@ import { helper } from '@ember/component/helper'; This helper returns a url to the changelog for the specified version. It assumes that Changelog headers for Vault versions >= 1.4.3 are structured as: -## v1.5.0 +## 1.5.0 ### Month, DD, YYYY -## v1.4.5 +## 1.4.5 ### Month, DD, YYY etc. @@ -25,7 +25,7 @@ export function changelogUrlFor([version]) { // only recent versions have a predictable url if (versionNumber >= '143') { - return url.concat('v', versionNumber); + return url.concat(versionNumber); } } catch (e) { console.log(e); diff --git a/ui/tests/integration/helpers/changelog-url-for-test.js b/ui/tests/integration/helpers/changelog-url-for-test.js index 64e66b562..c71f5e88b 100644 --- a/ui/tests/integration/helpers/changelog-url-for-test.js +++ b/ui/tests/integration/helpers/changelog-url-for-test.js @@ -9,12 +9,12 @@ module('Integration | Helper | changelog-url-for', function(hooks) { test('it builds an enterprise URL', function(assert) { const result = changelogUrlFor(['1.5.0+prem']); - assert.equal(result, CHANGELOG_URL.concat('v150')); + assert.equal(result, CHANGELOG_URL.concat('150')); }); test('it builds an OSS URL', function(assert) { const result = changelogUrlFor(['1.4.3']); - assert.equal(result, CHANGELOG_URL.concat('v143')); + assert.equal(result, CHANGELOG_URL.concat('143')); }); test('it returns the base changelog URL if the version is less than 1.4.3', function(assert) {