プロジェクト

全般

プロフィール

Vote #70874

未完了

Watchers list before and after creation issue

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

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

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
9500
author_id:
43514
assigned_to_id:
0
comments:
8
status_id:
1
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
35
ステータス-->[New]

説明

Hello!

When I'm creating a new issue - I can add as watchers all users in current project (with all "issues visibility" permissions), but after creation issue I can add watchers only with "All non private issues" in "Issues visibility" (new issue is not private).
Can you tell me how can I fix it? I need to have the same list of the watchers before and after creation issue.

I have Redmine 1.2.1.

Thank you!


journals

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

--------------------------------------------------------------------------------
I can confirm this issue. I came around this first while doing research for #9330 but failed to report it properly yet :-/

What I can remember of this is that this is due to the fact that the used add-watcher mechanism is different at both states (_during_ issue creation and _after_ issue creation).

During issue creation the addable watcher users are retrieved via source:/trunk/app/views/issues/_form.html.erb@7791#L32 which proposes all members of the project wherein the issue is being created as addable watcher users:
<pre><code class="rhtml"><% @issue.project.users.sort.each do |user| -%></code></pre>

After issue creation the addable watcher users are retrieved via source:/trunk/app/views/watchers/_watchers.html.erb@7791#L19 which correctly proposes only the users who have actual permission to watch the to-be watched object as addable watcher users:
<pre><code class="rhtml"><p><%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %></code></pre>
This "way of retrieving" addable watcher users has some extras like:
* r3170, Users can not watch what they are not allowed to view.
* r5876, Users that can't view an issue are not proposed as watchers
* r5880, Fixed: validation error on issue creation when trying to add an invalid user as a watcher

Based on the above I'd suggest to change the way how addable watcher users are retrieved during issue creation. Instead of proposing @@issue.project.users@ I think it would be better if @watched.addable_watcher_users@ is being proposed.

Hope this is of any use...
--------------------------------------------------------------------------------
I can also confirm the issue, and do agree with the original reporter that this is an issue. My reasoning is that while I agree with what Mischa is saying about not suggesting to add watchers that don't have the permission, if *I* have the permission to add others as watchers I think I should get the full list of people that belong to the project to choose from. So, there should be two separate cases depending on whether I have permission to add others as watchers or not.

The typical case, which I'd say will happen quite regularly, is that an issue is marked as private and as the bug gets worked on I realize I want to add someone as a watcher that wasn't included from the start.

I agree with point r3170 above with the addition "unless someone with permission to add watchers adds them".

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
I would also be glad if you cannot add a watcher to whom the issue would not be visible also at the time of issue creation.
--------------------------------------------------------------------------------

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

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


related_issues

relates,Closed,15123,"Add watcher" leaks all active users
relates,Closed,11724,Prevent users from seeing other users based on their project membership

Admin Redmine さんがほぼ4年前に更新

  • カテゴリIssues_2 にセット

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

いいね!0
いいね!0