public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Tim Buck <tbuck@rrinc.com>
To: help-gnats@gnu.org
Subject: Patch to gnatsweb.pl to display the new PR #
Date: Wed, 23 Mar 2005 16:17:00 -0000	[thread overview]
Message-ID: <d677e491115dcae0298bdf414e3a4213@rrinc.com> (raw)

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

             reply	other threads:[~2005-03-23 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 16:17 Tim Buck [this message]
2005-03-23 17:15 Tim Buck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d677e491115dcae0298bdf414e3a4213@rrinc.com \
    --to=tbuck@rrinc.com \
    --cc=help-gnats@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).