@@ -723,6 +723,9 class Issue < ActiveRecord::Base | |||
|
723 | 723 | @parent_issue.self_and_ancestors.any? {|a| a.relations_from.any? {|r| r.relation_type == IssueRelation::TYPE_PRECEDES && r.issue_to.would_reschedule?(self)}} |
|
724 | 724 | ) |
|
725 | 725 | errors.add :parent_issue_id, :invalid |
|
726 | elsif !closed? && @parent_issue.closed? | |
|
727 | # cannot attach an open issue to a closed parent | |
|
728 | errors.add :base, :open_issue_with_closed_parent | |
|
726 | 729 | elsif !new_record? |
|
727 | 730 | # moving an existing issue |
|
728 | 731 | if move_possible?(@parent_issue) |
@@ -945,9 +948,14 class Issue < ActiveRecord::Base | |||
|
945 | 948 | end |
|
946 | 949 | |
|
947 | 950 | statuses = statuses.compact.uniq.sort |
|
948 | if blocked? | |
|
951 | if blocked? || descendants.open.any? | |
|
952 | # cannot close a blocked issue or a parent with open subtasks | |
|
949 | 953 | statuses.reject!(&:is_closed?) |
|
950 | 954 | end |
|
955 | if ancestors.open(false).any? | |
|
956 | # cannot reopen a subtask of a closed parent | |
|
957 | statuses.select!(&:is_closed?) | |
|
958 | end | |
|
951 | 959 | statuses |
|
952 | 960 | end |
|
953 | 961 |
@@ -130,6 +130,7 ar: | |||
|
130 | 130 | cant_link_an_issue_with_a_descendant: "لا يمكن ان تكون المشكلة مرتبطة بواحدة من المهام الفرعية" |
|
131 | 131 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
132 | 132 | not_a_regexp: "is not a valid regular expression" |
|
133 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
133 | 134 | |
|
134 | 135 | actionview_instancetag_blank_option: الرجاء التحديد |
|
135 | 136 |
@@ -198,6 +198,7 az: | |||
|
198 | 198 | cant_link_an_issue_with_a_descendant: "Tapşırıq özünün alt tapşırığı ilə əlaqəli ola bilməz" |
|
199 | 199 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
200 | 200 | not_a_regexp: "is not a valid regular expression" |
|
201 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
201 | 202 | |
|
202 | 203 | support: |
|
203 | 204 | array: |
@@ -132,6 +132,7 bg: | |||
|
132 | 132 | cant_link_an_issue_with_a_descendant: "Една задача не може да бъде свързвана към своя подзадача" |
|
133 | 133 | earlier_than_minimum_start_date: "не може да бъде по-рано от %{date} поради предхождащи задачи" |
|
134 | 134 | not_a_regexp: "is not a valid regular expression" |
|
135 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
135 | 136 | |
|
136 | 137 | actionview_instancetag_blank_option: Изберете |
|
137 | 138 |
@@ -142,6 +142,7 bs: | |||
|
142 | 142 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
143 | 143 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
144 | 144 | not_a_regexp: "is not a valid regular expression" |
|
145 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
145 | 146 | |
|
146 | 147 | actionview_instancetag_blank_option: Molimo odaberite |
|
147 | 148 |
@@ -135,6 +135,7 ca: | |||
|
135 | 135 | cant_link_an_issue_with_a_descendant: "Un assumpte no es pot enllaçar a una de les seves subtasques" |
|
136 | 136 | earlier_than_minimum_start_date: "no pot ser anterior a %{date} derivat a les peticions precedents" |
|
137 | 137 | not_a_regexp: "is not a valid regular expression" |
|
138 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
138 | 139 | |
|
139 | 140 | actionview_instancetag_blank_option: "Seleccionar" |
|
140 | 141 |
@@ -136,6 +136,7 cs: | |||
|
136 | 136 | cant_link_an_issue_with_a_descendant: "Úkol nemůže být spojen s jedním z jeho dílčích úkolů" |
|
137 | 137 | earlier_than_minimum_start_date: "nemůže být dříve než %{date} kvůli předřazeným úkolům" |
|
138 | 138 | not_a_regexp: "is not a valid regular expression" |
|
139 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
139 | 140 | |
|
140 | 141 | actionview_instancetag_blank_option: Prosím vyberte |
|
141 | 142 |
@@ -143,6 +143,7 da: | |||
|
143 | 143 | cant_link_an_issue_with_a_descendant: "En sag kan ikke relateres til en af dens underopgaver" |
|
144 | 144 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
145 | 145 | not_a_regexp: "is not a valid regular expression" |
|
146 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
146 | 147 | |
|
147 | 148 | template: |
|
148 | 149 | header: |
@@ -147,6 +147,7 de: | |||
|
147 | 147 | cant_link_an_issue_with_a_descendant: "Ein Ticket kann nicht mit einer Ihrer Unteraufgaben verlinkt werden" |
|
148 | 148 | earlier_than_minimum_start_date: "kann wegen eines Vorgängertickets nicht vor %{date} liegen" |
|
149 | 149 | not_a_regexp: "is not a valid regular expression" |
|
150 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
150 | 151 | |
|
151 | 152 | actionview_instancetag_blank_option: Bitte auswählen |
|
152 | 153 |
@@ -132,6 +132,7 el: | |||
|
132 | 132 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
133 | 133 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
134 | 134 | not_a_regexp: "is not a valid regular expression" |
|
135 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
135 | 136 | |
|
136 | 137 | actionview_instancetag_blank_option: Παρακαλώ επιλέξτε |
|
137 | 138 |
@@ -135,6 +135,7 en-GB: | |||
|
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 | 137 | not_a_regexp: "is not a valid regular expression" |
|
138 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
138 | 139 | |
|
139 | 140 | actionview_instancetag_blank_option: Please select |
|
140 | 141 |
@@ -131,6 +131,7 en: | |||
|
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 | 133 | not_a_regexp: "is not a valid regular expression" |
|
134 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
134 | 135 | |
|
135 | 136 | actionview_instancetag_blank_option: Please select |
|
136 | 137 |
@@ -141,6 +141,7 es-PA: | |||
|
141 | 141 | cant_link_an_issue_with_a_descendant: "Esta incidencia no puede ser ligada a una de estas tareas" |
|
142 | 142 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
143 | 143 | not_a_regexp: "is not a valid regular expression" |
|
144 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
144 | 145 | |
|
145 | 146 | # Append your own errors here or at the model/attributes scope. |
|
146 | 147 |
@@ -139,6 +139,7 es: | |||
|
139 | 139 | cant_link_an_issue_with_a_descendant: "Esta petición no puede ser ligada a una de estas tareas" |
|
140 | 140 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
141 | 141 | not_a_regexp: "is not a valid regular expression" |
|
142 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
142 | 143 | |
|
143 | 144 | # Append your own errors here or at the model/attributes scope. |
|
144 | 145 |
@@ -148,6 +148,7 et: | |||
|
148 | 148 | cant_link_an_issue_with_a_descendant: "Teemat ei saa sidustada tema enda alamteemaga" |
|
149 | 149 | earlier_than_minimum_start_date: "Tähtpäev ei saa olla varasem kui %{date} eelnevate teemade tähtpäevade tõttu" |
|
150 | 150 | not_a_regexp: "is not a valid regular expression" |
|
151 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
151 | 152 | |
|
152 | 153 | actionview_instancetag_blank_option: "Palun vali" |
|
153 | 154 |
@@ -133,6 +133,7 eu: | |||
|
133 | 133 | cant_link_an_issue_with_a_descendant: "Zeregin bat ezin da bere azpiataza batekin estekatu." |
|
134 | 134 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
135 | 135 | not_a_regexp: "is not a valid regular expression" |
|
136 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
136 | 137 | |
|
137 | 138 | actionview_instancetag_blank_option: Hautatu mesedez |
|
138 | 139 |
@@ -131,6 +131,7 fa: | |||
|
131 | 131 | cant_link_an_issue_with_a_descendant: "یک مورد نمیتواند به یکی از زیر کارهایش پیوند بخورد" |
|
132 | 132 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
133 | 133 | not_a_regexp: "is not a valid regular expression" |
|
134 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
134 | 135 | |
|
135 | 136 | actionview_instancetag_blank_option: گزینش کنید |
|
136 | 137 |
@@ -156,6 +156,7 fi: | |||
|
156 | 156 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
157 | 157 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
158 | 158 | not_a_regexp: "is not a valid regular expression" |
|
159 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
159 | 160 | |
|
160 | 161 | actionview_instancetag_blank_option: Valitse, ole hyvä |
|
161 | 162 |
@@ -151,6 +151,7 fr: | |||
|
151 | 151 | cant_link_an_issue_with_a_descendant: "Une demande ne peut pas être liée à l'une de ses sous-tâches" |
|
152 | 152 | earlier_than_minimum_start_date: "ne peut pas être antérieure au %{date} à cause des demandes qui précèdent" |
|
153 | 153 | not_a_regexp: "n'est pas une expression regulière valide" |
|
154 | open_issue_with_closed_parent: "Une demande ouverte ne peut pas être rattachée à une demande fermée" | |
|
154 | 155 | |
|
155 | 156 | actionview_instancetag_blank_option: Choisir |
|
156 | 157 |
@@ -160,6 +160,7 gl: | |||
|
160 | 160 | cant_link_an_issue_with_a_descendant: "As peticións non poden estar ligadas coas súas subtarefas" |
|
161 | 161 | earlier_than_minimum_start_date: "Non pode ser antes de %{date} por mor de peticións anteriores" |
|
162 | 162 | not_a_regexp: "is not a valid regular expression" |
|
163 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
163 | 164 | |
|
164 | 165 | actionview_instancetag_blank_option: Por favor seleccione |
|
165 | 166 |
@@ -136,6 +136,7 he: | |||
|
136 | 136 | cant_link_an_issue_with_a_descendant: "לא ניתן לקשר נושא לתת־משימה שלו" |
|
137 | 137 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
138 | 138 | not_a_regexp: "is not a valid regular expression" |
|
139 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
139 | 140 | |
|
140 | 141 | actionview_instancetag_blank_option: בחר בבקשה |
|
141 | 142 |
@@ -126,6 +126,7 hr: | |||
|
126 | 126 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
127 | 127 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
128 | 128 | not_a_regexp: "is not a valid regular expression" |
|
129 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
129 | 130 | |
|
130 | 131 | actionview_instancetag_blank_option: Molimo odaberite |
|
131 | 132 |
@@ -152,6 +152,7 | |||
|
152 | 152 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
153 | 153 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
154 | 154 | not_a_regexp: "is not a valid regular expression" |
|
155 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
155 | 156 | |
|
156 | 157 | actionview_instancetag_blank_option: Kérem válasszon |
|
157 | 158 |
@@ -131,6 +131,7 id: | |||
|
131 | 131 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
132 | 132 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
133 | 133 | not_a_regexp: "is not a valid regular expression" |
|
134 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
134 | 135 | |
|
135 | 136 | actionview_instancetag_blank_option: Silakan pilih |
|
136 | 137 |
@@ -136,6 +136,7 it: | |||
|
136 | 136 | cant_link_an_issue_with_a_descendant: "Una segnalazione non può essere collegata a una delle sue discendenti" |
|
137 | 137 | earlier_than_minimum_start_date: "non può essere precedente a %{date} a causa di una precedente segnalazione" |
|
138 | 138 | not_a_regexp: "is not a valid regular expression" |
|
139 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
139 | 140 | |
|
140 | 141 | actionview_instancetag_blank_option: Scegli |
|
141 | 142 |
@@ -152,6 +152,7 ja: | |||
|
152 | 152 | cant_link_an_issue_with_a_descendant: "親子関係にあるチケット間での関連の設定はできません" |
|
153 | 153 | earlier_than_minimum_start_date: "を%{date}より前にすることはできません。先行するチケットがあります" |
|
154 | 154 | not_a_regexp: "is not a valid regular expression" |
|
155 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
155 | 156 | |
|
156 | 157 | actionview_instancetag_blank_option: 選んでください |
|
157 | 158 |
@@ -178,6 +178,7 ko: | |||
|
178 | 178 | cant_link_an_issue_with_a_descendant: "일감은 하위 일감과 연결할 수 없습니다." |
|
179 | 179 | earlier_than_minimum_start_date: "시작날짜 %{date}보다 앞선 시간으로 설정할 수 없습니다." |
|
180 | 180 | not_a_regexp: "is not a valid regular expression" |
|
181 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
181 | 182 | |
|
182 | 183 | actionview_instancetag_blank_option: 선택하세요 |
|
183 | 184 |
@@ -135,6 +135,7 lt: | |||
|
135 | 135 | cant_link_an_issue_with_a_descendant: "Darbas negali būti susietas su viena iš savo darbo dalių" |
|
136 | 136 | earlier_than_minimum_start_date: "negali būti anksčiau už %{date} dėl ankstesnių darbų" |
|
137 | 137 | not_a_regexp: "is not a valid regular expression" |
|
138 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
138 | 139 | |
|
139 | 140 | actionview_instancetag_blank_option: Prašom parinkti |
|
140 | 141 |
@@ -125,6 +125,7 lv: | |||
|
125 | 125 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
126 | 126 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
127 | 127 | not_a_regexp: "is not a valid regular expression" |
|
128 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
128 | 129 | |
|
129 | 130 | actionview_instancetag_blank_option: Izvēlieties |
|
130 | 131 |
@@ -132,6 +132,7 mk: | |||
|
132 | 132 | cant_link_an_issue_with_a_descendant: "Задача неможе да се поврзе со една од нејзините подзадачи" |
|
133 | 133 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
134 | 134 | not_a_regexp: "is not a valid regular expression" |
|
135 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
135 | 136 | |
|
136 | 137 | actionview_instancetag_blank_option: Изберете |
|
137 | 138 |
@@ -131,6 +131,7 mn: | |||
|
131 | 131 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
132 | 132 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
133 | 133 | not_a_regexp: "is not a valid regular expression" |
|
134 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
134 | 135 | |
|
135 | 136 | actionview_instancetag_blank_option: Сонгоно уу |
|
136 | 137 |
@@ -129,6 +129,7 nl: | |||
|
129 | 129 | cant_link_an_issue_with_a_descendant: "Een issue kan niet gelinked worden met een subtask" |
|
130 | 130 | earlier_than_minimum_start_date: "kan niet eerder zijn dan %{date} wegens voorafgaande issues" |
|
131 | 131 | not_a_regexp: "is not a valid regular expression" |
|
132 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
132 | 133 | |
|
133 | 134 | actionview_instancetag_blank_option: Selecteren |
|
134 | 135 |
@@ -120,6 +120,7 | |||
|
120 | 120 | cant_link_an_issue_with_a_descendant: "En sak kan ikke kobles mot en av sine undersaker" |
|
121 | 121 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
122 | 122 | not_a_regexp: "is not a valid regular expression" |
|
123 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
123 | 124 | |
|
124 | 125 | |
|
125 | 126 | actionview_instancetag_blank_option: Vennligst velg |
@@ -139,6 +139,7 pl: | |||
|
139 | 139 | cant_link_an_issue_with_a_descendant: "Zagadnienie nie może zostać powiązane z jednym z własnych podzagadnień" |
|
140 | 140 | earlier_than_minimum_start_date: "nie może być wcześniej niż %{date} z powodu poprzedających zagadnień" |
|
141 | 141 | not_a_regexp: "is not a valid regular expression" |
|
142 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
142 | 143 | |
|
143 | 144 | support: |
|
144 | 145 | array: |
@@ -151,6 +151,7 pt-BR: | |||
|
151 | 151 | cant_link_an_issue_with_a_descendant: "Uma tarefa não pode ser relaciona a uma de suas subtarefas" |
|
152 | 152 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
153 | 153 | not_a_regexp: "is not a valid regular expression" |
|
154 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
154 | 155 | |
|
155 | 156 | actionview_instancetag_blank_option: Selecione |
|
156 | 157 |
@@ -140,6 +140,7 pt: | |||
|
140 | 140 | cant_link_an_issue_with_a_descendant: "Não é possível ligar uma tarefa a uma sub-tarefa que lhe é pertencente" |
|
141 | 141 | earlier_than_minimum_start_date: "não pode ser antes de %{date} devido a tarefas precedentes" |
|
142 | 142 | not_a_regexp: "is not a valid regular expression" |
|
143 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
143 | 144 | |
|
144 | 145 | |
|
145 | 146 | actionview_instancetag_blank_option: Selecione |
@@ -126,6 +126,7 ro: | |||
|
126 | 126 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
127 | 127 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
128 | 128 | not_a_regexp: "is not a valid regular expression" |
|
129 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
129 | 130 | |
|
130 | 131 | actionview_instancetag_blank_option: Selectați |
|
131 | 132 |
@@ -208,6 +208,7 ru: | |||
|
208 | 208 | cant_link_an_issue_with_a_descendant: "Задача не может быть связана со своей подзадачей" |
|
209 | 209 | earlier_than_minimum_start_date: "не может быть раньше %{date} из-за предыдущих задач" |
|
210 | 210 | not_a_regexp: "is not a valid regular expression" |
|
211 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
211 | 212 | |
|
212 | 213 | support: |
|
213 | 214 | array: |
@@ -130,6 +130,7 sk: | |||
|
130 | 130 | cant_link_an_issue_with_a_descendant: "Nemožno prepojiť úlohu s niektorou z podúloh" |
|
131 | 131 | earlier_than_minimum_start_date: "nemôže byť skorší ako %{date} z dôvodu nadväznosti na predchádzajúce úlohy" |
|
132 | 132 | not_a_regexp: "is not a valid regular expression" |
|
133 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
133 | 134 | |
|
134 | 135 | actionview_instancetag_blank_option: Vyberte |
|
135 | 136 |
@@ -130,6 +130,7 sl: | |||
|
130 | 130 | cant_link_an_issue_with_a_descendant: "Zahtevek ne more biti povezan s svojo podnalogo" |
|
131 | 131 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
132 | 132 | not_a_regexp: "is not a valid regular expression" |
|
133 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
133 | 134 | |
|
134 | 135 | actionview_instancetag_blank_option: Prosimo izberite |
|
135 | 136 |
@@ -131,6 +131,7 sq: | |||
|
131 | 131 | cant_link_an_issue_with_a_descendant: "Nje ceshtje nuk mund te lidhet me nenceshtje" |
|
132 | 132 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
133 | 133 | not_a_regexp: "is not a valid regular expression" |
|
134 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
134 | 135 | |
|
135 | 136 | actionview_instancetag_blank_option: Zgjidhni |
|
136 | 137 |
@@ -134,6 +134,7 sr-YU: | |||
|
134 | 134 | cant_link_an_issue_with_a_descendant: "Problem ne može biti povezan sa jednim od svojih podzadataka" |
|
135 | 135 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
136 | 136 | not_a_regexp: "is not a valid regular expression" |
|
137 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
137 | 138 | |
|
138 | 139 | actionview_instancetag_blank_option: Molim odaberite |
|
139 | 140 |
@@ -132,6 +132,7 sr: | |||
|
132 | 132 | cant_link_an_issue_with_a_descendant: "Проблем не може бити повезан са једним од својих подзадатака" |
|
133 | 133 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
134 | 134 | not_a_regexp: "is not a valid regular expression" |
|
135 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
135 | 136 | |
|
136 | 137 | actionview_instancetag_blank_option: Молим одаберите |
|
137 | 138 |
@@ -136,6 +136,7 sv: | |||
|
136 | 136 | cant_link_an_issue_with_a_descendant: "Ett ärende kan inte länkas till ett av dess underärenden" |
|
137 | 137 | earlier_than_minimum_start_date: "kan inte vara tidigare än% {datum} på grund av föregående ärenden" |
|
138 | 138 | not_a_regexp: "is not a valid regular expression" |
|
139 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
139 | 140 | |
|
140 | 141 | direction: ltr |
|
141 | 142 | date: |
@@ -129,6 +129,7 th: | |||
|
129 | 129 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
130 | 130 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
131 | 131 | not_a_regexp: "is not a valid regular expression" |
|
132 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
132 | 133 | |
|
133 | 134 | actionview_instancetag_blank_option: กรุณาเลือก |
|
134 | 135 |
@@ -145,6 +145,7 tr: | |||
|
145 | 145 | cant_link_an_issue_with_a_descendant: "Bir iş, alt işlerinden birine bağlanamaz" |
|
146 | 146 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
147 | 147 | not_a_regexp: "is not a valid regular expression" |
|
148 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
148 | 149 | models: |
|
149 | 150 | |
|
150 | 151 | actionview_instancetag_blank_option: Lütfen Seçin |
@@ -129,6 +129,7 uk: | |||
|
129 | 129 | cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" |
|
130 | 130 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
131 | 131 | not_a_regexp: "is not a valid regular expression" |
|
132 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
132 | 133 | |
|
133 | 134 | actionview_instancetag_blank_option: Оберіть |
|
134 | 135 |
@@ -146,6 +146,7 vi: | |||
|
146 | 146 | cant_link_an_issue_with_a_descendant: "Một vấn đề không thể liên kết tới một trong số những tác vụ con của nó" |
|
147 | 147 | earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" |
|
148 | 148 | not_a_regexp: "is not a valid regular expression" |
|
149 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
149 | 150 | |
|
150 | 151 | direction: ltr |
|
151 | 152 | date: |
@@ -188,6 +188,7 | |||
|
188 | 188 | cant_link_an_issue_with_a_descendant: "議題無法被連結至自己的子任務" |
|
189 | 189 | earlier_than_minimum_start_date: "不能早於 %{date} 因為有前置議題" |
|
190 | 190 | not_a_regexp: "is not a valid regular expression" |
|
191 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
191 | 192 | |
|
192 | 193 | # You can define own errors for models or model attributes. |
|
193 | 194 | # The values :model, :attribute and :value are always available for interpolation. |
@@ -135,6 +135,7 zh: | |||
|
135 | 135 | cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务" |
|
136 | 136 | earlier_than_minimum_start_date: "不能早于 %{date} 由于有前置问题" |
|
137 | 137 | not_a_regexp: "is not a valid regular expression" |
|
138 | open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" | |
|
138 | 139 | |
|
139 | 140 | actionview_instancetag_blank_option: 请选择 |
|
140 | 141 |
@@ -330,4 +330,13 class IssueSubtaskingTest < ActiveSupport::TestCase | |||
|
330 | 330 | parent.generate_child!(:estimated_hours => 7) |
|
331 | 331 | assert_equal 12, parent.reload.total_estimated_hours |
|
332 | 332 | end |
|
333 | ||
|
334 | def test_open_issue_with_closed_parent_should_not_validate | |
|
335 | parent = Issue.generate!(:status_id => 5) | |
|
336 | child = Issue.generate! | |
|
337 | ||
|
338 | child.parent_issue_id = parent.id | |
|
339 | assert !child.save | |
|
340 | assert_include I18n.t("activerecord.errors.messages.open_issue_with_closed_parent"), child.errors.full_messages | |
|
341 | end | |
|
333 | 342 | end |
@@ -1941,6 +1941,24 class IssueTest < ActiveSupport::TestCase | |||
|
1941 | 1941 | assert !closed_statuses.empty? |
|
1942 | 1942 | end |
|
1943 | 1943 | |
|
1944 | def test_parent_issues_with_open_subtask_dont_allow_closed_statuses | |
|
1945 | parent = Issue.generate! | |
|
1946 | child = Issue.generate!(:parent_issue_id => parent.id) | |
|
1947 | ||
|
1948 | allowed_statuses = parent.reload.new_statuses_allowed_to(users(:users_002)) | |
|
1949 | assert allowed_statuses.any? | |
|
1950 | assert_equal [], allowed_statuses.select(&:is_closed?) | |
|
1951 | end | |
|
1952 | ||
|
1953 | def test_parent_issues_with_closed_subtask_allow_closed_statuses | |
|
1954 | parent = Issue.generate! | |
|
1955 | child = Issue.generate!(:parent_issue_id => parent.id, :status_id => 5) | |
|
1956 | ||
|
1957 | allowed_statuses = parent.reload.new_statuses_allowed_to(users(:users_002)) | |
|
1958 | assert allowed_statuses.any? | |
|
1959 | assert allowed_statuses.select(&:is_closed?).any? | |
|
1960 | end | |
|
1961 | ||
|
1944 | 1962 | def test_reschedule_an_issue_without_dates |
|
1945 | 1963 | with_settings :non_working_week_days => [] do |
|
1946 | 1964 | issue = Issue.new(:start_date => nil, :due_date => nil) |
General Comments 0
You need to be logged in to leave comments.
Login now