Project

General

Profile

Actions

Feature #10989

closed

Prevent parent issue from being closed if a child issue is open

Feature #10989: Prevent parent issue from being closed if a child issue is open

Added by ravi jain over 14 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Resolution:
Fixed

Description

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 Parent issue, until all it's child issues are not closed.


Files


Related issues 8 (2 open — 6 closed)

Related to Redmine - Feature #13585: Make sub-task inherit the properties of parentNewActions
Related to Redmine - Defect #27974: Issue-state can't set to done if state of one subissue is not set to doneClosedActions
Related to Redmine - Feature #28492: Option not to block closing a parent issue when it has open subtask(s)NewActions
Related to Redmine - Feature #31589: Show warning and the reason when the issue cannot be closed because of open subtasks or blocking open issue(s)ClosedGo MAEDAActions
Related to Redmine - Feature #31321: Option not to block closing a parent issue when its subtask is openClosedActions
Has duplicate Redmine - Feature #12956: Warning "parent issue is closed"ClosedActions
Has duplicate Redmine - Feature #18212: The status of parent issue could be changed to closed before all of the sub issues' status are changed to closedClosedActions
Has duplicate Redmine - Feature #5462: Blocking issues to be closed which have open subtasksClosedActions

Updated by Jean-Philippe Lang over 14 years ago Actions #1

  • Tracker changed from Defect to Feature
  • Subject changed from Parent issue can be closed, while it's child issues are still open to Prevent parent issue from being closed, while it's child issues are still open
  • Assignee deleted (Azamat Hackimov)
  • Priority changed from High to Normal

Updated by Toshi MARUYAMA about 12 years ago Actions #2

  • Has duplicate Feature #12956: Warning "parent issue is closed" added

Updated by Toshi MARUYAMA about 12 years ago Actions #3

  • Has duplicate Feature #18212: The status of parent issue could be changed to closed before all of the sub issues' status are changed to closed added

Updated by Ami Desai over 11 years ago Actions #4

+1

Updated by Go MAEDA about 10 years ago Actions #5

I think the behavior is logical and this feature is really needed.

#18212 has a patch.

Updated by Marius BĂLTEANU about 10 years ago Actions #6

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

Updated by Marius BĂLTEANU about 10 years ago Actions #7

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 already closed. I'm waiting for your feedback (or other Redmine contributors) in order to include also this change in the patch.

Updated by Toshi MARUYAMA about 10 years ago Actions #8

  • Related to Feature #13585: Make sub-task inherit the properties of parent added

Updated by Toshi MARUYAMA about 10 years ago Actions #9

  • Related to deleted (Feature #13585: Make sub-task inherit the properties of parent)

Updated by Toshi MARUYAMA about 10 years ago Actions #10

  • Related to Feature #13585: Make sub-task inherit the properties of parent added

Updated by Toshi MARUYAMA about 10 years ago Actions #11

  • Has duplicate Feature #5462: Blocking issues to be closed which have open subtasks added

Updated by Toshi MARUYAMA about 10 years ago Actions #12

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: "An issue with open subtasks cannot be closed" 

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 already closed. 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.

Updated by Marius BĂLTEANU about 10 years ago Actions #13

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 of view).
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 to update 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 is already closed. 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.

Agree, I'll open a new issue.

Updated by Toshi MARUYAMA about 10 years ago Actions #14

  • Target version set to Candidate for next major release

Updated by Toshi MARUYAMA about 10 years ago Actions #15

Marius BALTEANU wrote:

Let me know what do you think in order to update the patch.

Please update the patch.

Updated by Toshi MARUYAMA about 10 years ago Actions #17

  • Target version changed from Candidate for next major release to 3.4.0

Updated by Jean-Philippe Lang almost 10 years ago Actions #19

  • Subject changed from Prevent parent issue from being closed, while it's child issues are still open to Prevent parent issue from being closed if a child issue is open
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to 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.

Updated by Jean-Philippe Lang almost 10 years ago Actions #20

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 be linked to one of its subtasks").

Updated by Marius BĂLTEANU almost 10 years ago Actions #21

Thanks for implementing this. The new error message is fine for me.

Updated by Go MAEDA almost 9 years ago Actions #22

  • Related to Defect #27974: Issue-state can't set to done if state of one subissue is not set to done added

Updated by Go MAEDA over 8 years ago Actions #23

  • Related to Feature #27864: Subtasks inherit parent settings during copy added

Updated by Go MAEDA over 8 years ago Actions #24

  • Related to deleted (Feature #27864: Subtasks inherit parent settings during copy)

Updated by Go MAEDA over 8 years ago Actions #25

  • Related to Feature #28492: Option not to block closing a parent issue when it has open subtask(s) added

Updated by Go MAEDA over 7 years ago Actions #26

  • Related to Feature #31589: Show warning and the reason when the issue cannot be closed because of open subtasks or blocking open issue(s) added

Updated by Go MAEDA over 7 years ago Actions #27

  • Related to Feature #31321: Option not to block closing a parent issue when its subtask is open added
Actions

Also available in: PDF Atom