Project import generated by Copybara.

GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/tracker/issueentryafterlogin.py b/tracker/issueentryafterlogin.py
new file mode 100644
index 0000000..d25a7c1
--- /dev/null
+++ b/tracker/issueentryafterlogin.py
@@ -0,0 +1,32 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+"""Redirect to /issues/entry or an external URL (like the wizard).
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import servlet
+from framework import servlet_helpers
+
+
+class IssueEntryAfterLogin(servlet.Servlet):
+  """Redirect after clicking "New issue" and logging in."""
+
+  # Note: This servlet does not use an HTML template.
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    if not mr.auth.user_id:
+      self.abort(400, 'Only signed-in users should reach this URL.')
+
+    with mr.profiler.Phase('getting config'):
+      config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    entry_page_url = servlet_helpers.ComputeIssueEntryURL(mr, config)
+    logging.info('Redirecting to %r', entry_page_url)
+    self.redirect(entry_page_url, abort=True)