Project

General

Profile

Feature #17576 » 0001-ADD-Config-option-for-resetting-the-status-when-copy.patch

Patch - Vincent C., 2016-08-11 16:46

View differences:

app/models/issue.rb
899 899
  # Returns an array of statuses that user is able to apply
900 900
  def new_statuses_allowed_to(user=User.current, include_default=false)
901 901
    if new_record? && @copied_from
902
      [default_status, @copied_from.status].compact.uniq.sort
902
      if Setting.reset_issue_status_on_copy?
903
        [default_status]
904
      else
905
        [default_status, @copied_from.status].compact.uniq.sort
906
      end
903 907
    else
904 908
      initial_status = nil
905 909
      if new_record?
app/views/settings/_issues.html.erb
5 5

  
6 6
<p><%= setting_select :link_copied_issue, link_copied_issue_options %></p>
7 7

  
8
<p><%= setting_check_box :reset_issue_status_on_copy %></p>
9

  
8 10
<p><%= setting_select :cross_project_subtasks, cross_project_subtasks_options %></p>
9 11

  
10 12
<p><%= setting_check_box :issue_group_assignment %></p>
config/locales/en.yml
440 440
  setting_force_default_language_for_anonymous: Force default language for anonymous users
441 441
  setting_force_default_language_for_loggedin: Force default language for logged-in users
442 442
  setting_link_copied_issue: Link issues on copy
443
  setting_reset_issue_status_on_copy: Reset status when copying an issue
443 444
  setting_max_additional_emails: Maximum number of additional email addresses
444 445
  setting_search_results_per_page: Search results per page
445 446
  setting_attachment_extensions_allowed: Allowed extensions
config/locales/fr.yml
450 450
  setting_force_default_language_for_anonymous: Forcer la langue par défault pour les utilisateurs anonymes
451 451
  setting_force_default_language_for_loggedin: Forcer la langue par défault pour les utilisateurs identifiés
452 452
  setting_link_copied_issue: Lier les demandes lors de la copie
453
  setting_reset_issue_status_on_copy: Réinitialiser le statut lors d'une copie de demande
453 454
  setting_max_additional_emails: Nombre maximal d'adresses email additionnelles
454 455
  setting_search_results_per_page: Résultats de recherche affichés par page
455 456
  setting_attachment_extensions_allowed: Extensions autorisées
config/settings.yml
169 169
  default: 'derived'
170 170
link_copied_issue:
171 171
  default: 'ask'
172
reset_issue_status_on_copy:
173
  default: 0
172 174
issue_group_assignment:
173 175
  default: 0
174 176
default_issue_start_date_to_creation_date:
    (1-1/1)