プロジェクト

全般

プロフィール

Vote #80826

完了

Improve watchers functionality to mark the users that are watching a non visible object and to not return watchers that cannot see the object

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
152
issue_org_id:
33329
author_id:
107353
assigned_to_id:
332
comments:
9
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

The scope of this issue is to decrease the confusion created by the actual watchers implementation which allows you to add to an object (issue, wiki, news) a watcher who doesn't have permissions to view that object. There are multiple open issues generated by this issue, but I opted to create a new issue, clean, to discuss some proposal that I have in plan. At the end, depending on what it's implemented, we close those issues.

I made three patches:

1. 0001-Fix-typo-in-find_objects_from_params.patch
It just fix a typo in the code.

2. 0002-Do-not-propose-watchers-that-are-not-allowed-to-see-.patch
The patch changes the behaviour of method @users_for_new_watcher@ to reject users who doesn't have the permissions to view the object. This change applies only when the search is made for one object (eg: issue), not for multiple objects (add bulk watchers).

3. 0003-Show-an-warning-message-for-watchers-who-cannot-view
Because the second patch doesn't cover all the cases and it's difficult to cover all the cases, I've added in the UI an warning next to an invalid watcher with the following warning message: "Invalid watcher: User will not receive any notifications because it does not have access to view this object.". Any feedback on the message is welcome.
!{border:1px solid grey; width: 50%;}.invalid_watcher.png!

What else I have in mind:

  1. Limit the number of results returned by the auto complete method to a maximum 20 or 30 objects in order to avoid performance issues (we need to iterate through each object to check the visibility). Right now, when a term is used in the search, the autocomplete returns all the results found, else returns the first 100 results. It's hard to believe that an user prefer to scroll down in the list of returned watchers instead of typing a more complete search term.

  2. Return an error or an warning message when a watcher is added to an object not visible.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Looks good to me.

A similar patch #16133 was rejected 5 years ago due to performance concerns when a project has a lot of members, but I think 0002-Do-not-propose-watchers-that-are-not-allowed-to-see-.patch does not introduce the performance problem because @watchable_object.visible?@ is only called 200 times, only when the user open Add watchers dialog.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Looks good to me.
>
> A similar patch #16133 was rejected 5 years ago due to performance concerns when a project has a lot of members, but I think 0002-Do-not-propose-watchers-that-are-not-allowed-to-see-.patch does not introduce the performance problem because @watchable_object.visible?@ is only called 200 times, only when the user open Add watchers dialog.

I'm adding this to 4.2.0 in order to discuss and find some solutions to fix the current annoying behaviour. We can limit the number of calls made by @watchable_object.visible?@ by limiting the number of results returned from the database (proposal nr#4). Regarding patch nr#3, if the overall idea is accepted, we can load the watchers async always or only when there are more than x watchers. I'm sure that we can find good solutions without performance degradation.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patches. Thank you for improving Redmine.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,22977,A project member has no access and gets no notification, when being a watcher of the issue
relates,Closed,5679,Watchers not cleaned/updated when deleting/moving watched object
relates,New,11888,No e-mail notification for non-members who are watchers
relates,Closed,16133,Available watchers on new issue form include users who cannot even view issues
relates,New,35192,Watchers pop up window appears after a long time
relates,Closed,36549,Issues with watchers and restricted tickets

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0