Actions
Defect #10538
closedBlank screen when trying to add already added watcher
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Redmine trunk r9258
This defect appears when creating new issue. Way to reproduce:
- Go to New issue dialog.
- Fill obligatory fields.
- Add watchers using the check boxes or 'Search for watchers to add' dialog.
- Repeat 'Search for watchers to add' and select already added user.
- Press 'Create' button.
Blank screen appears and the new issue is not created.
The log of this bad behavior:
Processing IssuesController#new (for 192.168.2.100 at 2012-03-24 20:54:54) [GET]
Parameters: {"project_id"=>"first", "action"=>"new", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/new
Completed in 156ms (View: 125, DB: 16) | 200 OK [http://walker/projects/first/issues/new]
Processing WatchersController#new (for 192.168.2.100 at 2012-03-24 20:55:11) [GET]
Parameters: {"project_id"=>"first", "action"=>"new", "authenticity_token"=>"Twc+tR/McM5B+i+jXnl5wrE/H5b0UgGx+KYgIu4/hJ
E=", "controller"=>"watchers"}
Completed in 31ms (View: 16, DB: 0) | 200 OK [http://walker/watchers/new?project_id=first&authenticity_token=Twc%2BtR%2F
McM5B%2Bi%2BjXnl5wrE%2FH5b0UgGx%2BKYgIu4%2FhJE%3D]
BKYgIu4%2FhJE%3D]
Processing WatchersController#append (for 192.168.2.100 at 2012-03-24 20:55:13) [POST]
Parameters: {"action"=>"append", "authenticity_token"=>"Twc+tR/McM5B+i+jXnl5wrE/H5b0UgGx+KYgIu4/hJE=", "controller"=>"
watchers", "user_search"=>"", "object_type"=>"nil_class", "watcher"=>{"user_ids"=>["2"]}}
Completed in 16ms (View: 0, DB: 0) | 200 OK [http://walker/watchers/append?object_type=nil_class]
ass]
Processing IssuesController#create (for 192.168.2.100 at 2012-03-24 20:55:15) [POST]
Parameters: {"commit"=>"Create", "project_id"=>"first", "action"=>"create", "authenticity_token"=>"Twc+tR/McM5B+i+jXnl
5wrE/H5b0UgGx+KYgIu4/hJE=", "issue"=>{"start_date"=>"2012-03-24", "estimated_hours"=>"", "parent_issue_id"=>"", "priorit
y_id"=>"4", "is_private"=>"0", "fixed_version_id"=>"", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"╨б╨╕╨│╨╜╨░╨╗
USBAVAILABLE", "tracker_id"=>"1", "due_date"=>"", "status_id"=>"1", "description"=>"yyyyyyyyyyyyyyy", "watcher_user_ids
"=>["2", "1", "2"]}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}
ActiveRecord::RecordInvalid (Validation failed: User has already been taken):
app/controllers/issues_controller.rb:148:in `create'
d:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
d:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start'
b:82:in `start'
In my opinion, duplicate users should be silently omitted or a message should appear informing of the duplication.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Affected version (unused) set to devel
- Resolution set to Fixed
Actions