[refactor] Made the methods for associating tickets and tasks with a commit idempotent (30m)