Rewrite issues/mr filtering logic