Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

UI Script to remove the "Type" and "Priority" fields from the the test case templates

Hello, has anyone wrote a UI script to disable and remove the “Type” and “Priority” dropdowns?

Hi Jeremy,

Thanks for the post! You may find the following UI script helpful for accomplishing this:

name: Hide Test Case Fields
description: Hides the Type and Priority fields in all test case templates when editing adding test cases
author: Gurock Software
version: 1.0
includes: ^cases/(add|edit)

function() {
document.getElementById(‘type_id’) = “none”;
document.getElementById(‘priority_id’) = “none”;

This UI script will hide the fields when editing or adding any test case so you may wish to make additional changes to match specific test case templates or other situations. Please also keep in mind that this script is only a sample to use as a guide and we would not typically be able to provide or troubleshoot fully customized scripts for teams.

Instead of using a UI script, if you do not use the Type or Priority fields in any test cases, you can remove all but a single option from the available Type or Priority values and this option would be selected by default at all times.

Hope this helps,