commentPlaceholder: ''
};
- componentDidUpdate(prevProps /*: Props */) {
- const { resolution } = this.props.issue;
- if (!prevProps.issue.resolution && ['FALSE-POSITIVE', 'WONTFIX'].includes(resolution)) {
- this.toggleComment(true, translate('issue.comment.tell_why'));
- }
- }
-
setIssueProperty = (
property /*: string */,
popup /*: string */,
this.props.togglePopup('comment', open);
};
+ handleTransition = (issue /*: Issue */) => {
+ this.props.onChange(issue);
+ if (['FALSE-POSITIVE', 'WONTFIX'].includes(issue.resolution)) {
+ this.toggleComment(true, translate('issue.comment.tell_why'));
+ }
+ };
+
render() {
const { issue } = this.props;
const canAssign = issue.actions.includes('assign');
isOpen={this.props.currentPopup === 'transition' && hasTransitions}
issue={issue}
hasTransitions={hasTransitions}
- onChange={this.props.onChange}
+ onChange={this.handleTransition}
onFail={this.props.onFail}
togglePopup={this.props.togglePopup}
/>