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

[UI Script] Make References field required


#1

Hello,

This is a UI script to make the References field on the test case required (requires TestRail 4.0 or later):

[code]name: Make References required
description: Makes the References field of test cases required
author: Gurock Software
version: 1.0
includes: ^cases/(add|edit)
excludes:

js:
(document).ready( function() { (’#refs’).prev().append(’ *’)
('form').submit( function() { App.Validation.hideErrors(); if (.trim(('#refs').val()) == '') { (’#content-inner’).prepend(‘

Field References is a required field.
’);
$(’#refs’).addClass(‘form-control-error’);
return false;
}
}
);
}
);[/code]

Regards,
Tobias