Raise warning when closing an issue with open blockers
Problem to solve
This is a follow-on issue to #2035 (closed) which is the MVC for blocking issues support.
A user should receive a warning when they attempt to close an issue that has other issues specified as blocking issues.
As a software developer, I would like to receive a warning if I attempt to close an issue that has blocking issues which are not closed.
Further details
We want to ensure that issues are correctly prioritized. Without blocking issues, we cannot show priorities clearly.
Receiving a warning when attempting to close a blocked issue would allow team members to ensure that all relevant considerations were evaluated.
Discussion on #2035 (closed) had originally suggested now allowing issues to be closed if they were blocked. The feedback received was that this would provide an overly restrictive environment, and therefore, providing a warning would suffice.
Proposal
When a user attempt to close an issue, GitLab will verify that any blocking issues are closed. If so, the user's attempt to close the issue proceeds without interruption. If it is found that there are open blocking issues, the user is presented with a warning asking them to confirm the issue is okay to close.
A warning should ideally be raised when closing via the API as well.
Permissions and Security
There should be no additional permissions required, nor security concerns.
Documentation
Documentation should be updated to include:
- Explanation of the warning when blocking issues are present
Testing
Testing should cover:
- Attempt to close an issue with closed blocking issues (succeed without warning)
- Attempt to close an issue with open blocking issues (warning issued, should succeed after warning dismissal)
What is the type of buyer?
To align with other blocking issue support, this feature would be available to GitLab Starter users and above.
Links / references
Proposed Solution
The design for raising this warning on issue pages has been added in the Design tab. The idea here is that we would present this warning alert upon a user selecting the "Close issue" button. When this alert is presented, we would also like to hide or disable (preferably hide) the "Close issue" button in order to eliminate any confusion with the confirmation alert action. Specs for the alerts are located here.