プロジェクト

全般

プロフィール

Vote #64344

完了

Enable tracker update on issue edit form

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
6
issue_org_id:
2405
author_id:
2499
assigned_to_id:
1
comments:
14
status_id:
5
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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 @@
 

<%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %>

<%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %>

<%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>

+<% unless @issue.new_record? %> +

<%= f.select :tracker_id, @project.trackers.map{|t|[t.name,t.id]} %>

+<% end %>

journals

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

--------------------------------------------------------------------------------
Tested on 0.8.4.stable.2835, works, thanks.
--------------------------------------------------------------------------------
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.

<pre>
--- ../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,
</pre>

--------------------------------------------------------------------------------
I am in favor of adding this feature. Deleting an issue and resubmitting it under the correct tracker isn't much fun.
--------------------------------------------------------------------------------
+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.
--------------------------------------------------------------------------------
Does this patch also enable the tracker to changed on the right click menu on the list of issues page ?
--------------------------------------------------------------------------------
Feature added in r3108.
Tracker can now be changed when editing an issue.
--------------------------------------------------------------------------------
Sorry, but this commit broke functionals tests:

<pre>
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'
</pre>
--------------------------------------------------------------------------------
Actually, it was r3109.
--------------------------------------------------------------------------------
Fixed in r3111.
--------------------------------------------------------------------------------
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:<pre> <% unless @tracker.nil? %></pre>to:
<pre> <% unless @trackers.nil? %></pre>

Currently, with r3111 the tracker-option does not showup in the contextual menu ever since @@tracker.nil?@ always returns @true@ somehow.
--------------------------------------------------------------------------------
Oh, sorry. Fixed in r3113.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Oh, sorry. Fixed in r3113.

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

Admin Redmine さんが約4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン0.9.0_6 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0