Feature #34258

Create tracker by copy

Added by Go MAEDA 16 days ago. Updated 5 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Administration
Target version:4.2.0
Resolution:Fixed

Description

When there are many custom fields or projects, configuring a new tracker is painful work. Imagine that there are 300 custom fields in your Redmine instance. You have to check/uncheck 300 checkboxes.

It can be mitigated if Redmine has a feature to copy existing tracker. The feature to copy a role is already exists (#9258).

34258-copy-tracker.patch Magnifier (6.13 KB) Takenori TAKAKI, 2020-11-20 09:06


Related issues

Related to Redmine - Feature #9258: Create role by copy Closed 2011-09-16

Associated revisions

Revision 20492
Added by Go MAEDA 5 days ago

Create tracker by copy (#34258).

Patch by Takenori TAKAKI.

History

#1 Updated by Takenori TAKAKI 10 days ago

I made a patch to copy the tracker and attach it.
I confirmed that this patch works fine on latest trunk@20441.

#2 Updated by Go MAEDA 8 days ago

  • Target version set to Candidate for next major release

Thank you for posting the patch. I think the following change to the patch is necessary to fix an issue that the selection of "Copy workflow from" is cleared after validation error.

diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb
index b7c4b773f..2ccd225e6 100644
--- a/app/views/trackers/_form.html.erb
+++ b/app/views/trackers/_form.html.erb
@@ -39,7 +39,7 @@

 <% if @tracker.new_record? && @trackers.any? %>
 <p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
-<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name, @copy_from.try(:id))) %></p>
+<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name, params[:copy_workflow_from] || @copy_from.try(:id))) %></p>
 <% end %>
 <!--[eoform:tracker]-->
 </div>

#3 Updated by Go MAEDA 6 days ago

  • Target version changed from Candidate for next major release to 4.2.0

Setting the target version to 4.2.0.

#4 Updated by Takenori TAKAKI 6 days ago

Go MAEDA wrote:

Thank you for posting the patch. I think the following change to the patch is necessary to fix an issue that the selection of "Copy workflow from" is cleared after validation error.

Thank you for pointing out.
I confirmed that the proposed code solves the problem in case of Validation error.

#5 Updated by Go MAEDA 5 days ago

  • Related to Feature #841: Ability to copy an existing workflow when creating a new role added

#6 Updated by Go MAEDA 5 days ago

  • Subject changed from Ability to copy an existing tracker when creating a new tracker to Create tracker by copy
  • Description updated (diff)

#7 Updated by Go MAEDA 5 days ago

  • Related to deleted (Feature #841: Ability to copy an existing workflow when creating a new role)

#8 Updated by Go MAEDA 5 days ago

#9 Updated by Go MAEDA 5 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Also available in: Atom PDF