Go to JIRA Jira Administration > Issues > Workflow and design the workflow.
Here is an example that can be used as a Test & Pre-Conditions Workflow.
Tip
This is just an example! Implement a workflow that is adapted to your own needs.
Recommendations
Have a status for “deprecated” Tests; you can then disallow executions for Tests in this status, in Xray settings.
Have an initial stage for the specification (e.g., “draft” or “new”) and then another status whenever it’s ready to be used
UI Step
Update the Workflow Scheme
After designing the workflow you need to make it active for your project, you do that by updating the workflow scheme.
Go to your Project > Project settings > Workflows and click "Add Workflow.
Then select the workflow and mapped it with the issue types "Pre-Condition" and " Test"
Don't forget to publish the scheme after updating!
UI Step
Update the Workflow Settings in
XRAY
Xray
Go to JIRA Jira Administration > Manage Apps > Xray > Miscellaneous and set the Test workflow Status where you don't want to allow a user to perform Test Executions.
Info
Want to know more about creating and configuring workflows? Check out the Atlassian Documentation.