added compatibility to redmine 2.2; added tests