Feature #2405

Enable tracker update on issue edit form

Added by Kihyun Yun almost 9 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:0.9.0
Resolution:Fixed

Description

How can I change the tracker of issue?

I 've patched to enable this feature.
It is required because most of issuers of issue do not have whole knowledge of project. Some reporter created issues with wrong tracker. Especially we have 7 trackers for my environment.

Index: app/views/issues/_form.rhtml
===================================================================
--- app/views/issues/_form.rhtml    (revision 2195)
+++ app/views/issues/_form.rhtml    (working copy)
@@ -39,6 +39,9 @@
 <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p>
 <p><%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %></p>
 <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
+<% unless @issue.new_record? %>
+<p><%= f.select :tracker_id, @project.trackers.map{|t|[t.name,t.id]} %></p>
+<% end %>
 </div>

 <div style="clear:both;"> </div>

Associated revisions

Revision 3108
Added by Jean-Philippe Lang almost 8 years ago

Enable tracker update on issue edit form (#2405).

Revision 3109
Added by Jean-Philippe Lang almost 8 years ago

Adds tracker update to context menu and bulk edit form (#2405).

Revision 3111
Added by Jean-Philippe Lang almost 8 years ago

Fixes context menu broken by r3109 (#2405).

Revision 3113
Added by Jean-Philippe Lang almost 8 years ago

Fixes tracker update on context menu (#2405).

History

#1 Updated by Kevin Woo over 8 years ago

Tested on v0.8.1 @ r2471 and it works well. Exactly what I was looking for. Thanks!

#2 Updated by Roman Surikov over 8 years ago

Tested on 0.8.2.stable. Works. Thanks.

#3 Updated by Michael Cassano over 8 years ago

Tested on 0.8.4.stable.2835, works, thanks.

#4 Updated by Daniel Selinger over 8 years ago

vote for next release

I modified this a little bit though. Made the Tracker Input the first field in the "(more)" extra-section when updating Issues.

--- ../blub/redmine-0.8.4/app/views/issues/_form.rhtml  2009-05-17 11:09:34.000000000 +0200
+++ app/views/issues/_form.rhtml        2009-08-14 12:21:30.000000000 +0200
@@ -7,6 +7,9 @@
 <% end %>

 <div id="issue_descr_fields" <%= 'style="display:none"' unless @issue.new_record? || @issue.errors.any? %>>
+<% if !@issue.new_record? %>
+    <p><%= f.select :tracker_id, @project.trackers.map{|t|[t.name,t.id]} %></p>
+<% end %>
 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
 <p><%= f.text_area :description,
                    :cols => 60,

#5 Updated by threexk threexk about 8 years ago

I am in favor of adding this feature. Deleting an issue and resubmitting it under the correct tracker isn't much fun.

#6 Updated by Brian DeVries about 8 years ago

+1

As a question, I know that you can change the tracker via the "Move" command, though the user has to have the "Move Issues" permission checked; this permission is not given to the default "Developer" user profile. It does make more sense to me to consider the option to change the tracker as an "update," and use "move" to change the issue's project. Of course, when moving the issue to a new project, we may want to change the tracker as well, so that option should be left there. But from a use case standpoint, I don't see why changing the tracker for an issue within the same project is considered a "move" rather than an "update." Could one of the developers enlighten me on this? Is there any reason not to allow an update to change the tracker?

As far as this ticket goes, I'm in favor of adding this; I'm just curious what the developers' reasoning was for placing the tracker change option only under "move," more out of curiosity than anything else.

#7 Updated by S Reid about 8 years ago

Does this patch also enable the tracker to changed on the right click menu on the list of issues page ?

#8 Updated by Jean-Philippe Lang almost 8 years ago

  • Subject changed from To enable change tracker on editing to Enable tracker update on issue edit form
  • Status changed from New to Closed
  • Target version set to 0.9.0
  • Resolution set to Fixed

Feature added in r3108.
Tracker can now be changed when editing an issue.

#9 Updated by Alexey Palazhchenko almost 8 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Jean-Philippe Lang

Sorry, but this commit broke functionals tests:

test_context_menu_multiple_issues_of_different_project(IssuesControllerTest):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.trackers
    app/controllers/issues_controller.rb:426:in `context_menu'
    /test/functional/issues_controller_test.rb:1136:in `test_context_menu_multiple_issues_of_different_project'

#10 Updated by Alexey Palazhchenko almost 8 years ago

Actually, it was r3109.

#11 Updated by Jean-Philippe Lang almost 8 years ago

  • Status changed from Reopened to Closed

Fixed in r3111.

#12 Updated by Mischa The Evil almost 8 years ago

Jean-Philippe Lang wrote:

Fixed in r3111.

Jean-Philippe,

I might be wrong here but I think you've made a typo in r3111, source:/trunk/app/views/issues/context_menu.rhtml@3111#L21 should be changed

from:

        <% unless @tracker.nil? %>
to:
        <% unless @trackers.nil? %>

Currently, with r3111 the tracker-option does not showup in the contextual menu ever since @tracker.nil? always returns true somehow.

#13 Updated by Jean-Philippe Lang almost 8 years ago

Oh, sorry. Fixed in r3113.

#14 Updated by Mischa The Evil almost 8 years ago

Jean-Philippe Lang wrote:

Oh, sorry. Fixed in r3113.

Don't need to apologize... Thanks for fixing it... ;-)

Also available in: Atom PDF