RM_24198_Setting_for_subtasks_optionally_follow_the_project_change_of_the_parent.diff

Jérôme BATAILLE, 2016-10-28 14:56

Download (5.86 KB)

View differences:

app/models/issue.rb
1263 1263
    end
1264 1264

  
1265 1265
    # Move subtasks that were in the same project
1266
    children.each do |child|
1267
      next unless child.project_id == project_id_was
1268
      # Change project and keep project
1269
      child.send :project=, project, true
1270
      unless child.save
1271
        raise ActiveRecord::Rollback
1266
    if Setting.subtasks_follow_project_change_of_parent?
1267
      children.each do |child|
1268
        next unless child.project_id == project_id_was
1269
        # Change project and keep project
1270
        child.init_journal(User.current)
1271
        child.send :project=, project, true
1272
        unless child.save
1273
          raise ActiveRecord::Rollback
1274
        end
1272 1275
      end
1273 1276
    end
1274 1277
  end
app/views/settings/_issues.html.erb
11 11

  
12 12
<p><%= setting_check_box :display_subprojects_issues %></p>
13 13

  
14
<p><%= setting_check_box :subtasks_follow_project_change_of_parent %></p>
15

  
14 16
<p><%= setting_select :issue_done_ratio, Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]} %></p>
15 17

  
16 18
<p><%= setting_multiselect :non_working_week_days, (1..7).map {|d| [day_name(d), d.to_s]}, :inline => true %></p>
config/locales/ca.yml
336 336
  setting_user_format: "Format de com mostrar l'usuari"
337 337
  setting_activity_days_default: "Dies a mostrar l'activitat del projecte"
338 338
  setting_display_subprojects_issues: "Mostra els assumptes d'un subprojecte en el projecte pare per defecte"
339
  setting_subtasks_follow_project_change_of_parent: Subtasks follow project change of parent
339 340
  setting_enabled_scm: "Habilita l'SCM"
340 341
  setting_mail_handler_body_delimiters: "Trunca els correus electrònics després d'una d'aquestes línies"
341 342
  setting_mail_handler_api_enabled: "Habilita el WS per correus electrònics d'entrada"
config/locales/en-GB.yml
346 346
  setting_user_format: Users display format
347 347
  setting_activity_days_default: Days displayed on project activity
348 348
  setting_display_subprojects_issues: Display subprojects issues on main projects by default
349
  setting_subtasks_follow_project_change_of_parent: Subtasks follow project change of parent
349 350
  setting_enabled_scm: Enabled SCM
350 351
  setting_mail_handler_body_delimiters: "Truncate emails after one of these lines"
351 352
  setting_mail_handler_api_enabled: Enable WS for incoming emails
config/locales/en.yml
372 372
  setting_user_format: Users display format
373 373
  setting_activity_days_default: Days displayed on project activity
374 374
  setting_display_subprojects_issues: Display subprojects issues on main projects by default
375
  setting_subtasks_follow_project_change_of_parent: Subtasks follow project change of parent
375 376
  setting_enabled_scm: Enabled SCM
376 377
  setting_mail_handler_body_delimiters: "Truncate emails after one of these lines"
377 378
  setting_mail_handler_api_enabled: Enable WS for incoming emails
config/locales/es.yml
762 762
  setting_default_projects_public: Los proyectos nuevos son públicos por defecto
763 763
  setting_diff_max_lines_displayed: Número máximo de diferencias mostradas
764 764
  setting_display_subprojects_issues: Mostrar por defecto peticiones de proy. secundarios en el principal
765
  setting_subtasks_follow_project_change_of_parent: Subtasks follow project change of parent
765 766
  setting_emails_footer: Pie de mensajes
766 767
  setting_enabled_scm: Activar SCM
767 768
  setting_feeds_limit: Límite de contenido para sindicación
config/locales/fr.yml
392 392
  setting_user_format: Format d'affichage des utilisateurs
393 393
  setting_activity_days_default: Nombre de jours affichés sur l'activité des projets
394 394
  setting_display_subprojects_issues: Afficher par défaut les demandes des sous-projets sur les projets principaux
395
  setting_subtasks_follow_project_change_of_parent: Changer les sous-tâches de projet si le parent change de projet
395 396
  setting_enabled_scm: SCM activés
396 397
  setting_mail_handler_body_delimiters: "Tronquer les emails après l'une de ces lignes"
397 398
  setting_mail_handler_api_enabled: "Activer le WS pour la réception d'emails"
config/locales/uk.yml
709 709
  label_reverse_chronological_order: In reverse chronological order
710 710
  label_preferences: Preferences
711 711
  setting_display_subprojects_issues: Display subprojects issues on main projects by default
712
  setting_subtasks_follow_project_change_of_parent: Subtasks follow project change of parent
712 713
  label_overall_activity: Overall activity
713 714
  setting_default_projects_public: New projects are public by default
714 715
  error_scm_annotate: "The entry does not exist or can not be annotated."
config/settings.yml
164 164
  - updated_on
165 165
display_subprojects_issues:
166 166
  default: 1
167
subtasks_follow_project_change_of_parent:
168
  default: 1
167 169
issue_done_ratio:
168 170
  default: 'issue_field'
169 171
default_projects_public: