Feature #34609 » patch34609-0.diff
app/helpers/settings_helper.rb | ||
---|---|---|
185 | 185 |
def parent_issue_dates_options |
186 | 186 |
options = [ |
187 | 187 |
[:label_parent_task_attributes_derived, 'derived'], |
188 |
[:label_parent_task_attributes_partially_derived, 'partially_derived'], |
|
188 | 189 |
[:label_parent_task_attributes_independent, 'independent'] |
189 | 190 |
] |
190 | 191 |
app/models/issue.rb | ||
---|---|---|
745 | 745 |
errors.add :due_date, :greater_than_start_date |
746 | 746 |
end |
747 | 747 | |
748 |
if dates_partially_derived? && start_date && start_date_changed? && start_date > children.minimum(:start_date) |
|
749 |
errors.add :start_date, :later_than_minimum_start_date, :date => format_date(children.minimum(:start_date)) |
|
750 |
end |
|
751 | ||
752 |
if dates_partially_derived? && due_date && due_date_changed? && due_date < children.maximum(:due_date) |
|
753 |
errors.add :due_date, :earlier_than_maximum_due_date, :date => format_date(children.maximum(:due_date)) |
|
754 |
end |
|
755 | ||
748 | 756 |
if start_date && start_date_changed? && soonest_start && start_date < soonest_start |
749 | 757 |
errors.add :start_date, :earlier_than_minimum_start_date, :date => format_date(soonest_start) |
750 | 758 |
end |
... | ... | |
1412 | 1420 |
!leaf? && Setting.parent_issue_dates == 'derived' |
1413 | 1421 |
end |
1414 | 1422 | |
1423 |
def dates_partially_derived? |
|
1424 |
!leaf? && Setting.parent_issue_dates == 'partially_derived' |
|
1425 |
end |
|
1426 | ||
1415 | 1427 |
def priority_derived? |
1416 | 1428 |
!leaf? && Setting.parent_issue_priority == 'derived' |
1417 | 1429 |
end |
... | ... | |
1829 | 1841 |
end |
1830 | 1842 |
end |
1831 | 1843 | |
1844 |
if p.dates_partially_derived? |
|
1845 |
# start/due dates = lowest/highest dates of children or own date |
|
1846 |
p.start_date = [p.children.minimum(:start_date), p.start_date].compact.min |
|
1847 |
p.due_date = [p.children.maximum(:due_date),p.due_date].compact.max |
|
1848 |
if p.start_date && p.due_date && p.due_date < p.start_date |
|
1849 |
p.start_date, p.due_date = p.due_date, p.start_date |
|
1850 |
end |
|
1851 |
end |
|
1852 | ||
1832 | 1853 |
if p.done_ratio_derived? |
1833 | 1854 |
# done ratio = average ratio of children weighted with their total estimated hours |
1834 | 1855 |
unless Issue.use_status_for_done_ratio? && p.status && p.status.default_done_ratio |
config/locales/de.yml | ||
---|---|---|
146 | 146 |
circular_dependency: "Diese Beziehung würde eine zyklische Abhängigkeit erzeugen" |
147 | 147 |
cant_link_an_issue_with_a_descendant: "Ein Ticket kann nicht mit einem seiner untergeordneten Tickets verlinkt werden" |
148 | 148 |
earlier_than_minimum_start_date: "kann wegen eines Vorgängertickets nicht vor %{date} liegen" |
149 |
later_than_minimum_start_date: "kann wegen eines Untertickets nicht nach %{date} liegen" |
|
150 |
earlier_than_maximum_due_date: "kann wegen eines Untertickets nicht vor %{date} liegen" |
|
149 | 151 |
not_a_regexp: "ist kein gültiger regulärer Ausdruck" |
150 | 152 |
open_issue_with_closed_parent: "Ein offenes Ticket kann nicht an ein geschlossenes übergeordnetes Ticket angehängt werden" |
151 | 153 |
must_contain_uppercase: "muss Großbuchstaben (A-Z) enthalten" |
... | ... | |
1173 | 1175 |
field_remote_ip: IP-Adresse |
1174 | 1176 |
label_parent_task_attributes: Eigenschaften übergeordneter Tickets |
1175 | 1177 |
label_parent_task_attributes_derived: Abgeleitet von untergeordneten Tickets |
1178 |
label_parent_task_attributes_partially_derived: Teilweise abgeleitet von untergeordneten Tickets |
|
1176 | 1179 |
label_parent_task_attributes_independent: Unabhängig von untergeordneten Tickets |
1177 | 1180 |
label_time_entries_visibility_all: Alle Zeitaufwände |
1178 | 1181 |
label_time_entries_visibility_own: Nur eigene Aufwände |
config/locales/en-GB.yml | ||
---|---|---|
134 | 134 |
circular_dependency: "This relation would create a circular dependency" |
135 | 135 |
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" |
136 | 136 |
earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
137 |
later_than_minimum_start_date: "cannot be later than %{date} because of child issues" |
|
138 |
earlier_than_maximum_due_date: "cannot be earlier than %{date} because of child issues" |
|
137 | 139 |
not_a_regexp: "is not a valid regular expression" |
138 | 140 |
open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" |
139 | 141 |
must_contain_uppercase: "must contain uppercase letters (A-Z)" |
... | ... | |
1132 | 1134 |
field_time_entries_visibility: Time logs visibility |
1133 | 1135 |
setting_password_max_age: Require password change after |
1134 | 1136 |
label_parent_task_attributes: Parent tasks attributes |
1137 |
label_parent_task_attributes_partially_derived: Partially calculated from subtasks |
|
1135 | 1138 |
label_parent_task_attributes_derived: Calculated from subtasks |
1136 | 1139 |
label_parent_task_attributes_independent: Independent of subtasks |
1137 | 1140 |
label_time_entries_visibility_all: All time entries |
config/locales/en.yml | ||
---|---|---|
130 | 130 |
circular_dependency: "This relation would create a circular dependency" |
131 | 131 |
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" |
132 | 132 |
earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
133 |
earlier_than_maximum_due_date: "cannot be earlier than %{date} because of child issues" |
|
134 |
later_than_minimum_start_date: "cannot be later than %{date} because of child issues" |
|
133 | 135 |
not_a_regexp: "is not a valid regular expression" |
134 | 136 |
open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" |
135 | 137 |
must_contain_uppercase: "must contain uppercase letters (A-Z)" |
... | ... | |
1064 | 1066 |
label_blank_value: blank |
1065 | 1067 |
label_parent_task_attributes: Parent tasks attributes |
1066 | 1068 |
label_parent_task_attributes_derived: Calculated from subtasks |
1069 |
label_parent_task_attributes_partially_derived: Partially calculated from subtasks |
|
1067 | 1070 |
label_parent_task_attributes_independent: Independent of subtasks |
1068 | 1071 |
label_time_entries_visibility_all: All time entries |
1069 | 1072 |
label_time_entries_visibility_own: Time entries created by the user |