Redirect to the last visited epic board
What does this MR do?
The purpose of this MR is to redirect users to the epic board they visited as the last one.
A new table was created, that table stores the visits of epic boards by the users. We already have the functionality for project and group epic boards, I extracted the code from the mdoel/service/finder and reuse it also for the epics.
Side note
I discovered a bug when working on this, MR fixing that created: !60742 (merged)
Database
Migration
Adding the table
Up
== 20260421104929 AddEpicBoardRecentVisitsTable: migrating ====================
-- create_table(:boards_epic_board_recent_visits)
-> 0.0490s
== 20260421104929 AddEpicBoardRecentVisitsTable: migrated (0.0661s) ===========
Down
== 20260421104929 AddEpicBoardRecentVisitsTable: reverting ====================
-- drop_table(:boards_epic_board_recent_visits)
-> 0.0284s
== 20260421104929 AddEpicBoardRecentVisitsTable: reverted (0.0443s) ===========
Adding the index
Up
== 20260421104930 AddIndexToEpicBoardRecentVisits: migrating ==================
-- transaction_open?()
-> 0.0001s
-- index_exists?(:boards_epic_board_recent_visits, [:user_id, :group_id, :epic_board_id], {:name=>"index_epic_board_recent_visits_on_user_group_and_board", :unique=>true, :algorithm=>:concurrently})
-> 0.0065s
-- execute("SET statement_timeout TO 0")
-> 0.0006s
-- add_index(:boards_epic_board_recent_visits, [:user_id, :group_id, :epic_board_id], {:name=>"index_epic_board_recent_visits_on_user_group_and_board", :unique=>true, :algorithm=>:concurrently})
-> 0.0068s
-- execute("RESET ALL")
-> 0.0008s
== 20260421104930 AddIndexToEpicBoardRecentVisits: migrated (0.0162s) =========
Down
== 20260421104930 AddIndexToEpicBoardRecentVisits: reverting ==================
-- transaction_open?()
-> 0.0000s
-- indexes(:boards_epic_board_recent_visits)
-> 0.0085s
-- execute("SET statement_timeout TO 0")
-> 0.0007s
-- remove_index(:boards_epic_board_recent_visits, {:algorithm=>:concurrently, :name=>"index_epic_board_recent_visits_on_user_group_and_board"})
-> 0.0042s
-- execute("RESET ALL")
-> 0.0016s
== 20260421104930 AddIndexToEpicBoardRecentVisits: reverted (0.0176s) =========
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. - [-] I have not included a changelog entry because _____.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Related to #321625 (closed)
Edited by Mayra Cabrera