If an issue is referenced using only it's number (e.g. #17) the link won't generate correctly. For example
btasker 2022-03-13T11:14:07.524Z mentioned in issue [#14](/issue/websites/Gitlab-Issue-Listing-Script/14.html)
The link is to /issue//14.html
We need to detect those links and insert the project prefix.
Activity
14-Mar-22 13:05
assigned to @btasker
16-Apr-22 12:45
Testing #14
16-Apr-22 12:55
mentioned in commit 7e7a3c228fdfa7205eb38ed7c5c48a5cc803bf73
Message
Implement partial handling of relative issue references for websites/Gitlab-Issue-Listing-Script#17
This'll only work where issues are x-referenced from other issues - commits won't work.
We need to decide on how best to fetch the current project reference - do we pull it from a global somewhere, or do we have
qs2sef
pull it out of the url?16-Apr-22 12:56
Commit 787a3c22 is only a partial fix - it'll handle cross-issue references, but doesn't do anything for references in commit messages.
We need
qs2sef()
to be able to pull the current project reference from somewhere - whether that's direct from a URL, or stored in a global somewhere17-Apr-22 08:33
mentioned in commit aa09f40d0e6a9e9894e4bad93b8e95f833437ab0
Message
Improve handling of relative links for #17
If there isn't a project name in the provided reference, we'll check whether the page currently being viewed has one.
If not, then we revert to the behaviour that was present before this commit and return a relative link
17-Apr-22 08:35
The behaviour has been updated to take a project name from the current URL if one isn't included in the issue reference itself.
Assuming there isn't one (there'll be some view, somewhere, where that's true) then we'll do a hail mary and return a relative link.
This has been tested in the fixing commit aa09f40d
23-Apr-22 10:20
mentioned in issue #41