プロジェクト

全般

プロフィール

Vote #67766

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2010/08/04
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
155
issue_org_id:
6033
author_id:
936
assigned_to_id:
332
comments:
11
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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

--------------------------------------------------------------------------------
Setting the target version to 4.1.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Update the patch for the latest trunk (r21204).
--------------------------------------------------------------------------------
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.

<pre>
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
</pre>
--------------------------------------------------------------------------------
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.

<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

duplicates,Reopened,35991,Parent ticket history plugin

Admin Redmine さんが3年以上前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0