For requirements of the "bug" issue type, users should not be able to move them to the "task" issue type. However, moving them to other issue types (such as "story") should be allowed.
It would be even better if this scenario could be implemented specifically for certain user roles.
Can the scenario mentioned above be implemented using Script Runner with javascript?
Any suggestions would be greatly appreciated.