12

On the main Q&A sites, we have this convenient "Linked" section on the side. It provides links to other questions on the same site, either because:

  • This question has a link to the linked question in any of its post bodies or in the comments.
  • The linked question has a link to this question in any of its post bodies or in the comments.

It's a convenient resource for joining together questions that build off of each other or are otherwise related to each other, allowing one to manually build a repository of similar questions since the Related section itself is algorithmically generated. While tags allow one to group all questions within the same high level category, the Linked section allowed one to get to specifically related subsets that were on close enough ground that users would reference them together.

This functionality should exist within the scope of Teams as well. Specifically limited within the reach of the Team - e.g. if a question in a Team links to another question in the same Team, they should show up in each other's Linked sections. Like how we can't link questions across separate sites on the network, within a Team the Linked section should only look within the Team, not at other Teams or at the main Stack Overflow Q&A.

Within Teams, it's even more likely that users may want to refer others to questions that may exist elsewhere on the Team, so having this section around to retain that ease of access and overview functionality would be helpful.

1 Answer 1

8

This is a bug.

The functionality does exist: you can observe this by looking at a question that's been closed as a duplicate:

Linked sidebar exists on duplicate-closed questions and contains the link to the original

The problem is, closing a question as a duplicate is currently the only way to populate that sidebar on a Team... Because the bit of logic that scrapes the question, answer, and comments for links was never updated to recognize the Teams/Channels URL format:

new Regex("https?://" 
  + Regex.Escape(BaseHostAddress) 
  + @"(?:/q(uestions)?/(?<qid>\d+)|/a/(?<aid>\d+))", RegexOptions.IgnoreCase);

Note the lack of any /c/team-name bits in that expression... It'll ONLY recognize links to Stack Overflow posts. Except, it won't do that either because it's trying to find links where the host matches the current site - and while Teams links all use stackoverflow.com as their host, internally each Team site is configured with a different host (apparently one that sits on our internal network) - so no valid links can ever be recognized by the scraper.

Recommended fix

Update the regex to recognize Teams internal links.

Actual fix

Built out on September 7, 2018.

3
  • 3
    If this is updated for Teams, please update it to also handle protocol-relative and relative URLs.
    – Makyen Mod
    Aug 25, 2018 at 17:35
  • The Linked section only gets populated on post/edit, right? It won't retroactively populate the linked table for existing posts? I don't expect it to but if it should it didn't work. I tested/checked this on the charcoal team on a question of mine, in case you need evidence.
    – rene
    Sep 8, 2018 at 10:04
  • 1
    You have to add or remove a link somewhere on a post for this to update, @rene. Removing a link triggers a full rebuild for the post, so go with that. Also, don't forget to refresh the page after saving the edit.
    – Shog9
    Sep 10, 2018 at 23:41

Not the answer you're looking for? Browse other questions tagged .