<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml
index 0778d81..cd95e4a 100644
--- a/app/views/projects/roadmap.rhtml
+++ b/app/views/projects/roadmap.rhtml
@@ -10,19 +10,19 @@
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
- <% issues = version.fixed_issues.find(:all,
- :include => [:status, :tracker],
- :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
- :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") unless @selected_tracker_ids.empty?
+ <%
+ unless @selected_tracker_ids.empty?
+ issues = version.fixed_issues.find(:all,
+ :include => [:status, :tracker],
+ :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
+ :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
+ issues = Issue.find_with_parents( issues.collect { |i| i.id })
+ end
issues ||= []
%>
<% if issues.size > 0 %>
<% end %>
<% end %>
diff --git a/config/.gitignore b/config/.gitignore
new file mode 100644
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644
diff --git a/config/environments/warecorp_redmine.rb b/config/environments/warecorp_redmine.rb
new file mode 100644
diff --git a/config/environments/warecorp_redmine_test.rb b/config/environments/warecorp_redmine_test.rb
new file mode 100644
diff --git a/db/.gitignore b/db/.gitignore
new file mode 100644
diff --git a/files/.gitignore b/files/.gitignore
new file mode 100644
diff --git a/lang/bg.yml b/lang/bg.yml
index ae345f9..50d7f29 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -119,6 +119,7 @@ field_due_date: Крайна дата
field_assigned_to: Възложена на
field_priority: Приоритет
field_fixed_version: Планувана версия
+field_parent_issue: Child of
field_user: Потребител
field_role: Роля
field_homepage: Начална страница
@@ -396,6 +397,8 @@ label_blocks: блокира
label_blocked_by: блокирана от
label_precedes: предшества
label_follows: изпълнява се след
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -618,6 +621,7 @@ label_overall_activity: Цялостна дейност
setting_default_projects_public: Новите проекти са публични по подразбиране
error_scm_annotate: "Обектът не съществува или не може да бъде анотиран."
label_planning: Планиране
+error_issue_can_have_only_one_parent: allows only one relationship (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -692,3 +696,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/ca.yml b/lang/ca.yml
index 5264953..6c409cd 100644
--- a/lang/ca.yml
+++ b/lang/ca.yml
@@ -693,3 +693,8 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/cs.yml b/lang/cs.yml
index d195456..7398c4d 100644
--- a/lang/cs.yml
+++ b/lang/cs.yml
@@ -133,6 +133,7 @@ field_due_date: Uzavřít do
field_assigned_to: Přiřazeno
field_priority: Priorita
field_fixed_version: Přiřazeno k verzi
+field_parent_issue: Child of
field_user: Uživatel
field_role: Role
field_homepage: Homepage
@@ -453,6 +454,8 @@ label_blocks: bloků
label_blocked_by: zablokován
label_precedes: předchází
label_follows: následuje
+label_parents: child of
+label_children: parent of
label_end_to_start: od konce do začátku
label_end_to_end: od konce do konce
label_start_to_start: od začátku do začátku
@@ -623,6 +626,7 @@ enumeration_doc_categories: Kategorie dokumentů
enumeration_activities: Aktivity (sledování času)
error_scm_annotate: "Položka neexistuje nebo nemůže být komentována."
label_planning: Plánování
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -697,3 +701,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/da.yml b/lang/da.yml
index b5dbe6b..53baef6 100644
--- a/lang/da.yml
+++ b/lang/da.yml
@@ -133,6 +133,7 @@ field_due_date: Deadline
field_assigned_to: Tildelt til
field_priority: Prioritet
field_fixed_version: Planlagt version
+field_parent_issue: Child of
field_user: Bruger
field_role: Rolle
field_homepage: Hjemmeside
@@ -463,6 +464,8 @@ label_blocks: blokerer
label_blocked_by: blokeret af
label_precedes: kommer før
label_follows: følger
+label_parents: child of
+label_children: parent of
label_end_to_start: slut til start
label_end_to_end: slut til slut
label_start_to_start: start til start
@@ -524,6 +527,7 @@ label_preferences: Indstillinger
label_chronological_order: I kronologisk rækkefølge
label_reverse_chronological_order: I omvendt kronologisk rækkefølge
label_planning: Planlægning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
label_incoming_emails: Indkommende e-mails
label_generate_key: Generer en nøgle
label_issue_watchers: Overvågere
@@ -693,3 +697,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/de.yml b/lang/de.yml
index a621ecf..4f0f8bc 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -133,6 +133,7 @@ field_due_date: Abgabedatum
field_assigned_to: Zugewiesen an
field_priority: Priorität
field_fixed_version: Zielversion
+field_parent_issue: Child of
field_user: Benutzer
field_role: Rolle
field_homepage: Projekt-Homepage
@@ -514,6 +515,8 @@ label_blocks: Blockiert
label_blocked_by: Blockiert durch
label_precedes: Vorgänger von
label_follows: folgt
+label_parents: child of
+label_children: parent of
label_end_to_start: Ende - Anfang
label_end_to_end: Ende - Ende
label_start_to_start: Anfang - Anfang
@@ -694,3 +697,7 @@ default_activity_development: Entwicklung
enumeration_issue_priorities: Ticket-Prioritäten
enumeration_doc_categories: Dokumentenkategorien
enumeration_activities: Aktivitäten (Zeiterfassung)
+
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
+
+button_add_subissue: Add sub-issue
diff --git a/lang/en.yml b/lang/en.yml
index 245663f..9ab326c 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -133,6 +133,7 @@ field_due_date: Due date
field_assigned_to: Assigned to
field_priority: Priority
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: User
field_role: Role
field_homepage: Homepage
@@ -514,6 +515,8 @@ label_blocks: blocks
label_blocked_by: blocked by
label_precedes: precedes
label_follows: follows
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -590,6 +593,7 @@ button_create: Create
button_test: Test
button_edit: Edit
button_add: Add
+button_add_subissue: Add sub-issue
button_change: Change
button_apply: Apply
button_clear: Clear
@@ -627,6 +631,7 @@ text_select_mail_notifications: Select actions for which email notifications sho
text_regexp_info: eg. ^[A-Z0-9]+$
text_min_max_length_info: 0 means no restriction
text_project_destroy_confirmation: Are you sure you want to delete this project and related data ?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
text_workflow_edit: Select a role and a tracker to edit the workflow
text_are_you_sure: Are you sure ?
diff --git a/lang/es.yml b/lang/es.yml
index efef0d5..d8f0b0f 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -137,8 +137,6 @@ field_hours: Horas
field_identifier: Identificador
field_is_closed: Petición resuelta
field_is_default: Estado por defecto
-field_is_filter: Usado como filtro
-field_is_for_all: Para todos los proyectos
field_is_in_chlog: Consultar las peticiones en el histórico
field_is_in_roadmap: Consultar las peticiones en el roadmap
field_is_public: Público
@@ -185,6 +183,8 @@ field_url: URL
field_user: Usuario
field_value: Valor
field_version: Versión
+field_parent: Proyecto padre
+field_parent_issue: Child of
general_csv_decimal_separator: ','
general_csv_encoding: ISO-8859-15
general_csv_separator: ';'
@@ -501,6 +501,8 @@ label_wiki_page_plural: Wiki páginas
label_workflow: Flujo de trabajo
label_year: Año
label_yesterday: ayer
+label_parents: child of
+label_children: parent of
mail_body_account_activation_request: "Un nuevo usuario (%s) ha sido registrado. Esta cuenta está pendiende de aprobación"
mail_body_account_information: Información sobre su cuenta
mail_body_account_information_external: Puede usar su cuenta "%s" para conectarse.
@@ -592,21 +594,9 @@ project_module_repository: Repositorio
project_module_time_tracking: Control de tiempo
project_module_wiki: Wiki
setting_activity_days_default: Días a mostrar en la actividad de proyecto
-setting_app_subtitle: Subtítulo de la aplicación
-setting_app_title: Título de la aplicación
-setting_attachment_max_size: Tamaño máximo del fichero
-setting_autofetch_changesets: Autorellenar los commits del repositorio
-setting_autologin: Conexión automática
-setting_bcc_recipients: Ocultar las copias de carbón (bcc)
-setting_commit_fix_keywords: Palabras clave para la corrección
-setting_commit_logs_encoding: Codificación de los mensajes de commit
-setting_commit_ref_keywords: Palabras clave para la referencia
-setting_cross_project_issue_relations: Permitir relacionar peticiones de distintos proyectos
-setting_date_format: Formato de la fecha
-setting_default_language: Idioma por defecto
-setting_default_projects_public: Los proyectos nuevos son públicos por defecto
-setting_display_subprojects_issues: Mostrar peticiones de un subproyecto en el proyecto padre por defecto
-setting_emails_footer: Pie de mensajes
+
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
+
setting_enabled_scm: Activar SCM
setting_feeds_limit: Límite de contenido para sindicación
setting_gravatar_enabled: Usar iconos de usuario (Gravatar)
@@ -677,3 +667,21 @@ text_user_mail_option: "En los proyectos no seleccionados, sólo recibirá notif
text_user_wrote: '%s escribió:'
text_wiki_destroy_confirmation: ¿Seguro que quiere borrar el wiki y todo su contenido?
text_workflow_edit: Seleccionar un flujo de trabajo para actualizar
+field_is_filter: Used as a filter
+setting_default_language: Default language
+setting_emails_footer: Emails footer
+setting_app_subtitle: Application subtitle
+button_add_subissue: Add sub-issue
+setting_cross_project_issue_relations: Allow cross-project issue relations
+setting_autofetch_changesets: Autofetch commits
+setting_attachment_max_size: Attachment max. size
+setting_app_title: Application title
+setting_date_format: Date format
+setting_default_projects_public: New projects are public by default
+setting_commit_fix_keywords: Fixing keywords
+setting_autologin: Autologin
+setting_display_subprojects_issues: Display subprojects issues on main projects by default
+setting_bcc_recipients: Blind carbon copy recipients (bcc)
+setting_commit_ref_keywords: Referencing keywords
+field_is_for_all: For all projects
+setting_commit_logs_encoding: Commit messages encoding
diff --git a/lang/fi.yml b/lang/fi.yml
index 5b2dc0e..6066fd5 100644
--- a/lang/fi.yml
+++ b/lang/fi.yml
@@ -692,3 +692,8 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/fr.yml b/lang/fr.yml
index 8b2defb..fbe4ace 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -133,6 +133,7 @@ field_due_date: Date d'échéance
field_assigned_to: Assigné à
field_priority: Priorité
field_fixed_version: Version cible
+field_parent_issue: Child of
field_user: Utilisateur
field_role: Rôle
field_homepage: Site web
@@ -514,6 +515,8 @@ label_blocks: bloque
label_blocked_by: bloqué par
label_precedes: précède
label_follows: suit
+label_parents: child of
+label_children: parent of
label_end_to_start: fin à début
label_end_to_end: fin à fin
label_start_to_start: début à début
@@ -627,6 +630,7 @@ text_select_mail_notifications: Actions pour lesquelles une notification par e-m
text_regexp_info: ex. ^[A-Z0-9]+$
text_min_max_length_info: 0 pour aucune restriction
text_project_destroy_confirmation: Etes-vous sûr de vouloir supprimer ce projet et toutes ses données ?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Ses sous-projets: %s seront également supprimés.'
text_workflow_edit: Sélectionner un tracker et un rôle pour éditer le workflow
text_are_you_sure: Etes-vous sûr ?
@@ -694,3 +698,4 @@ default_activity_development: Développement
enumeration_issue_priorities: Priorités des demandes
enumeration_doc_categories: Catégories des documents
enumeration_activities: Activités (suivi du temps)
+button_add_subissue: Add sub-issue
diff --git a/lang/he.yml b/lang/he.yml
index e7f70e7..969e838 100644
--- a/lang/he.yml
+++ b/lang/he.yml
@@ -121,6 +121,7 @@ field_due_date: תאריך סיום
field_assigned_to: מוצב ל
field_priority: עדיפות
field_fixed_version: גירסאת יעד
+field_parent_issue: Child of
field_user: מתשמש
field_role: תפקיד
field_homepage: דף הבית
@@ -618,6 +619,7 @@ label_overall_activity: פעילות כוללת
setting_default_projects_public: פרויקטים חדשים הינם פומביים כברירת מחדל
error_scm_annotate: "הכניסה לא קיימת או שלא ניתן לתאר אותה."
label_planning: תכנון
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -692,3 +694,6 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
diff --git a/lang/hu.yml b/lang/hu.yml
index 26b0237..226f82f 100644
--- a/lang/hu.yml
+++ b/lang/hu.yml
@@ -693,3 +693,8 @@ label_example: Példa
text_repository_usernames_mapping: "Állítsd be a felhasználó összerendeléseket a Redmine, és a tároló logban található felhasználók között.\nAz azonos felhasználó nevek összerendelése automatikusan megtörténik."
permission_edit_own_messages: Saját üzenetek szerkesztése
permission_delete_won_messages: Saját üzenetek törlése
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/it.yml b/lang/it.yml
index f442710..64aea06 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -119,6 +119,7 @@ field_due_date: Data ultima
field_assigned_to: Assegnato a
field_priority: Priorita'
field_fixed_version: Versione prevista
+field_parent_issue: Child of
field_user: Utente
field_role: Ruolo
field_homepage: Homepage
@@ -396,6 +397,8 @@ label_blocks: blocchi
label_blocked_by: bloccato da
label_precedes: precede
label_follows: segue
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -618,6 +621,7 @@ label_overall_activity: Attività generale
setting_default_projects_public: I nuovi progetti sono pubblici per default
error_scm_annotate: "L'oggetto non esiste o non può essere annotato."
label_planning: Pianificazione
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Anche i suoi sottoprogetti: %s verranno eliminati.'
label_and_its_subprojects: %s ed i suoi sottoprogetti
mail_body_reminder: "%d segnalazioni che ti sono state assegnate scadranno nei prossimi %d giorni:"
@@ -692,3 +696,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/ja.yml b/lang/ja.yml
index 347454b..b791f1c 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -120,6 +120,7 @@ field_due_date: 期限日
field_assigned_to: 担当者
field_priority: 優先度
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: ユーザ
field_role: 役割
field_homepage: ホームページ
@@ -397,6 +398,8 @@ label_blocks: ブロックしている
label_blocked_by: ブロックされている
label_precedes: 先行する
label_follows: 後続する
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -620,6 +623,7 @@ label_overall_activity: 全ての活動
setting_default_projects_public: デフォルトで新しいプロジェクトは公開にする
error_scm_annotate: "エントリが存在しない、もしくはアノテートできません。"
label_planning: 計画
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'サブプロジェクト %s も削除されます。'
label_and_its_subprojects: %s とサブプロジェクト
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -693,3 +697,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/ko.yml b/lang/ko.yml
index 498572f..7e7433f 100644
--- a/lang/ko.yml
+++ b/lang/ko.yml
@@ -121,6 +121,7 @@ field_due_date: 완료 기한
field_assigned_to: 담당자
field_priority: 우선순위
field_fixed_version: 목표 버전
+field_parent_issue: Child of
field_user: 유저
field_role: 역할
field_homepage: 홈페이지
@@ -403,6 +404,8 @@ label_blocks: 다음 이슈가 해결을 막고 있음.
label_blocked_by: 막고 있는 이슈
label_precedes: 다음 이슈보다 앞서서 처리해야 함.
label_follows: 선처리 이슈
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -618,6 +621,7 @@ label_overall_activity: 전체 진행 상황
setting_default_projects_public: 신규 프로젝트를 Public 으로 설정
error_scm_annotate: "The entry does not exist or can not be annotated."
label_planning: 계획(Planning)
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -692,3 +696,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/lt.yml b/lang/lt.yml
index bcec2b3..36a5176 100644
--- a/lang/lt.yml
+++ b/lang/lt.yml
@@ -127,6 +127,7 @@ field_due_date: Užbaigimo data
field_assigned_to: Paskirtas
field_priority: Prioritetas
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: Vartotojas
field_role: Vaidmuo
field_homepage: Pagrindinis puslapis
@@ -415,6 +416,8 @@ label_blocks: blokai
label_blocked_by: blokuotas
label_precedes: įvyksta pirma
label_follows: seka
+label_parents: child of
+label_children: parent of
label_end_to_start: užbaigti, kad pradėti
label_end_to_end: užbaigti, kad pabaigti
label_start_to_start: pradėkite pradėti
@@ -619,6 +622,7 @@ label_overall_activity: Visa veikla
setting_default_projects_public: Naujas projektas viešas pagal nutylėjimą
error_scm_annotate: "Įrašas neegzituoja arba negalima jo atvaizduoti."
label_planning: Planavimas
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Šis(ie) subprojektas(ai): %s taip pat bus ištrintas(i).'
label_and_its_subprojects: %s projektas ir jo subprojektai
@@ -694,3 +698,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/nl.yml b/lang/nl.yml
index 0353419..dfab8a7 100644
--- a/lang/nl.yml
+++ b/lang/nl.yml
@@ -119,6 +119,7 @@ field_due_date: Verwachte datum gereed
field_assigned_to: Toegewezen aan
field_priority: Prioriteit
field_fixed_version: Doel versie
+field_parent_issue: Child of
field_user: Gebruiker
field_role: Rol
field_homepage: Homepage
@@ -396,6 +397,8 @@ label_blocks: blokkeert
label_blocked_by: geblokkeerd door
label_precedes: gaat vooraf aan
label_follows: volgt op
+label_parents: child of
+label_children: parent of
label_end_to_start: eind tot start
label_end_to_end: eind tot eind
label_start_to_start: start tot start
@@ -620,6 +623,7 @@ label_overall_activity: Activiteit
setting_default_projects_public: Nieuwe projecten zijn standaard publiek
error_scm_annotate: "Er kan geen commentaar toegevoegd worden."
label_planning: Planning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'De subprojecten: %s zullen ook verwijderd worden.'
label_and_its_subprojects: %s en zijn subprojecten.
mail_body_reminder: "%d issue(s) die aan u toegewezen zijn en voldaan moeten zijn in de komende %d dagen:"
@@ -694,3 +698,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/no.yml b/lang/no.yml
index d677923..4dc40da 100644
--- a/lang/no.yml
+++ b/lang/no.yml
@@ -132,6 +132,7 @@ field_due_date: Frist
field_assigned_to: Tildelt til
field_priority: Prioritet
field_fixed_version: Mål-versjon
+field_parent_issue: Child of
field_user: Bruker
field_role: Rolle
field_homepage: Hjemmeside
@@ -455,6 +456,8 @@ label_blocks: blokkerer
label_blocked_by: blokkert av
label_precedes: kommer før
label_follows: følger
+label_parents: child of
+label_children: parent of
label_end_to_start: slutt til start
label_end_to_end: slutt til slutt
label_start_to_start: start til start
@@ -563,6 +566,7 @@ text_select_mail_notifications: Velg hendelser som skal varsles med e-post.
text_regexp_info: eg. ^[A-Z0-9]+$
text_min_max_length_info: 0 betyr ingen begrensning
text_project_destroy_confirmation: Er du sikker på at du vil slette dette prosjekter og alle relatert data ?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Underprojekt(ene): %s vil også bli slettet.'
text_workflow_edit: Velg en rolle og en sakstype for å endre arbeidsflyten
text_are_you_sure: Er du sikker ?
@@ -693,3 +697,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/pl.yml b/lang/pl.yml
index 265baee..26f3465 100644
--- a/lang/pl.yml
+++ b/lang/pl.yml
@@ -221,6 +221,7 @@ gui_validation_error: 1 błąd
gui_validation_error_plural234: %d błędy
gui_validation_error_plural5: %d błędów
gui_validation_error_plural: %d błędów
+
label_activity: Aktywność
label_add_another_file: Dodaj kolejny plik
label_add_note: Dodaj notatkę
@@ -711,3 +712,8 @@ text_user_wrote: '%s napisał:'
text_wiki_destroy_confirmation: Jesteś pewien, że chcesz usunąć to wiki i całą jego zawartość ?
text_workflow_edit: Zaznacz rolę i typ zagadnienia do edycji przepływu
+field_parent_issue: Child of
+label_parents: child of
+label_children: parent of
+button_add_subissue: Add sub-issue
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index 299a139..806dba2 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -132,6 +132,7 @@ field_due_date: Data prevista
field_assigned_to: Atribuído para
field_priority: Prioridade
field_fixed_version: Versão
+field_parent_issue: Filha de
field_user: Usuário
field_role: Papel
field_homepage: Página inicial
@@ -460,6 +461,8 @@ label_blocks: bloqueia
label_blocked_by: bloqueado por
label_precedes: precede
label_follows: segue
+label_parents: filha de
+label_children: mãe de
label_end_to_start: fim para o início
label_end_to_end: fim para fim
label_start_to_start: início para início
@@ -693,3 +696,5 @@ label_example: Exemplo
text_repository_usernames_mapping: "Seleciona ou atualiza os usuários do Redmine mapeando para cada usuário encontrado no log do repositório.\nUsuários com o mesmo login ou email no Redmine e no repositório serão mapeados automaticamente."
permission_edit_own_messages: Editar próprias mensagens
permission_delete_won_messages: Excluir próprias mensagens
+button_add_subissue: Add sub-issue
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/pt.yml b/lang/pt.yml
index 310d2c3..4a0e005 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -134,6 +134,7 @@ field_due_date: Data final
field_assigned_to: Atribuído a
field_priority: Prioridade
field_fixed_version: Versão
+field_parent_issue: Child of
field_user: Utilizador
field_role: Papel
field_homepage: Página
@@ -464,6 +465,8 @@ label_blocks: bloqueia
label_blocked_by: bloqueado por
label_precedes: precede
label_follows: segue
+label_parents: child of
+label_children: parent of
label_end_to_start: fim a início
label_end_to_end: fim a fim
label_start_to_start: início a início
@@ -525,6 +528,7 @@ label_preferences: Preferências
label_chronological_order: Em ordem cronológica
label_reverse_chronological_order: Em ordem cronológica inversa
label_planning: Planeamento
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
label_incoming_emails: E-mails a chegar
label_generate_key: Gerar uma chave
label_issue_watchers: Observadores
@@ -694,3 +698,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/ro.yml b/lang/ro.yml
index cc1d9bc..05f2e58 100644
--- a/lang/ro.yml
+++ b/lang/ro.yml
@@ -119,6 +119,7 @@ field_due_date: Data finalizarii
field_assigned_to: Atribuit pentru
field_priority: Prioritate
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: Utilizator
field_role: Rol
field_homepage: Pagina principala
@@ -394,6 +395,8 @@ label_blocks: blocuri
label_blocked_by: blocat de
label_precedes: precedes
label_follows: follows
+label_parents: child of
+label_children: parent of
label_end_to_start: de la sfarsit la capat
label_end_to_end: de la sfarsit la sfarsit
label_start_to_start: de la capat la capat
@@ -618,6 +621,7 @@ label_overall_activity: Overall activity
setting_default_projects_public: New projects are public by default
error_scm_annotate: "The entry does not exist or can not be annotated."
label_planning: Planning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -692,3 +696,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/ru.yml b/lang/ru.yml
index 8ad4543..d625641 100644
--- a/lang/ru.yml
+++ b/lang/ru.yml
@@ -145,6 +145,7 @@ field_filename: Файл
field_filesize: Размер
field_firstname: Имя
field_fixed_version: Версия
+field_parent_issue: Child of
field_hide_mail: Скрывать мой email
field_homepage: Стартовая страница
field_host: Компьютер
@@ -725,3 +726,7 @@ text_user_mail_option: "Для невыбранных проектов, Вы б
text_user_wrote: '%s написал(а):'
text_wiki_destroy_confirmation: Вы уверены, что хотите удалить данную Wiki и все ее содержимое?
text_workflow_edit: Выберите роль и трекер для редактирования последовательности состояний
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/sk.yml b/lang/sk.yml
index 44085db..f617e95 100644
--- a/lang/sk.yml
+++ b/lang/sk.yml
@@ -698,3 +698,8 @@ label_example: Príklad
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/sr.yml b/lang/sr.yml
index 1f555c4..033971c 100644
--- a/lang/sr.yml
+++ b/lang/sr.yml
@@ -123,6 +123,7 @@ field_due_date: Do datuma
field_assigned_to: Dodeljeno
field_priority: Prioritet
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: Korisnik
field_role: Uloga
field_homepage: Homepage
@@ -406,6 +407,8 @@ label_blocks: blokira
label_blocked_by: blokiran od strane
label_precedes: prethodi
label_follows: sledi
+label_parents: child of
+label_children: parent of
label_end_to_start: od kraja do početka
label_end_to_end: od kraja do kraja
label_start_to_start: od početka do pocetka
@@ -619,6 +622,7 @@ label_overall_activity: Overall activity
setting_default_projects_public: New projects are public by default
error_scm_annotate: "The entry does not exist or can not be annotated."
label_planning: Planning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -693,3 +697,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/sv.yml b/lang/sv.yml
index 530838a..b77d39e 100644
--- a/lang/sv.yml
+++ b/lang/sv.yml
@@ -119,6 +119,7 @@ field_due_date: Färdigdatum
field_assigned_to: Tilldelad
field_priority: Prioritet
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: Användare
field_role: Roll
field_homepage: Hemsida
@@ -396,6 +397,8 @@ label_blocks: blocks
label_blocked_by: blocked by
label_precedes: precedes
label_follows: follows
+label_parents: child of
+label_children: parent of
label_end_to_start: end to start
label_end_to_end: end to end
label_start_to_start: start to start
@@ -619,6 +622,7 @@ label_overall_activity: Overall activity
setting_default_projects_public: New projects are public by default
error_scm_annotate: "The entry does not exist or can not be annotated."
label_planning: Planning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -693,3 +697,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/th.yml b/lang/th.yml
index 1d2f4e6..5fc5ef6 100644
--- a/lang/th.yml
+++ b/lang/th.yml
@@ -130,6 +130,7 @@ field_due_date: วันครบกำหนด
field_assigned_to: มอบหมายให้
field_priority: ความสำคัญ
field_fixed_version: รุ่น
+field_parent_issue: Child of
field_user: ผู้ใช้
field_role: บทบาท
field_homepage: หน้าแรก
@@ -452,6 +453,8 @@ label_blocks: กีดกัน
label_blocked_by: กีดกันโดย
label_precedes: นำหน้า
label_follows: ตามหลัง
+label_parents: child of
+label_children: parent of
label_end_to_start: จบ-เริ่ม
label_end_to_end: จบ-จบ
label_start_to_start: เริ่ม-เริ่ม
@@ -560,6 +563,7 @@ text_select_mail_notifications: เลือกการกระทำที่
text_regexp_info: ตัวอย่าง ^[A-Z0-9]+$
text_min_max_length_info: 0 หมายถึงไม่จำกัด
text_project_destroy_confirmation: คุณแน่ใจไหมว่าต้องการลบโครงการและข้อมูลที่เกี่ยวข้่อง ?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'โครงการย่อย: %s จะถูกลบด้วย.'
text_workflow_edit: เลือกบทบาทและการติดตาม เพื่อแก้ไขลำดับงาน
text_are_you_sure: คุณแน่ใจไหม ?
@@ -695,3 +699,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/tr.yml b/lang/tr.yml
index 3646baa..b53cb5f 100644
--- a/lang/tr.yml
+++ b/lang/tr.yml
@@ -693,3 +693,8 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/uk.yml b/lang/uk.yml
index 55acd3a..daea9cf 100644
--- a/lang/uk.yml
+++ b/lang/uk.yml
@@ -124,6 +124,7 @@ field_due_date: Дата виконання
field_assigned_to: Призначена до
field_priority: Пріоритет
field_fixed_version: Target version
+field_parent_issue: Child of
field_user: Користувач
field_role: Роль
field_homepage: Домашня сторінка
@@ -412,6 +413,8 @@ label_blocks: блокує
label_blocked_by: заблоковане
label_precedes: передує
label_follows: наступний за
+label_parents: child of
+label_children: parent of
label_end_to_start: з кінця до початку
label_end_to_end: з кінця до кінця
label_start_to_start: з початку до початку
@@ -620,6 +623,7 @@ label_overall_activity: Overall activity
setting_default_projects_public: New projects are public by default
error_scm_annotate: "The entry does not exist or can not be annotated."
label_planning: Planning
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.'
label_and_its_subprojects: %s and its subprojects
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
@@ -694,3 +698,4 @@ label_example: Example
text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
permission_edit_own_messages: Edit own messages
permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lang/vn.yml b/lang/vn.yml
index bde3113..476ec8e 100644
--- a/lang/vn.yml
+++ b/lang/vn.yml
@@ -694,3 +694,9 @@ permission_delete_messages: Xóa bài viết
permission_delete_own_messages: Xóa bài viết cá nhân
label_example: Ví dụ
text_repository_usernames_mapping: "Chọn hoặc cập nhật ánh xạ người dùng hệ thống với người dùng trong kho lưu trữ.\nNhững trường hợp trùng hợp về tên và email sẽ được tự động ánh xạ."
+
+button_add_subissue: Add sub-issue
+label_parents: child of
+label_children: parent of
+field_parent_issue: Child of
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml
index 1246cb7..2d54a9c 100644
--- a/lang/zh-tw.yml
+++ b/lang/zh-tw.yml
@@ -133,6 +133,7 @@ field_due_date: 完成日期
field_assigned_to: 分派給
field_priority: 優先權
field_fixed_version: 版本
+field_parent_issue: Child of
field_user: 用戶
field_role: 角色
field_homepage: 網站首頁
@@ -514,6 +515,8 @@ label_blocks: 阻擋
label_blocked_by: 被阻擋
label_precedes: 優先於
label_follows: 跟隨於
+label_parents: child of
+label_children: parent of
label_end_to_start: 結束─開始
label_end_to_end: 結束─結束
label_start_to_start: 開始─開始
@@ -627,6 +630,7 @@ text_select_mail_notifications: 選擇欲寄送提醒通知郵件之動作
text_regexp_info: eg. ^[A-Z0-9]+$
text_min_max_length_info: 0 代表「不限制」
text_project_destroy_confirmation: 您確定要刪除這個專案和其他相關資料?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: '下列子專案: %s 將一併被刪除。'
text_workflow_edit: 選擇角色與追蹤標籤以設定其工作流程
text_are_you_sure: 確定執行?
@@ -694,3 +698,4 @@ default_activity_development: 開發
enumeration_issue_priorities: 項目優先權
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
+button_add_subissue: Add sub-issue
diff --git a/lang/zh.yml b/lang/zh.yml
index d9cd622..fd2b90e 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -133,6 +133,7 @@ field_due_date: 完成日期
field_assigned_to: 指派给
field_priority: 优先级
field_fixed_version: 目标版本
+field_parent_issue: Child of
field_user: 用户
field_role: 角色
field_homepage: 主页
@@ -514,6 +515,8 @@ label_blocks: 阻挡
label_blocked_by: 被阻挡
label_precedes: 优先于
label_follows: 跟随于
+label_parents: child of
+label_children: parent of
label_end_to_start: 结束-开始
label_end_to_end: 结束-结束
label_start_to_start: 开始-开始
@@ -627,6 +630,7 @@ text_select_mail_notifications: 选择需要发送邮件通知的动作
text_regexp_info: 例如:^[A-Z0-9]+$
text_min_max_length_info: 0 表示没有限制
text_project_destroy_confirmation: 您确信要删除这个项目以及所有相关的数据吗?
+error_issue_can_have_only_one_parent: allows only one relation (a task can have only one parent).
text_subprojects_destroy_warning: '以下子项目也将被同时删除:%s'
text_workflow_edit: 选择角色和跟踪标签来编辑工作流程
text_are_you_sure: 您确定?
@@ -694,3 +698,5 @@ default_activity_development: 开发
enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
+permission_delete_won_messages: Delete own messages
+button_add_subissue: Add sub-issue
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 45cfcbd..4ee98b7 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -35,8 +35,8 @@ Redmine::AccessControl.map do |map|
:queries => :index,
:reports => :issue_report}, :public => true
map.permission :add_issues, {:issues => :new}
- map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit, :destroy_attachment]}
- map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
+ map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit, :destroy_attachment, :update_subject]}
+ map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy], :issues => :add_subissue}
map.permission :add_issue_notes, {:issues => [:edit, :reply]}
map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
diff --git a/lib/tasks/warecorp.rake b/lib/tasks/warecorp.rake
new file mode 100644
diff --git a/log/.gitignore b/log/.gitignore
new file mode 100644
diff --git a/public/.gitignore b/public/.gitignore
new file mode 100644
diff --git a/public/images/contract.png b/public/images/contract.png
new file mode 100644
index 0000000..69566ae
Binary files /dev/null and b/public/images/contract.png differ
diff --git a/public/images/expand.png b/public/images/expand.png
new file mode 100644
index 0000000..ca4f30f
Binary files /dev/null and b/public/images/expand.png differ
diff --git a/public/images/white.png b/public/images/white.png
new file mode 100644
index 0000000..6dab21b
Binary files /dev/null and b/public/images/white.png differ
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 6256531..66832d7 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -669,3 +669,46 @@ td.username img.gravatar {
#main { background: #fff; }
#content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
}
+
+/***** Subtasks *****/
+/*blocks composed of icon (+, - or none), project identification (if there is one) and link to the task*/
+.issue-subject-level-1, .issue-subject-level-1 .issue-subject {
+margin-left: 0em;
+}
+
+.issue-subject-level-2, .issue-subject-level-2 .issue-subject {
+margin-left: 2em;
+}
+
+.issue-subject-level-3, .issue-subject-level-3 .issue-subject {
+margin-left: 4em;
+}
+
+.issue-subject-level-4, .issue-subject-level-4 .issue-subject {
+margin-left: 6em;
+}
+
+.issue-subject-level-5, .issue-subject-level-5 .issue-subject {
+margin-left: 8em;
+}
+
+.expanded-issue {
+ background-image: url(contract.png);
+ background-repeat: no-repeat;
+}
+
+.contracted-issue {
+ background-image: url(expand.png);
+ background-repeat: no-repeat;
+}
+
+.expand-icon, .contract-icon{
+/* position: absolute; */
+ vertical-align: middle;
+}
+
+/*text after the icon, which needs to be indented so that all its lines stay completely after the icon*/
+.issue-subject{
+ padding-left: 1em;
+}
+
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 6a4775c..1dbed33 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -22,10 +22,12 @@ require 'issues_controller'
class IssuesController; def rescue_action(e) raise e end; end
class IssuesControllerTest < Test::Unit::TestCase
+
fixtures :projects,
:users,
:roles,
:members,
+ :queries,
:issues,
:issue_statuses,
:versions,
@@ -102,9 +104,9 @@ class IssuesControllerTest < Test::Unit::TestCase
assert_response :success
assert_template 'index.rhtml'
assert_not_nil assigns(:issues)
- assert_tag :tag => 'a', :content => /Can't print recipes/
- assert_tag :tag => 'a', :content => /Subproject issue/
- assert_tag :tag => 'a', :content => /Issue of a private subproject/
+ assert_tag :tag => 'span', :content => /Can't print recipes/
+ assert_tag :tag => 'span', :content => /Subproject issue/
+ assert_tag :tag => 'span', :content => /Issue of a private subproject/
end
def test_index_with_project_and_filter
@@ -702,4 +704,24 @@ class IssuesControllerTest < Test::Unit::TestCase
j = issue.journals.find(:first, :order => 'created_on DESC')
assert_equal 'attachment', j.details.first.property
end
+
+ def test_new_child_issue
+ child_issue_subject = 'This is the test_new child issue'
+ parent_issue = Issue.find(1)
+ @request.session[:user_id] = 2
+ post :new, :project_id => 1,
+ :issue_parent_issue_id => parent_issue.id,
+ :issue => {:tracker_id => 3,
+ :subject => 'This is the test_new child issue',
+ :description => 'This is the description',
+ :priority_id => 5,
+ :estimated_hours => '',
+ :custom_field_values => {'2' => 'Value for field 2'} }
+
+ assert_redirected_to 'issues/show'
+ follow_redirect
+ assert_tag :tag => 'p', :content => "Related issues"
+ assert_tag :tag => 'a', :content => "#{parent_issue.tracker.name} ##{parent_issue.id}"
+ end
+
end
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index 12b4da3..36a7f4f 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -22,7 +22,7 @@ class IssueTest < Test::Unit::TestCase
:trackers, :projects_trackers,
:issue_statuses, :issue_categories,
:enumerations,
- :issues,
+ :issues, :versions,
:custom_fields, :custom_fields_projects, :custom_fields_trackers, :custom_values,
:time_entries
@@ -190,4 +190,101 @@ class IssueTest < Test::Unit::TestCase
assert_nil Issue.find_by_id(1)
assert_nil TimeEntry.find_by_issue_id(1)
end
+
+ def test_should_update_target_version_of_parent_issue
+ create_family_of_issues 'Target version of parent updates test'
+
+ version_0_1 = Version.find( versions( :versions_001).id)
+ version_1_0 = Version.find( versions( :versions_002).id)
+
+ # set target version for child
+ @issue2.fixed_version = version_0_1
+ assert @issue2.save
+ assert @issue1.reload.fixed_version == @issue2.fixed_version
+
+ # set target version for child of child larger than target version
+ # of child. so, target version of parents should be updated.
+ @issue3.fixed_version = version_1_0
+ assert @issue3.save
+ assert @issue1.reload.fixed_version == @issue3.fixed_version
+
+ # set target version for child of child smaller than target
+ # version of any child of parent or parent. this should decrease
+ # target version of parent.
+ @issue3.fixed_version = version_0_1
+ assert @issue3.save
+ assert @issue1.reload.fixed_version == @issue3.reload.fixed_version
+ end
+
+ def test_should_not_allowed_close_parent_issue_while_one_of_children_open
+ create_family_of_issues 'Closing parent issue when some children is open test.'
+
+ closed_status = issue_statuses( :issue_statuses_005)
+ @issue3.status = closed_status
+ assert @issue3.save
+
+ assert_raise ActiveRecord::RecordInvalid do
+ @issue1.reload.status = closed_status
+ @issue1.save!
+ end
+
+ end
+
+ def test_should_change_status_of_parent_when_some_children_is_open
+ create_family_of_issues 'Changing status of parent from closed to open when some of children is open.'
+
+ open_status = issue_statuses( :issue_statuses_001)
+ closed_status = issue_statuses( :issue_statuses_005)
+
+ @issue3.status = closed_status
+ @issue2.status = closed_status
+ @issue1.status = closed_status
+ assert @issue3.save
+ assert @issue2.reload.save
+ assert @issue1.reload.save
+ @issue1.reload
+ @issue2.reload
+ @issue3.reload
+
+ # set status of children to open status. this should update status
+ # of parent and set it to open state.
+ @issue2.status = open_status
+ assert @issue2.reload.save
+ assert @issue1.reload.status == IssueStatus.default
+ end
+
+ private
+
+ def create_family_of_issues( subject)
+ # Create 3 issues
+ @issue1 = Issue.new( :project_id => 1, :tracker_id => 1,
+ :author_id => 1, :status_id => 1,
+ :priority => Enumeration.get_values('IPRI').first,
+ :subject => subject,
+ :description => subject)
+ assert @issue1.save
+ @issue2 = @issue1.clone
+ assert @issue2.save
+ @issue3 = @issue1.clone
+ assert @issue3.save
+
+ # 2 is a child of 1
+ IssueRelation.create( :issue_from => @issue2, :issue_to => @issue1,
+ :relation_type => IssueRelation::TYPE_PARENTS)
+ # And 3 is a child of 2
+ IssueRelation.create( :issue_from => @issue3, :issue_to => @issue2,
+ :relation_type => IssueRelation::TYPE_PARENTS)
+
+ assert @issue2.reload.parent == @issue1
+ assert @issue2.reload.children.include?( @issue3)
+
+ assert @issue1.save
+ assert @issue2.save
+ assert @issue3.save
+
+ @issue1.reload
+ @issue2.reload
+ @issue3.reload
+ end
+
end
diff --git a/tmp/.gitignore b/tmp/.gitignore
new file mode 100644
diff --git a/tmp/cache/.gitignore b/tmp/cache/.gitignore
new file mode 100644