# Bug SPPM-121 - Sharing project lists does not work

Project: Stream Project Portfolio Management
Status: closed
URL: https://community.openproject.org/work_packages/SPPM-121

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Project list |
| Target versions | 16.2.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Attila Dombi |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Login as a user with permissions to share project lists

2.  Go to the project list page and create a list that you want to share
    
    1.  Additionally make the list invalid by adding a custom field to the column list, then delete the custom field from the system.

3.  Press the share button

4.  share the list with a group

5.  Additionally, toggle the switch to share the list with all users

6.  Close the dialog

7.  Re-open  it

### What is the buggy behavior?

  - The toggleSwitch is resetedand the list not actually shared with all users. The issue is caused by trying to publish an invalid `ProjectQuery`, for example it contains custom fields as rows that are removed from the system.

  - The group is still listed, but when I login as a user of that group, I can't see the list. The `#allowed_to` query does not include the current user's groups in the permission check.
    
    <br>

### What is the expected behavior?

1.  Toggling the switch should actuall do something

2.  When I am member of a shared group,  I should also see the shared list

### 

### Environment information

<br>

**OpenProject version**

15.2

**Browser**

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

**Operating System**

- [ ] Windows
- [x] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)

**Language**

*German*
