Skip to content

Redirect to the last visited epic board

Jarka Košanová requested to merge 321625-epic_boards-redirect into master

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

Availability and Testing

Related to #321625 (closed)

Edited by Mayra Cabrera

Merge request reports