Package: redmine Version: 3.3.1-4 Redmine 3.3 allows closing issues despite the presence of unclosed subtasks; this is a regression from previous versions of redmine, and has been fixed upstream in the next minor-version release, redmine 3.4.0; see:
http://www.redmine.org/issues/10989 Should backport this to the stable release; otherwise it's just going to make later upgrades harder for people who accumulate broken parent/subtask relations in the interim. The changeset from upstream *almost* applied cleanly; it required very minor changes to deal with the slight different context.
Index: redmine-3.3.1/app/models/issue.rb =================================================================== --- redmine-3.3.1.orig/app/models/issue.rb +++ redmine-3.3.1/app/models/issue.rb @@ -713,6 +713,9 @@ class Issue < ActiveRecord::Base @parent_issue.self_and_ancestors.any? {|a| a.relations_from.any? {|r| r.relation_type == IssueRelation::TYPE_PRECEDES && r.issue_to.would_reschedule?(self)}} ) errors.add :parent_issue_id, :invalid + elsif !closed? && @parent_issue.closed? + # cannot attach an open issue to a closed parent + errors.add :base, :open_issue_with_closed_parent elsif !new_record? # moving an existing issue if move_possible?(@parent_issue) @@ -931,9 +934,14 @@ class Issue < ActiveRecord::Base statuses << initial_status unless statuses.empty? statuses << default_status if include_default || (new_record? && statuses.empty?) statuses = statuses.compact.uniq.sort - if blocked? + if blocked? || descendants.open.any? + # cannot close a blocked issue or a parent with open subtasks statuses.reject!(&:is_closed?) end + if ancestors.open(false).any? + # cannot reopen a subtask of a closed parent + statuses.select!(&:is_closed?) + end statuses end end Index: redmine-3.3.1/config/locales/ar.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ar.yml +++ redmine-3.3.1/config/locales/ar.yml @@ -129,6 +129,7 @@ ar: circular_dependency: "ÙØ°Ù Ø§ÙØ¹ÙØ§ÙØ© سÙ٠تخÙÙ Ø¹ÙØ§ÙØ© ØªØ¨Ø¹ÙØ© Ø¯Ø§Ø¦Ø±ÙØ©" cant_link_an_issue_with_a_descendant: "ÙØ§ ÙÙ Ù٠ا٠تÙÙ٠اÙÙ Ø´ÙÙØ© ٠رتبطة Ø¨ÙØ§ØØ¯Ø© ٠٠اÙÙ ÙØ§Ù اÙÙØ±Ø¹ÙØ©" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Ø§ÙØ±Ø¬Ø§Ø¡ Ø§ÙØªØØ¯Ùد Index: redmine-3.3.1/config/locales/az.yml =================================================================== --- redmine-3.3.1.orig/config/locales/az.yml +++ redmine-3.3.1/config/locales/az.yml @@ -197,6 +197,7 @@ az: circular_dependency: "BelÉ ÉlaqÉ dövri asılılıÄa gÉtirib çıxaracaq" cant_link_an_issue_with_a_descendant: "TapÅırıq özünün alt tapÅırıÄı ilÉ ÉlaqÉli ola bilmÉz" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" support: array: Index: redmine-3.3.1/config/locales/bg.yml =================================================================== --- redmine-3.3.1.orig/config/locales/bg.yml +++ redmine-3.3.1/config/locales/bg.yml @@ -131,6 +131,7 @@ bg: circular_dependency: "Тази ÑелаÑÐ¸Ñ Ñе доведе до безкÑайна завиÑимоÑÑ" cant_link_an_issue_with_a_descendant: "Ðдна задаÑа не може да бÑде ÑвÑÑзвана кÑм ÑÐ²Ð¾Ñ Ð¿Ð¾Ð´Ð·Ð°Ð´Ð°Ñа" earlier_than_minimum_start_date: "не може да бÑде по-Ñано Ð¾Ñ %{date} поÑади пÑÐµÐ´Ñ Ð¾Ð¶Ð´Ð°Ñи задаÑи" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ÐзбеÑеÑе Index: redmine-3.3.1/config/locales/bs.yml =================================================================== --- redmine-3.3.1.orig/config/locales/bs.yml +++ redmine-3.3.1/config/locales/bs.yml @@ -141,6 +141,7 @@ bs: circular_dependency: "Ova relacija stvar cirkularnu zavisnost" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Molimo odaberite Index: redmine-3.3.1/config/locales/ca.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ca.yml +++ redmine-3.3.1/config/locales/ca.yml @@ -134,6 +134,7 @@ ca: circular_dependency: "Aquesta relació crearia una dependència circular" cant_link_an_issue_with_a_descendant: "Un assumpte no es pot enllaçar a una de les seves subtasques" earlier_than_minimum_start_date: "no pot ser anterior a %{date} derivat a les peticions precedents" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: "Seleccionar" Index: redmine-3.3.1/config/locales/cs.yml =================================================================== --- redmine-3.3.1.orig/config/locales/cs.yml +++ redmine-3.3.1/config/locales/cs.yml @@ -135,6 +135,7 @@ cs: circular_dependency: "Tento vztah by vytvoÅil cyklickou závislost" cant_link_an_issue_with_a_descendant: "Ãkol nemůže být spojen s jednÃm z jeho dÃlÄÃch úkolů" earlier_than_minimum_start_date: "nemůže být dÅÃve než %{date} kvůli pÅedÅazeným úkolům" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ProsÃm vyberte Index: redmine-3.3.1/config/locales/da.yml =================================================================== --- redmine-3.3.1.orig/config/locales/da.yml +++ redmine-3.3.1/config/locales/da.yml @@ -142,6 +142,7 @@ da: circular_dependency: "Denne relation vil skabe et afhængighedsforhold" cant_link_an_issue_with_a_descendant: "En sag kan ikke relateres til en af dens underopgaver" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" template: header: Index: redmine-3.3.1/config/locales/de.yml =================================================================== --- redmine-3.3.1.orig/config/locales/de.yml +++ redmine-3.3.1/config/locales/de.yml @@ -146,6 +146,7 @@ de: circular_dependency: "Diese Beziehung würde eine zyklische Abhängigkeit erzeugen" cant_link_an_issue_with_a_descendant: "Ein Ticket kann nicht mit einer Ihrer Unteraufgaben verlinkt werden" earlier_than_minimum_start_date: "kann wegen eines Vorgängertickets nicht vor %{date} liegen" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Bitte auswählen Index: redmine-3.3.1/config/locales/el.yml =================================================================== --- redmine-3.3.1.orig/config/locales/el.yml +++ redmine-3.3.1/config/locales/el.yml @@ -131,6 +131,7 @@ el: circular_dependency: "ÎÏ Ïή η ÏÏÎÏη θα Î´Î·Î¼Î¹Î¿Ï ÏγήÏει ÎºÏ ÎºÎ»Î¹ÎºÎÏ ÎµÎ¾Î±ÏÏήÏειÏ" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ΠαÏÎ±ÎºÎ±Î»Ï ÎµÏιλÎξÏε Index: redmine-3.3.1/config/locales/en-GB.yml =================================================================== --- redmine-3.3.1.orig/config/locales/en-GB.yml +++ redmine-3.3.1/config/locales/en-GB.yml @@ -134,6 +134,7 @@ en-GB: circular_dependency: "This relation would create a circular dependency" cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Please select Index: redmine-3.3.1/config/locales/en.yml =================================================================== --- redmine-3.3.1.orig/config/locales/en.yml +++ redmine-3.3.1/config/locales/en.yml @@ -130,6 +130,7 @@ en: circular_dependency: "This relation would create a circular dependency" cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Please select Index: redmine-3.3.1/config/locales/es-PA.yml =================================================================== --- redmine-3.3.1.orig/config/locales/es-PA.yml +++ redmine-3.3.1/config/locales/es-PA.yml @@ -140,6 +140,7 @@ es-PA: circular_dependency: "Esta relación podrÃa crear una dependencia circular" cant_link_an_issue_with_a_descendant: "Esta incidencia no puede ser ligada a una de estas tareas" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" # Append your own errors here or at the model/attributes scope. Index: redmine-3.3.1/config/locales/es.yml =================================================================== --- redmine-3.3.1.orig/config/locales/es.yml +++ redmine-3.3.1/config/locales/es.yml @@ -138,6 +138,7 @@ es: circular_dependency: "Esta relación podrÃa crear una dependencia circular" cant_link_an_issue_with_a_descendant: "Esta petición no puede ser ligada a una de estas tareas" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" # Append your own errors here or at the model/attributes scope. Index: redmine-3.3.1/config/locales/et.yml =================================================================== --- redmine-3.3.1.orig/config/locales/et.yml +++ redmine-3.3.1/config/locales/et.yml @@ -147,6 +147,7 @@ et: circular_dependency: "See suhe looks vastastikuse sõltuvuse" cant_link_an_issue_with_a_descendant: "Teemat ei saa sidustada tema enda alamteemaga" earlier_than_minimum_start_date: "Tähtpäev ei saa olla varasem kui %{date} eelnevate teemade tähtpäevade tõttu" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: "Palun vali" Index: redmine-3.3.1/config/locales/eu.yml =================================================================== --- redmine-3.3.1.orig/config/locales/eu.yml +++ redmine-3.3.1/config/locales/eu.yml @@ -132,6 +132,7 @@ eu: circular_dependency: "Erlazio honek mendekotasun zirkular bat sortuko luke" cant_link_an_issue_with_a_descendant: "Zeregin bat ezin da bere azpiataza batekin estekatu." earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Hautatu mesedez Index: redmine-3.3.1/config/locales/fa.yml =================================================================== --- redmine-3.3.1.orig/config/locales/fa.yml +++ redmine-3.3.1/config/locales/fa.yml @@ -130,6 +130,7 @@ fa: circular_dependency: "اÛÙ ÙØ§Ø¨Ø³ØªÚ¯Û ÛÚ© ÙØ§Ø¨Ø³ØªÚ¯Û Ø¯Ø§ÛØ±Ù ÙØ§Ø± Ø®ÙØ§Ùد ساخت" cant_link_an_issue_with_a_descendant: "ÛÚ© Ù ÙØ±Ø¯ ÙÙ ÛâØªÙØ§Ùد ب٠ÛÚ©Û Ø§Ø² Ø²ÛØ± Ú©Ø§Ø±ÙØ§ÛØ´ Ù¾ÛÙÙØ¯ Ø¨Ø®ÙØ±Ø¯" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: گزÛÙØ´ Ú©ÙÛØ¯ Index: redmine-3.3.1/config/locales/fi.yml =================================================================== --- redmine-3.3.1.orig/config/locales/fi.yml +++ redmine-3.3.1/config/locales/fi.yml @@ -155,6 +155,7 @@ fi: circular_dependency: "Tämä suhde loisi kehän." cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Valitse, ole hyvä Index: redmine-3.3.1/config/locales/fr.yml =================================================================== --- redmine-3.3.1.orig/config/locales/fr.yml +++ redmine-3.3.1/config/locales/fr.yml @@ -150,6 +150,7 @@ fr: circular_dependency: "Cette relation créerait une dépendance circulaire" cant_link_an_issue_with_a_descendant: "Une demande ne peut pas être liée à l'une de ses sous-tâches" earlier_than_minimum_start_date: "ne peut pas être antérieure au %{date} à cause des demandes qui précèdent" + open_issue_with_closed_parent: "Une demande ouverte ne peut pas être rattachée à une demande fermée" actionview_instancetag_blank_option: Choisir Index: redmine-3.3.1/config/locales/gl.yml =================================================================== --- redmine-3.3.1.orig/config/locales/gl.yml +++ redmine-3.3.1/config/locales/gl.yml @@ -159,6 +159,7 @@ gl: circular_dependency: "Esta relación poderÃa crear unha dependencia circular" cant_link_an_issue_with_a_descendant: "As peticións non poden estar ligadas coas súas subtarefas" earlier_than_minimum_start_date: "Non pode ser antes de %{date} por mor de peticións anteriores" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Por favor seleccione Index: redmine-3.3.1/config/locales/he.yml =================================================================== --- redmine-3.3.1.orig/config/locales/he.yml +++ redmine-3.3.1/config/locales/he.yml @@ -135,6 +135,7 @@ he: circular_dependency: "קשר ×× ×צ×ר ת××ת ××¢×××ת" cant_link_an_issue_with_a_descendant: "×× × ××ª× ×קשר × ××©× ×תת־×ש××× ×©××" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ××ר ×××§×©× Index: redmine-3.3.1/config/locales/hr.yml =================================================================== --- redmine-3.3.1.orig/config/locales/hr.yml +++ redmine-3.3.1/config/locales/hr.yml @@ -125,6 +125,7 @@ hr: circular_dependency: "Ovaj relacija stvara kružnu ovisnost" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Molimo odaberite Index: redmine-3.3.1/config/locales/hu.yml =================================================================== --- redmine-3.3.1.orig/config/locales/hu.yml +++ redmine-3.3.1/config/locales/hu.yml @@ -151,6 +151,7 @@ circular_dependency: "Ez a kapcsolat egy körkörös függÅséget eredményez" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Kérem válasszon Index: redmine-3.3.1/config/locales/id.yml =================================================================== --- redmine-3.3.1.orig/config/locales/id.yml +++ redmine-3.3.1/config/locales/id.yml @@ -130,6 +130,7 @@ id: circular_dependency: "kaitan ini akan menghasilkan circular dependency" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Silakan pilih Index: redmine-3.3.1/config/locales/it.yml =================================================================== --- redmine-3.3.1.orig/config/locales/it.yml +++ redmine-3.3.1/config/locales/it.yml @@ -135,6 +135,7 @@ it: circular_dependency: "Questa relazione creerebbe una dipendenza circolare" cant_link_an_issue_with_a_descendant: "Una segnalazione non può essere collegata a una delle sue discendenti" earlier_than_minimum_start_date: "non può essere precedente a %{date} a causa di una precedente segnalazione" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Scegli Index: redmine-3.3.1/config/locales/ja.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ja.yml +++ redmine-3.3.1/config/locales/ja.yml @@ -151,6 +151,7 @@ ja: circular_dependency: "ãã®é¢ä¿ã§ã¯ã循ç°ä¾åã«ãªãã¾ã" cant_link_an_issue_with_a_descendant: "親åé¢ä¿ã«ãããã±ããéã§ã®é¢é£ã®è¨å®ã¯ã§ãã¾ãã" earlier_than_minimum_start_date: "ã%{date}ããåã«ãããã¨ã¯ã§ãã¾ãããå è¡ãããã±ãããããã¾ã" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: é¸ãã§ãã ãã Index: redmine-3.3.1/config/locales/ko.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ko.yml +++ redmine-3.3.1/config/locales/ko.yml @@ -177,6 +177,7 @@ ko: circular_dependency: "ì´ ê´ê³ë ìí ìì¡´ê´ê³ë¥¼ ë§ë¤ ì ììµëë¤" cant_link_an_issue_with_a_descendant: "ì¼ê°ì íì ì¼ê°ê³¼ ì°ê²°í ì ììµëë¤." earlier_than_minimum_start_date: "ììë ì§ %{date}ë³´ë¤ ìì ìê°ì¼ë¡ ì¤ì í ì ììµëë¤." + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ì ííì¸ì Index: redmine-3.3.1/config/locales/lt.yml =================================================================== --- redmine-3.3.1.orig/config/locales/lt.yml +++ redmine-3.3.1/config/locales/lt.yml @@ -134,6 +134,7 @@ lt: circular_dependency: "Å is ryÅ¡ys sukurtų ciklinÄ priklausomybÄ" cant_link_an_issue_with_a_descendant: "Darbas negali bÅ«ti susietas su viena iÅ¡ savo darbo dalių" earlier_than_minimum_start_date: "negali bÅ«ti anksÄiau už %{date} dÄl ankstesnių darbų" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: PraÅ¡om parinkti Index: redmine-3.3.1/config/locales/lv.yml =================================================================== --- redmine-3.3.1.orig/config/locales/lv.yml +++ redmine-3.3.1/config/locales/lv.yml @@ -124,6 +124,7 @@ lv: circular_dependency: "Å Ä« relÄcija radÄ«tu ciklisku atkarÄ«bu" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: IzvÄlieties Index: redmine-3.3.1/config/locales/mk.yml =================================================================== --- redmine-3.3.1.orig/config/locales/mk.yml +++ redmine-3.3.1/config/locales/mk.yml @@ -131,6 +131,7 @@ mk: circular_dependency: "Ðваа вÑÑка Ñе кÑеиÑа кÑÑжна завиÑноÑÑ" cant_link_an_issue_with_a_descendant: "ÐадаÑа неможе да Ñе повÑзе Ñо една од неÑзиниÑе подзадаÑи" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ÐзбеÑеÑе Index: redmine-3.3.1/config/locales/mn.yml =================================================================== --- redmine-3.3.1.orig/config/locales/mn.yml +++ redmine-3.3.1/config/locales/mn.yml @@ -130,6 +130,7 @@ mn: circular_dependency: "ÐÐ½Ñ Ñ Ð°ÑÑÑаа Ð½Ñ Ð³Ð¸Ð½Ð¶Ð¸Ð½(ÑекÑÑÑив) Ñ Ð°ÑÑÑаа Ò¯Ò¯ÑгÑÑ Ñм байна" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Сонгоно ÑÑ Index: redmine-3.3.1/config/locales/nl.yml =================================================================== --- redmine-3.3.1.orig/config/locales/nl.yml +++ redmine-3.3.1/config/locales/nl.yml @@ -128,6 +128,7 @@ nl: circular_dependency: "Deze relatie zou een circulaire afhankelijkheid tot gevolg hebben" cant_link_an_issue_with_a_descendant: "Een issue kan niet gelinked worden met een subtask" earlier_than_minimum_start_date: "kan niet eerder zijn dan %{date} wegens voorafgaande issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Selecteer Index: redmine-3.3.1/config/locales/no.yml =================================================================== --- redmine-3.3.1.orig/config/locales/no.yml +++ redmine-3.3.1/config/locales/no.yml @@ -119,6 +119,7 @@ circular_dependency: "Denne relasjonen ville lagd en sirkulær avhengighet" cant_link_an_issue_with_a_descendant: "En sak kan ikke kobles mot en av sine undersaker" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Vennligst velg Index: redmine-3.3.1/config/locales/pl.yml =================================================================== --- redmine-3.3.1.orig/config/locales/pl.yml +++ redmine-3.3.1/config/locales/pl.yml @@ -138,6 +138,7 @@ pl: circular_dependency: "Ta relacja może wytworzyÄ zapÄtlonÄ zależnoÅÄ" cant_link_an_issue_with_a_descendant: "Zagadnienie nie może zostaÄ powiÄ zane z jednym z wÅasnych podzagadnieÅ" earlier_than_minimum_start_date: "nie może byÄ wczeÅniej niż %{date} z powodu poprzedajÄ cych zagadnieÅ" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" support: array: Index: redmine-3.3.1/config/locales/pt-BR.yml =================================================================== --- redmine-3.3.1.orig/config/locales/pt-BR.yml +++ redmine-3.3.1/config/locales/pt-BR.yml @@ -150,6 +150,7 @@ pt-BR: circular_dependency: "Esta relação geraria uma dependência circular" cant_link_an_issue_with_a_descendant: "Uma tarefa não pode ser relaciona a uma de suas subtarefas" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Selecione Index: redmine-3.3.1/config/locales/pt.yml =================================================================== --- redmine-3.3.1.orig/config/locales/pt.yml +++ redmine-3.3.1/config/locales/pt.yml @@ -139,6 +139,7 @@ pt: circular_dependency: "Esta relação iria criar uma dependência circular" cant_link_an_issue_with_a_descendant: "Não é possÃvel ligar uma tarefa a uma sub-tarefa que lhe é pertencente" earlier_than_minimum_start_date: "não pode ser antes de %{date} devido a tarefas precedentes" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Selecione Index: redmine-3.3.1/config/locales/ro.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ro.yml +++ redmine-3.3.1/config/locales/ro.yml @@ -125,6 +125,7 @@ ro: circular_dependency: "AceastÄ relaÈie ar crea o dependenÈÄ circularÄ" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: SelectaÈi Index: redmine-3.3.1/config/locales/ru.yml =================================================================== --- redmine-3.3.1.orig/config/locales/ru.yml +++ redmine-3.3.1/config/locales/ru.yml @@ -207,6 +207,7 @@ ru: circular_dependency: "Ð¢Ð°ÐºÐ°Ñ ÑвÑÐ·Ñ Ð¿ÑÐ¸Ð²ÐµÐ´ÐµÑ Ðº ÑиклиÑеÑкой завиÑимоÑÑи" cant_link_an_issue_with_a_descendant: "ÐадаÑа не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ ÑвÑзана Ñо Ñвоей подзадаÑей" earlier_than_minimum_start_date: "не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ ÑанÑÑе %{date} из-за пÑедÑдÑÑÐ¸Ñ Ð·Ð°Ð´Ð°Ñ" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" support: array: Index: redmine-3.3.1/config/locales/sk.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sk.yml +++ redmine-3.3.1/config/locales/sk.yml @@ -129,6 +129,7 @@ sk: circular_dependency: "Tento vzÅ¥ah by vytvoril cyklickú závislosÅ¥" cant_link_an_issue_with_a_descendant: "Nemožno prepojiÅ¥ úlohu s niektorou z podúloh" earlier_than_minimum_start_date: "nemôže byÅ¥ skoršà ako %{date} z dôvodu nadväznosti na predchádzajúce úlohy" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Vyberte Index: redmine-3.3.1/config/locales/sl.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sl.yml +++ redmine-3.3.1/config/locales/sl.yml @@ -129,6 +129,7 @@ sl: circular_dependency: "Ta odnos bi povzroÄil krožno odvisnost" cant_link_an_issue_with_a_descendant: "Zahtevek ne more biti povezan s svojo podnalogo" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Prosimo izberite Index: redmine-3.3.1/config/locales/sq.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sq.yml +++ redmine-3.3.1/config/locales/sq.yml @@ -130,6 +130,7 @@ sq: circular_dependency: "Ky relacion do te krijoje nje varesi ciklike (circular dependency)" cant_link_an_issue_with_a_descendant: "Nje ceshtje nuk mund te lidhet me nenceshtje" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Zgjidhni Index: redmine-3.3.1/config/locales/sr-YU.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sr-YU.yml +++ redmine-3.3.1/config/locales/sr-YU.yml @@ -133,6 +133,7 @@ sr-YU: circular_dependency: "Ova veza Äe stvoriti kružnu referencu" cant_link_an_issue_with_a_descendant: "Problem ne može biti povezan sa jednim od svojih podzadataka" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Molim odaberite Index: redmine-3.3.1/config/locales/sr.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sr.yml +++ redmine-3.3.1/config/locales/sr.yml @@ -131,6 +131,7 @@ sr: circular_dependency: "Ðва веза Ñе ÑÑвоÑиÑи кÑÑÐ¶Ð½Ñ ÑеÑеÑенÑÑ" cant_link_an_issue_with_a_descendant: "ÐÑоблем не може биÑи повезан Ñа Ñедним од ÑвоÑÐ¸Ñ Ð¿Ð¾Ð´Ð·Ð°Ð´Ð°Ñака" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: Ðолим одабеÑиÑе Index: redmine-3.3.1/config/locales/sv.yml =================================================================== --- redmine-3.3.1.orig/config/locales/sv.yml +++ redmine-3.3.1/config/locales/sv.yml @@ -135,6 +135,7 @@ sv: circular_dependency: "Denna relation skulle skapa ett cirkulärt beroende" cant_link_an_issue_with_a_descendant: "Ett ärende kan inte länkas till ett av dess underärenden" earlier_than_minimum_start_date: "kan inte vara tidigare än% {datum} pÃ¥ grund av föregÃ¥ende ärenden" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" direction: ltr date: Index: redmine-3.3.1/config/locales/th.yml =================================================================== --- redmine-3.3.1.orig/config/locales/th.yml +++ redmine-3.3.1/config/locales/th.yml @@ -128,6 +128,7 @@ th: circular_dependency: "à¸à¸§à¸²à¸¡à¸ªà¸±à¸¡à¸à¸±à¸à¸à¹à¸à¹à¸²à¸à¸à¸´à¸à¹à¸à¹à¸à¸§à¸à¸à¸¥à¸¡" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: à¸à¸£à¸¸à¸à¸²à¹à¸¥à¸·à¸à¸ Index: redmine-3.3.1/config/locales/tr.yml =================================================================== --- redmine-3.3.1.orig/config/locales/tr.yml +++ redmine-3.3.1/config/locales/tr.yml @@ -144,6 +144,7 @@ tr: circular_dependency: "Bu iliÅki döngüsel baÄımlılık meydana getirecektir" cant_link_an_issue_with_a_descendant: "Bir iÅ, alt iÅlerinden birine baÄlanamaz" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" models: actionview_instancetag_blank_option: Lütfen Seçin Index: redmine-3.3.1/config/locales/uk.yml =================================================================== --- redmine-3.3.1.orig/config/locales/uk.yml +++ redmine-3.3.1/config/locales/uk.yml @@ -128,6 +128,7 @@ uk: circular_dependency: "Такий зв'Ñзок пÑиведе до ÑиклÑÑÐ½Ð¾Ñ Ð·Ð°Ð»ÐµÐ¶Ð½Ð¾ÑÑÑ" cant_link_an_issue_with_a_descendant: "An issue can not be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: ÐбеÑÑÑÑ Index: redmine-3.3.1/config/locales/vi.yml =================================================================== --- redmine-3.3.1.orig/config/locales/vi.yml +++ redmine-3.3.1/config/locales/vi.yml @@ -145,6 +145,7 @@ vi: circular_dependency: "quan há» có thá» gây ra lặp vô táºn" 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ó" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" direction: ltr date: Index: redmine-3.3.1/config/locales/zh-TW.yml =================================================================== --- redmine-3.3.1.orig/config/locales/zh-TW.yml +++ redmine-3.3.1/config/locales/zh-TW.yml @@ -187,6 +187,7 @@ circular_dependency: "éåéè¯æå°è´ç°çç¸ä¾" cant_link_an_issue_with_a_descendant: "è°é¡ç¡æ³è¢«é£çµè³èªå·±çåä»»å" earlier_than_minimum_start_date: "ä¸è½æ©æ¼ %{date} å çºæåç½®è°é¡" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" # You can define own errors for models or model attributes. # The values :model, :attribute and :value are always available for interpolation. Index: redmine-3.3.1/config/locales/zh.yml =================================================================== --- redmine-3.3.1.orig/config/locales/zh.yml +++ redmine-3.3.1/config/locales/zh.yml @@ -134,6 +134,7 @@ zh: circular_dependency: "æ¤å ³èå°å¯¼è´å¾ªç¯ä¾èµ" cant_link_an_issue_with_a_descendant: "é®é¢ä¸è½å ³èå°å®çåä»»å¡" earlier_than_minimum_start_date: "ä¸è½æ©äº %{date} ç±äºæåç½®é®é¢" + open_issue_with_closed_parent: "An open issue cannot be attached to a closed parent task" actionview_instancetag_blank_option: è¯·éæ© Index: redmine-3.3.1/test/unit/issue_subtasking_test.rb =================================================================== --- redmine-3.3.1.orig/test/unit/issue_subtasking_test.rb +++ redmine-3.3.1/test/unit/issue_subtasking_test.rb @@ -310,4 +310,13 @@ class IssueSubtaskingTest < ActiveSuppor parent.generate_child!(:estimated_hours => 7) assert_equal 12, parent.reload.total_estimated_hours end + + def test_open_issue_with_closed_parent_should_not_validate + parent = Issue.generate!(:status_id => 5) + child = Issue.generate! + + child.parent_issue_id = parent.id + assert !child.save + assert_include I18n.t("activerecord.errors.messages.open_issue_with_closed_parent"), child.errors.full_messages + end end Index: redmine-3.3.1/test/unit/issue_test.rb =================================================================== --- redmine-3.3.1.orig/test/unit/issue_test.rb +++ redmine-3.3.1/test/unit/issue_test.rb @@ -1948,6 +1948,24 @@ class IssueTest < ActiveSupport::TestCas assert !closed_statuses.empty? end + def test_parent_issues_with_open_subtask_dont_allow_closed_statuses + parent = Issue.generate! + child = Issue.generate!(:parent_issue_id => parent.id) + + allowed_statuses = parent.reload.new_statuses_allowed_to(users(:users_002)) + assert allowed_statuses.any? + assert_equal [], allowed_statuses.select(&:is_closed?) + end + + def test_parent_issues_with_closed_subtask_allow_closed_statuses + parent = Issue.generate! + child = Issue.generate!(:parent_issue_id => parent.id, :status_id => 5) + + allowed_statuses = parent.reload.new_statuses_allowed_to(users(:users_002)) + assert allowed_statuses.any? + assert allowed_statuses.select(&:is_closed?).any? + end + def test_reschedule_an_issue_without_dates with_settings :non_working_week_days => [] do issue = Issue.new(:start_date => nil, :due_date => nil)