# Bug OP-15983 - Sorting custom actions by "sort" header produces 500

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.0.0 |
| Observed in versions |  |
| Sprint | 15.0.0 |
| 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 | Oliver Günther |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Log in as admin user

2.  Go to the administration page from the profile dropdown

3.  Click work packages

4.  Click custom actions

5.  Click the "sort" header on the table

### What is the buggy behavior?

  - Changing the order of the custom actions with the arrow icons in this column did not rearrange anything.

  - If you try to click the sort header (in an attempt to have things sort by a column other than Name), the page at {baseurl}/admin/custom\_actions renders a 500 error. I was only able to get it to go away by restarting the Docker container.

### What is the expected behavior?

1.  As the custom actions are ordered by position (manually ordering), the table should not be sortable, i.e., the headers are not clickable.

### **Logs**

Logs attached as screenshot below that I grabbed in the moment without thinking to get the text ones--sorry about the copyability.

### Screenshots and other files

Custom actions in the order 1, 4, 2, 3, even though sort order should have been modified by the buttons in the sort column. Also, tooltip indicates where I'm about to click to create the error:

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/201085/content"> <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/201082/content"> <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/201086/content">

### Environment information

**OpenProject installation type**

  - Docker All-in-one container
    
      - I converted the run command into my own docker-compose.yml, but it's the all-in-one image.
    
      - (This is probably a separate bug I should file but the documentation maps pgdata to the wrong directory)

  - The database was restored from a .sql backup of a previous container run

**OpenProject version**

v14.5.1

**Browser**

- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [x] Windows (on client side--Docker is WSL)
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)

**Language**

en-us
