Scenario:
In a project management system like Jira, once a parent issue reaches the "In Development" or later status, regular users should not be allowed to create, remove, or modify any sub-tasks associated with that parent issue. This restriction is necessary to maintain the integrity of the project and prevent unauthorized changes to the task hierarchy.
Requirement:
Develop a feature or script that can enforce the following rules:
- Users who are not part of the "Administrators" group should not be able to create, remove, or modify sub-tasks for a parent issue that is in the "In Development" or later status.
- Users who are part of the "Administrators" group should be able to create, remove, and modify sub-tasks for any parent issue, regardless of its status.
Implementation:
The solution should be implemented using a Jira add-on or a custom script that can be integrated with the project management system. The script should:
- Define the list of issue statuses that should be considered "In Development" or later (e.g., "In Development", "Testing", "Completed", "Closed").
- When a user attempts to create, remove, or modify a sub-task, check the status of the parent issue.
- If the parent issue is in the "In Development" or later status, and the user is not an administrator, prevent the action and display an appropriate error message.
- If the user is an administrator, allow the action to proceed regardless of the parent issue status