refactor ticket report