Project

General

Profile

Actions

Feature #2405

closed

Enable tracker update on issue edit form

Added by Kihyun Yun about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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>
Actions #1

Updated by Kevin Woo about 15 years ago

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

Actions #2

Updated by Roman Surikov almost 15 years ago

Tested on 0.8.2.stable. Works. Thanks.

Actions #3

Updated by Michael Cassano over 14 years ago

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

Actions #4

Updated by Daniel Selinger over 14 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,
Actions #5

Updated by threexk threexk over 14 years ago

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

Actions #6

Updated by Brian DeVries over 14 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.

Actions #7

Updated by S Reid over 14 years ago

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

Actions #8

Updated by Jean-Philippe Lang over 14 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.

Actions #9

Updated by Alexey Palazhchenko over 14 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'
Actions #10

Updated by Alexey Palazhchenko over 14 years ago

Actually, it was r3109.

Actions #11

Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from Reopened to Closed

Fixed in r3111.

Actions #12

Updated by Mischa The Evil over 14 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.

Actions #13

Updated by Jean-Philippe Lang over 14 years ago

Oh, sorry. Fixed in r3113.

Actions #14

Updated by Mischa The Evil over 14 years ago

Jean-Philippe Lang wrote:

Oh, sorry. Fixed in r3113.

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

Actions

Also available in: Atom PDF