Project

General

Profile

Actions

Feature #10989

closed

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

Added by ravi jain almost 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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

Related to Redmine - Feature #13585: Make sub-task inherit the properties of parentNew

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

Actions
Related to Redmine - Feature #28492: Option not to block closing a parent issue when it has open subtask(s)New

Actions
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 MAEDA

Actions
Related to Redmine - Feature #31321: Option not to block closing a parent issue when its subtask is openClosed

Actions
Has duplicate Redmine - Feature #12956: Warning "parent issue is closed"Closed

Actions
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 closedClosed

Actions
Has duplicate Redmine - Feature #5462: Blocking issues to be closed which have open subtasksClosed2010-05-07

Actions
Actions #1

Updated by Jean-Philippe Lang almost 12 years ago

  • 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
Actions #2

Updated by Toshi MARUYAMA over 9 years ago

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

Updated by Toshi MARUYAMA over 9 years ago

  • 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
Actions #4

Updated by Ami Desai almost 9 years ago

+1

Actions #5

Updated by Go MAEDA over 7 years ago

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

#18212 has a patch.

Actions #6

Updated by Marius BĂLTEANU over 7 years ago

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

Actions #7

Updated by Marius BĂLTEANU over 7 years ago

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.

Actions #8

Updated by Toshi MARUYAMA over 7 years ago

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

Updated by Toshi MARUYAMA over 7 years ago

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

Updated by Toshi MARUYAMA over 7 years ago

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

Updated by Toshi MARUYAMA over 7 years ago

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

Updated by Toshi MARUYAMA over 7 years ago

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.

Actions #13

Updated by Marius BĂLTEANU over 7 years ago

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.

Actions #14

Updated by Toshi MARUYAMA over 7 years ago

  • Target version set to Candidate for next major release
Actions #15

Updated by Toshi MARUYAMA over 7 years ago

Marius BALTEANU wrote:

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

Please update the patch.

Actions #17

Updated by Toshi MARUYAMA over 7 years ago

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

Updated by Marius BĂLTEANU about 7 years ago

Fixed the expected error message in the test.

Actions #19

Updated by Jean-Philippe Lang about 7 years ago

  • 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.

Actions #20

Updated by Jean-Philippe Lang about 7 years ago

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").

Actions #21

Updated by Marius BĂLTEANU about 7 years ago

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

Actions #22

Updated by Go MAEDA about 6 years ago

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

Updated by Go MAEDA over 5 years ago

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

Updated by Go MAEDA over 5 years ago

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

Updated by Go MAEDA over 5 years ago

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

Updated by Go MAEDA over 4 years ago

  • 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
Actions #27

Updated by Go MAEDA over 4 years ago

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

Also available in: Atom PDF