From 36b2b7e2dd6359b58e77052bd2557d0107f1a9b0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Tue, 7 Oct 2014 16:23:35 +0200 Subject: [PATCH] SONAR-5575 Correctly send empty parameter values when modifying a custom rule --- .../views/coding-rules-custom-rule-creation-view.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.39.5