Redmine - Feature #10989
Prevent parent issue from being closed if a child issue is open
2012-05-22 10:46 - ravi jain

ステータス:

Closed

開始日:

優先度:

Normal

期日:担当者:

Jean-Philippe Lang

進捗率:0%

カテゴリ:

Issues

予定工数:

0.00時間対象バージョン:3.4.0

Resolution:

Fixed

説明
I am able to close a parent issue while its Child issues are yet not closed/rejected, ideally it should not let a use to close a Parentissue, until all it's child issues are not closed.
関連するチケット:
関連している Redmine - Feature #13585: Make sub-task inherit th...

New

関連している Redmine - Defect #27974: Issue-state can't set to ...

Closed関連している Redmine - Feature #28492: Option not to block clos...

New

関連している Redmine - Feature #31589: Show warning and the rea...

Closed関連している Redmine - Feature #31321: Option not to block clos...

Closed次のチケットが重複 Redmine - Feature #12956: Warning "parent issue...

Closed次のチケットが重複 Redmine - Feature #18212: The status of parent ...

Closed次のチケットが重複 Redmine - Feature #5462: Blocking issues to be ...

Closed2010-05-07

関係しているリビジョン
リビジョン 16108 - 2016-12-21 10:09 - Jean-Philippe Lang
Prevent parent issue from being closed if a child issue is open (#10989).

履歴#1 - 2012-05-25 19:18 - Jean-Philippe Lang
- トラッカー を Defect から Feature に変更- 題名 を Parent issue can be closed, while it's child issues are still open から Prevent parent issue from being closed, while it's child issues are stillopen に変更- 担当者 を削除 (Azamat Hackimov)- 優先度 を High から Normal に変更#2 - 2014-10-28 04:29 - Toshi MARUYAMA- 次のチケットが重複 Feature #12956: Warning "parent issue is closed" を追加#3 - 2014-10-28 04:31 - Toshi MARUYAMA- 次のチケットが重複 Feature #18212: The status of parent issue could be changed to closed before all of the sub issues' status are changed toclosed を追加#4 - 2015-04-16 08:28 - Ami Desai+1#5 - 2016-08-26 02:11 - Go MAEDA
I think the behavior is logical and this feature is really needed.
#18212 has a patch.
#6 - 2016-08-31 00:55 - Marius B

LTEANUThis means also that we shouldn't be able to add to a new/open issue a parent which is already closed?

2024-09-16

1/4

#7 - 2016-09-20 10:20 - Marius B

LTEANU- ファイル cant̲close̲before̲sub̲issues̲closed.patch を追加I made a patch (inspired from #18212) with tests that implements this feature request.
@Go MAEDA, I still think that in order to implement this completely, we should not allow to set for a new/open issue a parent which is alreadyclosed. I'm waiting for your feedback (or other Redmine contributors) in order to include also this change in the patch.
#8 - 2016-09-20 14:11 - Toshi MARUYAMA- 関連している Feature #13585: Make sub-task inherit the properties of parent を追加#9 - 2016-09-20 14:11 - Toshi MARUYAMA- 関連している を削除 (Feature #13585: Make sub-task inherit the properties of parent)#10 - 2016-09-20 14:12 - Toshi MARUYAMA- 関連している Feature #13585: Make sub-task inherit the properties of parent を追加#11 - 2016-09-20 14:13 - Toshi MARUYAMA- 次のチケットが重複 Feature #5462: Blocking issues to be closed which have open subtasks を追加#12 - 2016-09-20 14:29 - Toshi MARUYAMA
Marius BALTEANU wrote:
I made a patch (inspired from #18212) with tests that implements this feature request.

LGTM.
I have some questions.
What happens if opened child issues which user cannot see (private/visibility)?
error̲can̲not̲close̲issue̲with̲open̲subtasks:"Anissuewithopen

subtasks

cannotbeclosed"

Would it better "An issue" -> "The issue"?
@Go MAEDA, I still think that in order to implement this completely, we should not allow to set for a new/open issue a parent which is alreadyclosed. I'm waiting for your feedback (or other Redmine contributors) in order to include also this change in the patch.

I think this would better in separate issue.
#13 - 2016-09-20 18:05 - Marius B

LTEANU

Toshi MARUYAMA wrote:
What happens if opened child issues which user cannot see (private/visibility)?

The user will receive the same error message and I think that is the correct behavior because any open subtask means work to do (from my point ofview).
If you have the following scenario:
Issue with 4 subtasks
Two are visible to my role
Other two are visible to another role.
Closing my subtasks doesn't means that the parent issue can be closed, it means only that I made my piece of work. If you think that it'll be
confusing for the users, we can improve the error message.
Would it better "An issue" -> "The issue"?

I took some internal feedback and the new proposal is "You cannot close an issue with open subtasks.". Let me know what do you think in order toupdate the patch.
@Go MAEDA, I still think that in order to implement this completely, we should not allow to set for a new/open issue a parent which isalready closed. I'm waiting for your feedback (or other Redmine contributors) in order to include also this change in the patch.

2024-09-16

2/4

I think this would better in separate issue.

Agree, I'll open a new issue.
#14 - 2016-10-20 12:20 - Toshi MARUYAMA- 対象バージョン を Candidate for next major release にセット
#15 - 2016-10-20 12:23 - Toshi MARUYAMA
Marius BALTEANU wrote:
Let me know what do you think in order to update the patch.

Please update the patch.
#16 - 2016-10-20 14:53 - Marius B

LTEANU- ファイル cant̲close̲before̲sub̲issues̲closed̲v2.patch を追加
Here it is.
#17 - 2016-11-16 13:15 - Toshi MARUYAMA- 対象バージョン を Candidate for next major release から 3.4.0 に変更#18 - 2016-12-16 10:13 - Marius B

LTEANU- ファイル cant̲close̲before̲sub̲issues̲closed̲v3.patch を追加
Fixed the expected error message in the test.
#19 - 2016-12-21 10:13 - Jean-Philippe Lang
- 題名 を Prevent parent issue from being closed, while it's child issues are still open から Prevent parent issue from being closed if a child issue isopen に変更- ステータス を New から Closed に変更- 担当者 を Jean-Philippe Lang にセット
- Resolution を Fixed にセット
Added in r16108. It prevents a parent task with open subtasks from being closed and a subtask of a closed issue from being reopened (in the same
way as blocked issues were currently handled). It also prevents an open issue to be set as a subtask of a closed parent issue.
#20 - 2016-12-21 10:16 - Jean-Philippe Lang

I took some internal feedback and the new proposal is "You cannot close an issue with open subtasks."

I chose to use "An open issue cannot be attached to a closed parent task" to be consistent with other validation messages (eg. "An issue cannot belinked to one of its subtasks").
#21 - 2016-12-21 10:42 - Marius B

LTEANU

Thanks for implementing this. The new error message is fine for me.
#22 - 2018-01-13 01:53 - Go MAEDA- 関連している Defect #27974: Issue-state can't set to done if state of one subissue is not set to done を追加#23 - 2018-08-07 17:23 - Go MAEDA- 関連している Feature #27864: Subtasks inherit parent settings during copy を追加#24 - 2018-08-07 17:24 - Go MAEDA- 関連している を削除 (Feature #27864: Subtasks inherit parent settings during copy)

2024-09-16

3/4

#25 - 2018-08-07 17:24 - Go MAEDA- 関連している Feature #28492: Option not to block closing a parent issue when it has open subtask(s) を追加#26 - 2019-06-19 07:54 - Go MAEDA- 関連している Feature #31589: Show warning and the reason when the issue cannot be closed because of open subtasks or blocking open issue(s)を追加#27 - 2019-06-19 07:55 - Go MAEDA- 関連している Feature #31321: Option not to block closing a parent issue when its subtask is open を追加

ファイル
cant̲close̲before̲sub̲issues̲closed.patch

2.79 KB

2016-09-20

Marius B

LTEANUcant̲close̲before̲sub̲issues̲closed̲v2.patch

2.81 KB

2016-10-20

Marius B

LTEANUcant̲close̲before̲sub̲issues̲closed̲v3.patch

2.81 KB

2016-12-16

Marius B

LTEANU

2024-09-16

4/4