none.diff

Marc Horowitz, 2008-03-26 21:04

Download (2.7 KB)

View differences:

app/controllers/issues_controller.rb (working copy)
206 206
    if request.post?
207 207
      status = params[:status_id].blank? ? nil : IssueStatus.find_by_id(params[:status_id])
208 208
      priority = params[:priority_id].blank? ? nil : Enumeration.find_by_id(params[:priority_id])
209
      assigned_to = params[:assigned_to_id].blank? ? nil : User.find_by_id(params[:assigned_to_id])
209
      assigned_to = (params[:assigned_to_id].blank? || params[:assigned_to_id] == 'none') ? nil : User.find_by_id(params[:assigned_to_id])
210 210
      category = params[:category_id].blank? ? nil : @project.issue_categories.find_by_id(params[:category_id])
211
      fixed_version = params[:fixed_version_id].blank? ? nil : @project.versions.find_by_id(params[:fixed_version_id])
211
      fixed_version = (params[:fixed_version_id].blank? || params[:fixed_version_id] == 'none') ? nil : @project.versions.find_by_id(params[:fixed_version_id])
212 212
      
213 213
      unsaved_issue_ids = []      
214 214
      @issues.each do |issue|
......
216 216
        issue.priority = priority if priority
217 217
        issue.assigned_to = assigned_to if assigned_to || params[:assigned_to_id] == 'none'
218 218
        issue.category = category if category
219
        issue.fixed_version = fixed_version if fixed_version
219
        issue.fixed_version = fixed_version if fixed_version || params[:fixed_version_id] == 'none'
220 220
        issue.start_date = params[:start_date] unless params[:start_date].blank?
221 221
        issue.due_date = params[:due_date] unless params[:due_date].blank?
222 222
        issue.done_ratio = params[:done_ratio] unless params[:done_ratio].blank?
app/views/issues/bulk_edit.rhtml (working copy)
23 23
                                 content_tag('option', l(:label_nobody), :value => 'none') +
24 24
                                 options_from_collection_for_select(@project.assignable_users, :id, :name)) %></label>
25 25
<label><%= l(:field_fixed_version) %>: 
26
<%= select_tag('fixed_version_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@project.versions, :id, :name)) %></label>
26
<%= select_tag('fixed_version_id', content_tag('option', l(:label_no_change_option), :value => '') +
27
                                   content_tag('option', l(:label_none), :value => 'none') +
28
                                   options_from_collection_for_select(@project.versions, :id, :name)) %></label>
27 29
</p>
28 30

  
29 31
<p>