changeset_a34bffe750ce27d8cda5fa83e60f5ff5525054fd.diff

Yehuda Katz, 2012-10-12 21:53

Download (25.4 KB)

View differences:

app/controllers/issue_statuses_controller.rb
41 41
  def create
42 42
    @issue_status = IssueStatus.new(params[:issue_status])
43 43
    if request.post? && @issue_status.save
44
      if params[:add_to_all_workflows]
45
        begin
46
          Workflow.transaction do
47
            Tracker.all.each do |tracker|
48
              Role.all.each do |role|
49
                (IssueStatus.all - [@issue_status]).each do |status|
50
                  Workflow.create! :tracker_id => tracker.id, :old_status => @issue_status, :new_status => status, :role => role # from
51
                  Workflow.create! :tracker_id => tracker.id, :old_status => status, :new_status => @issue_status, :role => role # to
52
                end
53
              end
54
            end
55
          end
56
        rescue
57
          flash[:warning] = l(:error_unable_add_to_workflows)
58
        end
59
      end
44 60
      flash[:notice] = l(:notice_successful_create)
45 61
      redirect_to :action => 'index'
46 62
    else
app/views/issue_statuses/new.html.erb
2 2

  
3 3
<%= labelled_form_for @issue_status do |f| %>
4 4
  <%= render :partial => 'form', :locals => {:f => f} %>
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 %>
config/locales/ar.yml
1078 1078
  label_cross_project_tree: مع شجرة المشروع
1079 1079
  label_cross_project_hierarchy: مع التسلسل الهرمي للمشروع
1080 1080
  label_cross_project_system: مع جميع المشاريع
1081
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1082
    add it manually.
1083
  label_add_to_all_workflows: Add to all workflows
config/locales/bg.yml
1076 1076
  description_date_from: Въведете начална дата
1077 1077
  description_date_to: Въведете крайна дата
1078 1078
  text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
1079
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1080
    add it manually.
1081
  label_add_to_all_workflows: Add to all workflows
config/locales/bs.yml
1091 1091
  label_cross_project_tree: With project tree
1092 1092
  label_cross_project_hierarchy: With project hierarchy
1093 1093
  label_cross_project_system: With all projects
1094
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1095
    add it manually.
1096
  label_add_to_all_workflows: Add to all workflows
config/locales/ca.yml
1080 1080
  label_cross_project_tree: "Amb l'arbre del projecte"
1081 1081
  label_cross_project_hierarchy: "Amb la jerarquia del projecte"
1082 1082
  label_cross_project_system: "Amb tots els projectes"
1083
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1084
    add it manually.
1085
  label_add_to_all_workflows: Add to all workflows
config/locales/cs.yml
1081 1081
  label_cross_project_tree: Se stromem projektu
1082 1082
  label_cross_project_hierarchy: S hierarchií projektu
1083 1083
  label_cross_project_system: Se všemi projekty
1084
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1085
    add it manually.
1086
  label_add_to_all_workflows: Add to all workflows
config/locales/da.yml
1095 1095
  label_cross_project_tree: Med projekttræ
1096 1096
  label_cross_project_hierarchy: Med projekthierarki
1097 1097
  label_cross_project_system: Med alle projekter
1098
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1099
    add it manually.
1100
  label_add_to_all_workflows: Add to all workflows
config/locales/de.yml
1094 1094
  label_cross_project_tree: Mit Projektbaum
1095 1095
  label_cross_project_hierarchy: Mit Projekthierarchie
1096 1096
  label_cross_project_system: Mit allen Projekten
1097
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1098
    add it manually.
1099
  label_add_to_all_workflows: Add to all workflows
config/locales/el.yml
1078 1078
  label_cross_project_tree: With project tree
1079 1079
  label_cross_project_hierarchy: With project hierarchy
1080 1080
  label_cross_project_system: With all projects
1081
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1082
    add it manually.
1083
  label_add_to_all_workflows: Add to all workflows
config/locales/en-GB.yml
1080 1080
  label_cross_project_tree: With project tree
1081 1081
  label_cross_project_hierarchy: With project hierarchy
1082 1082
  label_cross_project_system: With all projects
1083
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1084
    add it manually.
1085
  label_add_to_all_workflows: Add to all workflows
config/locales/en.yml
196 196
  error_workflow_copy_source: 'Please select a source tracker or role'
197 197
  error_workflow_copy_target: 'Please select target tracker(s) and role(s)'
198 198
  error_unable_delete_issue_status: 'Unable to delete issue status'
199
  error_unable_add_to_workflows: 'Unable to add issue status to all workflows. Please add it manually.'
199 200
  error_unable_to_connect: "Unable to connect (%{value})"
200 201
  error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})"
201 202
  error_session_expired: "Your session has expired. Please login again."
......
516 517
  label_issue_status: Issue status
517 518
  label_issue_status_plural: Issue statuses
518 519
  label_issue_status_new: New status
520
  label_add_to_all_workflows: Add to all workflows
519 521
  label_issue_category: Issue category
520 522
  label_issue_category_plural: Issue categories
521 523
  label_issue_category_new: New category
config/locales/es.yml
1115 1115
  label_cross_project_tree: Con el árbol del proyecto
1116 1116
  label_cross_project_hierarchy: Con la jerarquía del proyecto
1117 1117
  label_cross_project_system: Con todos los proyectos
1118
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1119
    add it manually.
1120
  label_add_to_all_workflows: Add to all workflows
config/locales/et.yml
1091 1091
  label_cross_project_tree: "projektipuuga"
1092 1092
  label_cross_project_hierarchy: "projektihierarhiaga"
1093 1093
  label_cross_project_system: "kõigi projektidega"
1094
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1095
    add it manually.
1096
  label_add_to_all_workflows: Add to all workflows
config/locales/eu.yml
1081 1081
  label_cross_project_tree: Proiektu zuhaitzarekin
1082 1082
  label_cross_project_hierarchy: Proiektu Hierarkiarekin
1083 1083
  label_cross_project_system: Proiektu guztiekin
1084
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1085
    add it manually.
1086
  label_add_to_all_workflows: Add to all workflows
config/locales/fa.yml
1080 1080
  label_cross_project_tree: با درخت پروژه
1081 1081
  label_cross_project_hierarchy: با رشته پروژه‌ها
1082 1082
  label_cross_project_system: با همه پروژه‌ها
1083
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1084
    add it manually.
1085
  label_add_to_all_workflows: Add to all workflows
config/locales/fi.yml
1099 1099
  label_cross_project_tree: With project tree
1100 1100
  label_cross_project_hierarchy: With project hierarchy
1101 1101
  label_cross_project_system: With all projects
1102
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1103
    add it manually.
1104
  label_add_to_all_workflows: Add to all workflows
config/locales/fr.yml
1092 1092
  setting_repositories_encodings: Encodages des fichiers et des dépôts
1093 1093
  label_search_for_watchers: Rechercher des observateurs
1094 1094
  text_repository_identifier_info: 'Seuls les lettres minuscules (a-z), chiffres, tirets et underscore sont autorisés.<br />Un fois sauvegardé, l''identifiant ne pourra plus être modifié.'
1095
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1096
    add it manually.
1097
  label_add_to_all_workflows: Add to all workflows
config/locales/gl.yml
1089 1089
  label_cross_project_tree: With project tree
1090 1090
  label_cross_project_hierarchy: With project hierarchy
1091 1091
  label_cross_project_system: With all projects
1092
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1093
    add it manually.
1094
  label_add_to_all_workflows: Add to all workflows
config/locales/he.yml
1083 1083
  label_cross_project_tree: עם עץ הפרויקט
1084 1084
  label_cross_project_hierarchy: עם היררכית הפרויקטים
1085 1085
  label_cross_project_system: עם כל הפרויקטים
1086
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1087
    add it manually.
1088
  label_add_to_all_workflows: Add to all workflows
config/locales/hr.yml
1081 1081
  label_cross_project_tree: With project tree
1082 1082
  label_cross_project_hierarchy: With project hierarchy
1083 1083
  label_cross_project_system: With all projects
1084
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1085
    add it manually.
1086
  label_add_to_all_workflows: Add to all workflows
config/locales/hu.yml
1097 1097
  label_cross_project_tree: Projekt fával
1098 1098
  label_cross_project_hierarchy: Projekt hierarchiával
1099 1099
  label_cross_project_system: Minden projekttel
1100
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1101
    add it manually.
1102
  label_add_to_all_workflows: Add to all workflows
config/locales/id.yml
1084 1084
  label_cross_project_tree: Dengan pohon proyek
1085 1085
  label_cross_project_hierarchy: Dengan hirarki proyek
1086 1086
  label_cross_project_system: Dengan semua proyek
1087
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1088
    add it manually.
1089
  label_add_to_all_workflows: Add to all workflows
config/locales/it.yml
1079 1079
  label_cross_project_tree: Con progetto padre
1080 1080
  label_cross_project_hierarchy: Con gerarchia progetto
1081 1081
  label_cross_project_system: Con tutti i progetti
1082
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1083
    add it manually.
1084
  label_add_to_all_workflows: Add to all workflows
config/locales/ja.yml
1108 1108
  label_cross_project_tree: プロジェクトツリー単位
1109 1109
  label_cross_project_hierarchy: プロジェクト階層単位
1110 1110
  label_cross_project_system: すべてのプロジェクト
1111
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1112
    add it manually.
1113
  label_add_to_all_workflows: Add to all workflows
config/locales/ko.yml
1128 1128
  label_cross_project_tree: 최상위 및 모든 하위 프로젝트
1129 1129
  label_cross_project_hierarchy: 상위 및 하위 프로젝트
1130 1130
  label_cross_project_system: 모든 프로젝트
1131
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1132
    add it manually.
1133
  label_add_to_all_workflows: Add to all workflows
config/locales/lt.yml
1138 1138
  label_cross_project_tree: Su projekto medžiu
1139 1139
  label_cross_project_hierarchy: Su projekto hierarchija
1140 1140
  label_cross_project_system: Su visais projektais
1141
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1142
    add it manually.
1143
  label_add_to_all_workflows: Add to all workflows
config/locales/lv.yml
1072 1072
  label_cross_project_tree: Ar projekta koku
1073 1073
  label_cross_project_hierarchy: Ar projektu hierarhiju
1074 1074
  label_cross_project_system: Ar visiem projektiem
1075
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1076
    add it manually.
1077
  label_add_to_all_workflows: Add to all workflows
config/locales/mk.yml
1078 1078
  label_cross_project_tree: Со дрвото на проектот
1079 1079
  label_cross_project_hierarchy: Со хиерархијата на проектот
1080 1080
  label_cross_project_system: Со сите проекти
1081
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1082
    add it manually.
1083
  label_add_to_all_workflows: Add to all workflows
config/locales/mn.yml
1080 1080
  label_cross_project_tree: With project tree
1081 1081
  label_cross_project_hierarchy: With project hierarchy
1082 1082
  label_cross_project_system: With all projects
1083
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1084
    add it manually.
1085
  label_add_to_all_workflows: Add to all workflows
config/locales/nl.yml
1060 1060
  label_cross_project_tree: Met project boom
1061 1061
  label_cross_project_hierarchy: Met project hiërarchie
1062 1062
  label_cross_project_system: Met alle projecten
1063
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1064
    add it manually.
1065
  label_add_to_all_workflows: Add to all workflows
config/locales/no.yml
1068 1068
  label_cross_project_tree: Med prosjekt-tre
1069 1069
  label_cross_project_hierarchy: Med prosjekt-hierarki
1070 1070
  label_cross_project_system: Med alle prosjekter
1071
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1072
    add it manually.
1073
  label_add_to_all_workflows: Add to all workflows
config/locales/pl.yml
1095 1095
  label_cross_project_tree: Z drzewem projektów
1096 1096
  label_cross_project_hierarchy: Z hierarchią projektów
1097 1097
  label_cross_project_system: Ze wszystkimi projektami
1098
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1099
    add it manually.
1100
  label_add_to_all_workflows: Add to all workflows
config/locales/pt-BR.yml
1100 1100
  label_cross_project_tree: Com a árvore do projeto
1101 1101
  label_cross_project_hierarchy: Com a hierarquia do projeto
1102 1102
  label_cross_project_system: Com todos os projetos
1103
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1104
    add it manually.
1105
  label_add_to_all_workflows: Add to all workflows
config/locales/pt.yml
1083 1083
  label_cross_project_tree: Com árvore do projecto
1084 1084
  label_cross_project_hierarchy: Com hierarquia do projecto
1085 1085
  label_cross_project_system: Com todos os projectos
1086
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1087
    add it manually.
1088
  label_add_to_all_workflows: Add to all workflows
config/locales/ro.yml
1075 1075
  label_cross_project_tree: With project tree
1076 1076
  label_cross_project_hierarchy: With project hierarchy
1077 1077
  label_cross_project_system: With all projects
1078
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1079
    add it manually.
1080
  label_add_to_all_workflows: Add to all workflows
config/locales/ru.yml
1191 1191
  label_cross_project_tree: С деревом проектов
1192 1192
  label_cross_project_hierarchy: С иерархией проектов
1193 1193
  label_cross_project_system: Со всеми проектами
1194
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1195
    add it manually.
1196
  label_add_to_all_workflows: Add to all workflows
config/locales/sk.yml
1078 1078
  label_cross_project_tree: S projektovým stromom
1079 1079
  label_cross_project_hierarchy: S hierarchiou projektu
1080 1080
  label_cross_project_system: So všetkými projektami
1081
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1082
    add it manually.
1083
  label_add_to_all_workflows: Add to all workflows
config/locales/sl.yml
1078 1078
  label_cross_project_tree: Z drevesom projekta
1079 1079
  label_cross_project_hierarchy: S projektno hierarhijo
1080 1080
  label_cross_project_system: Z vsemi projekti
1081
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1082
    add it manually.
1083
  label_add_to_all_workflows: Add to all workflows
config/locales/sq.yml
1074 1074
  label_cross_project_tree: With project tree
1075 1075
  label_cross_project_hierarchy: With project hierarchy
1076 1076
  label_cross_project_system: With all projects
1077
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1078
    add it manually.
1079
  label_add_to_all_workflows: Add to all workflows
config/locales/sr-YU.yml
1080 1080
  label_cross_project_tree: Sa stablom projekta
1081 1081
  label_cross_project_hierarchy: Sa hijerarhijom projekta
1082 1082
  label_cross_project_system: Sa svim projektima
1083
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1084
    add it manually.
1085
  label_add_to_all_workflows: Add to all workflows
config/locales/sr.yml
1079 1079
  label_cross_project_tree: Са стаблом пројекта
1080 1080
  label_cross_project_hierarchy: Са хијерархијом пројекта
1081 1081
  label_cross_project_system: Са свим пројектима
1082
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1083
    add it manually.
1084
  label_add_to_all_workflows: Add to all workflows
config/locales/sv.yml
1116 1116
  label_cross_project_tree: Med projektträd
1117 1117
  label_cross_project_hierarchy: Med projekthierarki
1118 1118
  label_cross_project_system: Med alla projekt
1119
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1120
    add it manually.
1121
  label_add_to_all_workflows: Add to all workflows
config/locales/th.yml
1075 1075
  label_cross_project_tree: With project tree
1076 1076
  label_cross_project_hierarchy: With project hierarchy
1077 1077
  label_cross_project_system: With all projects
1078
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1079
    add it manually.
1080
  label_add_to_all_workflows: Add to all workflows
config/locales/tr.yml
1097 1097
  label_cross_project_tree: Proje ağacı ile
1098 1098
  label_cross_project_hierarchy: Proje hiyerarşisi ile
1099 1099
  label_cross_project_system: Tüm projeler ile
1100
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1101
    add it manually.
1102
  label_add_to_all_workflows: Add to all workflows
config/locales/uk.yml
1073 1073
  label_cross_project_tree: With project tree
1074 1074
  label_cross_project_hierarchy: With project hierarchy
1075 1075
  label_cross_project_system: With all projects
1076
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1077
    add it manually.
1078
  label_add_to_all_workflows: Add to all workflows
config/locales/vi.yml
1129 1129
  label_cross_project_tree: With project tree
1130 1130
  label_cross_project_hierarchy: With project hierarchy
1131 1131
  label_cross_project_system: With all projects
1132
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1133
    add it manually.
1134
  label_add_to_all_workflows: Add to all workflows
config/locales/zh-TW.yml
1159 1159
  label_cross_project_tree: 與專案樹共用
1160 1160
  label_cross_project_hierarchy: 與專案階層架構共用
1161 1161
  label_cross_project_system: 與全部的專案共用
1162
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1163
    add it manually.
1164
  label_add_to_all_workflows: Add to all workflows
config/locales/zh.yml
1082 1082
  label_cross_project_tree: 与项目树共享
1083 1083
  label_cross_project_hierarchy: 与项目继承层次共享
1084 1084
  label_cross_project_system: 与所有项目共享
1085
  error_unable_add_to_workflows: Unable to add issue status to all workflows. Please
1086
    add it manually.
1087
  label_add_to_all_workflows: Add to all workflows