From 5b77a83d5505ad20fd64c73042de347b92f55f3a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 20 Mar 2017 18:11:55 +0100 Subject: [PATCH] open comment box on issue transition --- server/sonar-web/src/main/js/components/issue/Issue.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/sonar-web/src/main/js/components/issue/Issue.js b/server/sonar-web/src/main/js/components/issue/Issue.js index 01c12f3b679..5717a060e3b 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.js +++ b/server/sonar-web/src/main/js/components/issue/Issue.js @@ -65,6 +65,12 @@ class Issue extends React.PureComponent { if (!prevProps.selected && this.props.selected) { this.bindShortcuts(); } + + // $FlowFixMe resolution doesn't exist in type `Model` + const { resolution } = this.props.issue; + if (!prevProps.issue.resolution && ['FALSE-POSITIVE', 'WONTFIX'].includes(resolution)) { + this.issueView.comment({ fromTransition: true }); + } } componentWillUnmount() { -- 2.39.5