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

Required field for test results based on test result type?


#1

HI,

Is it possible to define a field required for a specific test result type ?

My scenario is the following:

We like to have the Elapsed as mandatory field when tests have been executed - except when a test is marked as “Retest” as we like to use this as a simple marker, e.g. when a defect has been resolved.

So it does not make sense to enter a value for the Elapsed field here and a artificial value would have an impact to the prediction functionality.

So any chance this can be done ?

Thx
Andreas


#2

Hello Andreas,

Thanks for your posting! Configuring the mandatory/required attribute depending on the status is currently not available as a built-in feature but has been requested before and it’s planned to look into this. I’m happy to add another vote to this feature request. As a workaround, you can also use a UI script in the meantime if this is a critical feature:

(you would need to modify this slightly and take into account the test result status which is available as o.values.status_id)

Cheers,
Tobias


#3

Hi Tobias,

thanks for the answer, I will try it and see if this is working as I expect


#4

When I copy the script and try to save it, I get

Line 8 uses an invalid format ("name: value" expected).

#5

Hello Andreas,

You would need to add an additional newline/empty line before js:. The forum unfortunately removes this empty line. You would also need to use the second example (for TestRail 4.0 and later).

I hope this helps!

Cheers,
Tobias


#6

Thanks it is working


#7

Great to hear that :slight_smile:

Cheers,
Tobias