# Bug OP-14489 - Cannot make a query private that was created by another user

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.0.0 |
| Observed in versions | 13.3.0 |
| Sprint | 14.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 13.3.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 |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Create a public, favourised query in the work package view with user A.

2.  Delete user A

3.  Log in with user B who is an admin

4.  Visit the previously saved query

5.  Click on the three dots menu -\> Visibility settings

6.  Uncheck "favoured" and "public"

7.  Save

### What is the buggy behavior?

  - ~~An error occured~~

  - ~~Interestingly I can still delete the query but not modify the visibility settings~~

  - Upon some investigation, this behaviour turned out to be correct. If we make a deleted user's query private, it will remain in an inaccessible state.

  - However, we should still allow existing user's queries to be made private by an admin. This is not possible and that is the bug.

<img class="image_resized op-uc-image op-uc-image_inline" style="width:386px;" src="/api/v3/attachments/93573/content"> <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/94770/content">

### What is the expected behavior?

  - ~~I should be able to change the visibility of that query~~

  - Allow the existing user's query to be made private, without raising an error.

### Environment information

**OpenProject version**

*13.4*

**Browser**

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

**Language**

*German*
