I have a defect issue type that is created as a sub task for a Bug Issue type. I have another custom issue type called 'triaged defects' . Any unresolved or triaged defects that will not be closed in the current sprint will be moved to the triaged defects custom issue type. When the defect is ready for fixing , defect sub task that is stored in the triaged defects will be moved back to the Bug issue type.
I would like the defect subtask issue type to be moved with in Big issue type and triaged defects custom issue type. I would like to restrict permissions for the defect subtask to be able to move under other issue types such as story , epic or Task.
For the defect sub task , when I select the change parent , It should allow me to move it to either Bug issue type or my custom issue type triaged defects custom issue type. How do I achieve this using script runner.