Skip to content

Track visit when landing on issue show right after issue creation

Context: gitlab-org#17928 (comment 2625476644)

When a user creates a new issue and lands on the issue page directly after creation, the visit does not get logged in "Recently Viewed Items." This is because the show action is not triggered in that flow—only when the page is reloaded.

Expected Behavior:
Issue pages should be tracked as "Recently Viewed" immediately after creation, without requiring a page reload.

Possible Quick Fix Proposal:
Extend the controller callback to also cover :create:

after_action :log_issue_show, only: [:show, :create]
Edited by Thomas Hutterer