change_status_to_assigned_when_choosing_assignee-r1715.patch

Mischa The Evil, 2008-08-05 22:59

Download (1.92 KB)

View differences:

app/views/issues/_form.rhtml (working copy)
48 48
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
49 49
<% end %>
50 50

  
51
<script>
52
var assigned_to_field = $('issue_assigned_to_id');
53
var status_field = $('issue_status_id');
54
assigned_to_field.observe('change', function (e) {
55
  if (assigned_to_field.value != '') status_field.value='2';
56
});
57
</script>
58

  
51 59
<%= wikitoolbar_for 'issue_description' %>
app/views/issues/context_menu.rhtml (working copy)
37 37
		<a href="#" class="submenu"><%= l(:field_assigned_to) %></a>
38 38
		<ul>
39 39
		<% @assignables.each do |u| -%>
40
		    <li><%= context_menu_link u.name, {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => u, :back_to => @back}, :method => :post,
40
		    <li><%= context_menu_link u.name, {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => u, 'issue[status_id]' => 2,:back_to => @back}, :method => :post,
41 41
		                              :selected => (u == @issue.assigned_to), :disabled => !@can[:update] %></li>
42 42
		<% end -%>
43
		    <li><%= context_menu_link l(:label_nobody), {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => '', :back_to => @back}, :method => :post,
43
		    <li><%= context_menu_link l(:label_nobody), {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => '', 'issue[status_id]' => 1, :back_to => @back}, :method => :post,
44 44
		                              :selected => @issue.assigned_to.nil?, :disabled => !@can[:update] %></li>
45 45
		</ul>
46 46
	</li>