# Bug OP-16528 - Date alerts blocking more important background jobs

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 15.2.1 |
| Observed in versions |  |
| Sprint | 15.2.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 | Markus Kahl |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Or: Default priority for background jobs is high, not normal

<br>

### Steps to reproduce (needs console access)

*   Enqueue a job that has no priority defined, such as [Notifications::CreateDateAlertsNotificationsJob](https://github.com/opf/openproject/blob/release/15.2/app/workers/notifications/create_date_alerts_notifications_job.rb)
    

```ruby
GoodJob::Job.find(Notifications::CreateDateAlertsNotificationsJob.perform_later.job_id).priority
```

### What is the buggy behavior?

*   The job is enqueued using the highest priority (the result of the script above is `0`)
    
*   If there are many date alerts, this will block other jobs whose priority is defined as higher, such as user invitations or even journal creation
    

### What is the expected behavior?

*   The job should be enqueued with normal (`10`) priority
    

**OpenProject version**

_v15.2.0_
