public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Patch to gnatsweb.pl to display the new PR #
@ 2005-03-23 17:15 Tim Buck
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Buck @ 2005-03-23 17:15 UTC (permalink / raw)
  To: help-gnats

Since GNATS now returns the newly-assigned PR number when a new PR
is filed, I've made some changes to our gnatsweb.pl to use this
information. This change will cause gnatsweb.pl to display a link to
the newly-created PR in the submitnewpr feedback message.

My revision numbers and line numbers are vastly different from
those in the official repository, because we have made so many
local revisions to gnatsweb -- my apologies for that.

RCS file: /cvs/root/systems/gnu/gnatsweb/gnatsweb.pl,v
retrieving revision 1.124
diff -u -p -r1.124 gnatsweb.pl
--- gnatsweb.pl 18 Mar 2005 15:11:02 -0000      1.124
+++ gnatsweb.pl 23 Mar 2005 14:49:01 -0000
@@ -1611,7 +1611,12 @@ EOT
    client_cmd("$text.");

    client_cmd ("subm");
-  client_cmd("$text.");
+  # Get returned new PR number
+  my $new_prnum = join(" ",client_cmd("$text.")) || '';
+  # Strip off extra space at the end
+  $new_prnum =~ s/([0-9]+).*/$1/;
+  # How about a URL pointing us to it?
+  my $new_pr_url = get_viewpr_url($new_prnum);

    my $return_url = $q->param('return_url') || get_script_name();
    my $refresh = 5;
@@ -1631,11 +1636,10 @@ EOT

    # Give feedback for success
    page_heading($page, 'Problem Report Sent');
-  print "<p>Thank you for your report.  It will take a short while for
-your report to be processed.  When it is, you will receive
-an automated message about it, containing the Problem Report
-number, and the developer who has been assigned to
-investigate the problem.</p>";
+  print "<p>Thank you for your report. It has been assigned
+<a href=\"$new_pr_url\">PR #$new_prnum</a>. You will receive an 
automated
+message about it, containing the Problem Report number, and the 
developer who
+has been assigned to investigate the problem.</p>\n";
  print "<p>You will be returned to <a href=\"$return_url\">your 
previous page</a>
  in $refresh seconds...</p>";


Tim Buck * Information Technology Manager * Recognition Research, Inc.
PHONE +1 540 961-6500 * FAX +1 540 961-3568 * EMAIL tbuck@rrinc.com
No one ever went broke underestimating the intelligence of the
American People -- P. T. Barnum




_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Patch to gnatsweb.pl to display the new PR #
@ 2005-03-23 16:17 Tim Buck
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Buck @ 2005-03-23 16:17 UTC (permalink / raw)
  To: help-gnats

Since GNATS now returns the newly-assigned PR number when a new PR
is filed, I've made some changes to our gnatsweb.pl to use this
information. This change will cause gnatsweb.pl to display a link to
the newly-created PR in the submitnewpr feedback message.

My revision numbers and line numbers are vastly different from
those in the official repository, because we have made so many
local revisions to gnatsweb -- my apologies for that.

RCS file: /cvs/root/systems/gnu/gnatsweb/gnatsweb.pl,v
retrieving revision 1.124
diff -u -p -r1.124 gnatsweb.pl
--- gnatsweb.pl 18 Mar 2005 15:11:02 -0000      1.124
+++ gnatsweb.pl 23 Mar 2005 14:49:01 -0000
@@ -1611,7 +1611,12 @@ EOT
    client_cmd("$text.");

    client_cmd ("subm");
-  client_cmd("$text.");
+  # Get returned new PR number
+  my $new_prnum = join(" ",client_cmd("$text.")) || '';
+  # Strip off extra space at the end
+  $new_prnum =~ s/([0-9]+).*/$1/;
+  # How about a URL pointing us to it?
+  my $new_pr_url = get_viewpr_url($new_prnum);

    my $return_url = $q->param('return_url') || get_script_name();
    my $refresh = 5;
@@ -1631,11 +1636,10 @@ EOT

    # Give feedback for success
    page_heading($page, 'Problem Report Sent');
-  print "<p>Thank you for your report.  It will take a short while for
-your report to be processed.  When it is, you will receive
-an automated message about it, containing the Problem Report
-number, and the developer who has been assigned to
-investigate the problem.</p>";
+  print "<p>Thank you for your report. It has been assigned
+<a href=\"$new_pr_url\">PR #$new_prnum</a>. You will receive an 
automated
+message about it, containing the Problem Report number, and the 
developer who
+has been assigned to investigate the problem.</p>\n";
  print "<p>You will be returned to <a href=\"$return_url\">your 
previous page</a>
  in $refresh seconds...</p>";


Tim Buck * Information Technology Manager * Recognition Research, Inc.
PHONE +1 540 961-6500 * FAX +1 540 961-3568 * EMAIL tbuck@rrinc.com
No one ever went broke underestimating the intelligence of the
American People -- P. T. Barnum




_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-23 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-23 17:15 Patch to gnatsweb.pl to display the new PR # Tim Buck
  -- strict thread matches above, loose matches on Subject: below --
2005-03-23 16:17 Tim Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).