プロジェクト

全般

プロフィール

Vote #67144

完了

Watchers selection lost when issue creation fails

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

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

0%

予定工数:
category_id:
2
version_id:
18
issue_org_id:
5406
author_id:
3866
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
17
ステータス-->[Closed]

説明

[Tested with current git master (should be r3698) on my dev system (OS X, sqlite, passenger/apache) and our production system on r3628 (Ubuntu, MySQL, passenger/apache)]

When trying to save an "invalid" new issue, e.g. with no subject or a due date before the start date, the new issue form "remembers" everything but the selected watchers.


journals

I'd say @@issue.watched_by?(user)@ in source:trunk/app/views/issues/_form.rhtml#L36 is the culprit as @#watched_by?@ seems to operate only on already created relations.
--------------------------------------------------------------------------------
Ok, the quick and dirty fix would be to replace the aforementioned source:trunk/app/views/issues/_form.rhtml#L36 with:

<pre><label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user) || @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label></pre>

That doesn't really solve the underlying problem that @#watched_by@ only works with saved objects and not with those not written to the DB yet though.
--------------------------------------------------------------------------------
This is fixed in r3705.
--------------------------------------------------------------------------------

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

Admin Redmine さんが4年以上前に更新

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

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

いいね!0
いいね!0