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

[UI Script] Account for custom passed status


Our company has a custom passed status called ‘Passed w/ Retest’ we use this to distinguish if a test passed the first time, or if it initially failed and is now passing. The problem with this is that TestRail doesn’t account for this when calculating completion. So I’ve created a UI Script to account for this within the UI. You can find it here:

Here is a quick example from an view page:

Here is an example from an overview page:

Feature Request. Allowing customization to the embedded Reports

Isn’t “This status is a final status” the option you are looking for?

This status is a final status:
Tests with a final status are considered completed and add to the overall progress of a test run (such as Passed, Failed or Blocked).


Huh, would you look at that. I completely missed that when we created the status last year. Thanks for tip!


Actually, on further testing, it doesn’t seem to affect the UI. I’m not quite sure what the intent of the option is, but it doesn’t seem to be included in the ‘passed’ status’.



Tobias from TestRail here. Thanks for the UI script, this looks really useful. The “final” option is only used for the progress/burndown feature and not for the bar/status charts. We know that this is a bit misleading and it’s planned to reconsider this (or maybe add an additional option that controls this).



Just an FYI, I’ve made updates to support TestRail 4.0 and you can find them on github.



Thanks, Ryan, that’s really appreciated!



I know this is an old thread, but rather than starting a new one, I thought I’d add on to this. I wonder if the link to the UI script is still valid with the latest version of TestRail. I’ve tried copying it, but I can’t get it to work. I changed where it has custom_1 to be System Name of the custom status- is that the right thing to do? Same with the other custom status numbers.

I could use some help on this as I don’t know how to write one from scratch. If I can push my lucky, I’d like to include two custom statuses as passed :wink:


Hello Andy,

Thanks for your feedback :slight_smile: I don’t think the UI script works anymore because it’s for an older TestRail version. Could you let me know what you are trying to accomplish? Happy to suggest the best possible implementation with the built-in features of TestRail.



Thanks Tobias!

I recently upgraded from 2.3 to the latest version and was happy to see the ability to add custom statuses. I created a few, including:

N/A: not ready by testing deadline and
N/A: test case not applicable

I’d like these two statuses to be part of the Passed %, so that when I reach 100%, I can close out the test run.

I know I can remove the not applicable from the test run, and essentially the same for the not ready ones. But I’m trying to limit the manual updates to the test run if my team uses one of the above statuses…

I’d even change the name to Pass- not applicable, or Pass- not ready.


Hello Andy,

Thanks for your feedback! Custom statuses currently do not contribute to the 100% but it’s planned to look into this and this is high our feature request list. I’m happy to add another vote to this feature request and I would currently recommend removing those cases from the case selection instead.



Hi Tobias

I am also interested in implementing an updated version of this UI Script.
I have used one of the custom statuses as our “Conditional Pass” status.
I would like for this to be included in the % Passed completion calculation

See below:

Do you have advice on how to do this or how to update the UI script to do it?

Many thanks


Bumping this thread. Please add my vote to this feature request: make it possible for a custom status to count towards passed %.

We have a custom status tagged as “Backlog”, and having it count towards the % would help us see remaining work on test runs.