# Bug OP-17231 - Work packages "default" priority is lost when deleted.

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Administration, Modules and project features / Work packages |
| Target versions | 16.1.0 |
| Observed in versions | 16.0.0 |
| Sprint | 16.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.0.x |
| 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 |  |
| Product manager |  |
| Developers | Jens Ulferts |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### 

### Steps to reproduce

First log as member or admin and add a new work package, you will see that the priority field is filling by itself with the default value ex: NORMAL and keep it in mind.

Log as Admin, go to the priority field editor in the work package section.

Delete the default value that was pushed earlier.

Now go add a new work package again and you will need to enter the priority manualy. for simple work package its ok but when you try to add some from the "add children" in a work package it block you to do it because it need the field.

When you go back to the priority filed editor, ***you can't*** set a priority by default and the program dosen't set a new by itself.

<br>

### Temporary solution

The only work around i found was to backup the platform, edit the .sql file to add a "true" at the desired field to "is\_default" manualy and then restore the database.

`<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/633553/content">`

### Desired behaviour

  - Add a "Default" check box to the form for creating/editing priorities
    
      - The check box is placed below the "Active" checkbox
    
      - Add caption on the checkbox explaining that checking this will deselect the "Default" value from any other priority currently being the default priority: "Making this priority default will override the previous default priority."

  - When saving a priority with the "Default" checkbox checked, other priorities currently being marked as the default priority will loose that characteristic.

  - On the list of priorities in the administration, add a "Default" text to the one priority, being the default. This should look similar to how it is displayed for project phases:  <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/660099/content" alt="Ignore the fact that the color indicator is not displayed here, it is just a mock-up">

<br>

### Environnement

Tested on v15.5.1 and v16, running on docker compose

Selfhosted on ubuntu 24.04 LTS

Tested with firefox and Chrome

**Language**

*English and French*
