Feature #10989
Prevent parent issue from being closed if a child issue is open
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Issues | |||
Target version: | 3.4.0 | |||
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.
Related issues
Associated revisions
Prevent parent issue from being closed if a child issue is open (#10989).
History
#1
Updated by Jean-Philippe Lang about 10 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
#2
Updated by Toshi MARUYAMA over 7 years ago
- Duplicated by Feature #12956: Warning "parent issue is closed" added
#3
Updated by Toshi MARUYAMA over 7 years ago
- Duplicated by Feature #18212: The status of parent issue could be changed to closed before all of the sub issues' status are changed to closed added
#4
Updated by Ami Desai about 7 years ago
+1
#5
Updated by Go MAEDA over 5 years ago
I think the behavior is logical and this feature is really needed.
#18212 has a patch.
#6
Updated by Marius BALTEANU over 5 years ago
This means also that we shouldn't be able to add to a new/open issue a parent which is already closed?
#7
Updated by Marius BALTEANU over 5 years ago
- File cant_close_before_sub_issues_closed.patch
added
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.
#8
Updated by Toshi MARUYAMA over 5 years ago
- Related to Feature #13585: Make sub-task inherit the properties of parent added
#9
Updated by Toshi MARUYAMA over 5 years ago
- Related to deleted (Feature #13585: Make sub-task inherit the properties of parent)
#10
Updated by Toshi MARUYAMA over 5 years ago
- Related to Feature #13585: Make sub-task inherit the properties of parent added
#11
Updated by Toshi MARUYAMA over 5 years ago
- Duplicated by Feature #5462: Blocking issues to be closed which have open subtasks added
#12
Updated by Toshi MARUYAMA over 5 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.
#13
Updated by Marius BALTEANU over 5 years ago
Toshi MARUYAMA wrote:
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).What happens if opened child issues which user cannot see (private/visibility)?
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.
#14
Updated by Toshi MARUYAMA over 5 years ago
- Target version set to Candidate for next major release
#15
Updated by Toshi MARUYAMA over 5 years ago
Marius BALTEANU wrote:
Let me know what do you think in order to update the patch.
Please update the patch.
#16
Updated by Marius BALTEANU over 5 years ago
- File cant_close_before_sub_issues_closed_v2.patch
added
Here it is.
#17
Updated by Toshi MARUYAMA over 5 years ago
- Target version changed from Candidate for next major release to 3.4.0
#18
Updated by Marius BALTEANU over 5 years ago
- File cant_close_before_sub_issues_closed_v3.patch
added
Fixed the expected error message in the test.
#19
Updated by Jean-Philippe Lang over 5 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.
#20
Updated by Jean-Philippe Lang over 5 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").
#21
Updated by Marius BALTEANU over 5 years ago
Thanks for implementing this. The new error message is fine for me.
#22
Updated by Go MAEDA over 4 years ago
- Related to Defect #27974: Issue-state can't set to done if state of one subissue is not set to done added
#23
Updated by Go MAEDA almost 4 years ago
- Related to Feature #27864: Subtasks inherit parent settings during copy added
#24
Updated by Go MAEDA almost 4 years ago
- Related to deleted (Feature #27864: Subtasks inherit parent settings during copy)
#25
Updated by Go MAEDA almost 4 years ago
- Related to Feature #28492: Option not to block closing a parent issue when it has open subtask(s) added
#26
Updated by Go MAEDA almost 3 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
#27
Updated by Go MAEDA almost 3 years ago
- Related to Feature #31321: Option not to block closing a parent issue when its subtask is open added