Content
View differences
Updated by Ivana Šugić 11 months ago
This issue was discovered while working on <mention class="mention" data-id="30865" data-type="work_package" data-text="###30865"><strong>###30865</strong></mention> ##**30865**
### Steps to reproduce
1. As an administrator, create two distinct projects: Main and Other
2. in Main project, create a version with "sharing" set to "With all projects"
3. Create a work package in Main project and assign it the created version
4. Create a work package in Other project and assign it the created version
5. Create another user with access limited to Main project only
6. Go to the version page
### What is the buggy behavior?
* The reported number of open work packages is incorrect: it indicates 2 but only one is visible for limited user.
* If clicking the link, only 1 gets visible
* The other information on the page is correct
### What is the expected behavior?
1. The number of open work packages should take the user visibility and permissions into account. In the case described above it should display "1 open".
2. The issue also exists for the "Total progress", the "closed" counter, and the "open counter"
3. Looking at the `app/models/version.rb` source code, it looks like the visibility filter is not applied at all. There are probably other subtle bugs lying around regarding this.
### Screenshots and other files
The screenshot is with another scenario with multiple projects (main, parent, sibling, child, and another) and the one in main is closed.
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/94721/content">
### Environment information
**OpenProject installation type**
* [x] Hosted cloud edition
* [ ] Packaged installation
* What distribution?
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
OpenProject 13.3
### Steps to reproduce
1. As an administrator, create two distinct projects: Main and Other
* The reported number of open work packages is incorrect: it indicates 2 but only one is visible for limited user.
1. The number of open work packages should take the user visibility and permissions into account. In the case described above it should display "1 open".
The screenshot is with another scenario with multiple projects (main, parent, sibling, child, and another) and the one in main is closed.
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/94721/content">
### Environment information
**OpenProject installation type**
* [x] Hosted cloud edition
* [ ] Packaged installation
* What distribution?
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
OpenProject 13.3