Issues from archived projects are displaying on user issue list

Summary

Issues from archived projects are showing up on a user's issue list. These issues cannot be closed or unassigned, so they are stuck on the issue list. It is also causing a mismatch of the badge count (See screenshots)

Steps to reproduce

  1. Open an issue and assign to yourself
  2. Archive the project you made the issue in
  3. View your personal issue list

What is the current bug behavior?

Issues from archived projects are displaying on personal issue lists with no way to remove them

What is the expected correct behavior?

Either allow removal (unassign or close) or do not show issues from archived projects

Relevant logs and/or screenshots

Screenshot_2023-03-13_at_10.31.02_AM

Screenshot_2023-03-13_at_10.29.42_AM

Output of checks

/label reproduced on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes