ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

changeset_r9e80ae182e30c58857c8e30260f7fc3788dd7597.diff

Jan Schulz-Hofen, 2011-09-11 05:13 pm

Download (30.7 kB)

 
b/app/controllers/issue_statuses_controller.rb
35 35
  def create
36 36
    @issue_status = IssueStatus.new(params[:issue_status])
37 37
    if @issue_status.save
38
      if params[:add_to_all_workflows]
39
        begin
40
          Workflow.transaction do
41
            Tracker.all.each do |tracker|
42
              Role.all.each do |role|
43
                (IssueStatus.all - [@issue_status]).each do |status|
44
                  Workflow.create! :tracker_id => tracker.id, :old_status => @issue_status, :new_status => status, :role => role # from
45
                  Workflow.create! :tracker_id => tracker.id, :old_status => status, :new_status => @issue_status, :role => role # to
46
                end
47
                Workflow.create! :tracker_id => tracker.id, :old_status => @issue_status, :new_status => @issue_status, :role => role # self-to-self
48
              end
49
            end
50
          end
51
        rescue
52
          flash[:warning] = l(:error_unable_add_to_workflows)
53
        end
54
      end
38 55
      flash[:notice] = l(:notice_successful_create)
39 56
      redirect_to :action => 'index'
40 57
    else
b/app/views/issue_statuses/_form.rhtml
1 1
<%= error_messages_for 'issue_status' %>
2 2

  
3
<div class="box">
3
<div class="box tabular">
4 4
<!--[form:issue_status]-->
5 5
<p><label for="issue_status_name"><%=l(:field_name)%><span class="required"> *</span></label>
6 6
<%= text_field 'issue_status', 'name'  %></p>
b/app/views/issue_statuses/new.rhtml
1 1
<h2><%= link_to l(:label_issue_status_plural), :controller => 'issue_statuses', :action => 'index' %> &#187; <%=l(:label_issue_status_new)%></h2>
2 2

  
3
<% form_tag({:action => 'create'}, :class => "tabular") do %>
3
<% form_tag({:action => 'create'}) do %>
4 4
  <%= render :partial => 'form' %>
5
  <p><label><%= check_box_tag 'add_to_all_workflows', 1, true %> <%= l(:label_add_to_all_workflows) %></label></p>
5 6
  <%= submit_tag l(:button_create) %>
6 7
<% end %>
b/config/locales/bg.yml
1282 1282
  field_assigned_to_role: Member of Role
1283 1283
  button_edit_associated_wikipage: "Edit associated Wiki page: {{page_title}}"
1284 1284
  text_are_you_sure_with_children: Delete issue and all child issues?
1285
  label_add_to_all_workflows: Add to all workflows
1286
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/bs.yml
991 991
  label_git_report_last_commit: Report last commit for files and directories
992 992
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
993 993
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
994
  label_add_to_all_workflows: Add to all workflows
995
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/ca.yml
980 980
  label_git_report_last_commit: Report last commit for files and directories
981 981
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
982 982
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
983
  label_add_to_all_workflows: Add to all workflows
984
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/cs.yml
981 981
  label_git_report_last_commit: Report last commit for files and directories
982 982
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
983 983
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
984
  label_add_to_all_workflows: Add to all workflows
985
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/da.yml
994 994
  label_git_report_last_commit: Report last commit for files and directories
995 995
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
996 996
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
997
  label_add_to_all_workflows: Add to all workflows
998
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/de.yml
994 994
  label_git_report_last_commit: Bericht des letzten Commits für Dateien und Verzeichnisse
995 995
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
996 996
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
997
  label_add_to_all_workflows: Zu allen Workflows hinzufügen
998
  error_unable_add_to_workflows: Der Status konnte nicht zu allen Workflows hinzugefügt werden. Bitte fügen Sie ihn manuell hinzu.
b/config/locales/el.yml
977 977
  label_git_report_last_commit: Report last commit for files and directories
978 978
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980
  label_add_to_all_workflows: Add to all workflows
981
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/en-GB.yml
980 980
  label_git_report_last_commit: Report last commit for files and directories
981 981
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
982 982
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
983
  label_add_to_all_workflows: Add to all workflows
984
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/en.yml
188 188
  error_workflow_copy_source: 'Please select a source tracker or role'
189 189
  error_workflow_copy_target: 'Please select target tracker(s) and role(s)'
190 190
  error_unable_delete_issue_status: 'Unable to delete issue status'
191
  error_unable_add_to_workflows: 'Unable to add issue status to all workflows. Please add it manually.'
191 192
  error_unable_to_connect: "Unable to connect (%{value})"
192 193
  warning_attachments_not_saved: "%{count} file(s) could not be saved."
193 194
  
......
486 487
  label_issue_status: Issue status
487 488
  label_issue_status_plural: Issue statuses
488 489
  label_issue_status_new: New status
490
  label_add_to_all_workflows: Add to all workflows
489 491
  label_issue_category: Issue category
490 492
  label_issue_category_plural: Issue categories
491 493
  label_issue_category_new: New category
b/config/locales/es.yml
1014 1014
  label_git_report_last_commit: Report last commit for files and directories
1015 1015
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1016 1016
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1017
  label_add_to_all_workflows: Add to all workflows
1018
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/eu.yml
981 981
  label_git_report_last_commit: Report last commit for files and directories
982 982
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
983 983
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
984
  label_add_to_all_workflows: Add to all workflows
985
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/fa.yml
979 979
  label_git_report_last_commit: Report last commit for files and directories
980 980
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
981 981
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
982
  label_add_to_all_workflows: Add to all workflows
983
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/fi.yml
998 998
  label_git_report_last_commit: Report last commit for files and directories
999 999
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1000 1000
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1001
  label_add_to_all_workflows: Add to all workflows
1002
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/fr.yml
992 992
  label_git_report_last_commit: Afficher le dernier commit des fichiers et répertoires
993 993
  text_scm_config: Vous pouvez configurer les commandes des SCM dans config/configuration.yml. Redémarrer l'application après modification.
994 994
  text_scm_command_not_available: Ce SCM n'est pas disponible. Vérifier les paramètres dans la section administration.
995
  label_add_to_all_workflows: Ajouter à tous les workflows
996
  error_unable_add_to_workflows: Impossible d'ajouter le statut à tous les workflows. Veuillez l'ajouter manuellement.
b/config/locales/gl.yml
989 989
  label_git_report_last_commit: Report last commit for files and directories
990 990
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
991 991
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
992
  label_add_to_all_workflows: Add to all workflows
993
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/he.yml
982 982
  label_git_report_last_commit: Report last commit for files and directories
983 983
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
984 984
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
985
  label_add_to_all_workflows: Add to all workflows
986
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/hr.yml
984 984
  label_git_report_last_commit: Report last commit for files and directories
985 985
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
986 986
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
987
  label_add_to_all_workflows: Add to all workflows
988
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/hu.yml
996 996
  label_git_report_last_commit: Report last commit for files and directories
997 997
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
998 998
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
999
  label_add_to_all_workflows: Add to all workflows
1000
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/id.yml
985 985
  label_git_report_last_commit: Report last commit for files and directories
986 986
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
987 987
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
988
  label_add_to_all_workflows: Add to all workflows
989
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/it.yml
978 978
  label_git_report_last_commit: Report last commit for files and directories
979 979
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
980 980
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
981
  label_add_to_all_workflows: Add to all workflows
982
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/ja.yml
999 999
  permission_set_issues_private: チケットをプライベートに設定
1000 1000
  label_issues_visibility_public: プライベートチケット以外
1001 1001
  text_issues_destroy_descendants_confirmation: %{count}個の子チケットも削除されます。
1002
  label_add_to_all_workflows: Add to all workflows
1003
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/ko.yml
1029 1029
  label_git_report_last_commit: Report last commit for files and directories
1030 1030
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1031 1031
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1032
  label_add_to_all_workflows: Add to all workflows
1033
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/lt.yml
1037 1037
  label_git_report_last_commit: Report last commit for files and directories
1038 1038
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1039 1039
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1040
  label_add_to_all_workflows: Add to all workflows
1041
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/lv.yml
972 972
  label_git_report_last_commit: Report last commit for files and directories
973 973
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
974 974
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
975
  label_add_to_all_workflows: Add to all workflows
976
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/mk.yml
977 977
  label_git_report_last_commit: Report last commit for files and directories
978 978
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980
  label_add_to_all_workflows: Add to all workflows
981
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/mn.yml
978 978
  label_git_report_last_commit: Report last commit for files and directories
979 979
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
980 980
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
981
  label_add_to_all_workflows: Add to all workflows
982
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/nl.yml
959 959
  label_git_report_last_commit: Report last commit for files and directories
960 960
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
961 961
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
962
  label_add_to_all_workflows: Add to all workflows
963
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/no.yml
964 964
  label_git_report_last_commit: Report last commit for files and directories
965 965
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
966 966
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
967
  label_add_to_all_workflows: Add to all workflows
968
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/pl.yml
994 994
  label_git_report_last_commit: Report last commit for files and directories
995 995
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
996 996
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
997
  label_add_to_all_workflows: Add to all workflows
998
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/pt-BR.yml
997 997
  label_git_report_last_commit: Report last commit for files and directories
998 998
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
999 999
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1000
  label_add_to_all_workflows: Add to all workflows
1001
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/pt.yml
982 982
  label_git_report_last_commit: Report last commit for files and directories
983 983
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
984 984
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
985
  label_add_to_all_workflows: Add to all workflows
986
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/ro.yml
970 970
  label_git_report_last_commit: Report last commit for files and directories
971 971
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
972 972
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
973
  label_add_to_all_workflows: Add to all workflows
974
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/ru.yml
1090 1090
  label_git_report_last_commit: Report last commit for files and directories
1091 1091
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1092 1092
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1093
  label_add_to_all_workflows: Add to all workflows
1094
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/sk.yml
972 972
  label_git_report_last_commit: Report last commit for files and directories
973 973
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
974 974
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
975
  label_add_to_all_workflows: Add to all workflows
976
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/sl.yml
973 973
  label_git_report_last_commit: Report last commit for files and directories
974 974
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
975 975
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
976
  label_add_to_all_workflows: Add to all workflows
977
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/sr-YU.yml
977 977
  label_git_report_last_commit: Report last commit for files and directories
978 978
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
979 979
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
980
  label_add_to_all_workflows: Add to all workflows
981
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/sr.yml
978 978
  label_git_report_last_commit: Report last commit for files and directories
979 979
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
980 980
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
981
  label_add_to_all_workflows: Add to all workflows
982
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/sv.yml
1018 1018
  label_git_report_last_commit: Report last commit for files and directories
1019 1019
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1020 1020
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1021
  label_add_to_all_workflows: Add to all workflows
1022
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/th.yml
974 974
  label_git_report_last_commit: Report last commit for files and directories
975 975
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
976 976
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
977
  label_add_to_all_workflows: Add to all workflows
978
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/tr.yml
996 996
  label_git_report_last_commit: Report last commit for files and directories
997 997
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
998 998
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
999
  label_add_to_all_workflows: Add to all workflows
1000
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/uk.yml
973 973
  label_git_report_last_commit: Report last commit for files and directories
974 974
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
975 975
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
976
  label_add_to_all_workflows: Add to all workflows
977
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/vi.yml
1028 1028
  label_git_report_last_commit: Report last commit for files and directories
1029 1029
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
1030 1030
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
1031
  label_add_to_all_workflows: Add to all workflows
1032
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/zh-TW.yml
1058 1058
  enumeration_doc_categories: 文件分類
1059 1059
  enumeration_activities: 活動 (時間追蹤)
1060 1060
  enumeration_system_activity: 系統活動
1061
  label_add_to_all_workflows: Add to all workflows
1062
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.
b/config/locales/zh.yml
980 980
  label_git_report_last_commit: Report last commit for files and directories
981 981
  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
982 982
  text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel.
983
  label_add_to_all_workflows: Add to all workflows
984
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please add it manually.