diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-10-07 16:23:35 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-10-09 09:40:44 +0200 |
commit | 36b2b7e2dd6359b58e77052bd2557d0107f1a9b0 (patch) | |
tree | e7e1b08514dd7830edbbf2b912a169eb9ee7dcc9 /server | |
parent | f58e7e8c41c3972ffeae189b5368d1d29d006de7 (diff) | |
download | sonarqube-36b2b7e2dd6359b58e77052bd2557d0107f1a9b0.tar.gz sonarqube-36b2b7e2dd6359b58e77052bd2557d0107f1a9b0.zip |
SONAR-5575 Correctly send empty parameter values when modifying a custom rule
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee index 810f4ccfd89..4728cb45e5b 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee @@ -68,7 +68,11 @@ define [ postData.prevent_reactivation = true params = @ui.customRuleCreationParameters.map(-> - key: jQuery(@).prop('name'), value: jQuery(@).val() || jQuery(@).prop('placeholder') || '').get() + node = jQuery(@) + value = node.val() + if !value and action == 'create' + value = node.prop('placeholder') || '' + key: node.prop('name'), value: value).get() postData.params = (params.map (param) -> param.key + '=' + param.value).join(';') @sendRequest(action, postData) |