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: https://github.com/rjbez17/testrail_custom_passed_status.
Here is a quick example from an view page:
Here is an example from an overview page: