Feature #6033

Allow addition/removal of subtasks to show in parent's history

Added by Mark P over 12 years ago. Updated about 1 year ago.

Status:ClosedStart date:2010-08-04
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues
Target version:5.0.0
Resolution:Fixed

Description

The subtask feature has been working as expected. When I remove a parent from a child, that change is captured in the child's history, but it does not appear in the parent's history. I think it would be really handy to be able to see from the parent's perspective, how many child issues came and went. Seeing history like this viewing from the child up to the parent is a tad cumbersome. Hopefully, that makes sense.

Bravo Zulu on Redmine.

6033_subtasks_show_in_parent_history.patch Magnifier (12.3 KB) Yuichi HARADA, 2019-08-16 04:19

6033_subtasks_show_in_parent_history.patch Magnifier (11.6 KB) Go MAEDA, 2021-09-05 14:15

6033_subtasks_show_in_parent_history-v2.patch Magnifier (12.6 KB) Yuichi HARADA, 2021-10-05 02:29


Related issues

Duplicated by Redmine - Feature #35991: Parent ticket history plugin Reopened

Associated revisions

Revision 21273
Added by Go MAEDA about 1 year ago

Allow addition/removal of subtasks to show in parent's history (#6033).

Patch by Yuichi HARADA.

Revision 21274
Added by Go MAEDA about 1 year ago

Update locales (#6033).

History

#1 Updated by Go MAEDA almost 5 years ago

  • Category set to Issues

#2 Updated by Yuichi HARADA over 3 years ago

Display the addition / deletion of subtask issues in the parent issue's history block.
I attached a patch.

#3 Updated by Go MAEDA over 3 years ago

  • Target version set to Candidate for next major release

#4 Updated by Go MAEDA about 3 years ago

  • Subject changed from Allow removal of child subtasks to show in parent's History block to Allow addition/removal of subtasks to show in parent's History block
  • Target version changed from Candidate for next major release to 4.1.0

Setting the target version to 4.1.0.

#5 Updated by Go MAEDA about 3 years ago

  • Target version changed from 4.1.0 to 4.2.0

#6 Updated by Marius BALTEANU over 1 year ago

  • Target version changed from 4.2.0 to 5.0.0

#7 Updated by Go MAEDA over 1 year ago

Update the patch for the latest trunk (r21204).

#8 Updated by Go MAEDA about 1 year ago

The patch breaks an existing test. This is because patched Redmine sends an email notification when a journal that records the addition or removal of a subtask is added.

Error:
MailHandlerTest#test_add_issue_should_send_notification:
NameError: undefined local variable or method `byebug' for #<MailHandlerTest:0x00007fd3f69b1d98>
    test/unit/mail_handler_test.rb:438:in `test_add_issue_should_send_notification'

rails test test/unit/mail_handler_test.rb:431

#9 Updated by Yuichi HARADA about 1 year ago

Go MAEDA wrote:

The patch breaks an existing test. This is because patched Redmine sends an email notification when a journal that records the addition or removal of a subtask is added.

[...]

I have confirmed that the test fails. I fixed test/unit/mail_handler_test.rb as follows.

diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 3fd3ce0722..999cb8ceac 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -433,10 +433,19 @@ class MailHandlerTest < ActiveSupport::TestCase
     assert issue.is_a?(Issue)
     assert !issue.new_record?

-    mail = ActionMailer::Base.deliveries.last
-    assert_not_nil mail
-    assert mail.subject.include?("##{issue.id}")
-    assert mail.subject.include?('New ticket on a given project')
+    assert_equal 4, issue.parent_issue_id
+    assert_equal 2, ActionMailer::Base.deliveries.size
+
+    [
+      [issue.id, 'New ticket on a given project'],
+      [4, 'Issue on project 2'],
+    ].each do |issue_id, issue_subject|
+      mail =
+        ActionMailer::Base.deliveries.detect do |m|
+          /##{issue_id}/.match?(m.subject) && /#{issue_subject}/.match?(m.subject)
+        end
+      assert_not_nil mail
+    end
   end

   def test_created_user_should_be_added_to_groups

#10 Updated by Go MAEDA about 1 year ago

  • Subject changed from Allow addition/removal of subtasks to show in parent's History block to Allow addition/removal of subtasks to show in parent's history
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for your contribution.

#11 Updated by Go MAEDA about 1 year ago

Also available in: Atom PDF