From: Kohei Yoshino Date: Mon, 12 Aug 2019 21:46:10 +0000 (-0400) Subject: Bug 1572945 - Cannot enter bug through Guided Bug Form if the product’s default platf... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17f1dfc2f15e6e31d30df76f325c14e23cfca156;p=thirdparty%2Fbugzilla.git Bug 1572945 - Cannot enter bug through Guided Bug Form if the product’s default platform is auto-detect --- diff --git a/extensions/GuidedBugEntry/web/js/guided.js b/extensions/GuidedBugEntry/web/js/guided.js index fd79f2602..b5127f786 100644 --- a/extensions/GuidedBugEntry/web/js/guided.js +++ b/extensions/GuidedBugEntry/web/js/guided.js @@ -724,10 +724,21 @@ var bugForm = { } bugForm.onVersionChange(elVersions.value); - // set default hw/os/group - Dom.get('rep_platform').value = product.details.default_platform; - Dom.get('op_sys').value = product.details.default_op_sys; - Dom.get('groups').value = product.details.default_security_group; + // Set default Platform, OS and Security Group + // Skip if the default value is empty = auto-detect + const { default_platform, default_op_sys, default_security_group } = product.details; + + if (default_platform) { + document.querySelector('#rep_platform').value = default_platform; + } + + if (default_op_sys) { + document.querySelector('#op_sys').value = default_op_sys; + } + + if (default_security_group) { + document.querySelector('#groups').value = default_security_group; + } }, onComponentChange: function(componentName) {