# Bug OP-15677 - Internal error when trying to access notifications menu 

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-15677

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 14.4.1 |
| Observed in versions |  |
| Sprint | 14.4.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Jens Ulferts |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Before filing a report

_Before you file a report, please ensure you are running the latest version of OpenProject and_&nbsp;  
_have searched for similar bug reports._

### Steps to reproduce

_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_

1.  Create notification for work package X in project A
    
2.  Move work package X to project B
    
3.  destroy project A
    
4.  Go to notifications
    
5.  You get an internal error as the notification#project\_id is still pointing to project A
    

  

### Workaround

  

Re-assign the notifications to the correct project:

**Packaged installation**

`openproject run bundle exec rails runner "Notification.where.not(project_id: Project.select(:id)).each { |notification| notification.update_column(:project_id, notification.resource.project_id) }"`

**Docker installation**

`docker exec -it <container ID> bundle exec rails console`

`Notification.where.not(project_id: Project.select(:id)).each { |notification| notification.update_column(:project_id, notification.resource.project_id) }`

###   

https://appsignal.com/openproject-gmbh/sites/632371afd2a5e463ef717ecb/exceptions/incidents/6263/samples/632371afd2a5e463ef717ecb-501342606796993921117241490202
