Return "final" historical status in step
SummaryIf a candidate was passed but then rejected in one step, we only want to return the final status of rejected.
We want to count how many candidates were in a certain step (historical) in total and then how many were passed or rejected (historical) in that step. The problem is that recruiters have "passed" a candidate and then later changed their status to "rejected" in that same step so they're being counted twice, once in the passed column and once in the rejected column. This causes the 'total' amount in a step to be less than the sum of 'rejected' and 'passed' which shouldn't happen (see table screenshot).