diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-24 15:32:16 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-27 16:07:38 +0100 |
commit | f041aebb79ac063a86d5a48526addeb8988b8a80 (patch) | |
tree | f5abe8f7acb6d08ed05e3e1751e5af476a637264 /sonar-core/src | |
parent | ade384ed801f26543f63281d3e5d82e75f89eba1 (diff) | |
download | sonarqube-f041aebb79ac063a86d5a48526addeb8988b8a80.tar.gz sonarqube-f041aebb79ac063a86d5a48526addeb8988b8a80.zip |
Allow to set a default assignee on issues (2nd edition) - SONAR-6154
integrates my last 3 commits as the merge broke previous commit on branch-5.2
Diffstat (limited to 'sonar-core/src')
3 files changed, 17 insertions, 5 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 97977cd2162..dafff170cb8 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -60,6 +60,16 @@ public class CorePropertyDefinitions { .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL) .build(), + // ISSUES + PropertyDefinition.builder(CoreProperties.DEFAULT_ISSUE_ASSIGNEE) + .name("Default Assignee") + .description("Login assigned to a new issue if an assignee has not been found.") + .category(CoreProperties.CATEGORY_GENERAL) + .subCategory(CoreProperties.SUBCATEGORY_ISSUES) + .onQualifiers(Qualifiers.PROJECT) + .type(PropertyType.STRING) + .build(), + // BATCH PropertyDefinition.builder(CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY) @@ -153,7 +163,7 @@ public class CorePropertyDefinitions { .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS_EXCLUSIONS) .multiValues(true) .build() - )); + )); return defs; } } diff --git a/sonar-core/src/main/java/org/sonar/core/user/UserDao.java b/sonar-core/src/main/java/org/sonar/core/user/UserDao.java index 0cff129eb8a..97f7e6a26cd 100644 --- a/sonar-core/src/main/java/org/sonar/core/user/UserDao.java +++ b/sonar-core/src/main/java/org/sonar/core/user/UserDao.java @@ -68,20 +68,21 @@ public class UserDao implements BatchComponent, ServerComponent, DaoComponent { public UserDto selectActiveUserByLogin(String login) { DbSession session = mybatis.openSession(false); try { - return selectActiveUserByLogin(login, session); + return selectActiveUserByLogin(session, login); } finally { MyBatis.closeQuietly(session); } } - public UserDto selectActiveUserByLogin(String login, DbSession session) { + @CheckForNull + public UserDto selectActiveUserByLogin(DbSession session, String login) { UserMapper mapper = session.getMapper(UserMapper.class); return mapper.selectUserByLogin(login); } public List<UserDto> selectUsersByLogins(List<String> logins) { List<UserDto> users = Lists.newArrayList(); - SqlSession session = mybatis.openSession(false); + DbSession session = mybatis.openSession(false); try { users.addAll(selectUsersByLogins(session, logins)); } finally { @@ -90,7 +91,7 @@ public class UserDao implements BatchComponent, ServerComponent, DaoComponent { return users; } - public List<UserDto> selectUsersByLogins(SqlSession session, List<String> logins) { + public List<UserDto> selectUsersByLogins(DbSession session, List<String> logins) { List<UserDto> users = Lists.newArrayList(); if (!logins.isEmpty()) { UserMapper mapper = session.getMapper(UserMapper.class); diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 818f275957d..90cde500ab3 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -978,6 +978,7 @@ property.category.general.differentialViews=Differential Views property.category.general.localization=Localization property.category.general.databaseCleaner=Database Cleaner property.category.general.looknfeel=Look & Feel +property.category.general.issues=Issues property.category.security=Security property.category.security.encryption=Encryption property.category.java=Java |