From 73ccbbeada1c4c6b7fecc3cbf116f3f553d69394 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Tue, 28 May 2019 23:14:33 -0400 Subject: [PATCH] Bug 1376609 - Make needinfo field more visible when filing a new bug --- extensions/Needinfo/Extension.pm | 14 +++++++++++ .../en/default/bug/needinfo.html.tmpl | 2 +- .../create-after_custom_fields.html.tmpl | 24 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 extensions/Needinfo/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm index f9702a55f..4c41852df 100644 --- a/extensions/Needinfo/Extension.pm +++ b/extensions/Needinfo/Extension.pm @@ -69,6 +69,20 @@ sub install_before_final_checks { }); } +sub bug_end_of_create { + my ($self, $args) = @_; + my $params = Bugzilla->input_params; + + return unless $params->{needinfo_from}; + + # Add extra params + $params->{needinfo} = 1; + $params->{needinfo_role} = 'other'; + + # Do the rest + $self->bug_start_of_update($args); +} + # Clear the needinfo? flag if comment is being given by # requestee or someone used the override flag. sub bug_start_of_update { diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index 43e632e6c..dc03248bc 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -184,7 +184,7 @@ $(function() {