Fossil Forum
Post: Linking to tickets/commits
How does one link to a ticket in a commit, or link a commit in a ticket? I, naively, just inserted their hashes within square brackets and assumed that would be sufficient, but the timeline/ticket view just shows it as the hash within square brackets.
I, naively, just inserted their hashes within square brackets and assumed that would be sufficient, but the timeline/ticket view just shows it as the hash within square brackets.
You did the right thing, but it sounds like your repo might be set up for plain-text timeline. You can toggle that off in /setup_settings.
It wasn't the plain-text timeline -- when referencing a commit in a ticket, I needed to set Append Remark with format to [links only]. ("links only" isn't super intuitive to me -- what exactly does that do?). Should that be needed?
I'm not sure why linking a ticket from a commit message didn't work -- I was using the web editor to update a commit message, and in the preview it didn't show a link. Maybe I had copied'n'pasted the wrong hash? I don't know, but it seems to be working now at least.
The format [0123abc...] should work for a plain hash link. Prefixing that with /tktview/ would bring up the specific ticket page, and of course you can make a "fancy" link with [Displayed text.](/tktview/0123abc) (the pipe in the middle separating the URL from the display, effectively <a href="/projects/fossil-forum/fossil/tickets/0123abc/">Displayed text.</a>).