From: Stas Vilchik Date: Fri, 3 Feb 2017 15:30:09 +0000 (+0100) Subject: automatically select assignee checkbox when unassigning issues through bulk change X-Git-Tag: 6.3-RC1~217 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bbfdd41672461ad21b32bd5ec037d264d0db2d93;p=sonarqube.git automatically select assignee checkbox when unassigning issues through bulk change --- diff --git a/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js b/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js index eb075e26f58..f130a7bb8e3 100644 --- a/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js +++ b/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js @@ -29,6 +29,7 @@ import { translate, translateWithParameters } from '../../helpers/l10n'; const LIMIT = 500; const INPUT_WIDTH = '250px'; const MINIMUM_QUERY_LENGTH = 2; +const UNASSIGNED = ''; type Issue = { actions?: Array, @@ -82,7 +83,7 @@ export default ModalForm.extend({ defaultOptions.push({ id: currentUser.login, text: `${currentUser.name} (${currentUser.login})` }); } if (canBeUnassigned) { - defaultOptions.push({ id: '', text: translate('unassigned') }); + defaultOptions.push({ id: UNASSIGNED, text: translate('unassigned') }); } input.select2({ @@ -159,7 +160,7 @@ export default ModalForm.extend({ const assignee = this.$('#assignee').val(); if (this.$('#assign-action').is(':checked') && assignee != null) { - query['assign'] = assignee; + query['assign'] = assignee === UNASSIGNED ? '' : assignee; } const type = this.$('#type').val();